diff options
author | 2021-05-09 14:06:06 +0200 | |
---|---|---|
committer | 2021-05-09 14:06:06 +0200 | |
commit | 3363e0ebdd2ad8bde458037b82432bc3dd93adde (patch) | |
tree | 3b105083f75aa47f3872b588403d9e5cf2f45d14 /internal/message/processor.go | |
parent | Letsencrypt (#17) (diff) | |
download | gotosocial-3363e0ebdd2ad8bde458037b82432bc3dd93adde.tar.xz |
add api/v1/instance info handler + instance model (#18)
Diffstat (limited to 'internal/message/processor.go')
-rw-r--r-- | internal/message/processor.go | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/internal/message/processor.go b/internal/message/processor.go index 2126c9597..0c0334e20 100644 --- a/internal/message/processor.go +++ b/internal/message/processor.go @@ -68,9 +68,20 @@ type Processor interface { // AccountUpdate processes the update of an account with the given form AccountUpdate(authed *oauth.Auth, form *apimodel.UpdateCredentialsRequest) (*apimodel.Account, error) + // AdminEmojiCreate handles the creation of a new instance emoji by an admin, using the given form. + AdminEmojiCreate(authed *oauth.Auth, form *apimodel.EmojiCreateRequest) (*apimodel.Emoji, error) + // AppCreate processes the creation of a new API application AppCreate(authed *oauth.Auth, form *apimodel.ApplicationCreateRequest) (*apimodel.Application, error) + // InstanceGet retrieves instance information for serving at api/v1/instance + InstanceGet(domain string) (*apimodel.Instance, ErrorWithCode) + + // MediaCreate handles the creation of a media attachment, using the given form. + MediaCreate(authed *oauth.Auth, form *apimodel.AttachmentRequest) (*apimodel.Attachment, error) + // MediaGet handles the fetching of a media attachment, using the given request form. + MediaGet(authed *oauth.Auth, form *apimodel.GetContentRequestForm) (*apimodel.Content, error) + // StatusCreate processes the given form to create a new status, returning the api model representation of that status if it's OK. StatusCreate(authed *oauth.Auth, form *apimodel.AdvancedStatusCreateForm) (*apimodel.Status, error) // StatusDelete processes the delete of a given status, returning the deleted status if the delete goes through. @@ -86,13 +97,6 @@ type Processor interface { // StatusUnfave processes the unfaving of a given status, returning the updated status if the fave goes through. StatusUnfave(authed *oauth.Auth, targetStatusID string) (*apimodel.Status, error) - // MediaCreate handles the creation of a media attachment, using the given form. - MediaCreate(authed *oauth.Auth, form *apimodel.AttachmentRequest) (*apimodel.Attachment, error) - // MediaGet handles the fetching of a media attachment, using the given request form. - MediaGet(authed *oauth.Auth, form *apimodel.GetContentRequestForm) (*apimodel.Content, error) - // AdminEmojiCreate handles the creation of a new instance emoji by an admin, using the given form. - AdminEmojiCreate(authed *oauth.Auth, form *apimodel.EmojiCreateRequest) (*apimodel.Emoji, error) - /* FEDERATION API-FACING PROCESSING FUNCTIONS These functions are intended to be called when the federating client needs an immediate (ie., synchronous) reply |