Documentation ¶
Overview ¶
Package server contains the microsub server itself. It implements http.Handler. It follows the spec at https://indieweb.org/Microsub-spec.
Index ¶
- Constants
- func NewMicrosubHandler(backend microsub.Microsub) (http.Handler, *sse.Broker)
- type NullBackend
- func (b *NullBackend) ChannelsCreate(ctx context.Context, name string) (microsub.Channel, error)
- func (b *NullBackend) ChannelsDelete(ctx context.Context, uid string) error
- func (b *NullBackend) ChannelsGetList(ctx context.Context) ([]microsub.Channel, error)
- func (b *NullBackend) ChannelsUpdate(ctx context.Context, uid, name string) (microsub.Channel, error)
- func (b *NullBackend) Events(ctx context.Context) (chan sse.Message, error)
- func (b *NullBackend) FollowGetList(ctx context.Context, uid string) ([]microsub.Feed, error)
- func (b *NullBackend) FollowURL(ctx context.Context, uid string, url string) (microsub.Feed, error)
- func (b *NullBackend) ItemSearch(ctx context.Context, channel, query string) ([]microsub.Item, error)
- func (b *NullBackend) MarkRead(ctx context.Context, channel string, uids []string) error
- func (b *NullBackend) PreviewURL(ctx context.Context, url string) (microsub.Timeline, error)
- func (b *NullBackend) Search(ctx context.Context, query string) ([]microsub.Feed, error)
- func (b *NullBackend) TimelineGet(ctx context.Context, before, after, channel string) (microsub.Timeline, error)
- func (b *NullBackend) UnfollowURL(ctx context.Context, uid string, url string) error
Constants ¶
View Source
const (
OutputContentType = "application/json; charset=utf-8"
)
Constants used for the responses
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NullBackend ¶
type NullBackend struct { }
NullBackend is the simplest possible backend
func (*NullBackend) ChannelsCreate ¶
ChannelsCreate creates no channels
func (*NullBackend) ChannelsDelete ¶
func (b *NullBackend) ChannelsDelete(ctx context.Context, uid string) error
ChannelsDelete delets no channels
func (*NullBackend) ChannelsGetList ¶
ChannelsGetList gets no channels
func (*NullBackend) ChannelsUpdate ¶
func (b *NullBackend) ChannelsUpdate(ctx context.Context, uid, name string) (microsub.Channel, error)
ChannelsUpdate updates no channels
func (*NullBackend) FollowGetList ¶
FollowGetList implements the follow list command
func (*NullBackend) ItemSearch ¶
func (b *NullBackend) ItemSearch(ctx context.Context, channel, query string) ([]microsub.Item, error)
ItemSearch returns a list of zero items
func (*NullBackend) PreviewURL ¶
PreviewURL shows an empty feed
func (*NullBackend) TimelineGet ¶
func (b *NullBackend) TimelineGet(ctx context.Context, before, after, channel string) (microsub.Timeline, error)
TimelineGet gets no timeline
func (*NullBackend) UnfollowURL ¶
UnfollowURL unfollows a url
Click to show internal directories.
Click to hide internal directories.