func NewComponent(dir, apiPattern string) Component { return Component{ BaseController: webfw.NewBaseController("/component/:name", webfw.MethodAll, ""), dir: dir, apiPattern: apiPattern, } }
func NewFeed(fm *readeef.FeedManager) Feed { return Feed{ webfw.NewBaseController("", webfw.MethodGet, ""), fm, } }
func NewArticle() Article { return Article{ webfw.NewBaseController("/v:version/article/:action/:feed-id/:article-id/:value", webfw.MethodAll, ""), } }
func NewApp() App { return App{ webfw.NewBaseController("/", webfw.MethodAll, ""), } }
func NewLogin(pattern string) Login { return Login{webfw.NewBaseController(pattern, webfw.MethodGet|webfw.MethodPost, "auth-login")} }
func NewAuth() Auth { return Auth{ webfw.NewBaseController("/v:version/auth", webfw.MethodAll, ""), } }
func NewHubbubController(h *Hubbub) HubbubController { return HubbubController{ webfw.NewBaseController(h.config.Hubbub.RelativePath+"/:feed-id", webfw.MethodGet|webfw.MethodPost, "hubbub-callback"), h} }
func NewUserSettings() UserSettings { return UserSettings{ webfw.NewBaseController("/v:version/user-settings/:attribute", webfw.MethodGet|webfw.MethodPost, ""), } }
func NewUser() User { return User{ webfw.NewBaseController("", webfw.MethodGet, ""), } }
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, } }