Documentation
¶
Index ¶
- type Apps
- func (srv *Apps) Create(AppId string, Name string, RedirectUris []string, ...) (*models.App, error)
- func (srv *Apps) CreateInstallationToken(AppId string, InstallationId string) (*models.Oauth2Token, error)
- func (srv *Apps) CreateKey(AppId string) (*models.AppKey, error)
- func (srv *Apps) CreateSecret(AppId string) (*models.AppSecretPlaintext, error)
- func (srv *Apps) Delete(AppId string) (*interface{}, error)
- func (srv *Apps) DeleteInstallation(AppId string, InstallationId string) (*interface{}, error)
- func (srv *Apps) DeleteKey(AppId string, KeyId string) (*interface{}, error)
- func (srv *Apps) DeleteSecret(AppId string, SecretId string) (*interface{}, error)
- func (srv *Apps) DeleteTokens(AppId string) (*interface{}, error)
- func (srv *Apps) Get(AppId string) (*models.App, error)
- func (srv *Apps) GetInstallation(AppId string, InstallationId string) (*models.AppInstallation, error)
- func (srv *Apps) GetKey(AppId string, KeyId string) (*models.AppKey, error)
- func (srv *Apps) GetSecret(AppId string, SecretId string) (*models.AppSecret, error)
- func (srv *Apps) List(optionalSetters ...ListOption) (*models.AppsList, error)
- func (srv *Apps) ListInstallationScopes() (*models.AppScopeList, error)
- func (srv *Apps) ListInstallations(AppId string, optionalSetters ...ListInstallationsOption) (*models.AppInstallationList, error)
- func (srv *Apps) ListKeys(AppId string, optionalSetters ...ListKeysOption) (*models.AppKeyList, error)
- func (srv *Apps) ListOAuth2Scopes() (*models.AppScopeList, error)
- func (srv *Apps) ListSecrets(AppId string, optionalSetters ...ListSecretsOption) (*models.AppSecretList, error)
- func (srv *Apps) Update(AppId string, Name string, optionalSetters ...UpdateOption) (*models.App, error)
- func (srv *Apps) UpdateLabels(AppId string, Labels []string) (*models.App, error)
- func (srv *Apps) UpdateTeam(AppId string, TeamId string) (*models.App, error)
- func (srv *Apps) WithCreateClientUri(v string) CreateOption
- func (srv *Apps) WithCreateContacts(v []string) CreateOption
- func (srv *Apps) WithCreateDataDeletionUrl(v string) CreateOption
- func (srv *Apps) WithCreateDescription(v string) CreateOption
- func (srv *Apps) WithCreateDeviceFlow(v bool) CreateOption
- func (srv *Apps) WithCreateEnabled(v bool) CreateOption
- func (srv *Apps) WithCreateImages(v []string) CreateOption
- func (srv *Apps) WithCreateLogoUri(v string) CreateOption
- func (srv *Apps) WithCreatePostLogoutRedirectUris(v []string) CreateOption
- func (srv *Apps) WithCreatePrivacyPolicyUrl(v string) CreateOption
- func (srv *Apps) WithCreateSupportUrl(v string) CreateOption
- func (srv *Apps) WithCreateTagline(v string) CreateOption
- func (srv *Apps) WithCreateTags(v []string) CreateOption
- func (srv *Apps) WithCreateTeamId(v string) CreateOption
- func (srv *Apps) WithCreateTermsUrl(v string) CreateOption
- func (srv *Apps) WithCreateType(v string) CreateOption
- func (srv *Apps) WithListInstallationsQueries(v []string) ListInstallationsOption
- func (srv *Apps) WithListInstallationsTotal(v bool) ListInstallationsOption
- func (srv *Apps) WithListKeysQueries(v []string) ListKeysOption
- func (srv *Apps) WithListKeysTotal(v bool) ListKeysOption
- func (srv *Apps) WithListQueries(v []string) ListOption
- func (srv *Apps) WithListSecretsQueries(v []string) ListSecretsOption
- func (srv *Apps) WithListSecretsTotal(v bool) ListSecretsOption
- func (srv *Apps) WithListTotal(v bool) ListOption
- func (srv *Apps) WithUpdateClientUri(v string) UpdateOption
- func (srv *Apps) WithUpdateContacts(v []string) UpdateOption
- func (srv *Apps) WithUpdateDataDeletionUrl(v string) UpdateOption
- func (srv *Apps) WithUpdateDescription(v string) UpdateOption
- func (srv *Apps) WithUpdateDeviceFlow(v bool) UpdateOption
- func (srv *Apps) WithUpdateEnabled(v bool) UpdateOption
- func (srv *Apps) WithUpdateImages(v []string) UpdateOption
- func (srv *Apps) WithUpdateInstallationRedirectUrl(v string) UpdateOption
- func (srv *Apps) WithUpdateInstallationScopes(v []string) UpdateOption
- func (srv *Apps) WithUpdateLogoUri(v string) UpdateOption
- func (srv *Apps) WithUpdatePostLogoutRedirectUris(v []string) UpdateOption
- func (srv *Apps) WithUpdatePrivacyPolicyUrl(v string) UpdateOption
- func (srv *Apps) WithUpdateRedirectUris(v []string) UpdateOption
- func (srv *Apps) WithUpdateSupportUrl(v string) UpdateOption
- func (srv *Apps) WithUpdateTagline(v string) UpdateOption
- func (srv *Apps) WithUpdateTags(v []string) UpdateOption
- func (srv *Apps) WithUpdateTermsUrl(v string) UpdateOption
- func (srv *Apps) WithUpdateType(v string) UpdateOption
- type CreateOption
- type CreateOptions
- type ListInstallationsOption
- type ListInstallationsOptions
- type ListKeysOption
- type ListKeysOptions
- type ListOption
- type ListOptions
- type ListSecretsOption
- type ListSecretsOptions
- type UpdateOption
- type UpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Apps ¶
type Apps struct {
// contains filtered or unexported fields
}
Apps service
func (*Apps) Create ¶
func (srv *Apps) Create(AppId string, Name string, RedirectUris []string, optionalSetters ...CreateOption) (*models.App, error)
Create create a new application.
func (*Apps) CreateInstallationToken ¶
func (srv *Apps) CreateInstallationToken(AppId string, InstallationId string) (*models.Oauth2Token, error)
CreateInstallationToken create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.
func (*Apps) CreateKey ¶
CreateKey create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.
func (*Apps) CreateSecret ¶
func (srv *Apps) CreateSecret(AppId string) (*models.AppSecretPlaintext, error)
CreateSecret create a new client secret for an application.
func (*Apps) DeleteInstallation ¶
DeleteInstallation delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked.
func (*Apps) DeleteSecret ¶
DeleteSecret delete an application client secret by its unique ID.
func (*Apps) DeleteTokens ¶
DeleteTokens revoke all tokens for an application by its unique ID.
func (*Apps) GetInstallation ¶
func (srv *Apps) GetInstallation(AppId string, InstallationId string) (*models.AppInstallation, error)
GetInstallation get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.
func (*Apps) List ¶
func (srv *Apps) List(optionalSetters ...ListOption) (*models.AppsList, error)
List list applications.
func (*Apps) ListInstallationScopes ¶
func (srv *Apps) ListInstallationScopes() (*models.AppScopeList, error)
ListInstallationScopes list scopes an application can request when installed on a team.
func (*Apps) ListInstallations ¶
func (srv *Apps) ListInstallations(AppId string, optionalSetters ...ListInstallationsOption) (*models.AppInstallationList, error)
ListInstallations list installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.
func (*Apps) ListKeys ¶
func (srv *Apps) ListKeys(AppId string, optionalSetters ...ListKeysOption) (*models.AppKeyList, error)
ListKeys list app keys for an application.
func (*Apps) ListOAuth2Scopes ¶
func (srv *Apps) ListOAuth2Scopes() (*models.AppScopeList, error)
ListOAuth2Scopes list scopes an application can request during the OAuth2 flow.
func (*Apps) ListSecrets ¶
func (srv *Apps) ListSecrets(AppId string, optionalSetters ...ListSecretsOption) (*models.AppSecretList, error)
ListSecrets list client secrets for an application.
func (*Apps) Update ¶
func (srv *Apps) Update(AppId string, Name string, optionalSetters ...UpdateOption) (*models.App, error)
Update update an application by its unique ID.
func (*Apps) UpdateLabels ¶
UpdateLabels update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.
func (*Apps) UpdateTeam ¶
UpdateTeam transfer an application to another team by its unique ID.
func (*Apps) WithCreateClientUri ¶
func (srv *Apps) WithCreateClientUri(v string) CreateOption
func (*Apps) WithCreateContacts ¶
func (srv *Apps) WithCreateContacts(v []string) CreateOption
func (*Apps) WithCreateDataDeletionUrl ¶
func (srv *Apps) WithCreateDataDeletionUrl(v string) CreateOption
func (*Apps) WithCreateDescription ¶
func (srv *Apps) WithCreateDescription(v string) CreateOption
func (*Apps) WithCreateDeviceFlow ¶
func (srv *Apps) WithCreateDeviceFlow(v bool) CreateOption
func (*Apps) WithCreateEnabled ¶
func (srv *Apps) WithCreateEnabled(v bool) CreateOption
func (*Apps) WithCreateImages ¶
func (srv *Apps) WithCreateImages(v []string) CreateOption
func (*Apps) WithCreateLogoUri ¶
func (srv *Apps) WithCreateLogoUri(v string) CreateOption
func (*Apps) WithCreatePostLogoutRedirectUris ¶
func (srv *Apps) WithCreatePostLogoutRedirectUris(v []string) CreateOption
func (*Apps) WithCreatePrivacyPolicyUrl ¶
func (srv *Apps) WithCreatePrivacyPolicyUrl(v string) CreateOption
func (*Apps) WithCreateSupportUrl ¶
func (srv *Apps) WithCreateSupportUrl(v string) CreateOption
func (*Apps) WithCreateTagline ¶
func (srv *Apps) WithCreateTagline(v string) CreateOption
func (*Apps) WithCreateTags ¶
func (srv *Apps) WithCreateTags(v []string) CreateOption
func (*Apps) WithCreateTeamId ¶
func (srv *Apps) WithCreateTeamId(v string) CreateOption
func (*Apps) WithCreateTermsUrl ¶
func (srv *Apps) WithCreateTermsUrl(v string) CreateOption
func (*Apps) WithCreateType ¶
func (srv *Apps) WithCreateType(v string) CreateOption
func (*Apps) WithListInstallationsQueries ¶
func (srv *Apps) WithListInstallationsQueries(v []string) ListInstallationsOption
func (*Apps) WithListInstallationsTotal ¶
func (srv *Apps) WithListInstallationsTotal(v bool) ListInstallationsOption
func (*Apps) WithListKeysQueries ¶
func (srv *Apps) WithListKeysQueries(v []string) ListKeysOption
func (*Apps) WithListKeysTotal ¶
func (srv *Apps) WithListKeysTotal(v bool) ListKeysOption
func (*Apps) WithListQueries ¶
func (srv *Apps) WithListQueries(v []string) ListOption
func (*Apps) WithListSecretsQueries ¶
func (srv *Apps) WithListSecretsQueries(v []string) ListSecretsOption
func (*Apps) WithListSecretsTotal ¶
func (srv *Apps) WithListSecretsTotal(v bool) ListSecretsOption
func (*Apps) WithListTotal ¶
func (srv *Apps) WithListTotal(v bool) ListOption
func (*Apps) WithUpdateClientUri ¶
func (srv *Apps) WithUpdateClientUri(v string) UpdateOption
func (*Apps) WithUpdateContacts ¶
func (srv *Apps) WithUpdateContacts(v []string) UpdateOption
func (*Apps) WithUpdateDataDeletionUrl ¶
func (srv *Apps) WithUpdateDataDeletionUrl(v string) UpdateOption
func (*Apps) WithUpdateDescription ¶
func (srv *Apps) WithUpdateDescription(v string) UpdateOption
func (*Apps) WithUpdateDeviceFlow ¶
func (srv *Apps) WithUpdateDeviceFlow(v bool) UpdateOption
func (*Apps) WithUpdateEnabled ¶
func (srv *Apps) WithUpdateEnabled(v bool) UpdateOption
func (*Apps) WithUpdateImages ¶
func (srv *Apps) WithUpdateImages(v []string) UpdateOption
func (*Apps) WithUpdateInstallationRedirectUrl ¶
func (srv *Apps) WithUpdateInstallationRedirectUrl(v string) UpdateOption
func (*Apps) WithUpdateInstallationScopes ¶
func (srv *Apps) WithUpdateInstallationScopes(v []string) UpdateOption
func (*Apps) WithUpdateLogoUri ¶
func (srv *Apps) WithUpdateLogoUri(v string) UpdateOption
func (*Apps) WithUpdatePostLogoutRedirectUris ¶
func (srv *Apps) WithUpdatePostLogoutRedirectUris(v []string) UpdateOption
func (*Apps) WithUpdatePrivacyPolicyUrl ¶
func (srv *Apps) WithUpdatePrivacyPolicyUrl(v string) UpdateOption
func (*Apps) WithUpdateRedirectUris ¶
func (srv *Apps) WithUpdateRedirectUris(v []string) UpdateOption
func (*Apps) WithUpdateSupportUrl ¶
func (srv *Apps) WithUpdateSupportUrl(v string) UpdateOption
func (*Apps) WithUpdateTagline ¶
func (srv *Apps) WithUpdateTagline(v string) UpdateOption
func (*Apps) WithUpdateTags ¶
func (srv *Apps) WithUpdateTags(v []string) UpdateOption
func (*Apps) WithUpdateTermsUrl ¶
func (srv *Apps) WithUpdateTermsUrl(v string) UpdateOption
func (*Apps) WithUpdateType ¶
func (srv *Apps) WithUpdateType(v string) UpdateOption
type CreateOption ¶
type CreateOption func(*CreateOptions)
type CreateOptions ¶
type CreateOptions struct {
Description string
ClientUri string
LogoUri string
PrivacyPolicyUrl string
TermsUrl string
Contacts []string
Tagline string
Tags []string
Images []string
SupportUrl string
DataDeletionUrl string
PostLogoutRedirectUris []string
Enabled bool
Type string
DeviceFlow bool
TeamId string
// contains filtered or unexported fields
}
func (CreateOptions) New ¶
func (options CreateOptions) New() *CreateOptions
type ListInstallationsOption ¶
type ListInstallationsOption func(*ListInstallationsOptions)
type ListInstallationsOptions ¶
type ListInstallationsOptions struct {
Queries []string
Total bool
// contains filtered or unexported fields
}
func (ListInstallationsOptions) New ¶
func (options ListInstallationsOptions) New() *ListInstallationsOptions
type ListKeysOption ¶
type ListKeysOption func(*ListKeysOptions)
type ListKeysOptions ¶
type ListKeysOptions struct {
Queries []string
Total bool
// contains filtered or unexported fields
}
func (ListKeysOptions) New ¶
func (options ListKeysOptions) New() *ListKeysOptions
type ListOption ¶
type ListOption func(*ListOptions)
type ListOptions ¶
func (ListOptions) New ¶
func (options ListOptions) New() *ListOptions
type ListSecretsOption ¶
type ListSecretsOption func(*ListSecretsOptions)
type ListSecretsOptions ¶
type ListSecretsOptions struct {
Queries []string
Total bool
// contains filtered or unexported fields
}
func (ListSecretsOptions) New ¶
func (options ListSecretsOptions) New() *ListSecretsOptions
type UpdateOption ¶
type UpdateOption func(*UpdateOptions)
type UpdateOptions ¶
type UpdateOptions struct {
Description string
ClientUri string
LogoUri string
PrivacyPolicyUrl string
TermsUrl string
Contacts []string
Tagline string
Tags []string
Images []string
SupportUrl string
DataDeletionUrl string
Enabled bool
RedirectUris []string
PostLogoutRedirectUris []string
Type string
DeviceFlow bool
InstallationScopes []string
InstallationRedirectUrl string
// contains filtered or unexported fields
}
func (UpdateOptions) New ¶
func (options UpdateOptions) New() *UpdateOptions