Documentation ¶
Index ¶
- type Processor
- func (p *Processor) Authorize(ctx context.Context, accessToken string) (*gtsmodel.Account, gtserror.WithCode)
- func (p *Processor) Delete(ctx context.Context, statusID string)
- func (p *Processor) FiltersChanged(ctx context.Context, account *gtsmodel.Account)
- func (p *Processor) Notify(ctx context.Context, account *gtsmodel.Account, notif *apimodel.Notification)
- func (p *Processor) Open(ctx context.Context, account *gtsmodel.Account, streamType string) (*stream.Stream, gtserror.WithCode)
- func (p *Processor) StatusUpdate(ctx context.Context, account *gtsmodel.Account, status *apimodel.Status, ...)
- func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, status *apimodel.Status, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func (*Processor) Authorize ¶
func (p *Processor) Authorize(ctx context.Context, accessToken string) (*gtsmodel.Account, gtserror.WithCode)
Authorize returns an oauth2 token info in response to an access token query from the streaming API
func (*Processor) FiltersChanged ¶ added in v0.16.0
FiltersChanged streams a filters changed event to any open, appropriate streams belonging to the given account. Filter changes have no payload.
func (*Processor) Notify ¶
func (p *Processor) Notify(ctx context.Context, account *gtsmodel.Account, notif *apimodel.Notification)
Notify streams the given notification to any open, appropriate streams belonging to the given account.
func (*Processor) Open ¶
func (p *Processor) Open(ctx context.Context, account *gtsmodel.Account, streamType string) (*stream.Stream, gtserror.WithCode)
Open returns a new Stream for the given account, which will contain a channel for passing messages back to the caller.
Click to show internal directories.
Click to hide internal directories.