push

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

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 New

func New(state *state.State, converter *typeutils.Converter) Processor

func (*Processor) CreateOrReplace

func (p *Processor) CreateOrReplace(
	ctx context.Context,
	accountID string,
	accessToken string,
	request *apimodel.WebPushSubscriptionCreateRequest,
) (*apimodel.WebPushSubscription, gtserror.WithCode)

CreateOrReplace creates a Web Push subscription for the given access token, or entirely replaces the previously existing subscription for that token.

func (*Processor) Delete

func (p *Processor) Delete(ctx context.Context, accessToken string) gtserror.WithCode

Delete deletes the Web Push subscription for the given access token, if there is one.

func (*Processor) Get

Get returns the Web Push subscription for the given access token.

func (*Processor) Update

Update updates the Web Push subscription for the given access token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL