Documentation ¶
Index ¶
- type Processor
- func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, ...) (*apimodel.FilterV1, gtserror.WithCode)
- func (p *Processor) Delete(ctx context.Context, account *gtsmodel.Account, filterKeywordID string) gtserror.WithCode
- func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, filterKeywordID string) (*apimodel.FilterV1, gtserror.WithCode)
- func (p *Processor) GetAll(ctx context.Context, account *gtsmodel.Account) ([]*apimodel.FilterV1, gtserror.WithCode)
- func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, filterKeywordID string, ...) (*apimodel.FilterV1, gtserror.WithCode)
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) Create ¶
func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.FilterCreateUpdateRequestV1) (*apimodel.FilterV1, gtserror.WithCode)
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.
Click to show internal directories.
Click to hide internal directories.