Beispiel #1
0
func NewComponent(dispatcher *webfw.Dispatcher, apiPattern string) Component {
	return Component{
		BasePatternController: webfw.NewBasePatternController("/component/:name", webfw.MethodAll, ""),
		dispatcher:            dispatcher,
		apiPattern:            apiPattern,
	}
}
Beispiel #2
0
func NewWebSocket(fm *readeef.FeedManager, si readeef.SearchIndex) WebSocket {
	return WebSocket{
		BasePatternController: webfw.NewBasePatternController("/v:version/", webfw.MethodGet, ""),
		fm:         fm,
		si:         si,
		updateFeed: make(chan content.Feed),
	}
}
Beispiel #3
0
func NewHubbubController(h *readeef.Hubbub, relativePath string,
	addFeed chan<- content.Feed, removeFeed chan<- content.Feed) HubbubController {

	return HubbubController{
		BasePatternController: webfw.NewBasePatternController(
			"/v:version"+relativePath+"/:feed-id",
			webfw.MethodGet|webfw.MethodPost, "hubbub-callback",
		),
		hubbub: h, addFeed: addFeed, removeFeed: removeFeed}
}
Beispiel #4
0
func NewWebSocket(fm *readeef.FeedManager, sp content.SearchProvider,
	extractor content.Extractor, capabilities capabilities) WebSocket {
	return WebSocket{
		BasePatternController: webfw.NewBasePatternController("/v:version/", webfw.MethodGet, ""),
		fm:           fm,
		sp:           sp,
		extractor:    extractor,
		capabilities: capabilities,
		updateFeed:   make(chan content.Feed),
	}
}
Beispiel #5
0
func NewHubbubController(h *Hubbub) HubbubController {
	return HubbubController{
		webfw.NewBasePatternController(h.config.Hubbub.RelativePath+"/:feed-id", webfw.MethodGet|webfw.MethodPost, "hubbub-callback"),
		h}
}
Beispiel #6
0
func NewLogin(pattern string) Login {
	return Login{webfw.NewBasePatternController(pattern, webfw.MethodGet|webfw.MethodPost, "auth-login")}
}
Beispiel #7
0
func NewProxy() Proxy {
	return Proxy{
		BasePatternController: webfw.NewBasePatternController("/proxy", webfw.MethodGet, ""),
	}
}
Beispiel #8
0
func NewSearch(searchIndex readeef.SearchIndex) Search {
	return Search{
		webfw.NewBasePatternController("/v:version/search/:query", webfw.MethodGet, ""),
		searchIndex,
	}
}
Beispiel #9
0
func NewUserSettings() UserSettings {
	return UserSettings{
		webfw.NewBasePatternController("/v:version/user-settings/:attribute", webfw.MethodGet|webfw.MethodPost, ""),
	}
}
Beispiel #10
0
func NewAuth() Auth {
	return Auth{
		webfw.NewBasePatternController("/v:version/auth", webfw.MethodAll, ""),
	}
}
Beispiel #11
0
func NewNonce(nonce *readeef.Nonce) Nonce {
	return Nonce{
		webfw.NewBasePatternController("/v:version/nonce", webfw.MethodAll, ""),
		nonce,
	}
}
Beispiel #12
0
func NewFever() Fever {
	return Fever{
		BasePatternController: webfw.NewBasePatternController(
			fmt.Sprintf("/v%d/fever/", FEVER_API_VERSION), webfw.MethodPost, ""),
	}
}