v1

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: AGPL-3.0 Imports: 15 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) Create

Create a new filter and filter keyword for the given account, using the provided parameters. These params should have already been validated by the time they reach this function.

func (*Processor) Delete

func (p *Processor) Delete(
	ctx context.Context,
	account *gtsmodel.Account,
	filterKeywordID string,
) gtserror.WithCode

Delete an existing filter keyword and (if empty afterwards) filter for the given account.

func (*Processor) Get

func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, filterKeywordID string) (*apimodel.FilterV1, gtserror.WithCode)

Get looks up a filter keyword by ID and returns it as a v1 filter.

func (*Processor) GetAll

func (p *Processor) GetAll(ctx context.Context, account *gtsmodel.Account) ([]*apimodel.FilterV1, gtserror.WithCode)

GetAll looks up all filter keywords for the current account and returns them as v1 filters.

func (*Processor) Update

func (p *Processor) Update(
	ctx context.Context,
	account *gtsmodel.Account,
	filterKeywordID string,
	form *apimodel.FilterCreateUpdateRequestV1,
) (*apimodel.FilterV1, gtserror.WithCode)

Update an existing filter and filter keyword for the given account, using the provided parameters. These params should have already been validated by the time they reach this function.

Jump to

Keyboard shortcuts

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