Documentation ¶
Index ¶
- type Processor
- func (p *Processor) AddToList(ctx context.Context, account *gtsmodel.Account, listID string, ...) gtserror.WithCode
- func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, title string, ...) (*apimodel.List, gtserror.WithCode)
- func (p *Processor) Delete(ctx context.Context, account *gtsmodel.Account, id string) gtserror.WithCode
- func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, id string) (*apimodel.List, gtserror.WithCode)
- func (p *Processor) GetAll(ctx context.Context, account *gtsmodel.Account) ([]*apimodel.List, gtserror.WithCode)
- func (p *Processor) GetListAccounts(ctx context.Context, account *gtsmodel.Account, listID string, ...) (*apimodel.PageableResponse, gtserror.WithCode)
- func (p *Processor) RemoveFromList(ctx context.Context, account *gtsmodel.Account, listID string, ...) gtserror.WithCode
- func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, id string, title *string, ...) (*apimodel.List, 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) AddToList ¶
func (p *Processor) AddToList(ctx context.Context, account *gtsmodel.Account, listID string, targetAccountIDs []string) gtserror.WithCode
AddToList adds targetAccountIDs to the given list, if valid.
func (*Processor) Create ¶
func (p *Processor) Create( ctx context.Context, account *gtsmodel.Account, title string, repliesPolicy gtsmodel.RepliesPolicy, exclusive bool, ) (*apimodel.List, gtserror.WithCode)
Create creates one a new list 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, id string) gtserror.WithCode
Delete deletes one list for the given account.
func (*Processor) Get ¶
func (p *Processor) Get(ctx context.Context, account *gtsmodel.Account, id string) (*apimodel.List, gtserror.WithCode)
Get returns the api model of one list with the given ID.
func (*Processor) GetAll ¶
func (p *Processor) GetAll(ctx context.Context, account *gtsmodel.Account) ([]*apimodel.List, gtserror.WithCode)
GetAll returns multiple lists created by the given account, sorted by list ID DESC (newest first).
func (*Processor) GetListAccounts ¶
func (p *Processor) GetListAccounts( ctx context.Context, account *gtsmodel.Account, listID string, page *paging.Page, ) (*apimodel.PageableResponse, gtserror.WithCode)
GetListAccounts returns accounts that are in the given list, owned by the given account. The additional parameters can be used for paging. Nil page param returns all accounts.
func (*Processor) RemoveFromList ¶
func (p *Processor) RemoveFromList( ctx context.Context, account *gtsmodel.Account, listID string, targetAccountIDs []string, ) gtserror.WithCode
RemoveFromList removes targetAccountIDs from the given list, if valid.
func (*Processor) Update ¶
func (p *Processor) Update( ctx context.Context, account *gtsmodel.Account, id string, title *string, repliesPolicy *gtsmodel.RepliesPolicy, exclusive *bool, ) (*apimodel.List, gtserror.WithCode)
Update updates one list for the given account, using the provided parameters. These params should have already been validated by the time they reach this function.