Documentation ¶
Index ¶
- type Processor
- func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, ...) (*apimodel.FilterV2, gtserror.WithCode)
- func (p *Processor) Delete(ctx context.Context, account *gtsmodel.Account, filterID string) gtserror.WithCode
- func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, filterID string) (*apimodel.FilterV2, gtserror.WithCode)
- func (p *Processor) GetAll(ctx context.Context, account *gtsmodel.Account) ([]*apimodel.FilterV2, gtserror.WithCode)
- func (p *Processor) KeywordCreate(ctx context.Context, account *gtsmodel.Account, filterID string, ...) (*apimodel.FilterKeyword, gtserror.WithCode)
- func (p *Processor) KeywordDelete(ctx context.Context, account *gtsmodel.Account, filterID string) gtserror.WithCode
- func (p *Processor) KeywordGet(ctx context.Context, account *gtsmodel.Account, filterKeywordID string) (*apimodel.FilterKeyword, gtserror.WithCode)
- func (p *Processor) KeywordUpdate(ctx context.Context, account *gtsmodel.Account, filterKeywordID string, ...) (*apimodel.FilterKeyword, gtserror.WithCode)
- func (p *Processor) KeywordsGetForFilterID(ctx context.Context, account *gtsmodel.Account, filterID string) ([]*apimodel.FilterKeyword, gtserror.WithCode)
- func (p *Processor) StatusCreate(ctx context.Context, account *gtsmodel.Account, filterID string, ...) (*apimodel.FilterStatus, gtserror.WithCode)
- func (p *Processor) StatusDelete(ctx context.Context, account *gtsmodel.Account, filterID string) gtserror.WithCode
- func (p *Processor) StatusGet(ctx context.Context, account *gtsmodel.Account, filterStatusID string) (*apimodel.FilterStatus, gtserror.WithCode)
- func (p *Processor) StatusesGetForFilterID(ctx context.Context, account *gtsmodel.Account, filterID string) ([]*apimodel.FilterStatus, gtserror.WithCode)
- func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, filterID string, ...) (*apimodel.FilterV2, 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.FilterCreateRequestV2) (*apimodel.FilterV2, gtserror.WithCode)
Create a new filter 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, filterID string, ) gtserror.WithCode
Delete an existing filter and all its attached keywords and statuses for the given account.
func (*Processor) Get ¶
func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, filterID string) (*apimodel.FilterV2, gtserror.WithCode)
Get looks up a filter by ID and returns it with keywords and statuses.
func (*Processor) GetAll ¶
func (p *Processor) GetAll(ctx context.Context, account *gtsmodel.Account) ([]*apimodel.FilterV2, gtserror.WithCode)
GetAll looks up all filters for the current account and returns them with keywords and statuses.
func (*Processor) KeywordCreate ¶
func (p *Processor) KeywordCreate(ctx context.Context, account *gtsmodel.Account, filterID string, form *apimodel.FilterKeywordCreateUpdateRequest) (*apimodel.FilterKeyword, gtserror.WithCode)
KeywordCreate adds a filter keyword to an existing filter for the given account, using the provided parameters. These params should have already been normalized and validated by the time they reach this function.
func (*Processor) KeywordDelete ¶
func (p *Processor) KeywordDelete( ctx context.Context, account *gtsmodel.Account, filterID string, ) gtserror.WithCode
KeywordDelete deletes an existing filter keyword from a filter.
func (*Processor) KeywordGet ¶
func (p *Processor) KeywordGet(ctx context.Context, account *gtsmodel.Account, filterKeywordID string) (*apimodel.FilterKeyword, gtserror.WithCode)
KeywordGet looks up a filter keyword by ID.
func (*Processor) KeywordUpdate ¶
func (p *Processor) KeywordUpdate( ctx context.Context, account *gtsmodel.Account, filterKeywordID string, form *apimodel.FilterKeywordCreateUpdateRequest, ) (*apimodel.FilterKeyword, gtserror.WithCode)
KeywordUpdate updates an existing 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) KeywordsGetForFilterID ¶
func (p *Processor) KeywordsGetForFilterID(ctx context.Context, account *gtsmodel.Account, filterID string) ([]*apimodel.FilterKeyword, gtserror.WithCode)
KeywordsGetForFilterID looks up all filter keywords for the given filter.
func (*Processor) StatusCreate ¶
func (p *Processor) StatusCreate(ctx context.Context, account *gtsmodel.Account, filterID string, form *apimodel.FilterStatusCreateRequest) (*apimodel.FilterStatus, gtserror.WithCode)
StatusCreate adds a filter status to an existing filter for the given account, using the provided parameters. These params should have already been validated by the time they reach this function.
func (*Processor) StatusDelete ¶
func (p *Processor) StatusDelete( ctx context.Context, account *gtsmodel.Account, filterID string, ) gtserror.WithCode
StatusDelete deletes an existing filter status from a filter.
func (*Processor) StatusGet ¶
func (p *Processor) StatusGet(ctx context.Context, account *gtsmodel.Account, filterStatusID string) (*apimodel.FilterStatus, gtserror.WithCode)
StatusGet looks up a filter status by ID.
func (*Processor) StatusesGetForFilterID ¶
func (p *Processor) StatusesGetForFilterID(ctx context.Context, account *gtsmodel.Account, filterID string) ([]*apimodel.FilterStatus, gtserror.WithCode)
StatusesGetForFilterID looks up all filter statuses for the given filter.
func (*Processor) Update ¶
func (p *Processor) Update( ctx context.Context, account *gtsmodel.Account, filterID string, form *apimodel.FilterUpdateRequestV2, ) (*apimodel.FilterV2, gtserror.WithCode)
Update an existing filter for the given account, using the provided parameters. These params should have already been validated by the time they reach this function.