Documentation
¶
Overview ¶
Package webapi answers the JSON endpoints a page calls back to.
Index ¶
Constants ¶
const ( RatingsPath = "/pw-api/ratings" LikedPostsPath = "/pw-api/liked-posts" MyTicketsPath = "/pw-api/my-tickets" MyTicketPrefix = MyTicketsPath + "/" )
const ( NotificationsPath = "/pw-api/notifications" NotificationsMutePath = "/pw-api/notifications/mute" )
const ( UsersPath = "/pw-api/users" UsersPrefix = "/pw-api/users/" )
const ( ModulesPath = "/pw-api/modules" PreviewPath = "/pw-api/preview" )
const AdminPrefix = "/pw-api/admin/"
const AllArticlesPath = "/pw-api/articles"
const ArticlesPrefix = "/pw-api/articles/"
const CreatePath = ArticlesPrefix + "new"
const FavouritesPath = "/pw-api/favourites"
const FeedPath = listpages.FeedPath
const FilesPrefix = "/pw-api/files/"
const MessagesPrefix = "/pw-api/messages/"
const SubscribePath = "/pw-api/notifications/subscribe"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllArticles ¶
type AllArticles struct {
// contains filtered or unexported fields
}
func NewAllArticles ¶
func NewAllArticles(d Deps, next http.Handler) *AllArticles
func (*AllArticles) ServeHTTP ¶
func (h *AllArticles) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Favourites ¶
type Favourites struct {
// contains filtered or unexported fields
}
func NewFavourites ¶
func NewFavourites(d Deps, next http.Handler) *Favourites
func (*Favourites) ServeHTTP ¶
func (h *Favourites) ServeHTTP(w http.ResponseWriter, r *http.Request)
A reader only ever gets and changes their own rows. Nothing in the request names a user, so there is nothing to authorise beyond being signed in.
type FileItems ¶
type FileItems struct {
// contains filtered or unexported fields
}
A file's own path carries no page name, so it reaches the same handlers through an entry point of its own.
type Notifications ¶
type Notifications struct {
// contains filtered or unexported fields
}
func NewNotifications ¶
func NewNotifications(d Deps, next http.Handler) *Notifications
func (*Notifications) ServeHTTP ¶
func (h *Notifications) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
func NewSubscriptions ¶
func NewSubscriptions(d Deps, next http.Handler) *Subscriptions
func (*Subscriptions) ServeHTTP ¶
func (h *Subscriptions) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files
¶
- admin.go
- allarticles.go
- articles.go
- content_reports.go
- create.go
- delete.go
- deletion_notice.go
- favourites.go
- feed.go
- fetch.go
- files.go
- form.go
- invite.go
- log.go
- messages.go
- mypages.go
- notifications.go
- notify.go
- preview.go
- reports.go
- required_tags.go
- revert.go
- revert_apply.go
- sitelinks.go
- subscribe.go
- update.go
- users.go
- webapi.go