示例#1
0
func NewComponent(dir, apiPattern string) Component {
	return Component{
		BaseController: webfw.NewBaseController("/component/:name", webfw.MethodAll, ""),
		dir:            dir,
		apiPattern:     apiPattern,
	}
}
示例#2
0
func NewFeed(fm *readeef.FeedManager) Feed {
	return Feed{
		webfw.NewBaseController("", webfw.MethodGet, ""),
		fm,
	}
}
示例#3
0
func NewArticle() Article {
	return Article{
		webfw.NewBaseController("/v:version/article/:action/:feed-id/:article-id/:value", webfw.MethodAll, ""),
	}
}
示例#4
0
func NewApp() App {
	return App{
		webfw.NewBaseController("/", webfw.MethodAll, ""),
	}
}
示例#5
0
func NewLogin(pattern string) Login {
	return Login{webfw.NewBaseController(pattern, webfw.MethodGet|webfw.MethodPost, "auth-login")}
}
示例#6
0
func NewAuth() Auth {
	return Auth{
		webfw.NewBaseController("/v:version/auth", webfw.MethodAll, ""),
	}
}
示例#7
0
func NewHubbubController(h *Hubbub) HubbubController {
	return HubbubController{
		webfw.NewBaseController(h.config.Hubbub.RelativePath+"/:feed-id", webfw.MethodGet|webfw.MethodPost, "hubbub-callback"),
		h}
}
示例#8
0
func NewUserSettings() UserSettings {
	return UserSettings{
		webfw.NewBaseController("/v:version/user-settings/:attribute", webfw.MethodGet|webfw.MethodPost, ""),
	}
}
示例#9
0
func NewUser() User {
	return User{
		webfw.NewBaseController("", webfw.MethodGet, ""),
	}
}
示例#10
0
func NewNonce(nonce *readeef.Nonce) Nonce {
	return Nonce{
		webfw.NewBaseController("/v:version/nonce", webfw.MethodAll, ""),
		nonce,
	}
}
func NewFeedUpdateNotificator(updateFeed <-chan readeef.Feed) FeedUpdateNotificator {
	return FeedUpdateNotificator{
		BaseController: webfw.NewBaseController("/v:version/feed-update-notifier", webfw.MethodGet, ""),
		updateFeed:     updateFeed,
	}
}