Documentation ¶
Index ¶
- type Processor
- func (p *Processor) AccountAction(ctx context.Context, account *gtsmodel.Account, ...) gtserror.WithCode
- func (p *Processor) DomainBlockCreate(ctx context.Context, account *gtsmodel.Account, domain string, obfuscate bool, ...) (*apimodel.DomainBlock, gtserror.WithCode)
- func (p *Processor) DomainBlockDelete(ctx context.Context, account *gtsmodel.Account, id string) (*apimodel.DomainBlock, gtserror.WithCode)
- func (p *Processor) DomainBlockGet(ctx context.Context, account *gtsmodel.Account, id string, export bool) (*apimodel.DomainBlock, gtserror.WithCode)
- func (p *Processor) DomainBlocksGet(ctx context.Context, account *gtsmodel.Account, export bool) ([]*apimodel.DomainBlock, gtserror.WithCode)
- func (p *Processor) DomainBlocksImport(ctx context.Context, account *gtsmodel.Account, domains *multipart.FileHeader) ([]*apimodel.DomainBlock, gtserror.WithCode)
- func (p *Processor) EmailTest(ctx context.Context, account *gtsmodel.Account, toAddress string) gtserror.WithCode
- func (p *Processor) EmojiCategoriesGet(ctx context.Context) ([]*apimodel.EmojiCategory, gtserror.WithCode)
- func (p *Processor) EmojiCreate(ctx context.Context, account *gtsmodel.Account, user *gtsmodel.User, ...) (*apimodel.Emoji, gtserror.WithCode)
- func (p *Processor) EmojiDelete(ctx context.Context, id string) (*apimodel.AdminEmoji, gtserror.WithCode)
- func (p *Processor) EmojiGet(ctx context.Context, account *gtsmodel.Account, user *gtsmodel.User, id string) (*apimodel.AdminEmoji, gtserror.WithCode)
- func (p *Processor) EmojiUpdate(ctx context.Context, id string, form *apimodel.EmojiUpdateRequest) (*apimodel.AdminEmoji, gtserror.WithCode)
- func (p *Processor) EmojisGet(ctx context.Context, account *gtsmodel.Account, user *gtsmodel.User, ...) (*apimodel.PageableResponse, gtserror.WithCode)
- func (p *Processor) MediaPrune(ctx context.Context, mediaRemoteCacheDays int) gtserror.WithCode
- func (p *Processor) MediaRefetch(ctx context.Context, requestingAccount *gtsmodel.Account, domain string) gtserror.WithCode
- func (p *Processor) ReportGet(ctx context.Context, account *gtsmodel.Account, id string) (*apimodel.AdminReport, gtserror.WithCode)
- func (p *Processor) ReportResolve(ctx context.Context, account *gtsmodel.Account, id string, ...) (*apimodel.AdminReport, gtserror.WithCode)
- func (p *Processor) ReportsGet(ctx context.Context, account *gtsmodel.Account, resolved *bool, ...) (*apimodel.PageableResponse, 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 New ¶
func New(state *state.State, tc typeutils.TypeConverter, mediaManager media.Manager, transportController transport.Controller, emailSender email.Sender) Processor
New returns a new admin processor.
func (*Processor) AccountAction ¶ added in v0.2.2
func (*Processor) DomainBlockCreate ¶
func (*Processor) DomainBlockDelete ¶
func (p *Processor) DomainBlockDelete(ctx context.Context, account *gtsmodel.Account, id string) (*apimodel.DomainBlock, gtserror.WithCode)
DomainBlockDelete removes one domain block with the given ID.
func (*Processor) DomainBlockGet ¶
func (p *Processor) DomainBlockGet(ctx context.Context, account *gtsmodel.Account, id string, export bool) (*apimodel.DomainBlock, gtserror.WithCode)
DomainBlockGet returns one domain block with the given id. If export is true, the format will be suitable for writing out to an export.
func (*Processor) DomainBlocksGet ¶
func (p *Processor) DomainBlocksGet(ctx context.Context, account *gtsmodel.Account, export bool) ([]*apimodel.DomainBlock, gtserror.WithCode)
DomainBlocksGet returns all existing domain blocks. If export is true, the format will be suitable for writing out to an export.
func (*Processor) DomainBlocksImport ¶
func (p *Processor) DomainBlocksImport(ctx context.Context, account *gtsmodel.Account, domains *multipart.FileHeader) ([]*apimodel.DomainBlock, gtserror.WithCode)
DomainBlocksImport handles the import of a bunch of domain blocks at once, by calling the DomainBlockCreate function for each domain in the provided file.
func (*Processor) EmailTest ¶ added in v0.8.0
func (p *Processor) EmailTest(ctx context.Context, account *gtsmodel.Account, toAddress string) gtserror.WithCode
EmailTest sends a generic test email to the given toAddress (which should be a valid email address). To help callers differentiate between proper errors and the smtp errors they're likely fishing for, will return 422 + help text on an SMTP error, or error 500 otherwise.
func (*Processor) EmojiCategoriesGet ¶ added in v0.6.0
func (p *Processor) EmojiCategoriesGet(ctx context.Context) ([]*apimodel.EmojiCategory, gtserror.WithCode)
EmojiCategoriesGet returns all custom emoji categories that exist on this instance.
func (*Processor) EmojiCreate ¶
func (p *Processor) EmojiCreate(ctx context.Context, account *gtsmodel.Account, user *gtsmodel.User, form *apimodel.EmojiCreateRequest) (*apimodel.Emoji, gtserror.WithCode)
EmojiCreate creates a custom emoji on this instance.
func (*Processor) EmojiDelete ¶ added in v0.6.0
func (p *Processor) EmojiDelete(ctx context.Context, id string) (*apimodel.AdminEmoji, gtserror.WithCode)
EmojiDelete deletes one emoji from the database, with the given id.
func (*Processor) EmojiGet ¶ added in v0.6.0
func (p *Processor) EmojiGet(ctx context.Context, account *gtsmodel.Account, user *gtsmodel.User, id string) (*apimodel.AdminEmoji, gtserror.WithCode)
EmojiGet returns the admin view of one custom emoji with the given id.
func (*Processor) EmojiUpdate ¶ added in v0.6.0
func (p *Processor) EmojiUpdate(ctx context.Context, id string, form *apimodel.EmojiUpdateRequest) (*apimodel.AdminEmoji, gtserror.WithCode)
EmojiUpdate updates one emoji with the given id, using the provided form parameters.
func (*Processor) EmojisGet ¶ added in v0.6.0
func (p *Processor) EmojisGet( ctx context.Context, account *gtsmodel.Account, user *gtsmodel.User, domain string, includeDisabled bool, includeEnabled bool, shortcode string, maxShortcodeDomain string, minShortcodeDomain string, limit int, ) (*apimodel.PageableResponse, gtserror.WithCode)
EmojisGet returns an admin view of custom emojis, filtered with the given parameters.
func (*Processor) MediaPrune ¶ added in v0.3.4
MediaPrune triggers a non-blocking prune of remote media, local unused media, etc.
func (*Processor) MediaRefetch ¶ added in v0.7.0
func (p *Processor) MediaRefetch(ctx context.Context, requestingAccount *gtsmodel.Account, domain string) gtserror.WithCode
MediaRefetch forces a refetch of remote emojis.
func (*Processor) ReportGet ¶ added in v0.7.0
func (p *Processor) ReportGet(ctx context.Context, account *gtsmodel.Account, id string) (*apimodel.AdminReport, gtserror.WithCode)
ReportGet returns one report, with the given ID.
func (*Processor) ReportResolve ¶ added in v0.7.0
func (p *Processor) ReportResolve(ctx context.Context, account *gtsmodel.Account, id string, actionTakenComment *string) (*apimodel.AdminReport, gtserror.WithCode)
ReportResolve marks a report with the given id as resolved, and stores the provided actionTakenComment (if not null). If the report creator is from this instance, an email will be sent to them to let them know that the report is resolved.
func (*Processor) ReportsGet ¶ added in v0.7.0
func (p *Processor) ReportsGet( ctx context.Context, account *gtsmodel.Account, resolved *bool, accountID string, targetAccountID string, maxID string, sinceID string, minID string, limit int, ) (*apimodel.PageableResponse, gtserror.WithCode)
ReportsGet returns all reports stored on this instance, with the given parameters.