diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fc4483c..1210df2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## v0.17.0 + +* Fix doc examples with proper formatting +* Add support for the new `Backups` service + ## v0.16.0 * Added ability to create columns and indexes synchronously while creating a table @@ -66,4 +71,4 @@ ## 0.3.0 -* Add new push message parameters \ No newline at end of file +* Add new push message parameters diff --git a/README.md b/README.md index 8ad82ca3..b4599f4c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-go/releases).** +**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-go/releases).** Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Go SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) diff --git a/appwrite/appwrite.go b/appwrite/appwrite.go index e82e1a86..bf4cfa6c 100644 --- a/appwrite/appwrite.go +++ b/appwrite/appwrite.go @@ -6,6 +6,7 @@ import ( "github.com/appwrite/sdk-for-go/client" "github.com/appwrite/sdk-for-go/account" "github.com/appwrite/sdk-for-go/avatars" + "github.com/appwrite/sdk-for-go/backups" "github.com/appwrite/sdk-for-go/databases" "github.com/appwrite/sdk-for-go/functions" "github.com/appwrite/sdk-for-go/graphql" @@ -26,6 +27,9 @@ func NewAccount(clt client.Client) *account.Account { func NewAvatars(clt client.Client) *avatars.Avatars { return avatars.New(clt) } +func NewBackups(clt client.Client) *backups.Backups { + return backups.New(clt) +} func NewDatabases(clt client.Client) *databases.Databases { return databases.New(clt) } diff --git a/backups/backups.go b/backups/backups.go new file mode 100644 index 00000000..9a66beaf --- /dev/null +++ b/backups/backups.go @@ -0,0 +1,663 @@ +package backups + +import ( + "encoding/json" + "errors" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/models" + "strings" +) + +// Backups service +type Backups struct { + client client.Client +} + +func New(clt client.Client) *Backups { + return &Backups{ + client: clt, + } +} + +type ListArchivesOptions struct { + Queries []string + enabledSetters map[string]bool +} +func (options ListArchivesOptions) New() *ListArchivesOptions { + options.enabledSetters = map[string]bool{ + "Queries": false, + } + return &options +} +type ListArchivesOption func(*ListArchivesOptions) +func (srv *Backups) WithListArchivesQueries(v []string) ListArchivesOption { + return func(o *ListArchivesOptions) { + o.Queries = v + o.enabledSetters["Queries"] = true + } +} + +// ListArchives list all archives for a project. +func (srv *Backups) ListArchives(optionalSetters ...ListArchivesOption)(*models.BackupArchiveList, error) { + path := "/backups/archives" + options := ListArchivesOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Queries"] { + params["queries"] = options.Queries + } + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupArchiveList{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupArchiveList + parsed, ok := resp.Result.(models.BackupArchiveList) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type CreateArchiveOptions struct { + ResourceId string + enabledSetters map[string]bool +} +func (options CreateArchiveOptions) New() *CreateArchiveOptions { + options.enabledSetters = map[string]bool{ + "ResourceId": false, + } + return &options +} +type CreateArchiveOption func(*CreateArchiveOptions) +func (srv *Backups) WithCreateArchiveResourceId(v string) CreateArchiveOption { + return func(o *CreateArchiveOptions) { + o.ResourceId = v + o.enabledSetters["ResourceId"] = true + } +} + +// CreateArchive create a new archive asynchronously for a project. +func (srv *Backups) CreateArchive(Services []string, optionalSetters ...CreateArchiveOption)(*models.BackupArchive, error) { + path := "/backups/archives" + options := CreateArchiveOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + params["services"] = Services + if options.enabledSetters["ResourceId"] { + params["resourceId"] = options.ResourceId + } + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("POST", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupArchive{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupArchive + parsed, ok := resp.Result.(models.BackupArchive) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// GetArchive get a backup archive using it's ID. +func (srv *Backups) GetArchive(ArchiveId string)(*models.BackupArchive, error) { + r := strings.NewReplacer("{archiveId}", ArchiveId) + path := r.Replace("/backups/archives/{archiveId}") + params := map[string]interface{}{} + params["archiveId"] = ArchiveId + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupArchive{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupArchive + parsed, ok := resp.Result.(models.BackupArchive) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// DeleteArchive delete an existing archive for a project. +func (srv *Backups) DeleteArchive(ArchiveId string)(*interface{}, error) { + r := strings.NewReplacer("{archiveId}", ArchiveId) + path := r.Replace("/backups/archives/{archiveId}") + params := map[string]interface{}{} + params["archiveId"] = ArchiveId + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("DELETE", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + var parsed interface{} + + err = json.Unmarshal(bytes, &parsed) + if err != nil { + return nil, err + } + return &parsed, nil + } + var parsed interface{} + parsed, ok := resp.Result.(interface{}) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type ListPoliciesOptions struct { + Queries []string + enabledSetters map[string]bool +} +func (options ListPoliciesOptions) New() *ListPoliciesOptions { + options.enabledSetters = map[string]bool{ + "Queries": false, + } + return &options +} +type ListPoliciesOption func(*ListPoliciesOptions) +func (srv *Backups) WithListPoliciesQueries(v []string) ListPoliciesOption { + return func(o *ListPoliciesOptions) { + o.Queries = v + o.enabledSetters["Queries"] = true + } +} + +// ListPolicies list all policies for a project. +func (srv *Backups) ListPolicies(optionalSetters ...ListPoliciesOption)(*models.BackupPolicyList, error) { + path := "/backups/policies" + options := ListPoliciesOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Queries"] { + params["queries"] = options.Queries + } + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupPolicyList{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupPolicyList + parsed, ok := resp.Result.(models.BackupPolicyList) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type CreatePolicyOptions struct { + Name string + ResourceId string + Enabled bool + enabledSetters map[string]bool +} +func (options CreatePolicyOptions) New() *CreatePolicyOptions { + options.enabledSetters = map[string]bool{ + "Name": false, + "ResourceId": false, + "Enabled": false, + } + return &options +} +type CreatePolicyOption func(*CreatePolicyOptions) +func (srv *Backups) WithCreatePolicyName(v string) CreatePolicyOption { + return func(o *CreatePolicyOptions) { + o.Name = v + o.enabledSetters["Name"] = true + } +} +func (srv *Backups) WithCreatePolicyResourceId(v string) CreatePolicyOption { + return func(o *CreatePolicyOptions) { + o.ResourceId = v + o.enabledSetters["ResourceId"] = true + } +} +func (srv *Backups) WithCreatePolicyEnabled(v bool) CreatePolicyOption { + return func(o *CreatePolicyOptions) { + o.Enabled = v + o.enabledSetters["Enabled"] = true + } +} + +// CreatePolicy create a new backup policy. +func (srv *Backups) CreatePolicy(PolicyId string, Services []string, Retention int, Schedule string, optionalSetters ...CreatePolicyOption)(*models.BackupPolicy, error) { + path := "/backups/policies" + options := CreatePolicyOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + params["policyId"] = PolicyId + params["services"] = Services + params["retention"] = Retention + params["schedule"] = Schedule + if options.enabledSetters["Name"] { + params["name"] = options.Name + } + if options.enabledSetters["ResourceId"] { + params["resourceId"] = options.ResourceId + } + if options.enabledSetters["Enabled"] { + params["enabled"] = options.Enabled + } + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("POST", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupPolicy{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupPolicy + parsed, ok := resp.Result.(models.BackupPolicy) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// GetPolicy get a backup policy using it's ID. +func (srv *Backups) GetPolicy(PolicyId string)(*models.BackupPolicy, error) { + r := strings.NewReplacer("{policyId}", PolicyId) + path := r.Replace("/backups/policies/{policyId}") + params := map[string]interface{}{} + params["policyId"] = PolicyId + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupPolicy{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupPolicy + parsed, ok := resp.Result.(models.BackupPolicy) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type UpdatePolicyOptions struct { + Name string + Retention int + Schedule string + Enabled bool + enabledSetters map[string]bool +} +func (options UpdatePolicyOptions) New() *UpdatePolicyOptions { + options.enabledSetters = map[string]bool{ + "Name": false, + "Retention": false, + "Schedule": false, + "Enabled": false, + } + return &options +} +type UpdatePolicyOption func(*UpdatePolicyOptions) +func (srv *Backups) WithUpdatePolicyName(v string) UpdatePolicyOption { + return func(o *UpdatePolicyOptions) { + o.Name = v + o.enabledSetters["Name"] = true + } +} +func (srv *Backups) WithUpdatePolicyRetention(v int) UpdatePolicyOption { + return func(o *UpdatePolicyOptions) { + o.Retention = v + o.enabledSetters["Retention"] = true + } +} +func (srv *Backups) WithUpdatePolicySchedule(v string) UpdatePolicyOption { + return func(o *UpdatePolicyOptions) { + o.Schedule = v + o.enabledSetters["Schedule"] = true + } +} +func (srv *Backups) WithUpdatePolicyEnabled(v bool) UpdatePolicyOption { + return func(o *UpdatePolicyOptions) { + o.Enabled = v + o.enabledSetters["Enabled"] = true + } +} + +// UpdatePolicy update an existing policy using it's ID. +func (srv *Backups) UpdatePolicy(PolicyId string, optionalSetters ...UpdatePolicyOption)(*models.BackupPolicy, error) { + r := strings.NewReplacer("{policyId}", PolicyId) + path := r.Replace("/backups/policies/{policyId}") + options := UpdatePolicyOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + params["policyId"] = PolicyId + if options.enabledSetters["Name"] { + params["name"] = options.Name + } + if options.enabledSetters["Retention"] { + params["retention"] = options.Retention + } + if options.enabledSetters["Schedule"] { + params["schedule"] = options.Schedule + } + if options.enabledSetters["Enabled"] { + params["enabled"] = options.Enabled + } + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("PATCH", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupPolicy{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupPolicy + parsed, ok := resp.Result.(models.BackupPolicy) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// DeletePolicy delete a policy using it's ID. +func (srv *Backups) DeletePolicy(PolicyId string)(*interface{}, error) { + r := strings.NewReplacer("{policyId}", PolicyId) + path := r.Replace("/backups/policies/{policyId}") + params := map[string]interface{}{} + params["policyId"] = PolicyId + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("DELETE", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + var parsed interface{} + + err = json.Unmarshal(bytes, &parsed) + if err != nil { + return nil, err + } + return &parsed, nil + } + var parsed interface{} + parsed, ok := resp.Result.(interface{}) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type CreateRestorationOptions struct { + NewResourceId string + NewResourceName string + enabledSetters map[string]bool +} +func (options CreateRestorationOptions) New() *CreateRestorationOptions { + options.enabledSetters = map[string]bool{ + "NewResourceId": false, + "NewResourceName": false, + } + return &options +} +type CreateRestorationOption func(*CreateRestorationOptions) +func (srv *Backups) WithCreateRestorationNewResourceId(v string) CreateRestorationOption { + return func(o *CreateRestorationOptions) { + o.NewResourceId = v + o.enabledSetters["NewResourceId"] = true + } +} +func (srv *Backups) WithCreateRestorationNewResourceName(v string) CreateRestorationOption { + return func(o *CreateRestorationOptions) { + o.NewResourceName = v + o.enabledSetters["NewResourceName"] = true + } +} + +// CreateRestoration create and trigger a new restoration for a backup on a +// project. +func (srv *Backups) CreateRestoration(ArchiveId string, Services []string, optionalSetters ...CreateRestorationOption)(*models.BackupRestoration, error) { + path := "/backups/restoration" + options := CreateRestorationOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + params["archiveId"] = ArchiveId + params["services"] = Services + if options.enabledSetters["NewResourceId"] { + params["newResourceId"] = options.NewResourceId + } + if options.enabledSetters["NewResourceName"] { + params["newResourceName"] = options.NewResourceName + } + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("POST", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupRestoration{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupRestoration + parsed, ok := resp.Result.(models.BackupRestoration) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type ListRestorationsOptions struct { + Queries []string + enabledSetters map[string]bool +} +func (options ListRestorationsOptions) New() *ListRestorationsOptions { + options.enabledSetters = map[string]bool{ + "Queries": false, + } + return &options +} +type ListRestorationsOption func(*ListRestorationsOptions) +func (srv *Backups) WithListRestorationsQueries(v []string) ListRestorationsOption { + return func(o *ListRestorationsOptions) { + o.Queries = v + o.enabledSetters["Queries"] = true + } +} + +// ListRestorations list all backup restorations for a project. +func (srv *Backups) ListRestorations(optionalSetters ...ListRestorationsOption)(*models.BackupRestorationList, error) { + path := "/backups/restorations" + options := ListRestorationsOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Queries"] { + params["queries"] = options.Queries + } + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupRestorationList{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupRestorationList + parsed, ok := resp.Result.(models.BackupRestorationList) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// GetRestoration get the current status of a backup restoration. +func (srv *Backups) GetRestoration(RestorationId string)(*models.BackupRestoration, error) { + r := strings.NewReplacer("{restorationId}", RestorationId) + path := r.Replace("/backups/restorations/{restorationId}") + params := map[string]interface{}{} + params["restorationId"] = RestorationId + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.BackupRestoration{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.BackupRestoration + parsed, ok := resp.Result.(models.BackupRestoration) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} diff --git a/client/client.go b/client/client.go index a17af298..dff15cca 100644 --- a/client/client.go +++ b/client/client.go @@ -74,11 +74,11 @@ type Client struct { func New(optionalSetters ...ClientOption) Client { headers := map[string]string{ "X-Appwrite-Response-Format" : "1.8.0", - "user-agent" : fmt.Sprintf("AppwriteGoSDK/v0.16.0 (%s; %s)", runtime.GOOS, runtime.GOARCH), + "user-agent" : fmt.Sprintf("AppwriteGoSDK/v0.17.0 (%s; %s)", runtime.GOOS, runtime.GOARCH), "x-sdk-name": "Go", "x-sdk-platform": "server", "x-sdk-language": "go", - "x-sdk-version": "v0.16.0", + "x-sdk-version": "v0.17.0", } httpClient, err := GetDefaultClient(defaultTimeout) if err != nil { diff --git a/docs/examples/account/create-anonymous-session.md b/docs/examples/account/create-anonymous-session.md index b6da8a74..70f055ab 100644 --- a/docs/examples/account/create-anonymous-session.md +++ b/docs/examples/account/create-anonymous-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.CreateAnonymousSession()) +``` diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md index 7067b8a0..5a220ccf 100644 --- a/docs/examples/account/create-email-password-session.md +++ b/docs/examples/account/create-email-password-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.CreateEmailPasswordSession( "email@example.com", "password", ) +``` diff --git a/docs/examples/account/create-email-token.md b/docs/examples/account/create-email-token.md index 466d1c83..d544f3a0 100644 --- a/docs/examples/account/create-email-token.md +++ b/docs/examples/account/create-email-token.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.CreateEmailToken( "email@example.com", account.WithCreateEmailTokenPhrase(false), ) +``` diff --git a/docs/examples/account/create-email-verification.md b/docs/examples/account/create-email-verification.md index d10b88e2..76164f04 100644 --- a/docs/examples/account/create-email-verification.md +++ b/docs/examples/account/create-email-verification.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.CreateEmailVerification( "https://example.com", ) +``` diff --git a/docs/examples/account/create-jwt.md b/docs/examples/account/create-jwt.md index a5952d8c..6ebd9cde 100644 --- a/docs/examples/account/create-jwt.md +++ b/docs/examples/account/create-jwt.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.CreateJWT( account.WithCreateJWTDuration(0), ) +``` diff --git a/docs/examples/account/create-magic-url-token.md b/docs/examples/account/create-magic-url-token.md index e1fe8897..972bd0d7 100644 --- a/docs/examples/account/create-magic-url-token.md +++ b/docs/examples/account/create-magic-url-token.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateMagicURLToken( account.WithCreateMagicURLTokenUrl("https://example.com"), account.WithCreateMagicURLTokenPhrase(false), ) +``` diff --git a/docs/examples/account/create-mfa-authenticator.md b/docs/examples/account/create-mfa-authenticator.md index c0124d6c..05c5a17e 100644 --- a/docs/examples/account/create-mfa-authenticator.md +++ b/docs/examples/account/create-mfa-authenticator.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.CreateMFAAuthenticator( "totp", ) +``` diff --git a/docs/examples/account/create-mfa-challenge.md b/docs/examples/account/create-mfa-challenge.md index 7eb816c8..7aee4c42 100644 --- a/docs/examples/account/create-mfa-challenge.md +++ b/docs/examples/account/create-mfa-challenge.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.CreateMFAChallenge( "email", ) +``` diff --git a/docs/examples/account/create-mfa-recovery-codes.md b/docs/examples/account/create-mfa-recovery-codes.md index 332102ea..a5744906 100644 --- a/docs/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/account/create-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.CreateMFARecoveryCodes()) +``` diff --git a/docs/examples/account/create-o-auth-2-token.md b/docs/examples/account/create-o-auth-2-token.md index 48ff13ee..82b56a38 100644 --- a/docs/examples/account/create-o-auth-2-token.md +++ b/docs/examples/account/create-o-auth-2-token.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateOAuth2Token( account.WithCreateOAuth2TokenFailure("https://example.com"), account.WithCreateOAuth2TokenScopes([]interface{}{}), ) +``` diff --git a/docs/examples/account/create-phone-token.md b/docs/examples/account/create-phone-token.md index 043ef3c8..a652a687 100644 --- a/docs/examples/account/create-phone-token.md +++ b/docs/examples/account/create-phone-token.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.CreatePhoneToken( "", "+12065550100", ) +``` diff --git a/docs/examples/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index 68fd7f78..391e9f20 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.CreatePhoneVerification()) +``` diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index 5e78d019..64d2746f 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.CreateRecovery( "email@example.com", "https://example.com", ) +``` diff --git a/docs/examples/account/create-session.md b/docs/examples/account/create-session.md index 3c24783b..fdaf0f15 100644 --- a/docs/examples/account/create-session.md +++ b/docs/examples/account/create-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.CreateSession( "", "", ) +``` diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index 14a1b946..05e52439 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.CreateVerification( "https://example.com", ) +``` diff --git a/docs/examples/account/create.md b/docs/examples/account/create.md index ebb50015..c3d3cca1 100644 --- a/docs/examples/account/create.md +++ b/docs/examples/account/create.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.Create( "", account.WithCreateName(""), ) +``` diff --git a/docs/examples/account/delete-identity.md b/docs/examples/account/delete-identity.md index a513991a..d32b01c6 100644 --- a/docs/examples/account/delete-identity.md +++ b/docs/examples/account/delete-identity.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.DeleteIdentity( "", ) +``` diff --git a/docs/examples/account/delete-mfa-authenticator.md b/docs/examples/account/delete-mfa-authenticator.md index 33b7e51a..af82bdf2 100644 --- a/docs/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/account/delete-mfa-authenticator.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.DeleteMFAAuthenticator( "totp", ) +``` diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index 0a7bb5a8..ca7dabab 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.DeleteSession( "", ) +``` diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index 87c9881e..17d27c05 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.DeleteSessions()) +``` diff --git a/docs/examples/account/get-mfa-recovery-codes.md b/docs/examples/account/get-mfa-recovery-codes.md index ee955116..1b8a22c1 100644 --- a/docs/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/account/get-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.GetMFARecoveryCodes()) +``` diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index c4511438..a93364ae 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.GetPrefs()) +``` diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index 9005de9c..e966b0f0 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.GetSession( "", ) +``` diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index 280492c7..39a563ef 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.Get()) +``` diff --git a/docs/examples/account/list-identities.md b/docs/examples/account/list-identities.md index 30a367e6..7a5a1cd7 100644 --- a/docs/examples/account/list-identities.md +++ b/docs/examples/account/list-identities.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.ListIdentities( account.WithListIdentitiesQueries([]interface{}{}), account.WithListIdentitiesTotal(false), ) +``` diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index f2173181..f823c9c7 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.ListLogs( account.WithListLogsQueries([]interface{}{}), account.WithListLogsTotal(false), ) +``` diff --git a/docs/examples/account/list-mfa-factors.md b/docs/examples/account/list-mfa-factors.md index f6f90f62..0176a4bb 100644 --- a/docs/examples/account/list-mfa-factors.md +++ b/docs/examples/account/list-mfa-factors.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.ListMFAFactors()) +``` diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index c8a40858..55ae24ba 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.ListSessions()) +``` diff --git a/docs/examples/account/update-email-verification.md b/docs/examples/account/update-email-verification.md index 780405d5..bbd504ee 100644 --- a/docs/examples/account/update-email-verification.md +++ b/docs/examples/account/update-email-verification.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateEmailVerification( "", "", ) +``` diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index 6defd009..180c152c 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateEmail( "email@example.com", "password", ) +``` diff --git a/docs/examples/account/update-magic-url-session.md b/docs/examples/account/update-magic-url-session.md index 0fc951b3..c47f048a 100644 --- a/docs/examples/account/update-magic-url-session.md +++ b/docs/examples/account/update-magic-url-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateMagicURLSession( "", "", ) +``` diff --git a/docs/examples/account/update-mfa-authenticator.md b/docs/examples/account/update-mfa-authenticator.md index 49990345..334affda 100644 --- a/docs/examples/account/update-mfa-authenticator.md +++ b/docs/examples/account/update-mfa-authenticator.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateMFAAuthenticator( "totp", "", ) +``` diff --git a/docs/examples/account/update-mfa-challenge.md b/docs/examples/account/update-mfa-challenge.md index a9dd94ea..6c666d10 100644 --- a/docs/examples/account/update-mfa-challenge.md +++ b/docs/examples/account/update-mfa-challenge.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateMFAChallenge( "", "", ) +``` diff --git a/docs/examples/account/update-mfa-recovery-codes.md b/docs/examples/account/update-mfa-recovery-codes.md index fc47d3b0..1a6f4790 100644 --- a/docs/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/account/update-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.UpdateMFARecoveryCodes()) +``` diff --git a/docs/examples/account/update-mfa.md b/docs/examples/account/update-mfa.md index 1808eed8..31c21c50 100644 --- a/docs/examples/account/update-mfa.md +++ b/docs/examples/account/update-mfa.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.UpdateMFA( false, ) +``` diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index 1cf5aa2a..ef827ed0 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.UpdateName( "", ) +``` diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index f5746792..66badad5 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePassword( "", account.WithUpdatePasswordOldPassword("password"), ) +``` diff --git a/docs/examples/account/update-phone-session.md b/docs/examples/account/update-phone-session.md index 6c7ee57b..1fb33a77 100644 --- a/docs/examples/account/update-phone-session.md +++ b/docs/examples/account/update-phone-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePhoneSession( "", "", ) +``` diff --git a/docs/examples/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index cb5a9393..1c1dcbf9 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/examples/account/update-phone-verification.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePhoneVerification( "", "", ) +``` diff --git a/docs/examples/account/update-phone.md b/docs/examples/account/update-phone.md index ac21bd32..92e4634e 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/examples/account/update-phone.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePhone( "+12065550100", "password", ) +``` diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index 2091395f..0b18e513 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.UpdatePrefs( "darkTheme": true }, ) +``` diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index e21e5ccf..1222f597 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.UpdateRecovery( "", "", ) +``` diff --git a/docs/examples/account/update-session.md b/docs/examples/account/update-session.md index 4984b9ef..22ef7fa9 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := account.New(client) response, error := service.UpdateSession( "", ) +``` diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index e3c5d66a..f2900504 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := account.New(client) response, error := service.UpdateStatus()) +``` diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index b3175174..a8e0c5a5 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateVerification( "", "", ) +``` diff --git a/docs/examples/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index 6b238c9f..ea675f08 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/examples/avatars/get-browser.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.GetBrowser( avatars.WithGetBrowserHeight(0), avatars.WithGetBrowserQuality(-1), ) +``` diff --git a/docs/examples/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index 4ca6feb2..f11ccaef 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/examples/avatars/get-credit-card.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.GetCreditCard( avatars.WithGetCreditCardHeight(0), avatars.WithGetCreditCardQuality(-1), ) +``` diff --git a/docs/examples/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index dafc8dd7..d341e3dd 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/examples/avatars/get-favicon.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := avatars.New(client) response, error := service.GetFavicon( "https://example.com", ) +``` diff --git a/docs/examples/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index ad46317c..f08a8639 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/examples/avatars/get-flag.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.GetFlag( avatars.WithGetFlagHeight(0), avatars.WithGetFlagQuality(-1), ) +``` diff --git a/docs/examples/avatars/get-image.md b/docs/examples/avatars/get-image.md index 7e9a20f2..6b237773 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/examples/avatars/get-image.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetImage( avatars.WithGetImageWidth(0), avatars.WithGetImageHeight(0), ) +``` diff --git a/docs/examples/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index 84ddfc08..5dbd77d9 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.GetInitials( avatars.WithGetInitialsHeight(0), avatars.WithGetInitialsBackground(""), ) +``` diff --git a/docs/examples/avatars/get-qr.md b/docs/examples/avatars/get-qr.md index 97efa740..e0e5d874 100644 --- a/docs/examples/avatars/get-qr.md +++ b/docs/examples/avatars/get-qr.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.GetQR( avatars.WithGetQRMargin(0), avatars.WithGetQRDownload(false), ) +``` diff --git a/docs/examples/avatars/get-screenshot.md b/docs/examples/avatars/get-screenshot.md index b0853466..784a96a5 100644 --- a/docs/examples/avatars/get-screenshot.md +++ b/docs/examples/avatars/get-screenshot.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -39,3 +40,4 @@ response, error := service.GetScreenshot( avatars.WithGetScreenshotQuality(85), avatars.WithGetScreenshotOutput("jpeg"), ) +``` diff --git a/docs/examples/backups/create-archive.md b/docs/examples/backups/create-archive.md new file mode 100644 index 00000000..445607ab --- /dev/null +++ b/docs/examples/backups/create-archive.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.CreateArchive( + []interface{}{}, + backups.WithCreateArchiveResourceId(""), +) +``` diff --git a/docs/examples/backups/create-policy.md b/docs/examples/backups/create-policy.md new file mode 100644 index 00000000..ba9acc83 --- /dev/null +++ b/docs/examples/backups/create-policy.md @@ -0,0 +1,27 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.CreatePolicy( + "", + []interface{}{}, + 1, + "", + backups.WithCreatePolicyName(""), + backups.WithCreatePolicyResourceId(""), + backups.WithCreatePolicyEnabled(false), +) +``` diff --git a/docs/examples/backups/create-restoration.md b/docs/examples/backups/create-restoration.md new file mode 100644 index 00000000..eb2ed98e --- /dev/null +++ b/docs/examples/backups/create-restoration.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.CreateRestoration( + "", + []interface{}{}, + backups.WithCreateRestorationNewResourceId(""), + backups.WithCreateRestorationNewResourceName(""), +) +``` diff --git a/docs/examples/backups/delete-archive.md b/docs/examples/backups/delete-archive.md new file mode 100644 index 00000000..fb9097c2 --- /dev/null +++ b/docs/examples/backups/delete-archive.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.DeleteArchive( + "", +) +``` diff --git a/docs/examples/backups/delete-policy.md b/docs/examples/backups/delete-policy.md new file mode 100644 index 00000000..56128e45 --- /dev/null +++ b/docs/examples/backups/delete-policy.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.DeletePolicy( + "", +) +``` diff --git a/docs/examples/backups/get-archive.md b/docs/examples/backups/get-archive.md new file mode 100644 index 00000000..79067bc0 --- /dev/null +++ b/docs/examples/backups/get-archive.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.GetArchive( + "", +) +``` diff --git a/docs/examples/backups/get-policy.md b/docs/examples/backups/get-policy.md new file mode 100644 index 00000000..175e81ed --- /dev/null +++ b/docs/examples/backups/get-policy.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.GetPolicy( + "", +) +``` diff --git a/docs/examples/backups/get-restoration.md b/docs/examples/backups/get-restoration.md new file mode 100644 index 00000000..1331320e --- /dev/null +++ b/docs/examples/backups/get-restoration.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.GetRestoration( + "", +) +``` diff --git a/docs/examples/backups/list-archives.md b/docs/examples/backups/list-archives.md new file mode 100644 index 00000000..8f5b5435 --- /dev/null +++ b/docs/examples/backups/list-archives.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.ListArchives( + backups.WithListArchivesQueries([]interface{}{}), +) +``` diff --git a/docs/examples/backups/list-policies.md b/docs/examples/backups/list-policies.md new file mode 100644 index 00000000..cef7b8ac --- /dev/null +++ b/docs/examples/backups/list-policies.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.ListPolicies( + backups.WithListPoliciesQueries([]interface{}{}), +) +``` diff --git a/docs/examples/backups/list-restorations.md b/docs/examples/backups/list-restorations.md new file mode 100644 index 00000000..32e20b16 --- /dev/null +++ b/docs/examples/backups/list-restorations.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.ListRestorations( + backups.WithListRestorationsQueries([]interface{}{}), +) +``` diff --git a/docs/examples/backups/update-policy.md b/docs/examples/backups/update-policy.md new file mode 100644 index 00000000..5fb6060a --- /dev/null +++ b/docs/examples/backups/update-policy.md @@ -0,0 +1,25 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/backups" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := backups.New(client) + +response, error := service.UpdatePolicy( + "", + backups.WithUpdatePolicyName(""), + backups.WithUpdatePolicyRetention(1), + backups.WithUpdatePolicySchedule(""), + backups.WithUpdatePolicyEnabled(false), +) +``` diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index db87ed2d..777b7176 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateBooleanAttribute( databases.WithCreateBooleanAttributeDefault(false), databases.WithCreateBooleanAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 5cad00a6..100ba24e 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateCollection( databases.WithCreateCollectionAttributes([]interface{}{}), databases.WithCreateCollectionIndexes([]interface{}{}), ) +``` diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index d1b5785b..7e66c56a 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateDatetimeAttribute( databases.WithCreateDatetimeAttributeDefault(""), databases.WithCreateDatetimeAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-document.md b/docs/examples/databases/create-document.md index 1c7a4891..49b17215 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.CreateDocument( databases.WithCreateDocumentPermissions(interface{}{"read("any")"}), databases.WithCreateDocumentTransactionId(""), ) +``` diff --git a/docs/examples/databases/create-documents.md b/docs/examples/databases/create-documents.md index ae08b2e7..796553bd 100644 --- a/docs/examples/databases/create-documents.md +++ b/docs/examples/databases/create-documents.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateDocuments( []interface{}{}, databases.WithCreateDocumentsTransactionId(""), ) +``` diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 24ceeab4..020fb16d 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateEmailAttribute( databases.WithCreateEmailAttributeDefault("email@example.com"), databases.WithCreateEmailAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index 49c576a6..3573b94c 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateEnumAttribute( databases.WithCreateEnumAttributeDefault(""), databases.WithCreateEnumAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index 2a039e80..b93fa4b2 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateFloatAttribute( databases.WithCreateFloatAttributeDefault(0), databases.WithCreateFloatAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index e2b11982..314ed8c1 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateIndex( databases.WithCreateIndexOrders([]interface{}{}), databases.WithCreateIndexLengths([]interface{}{}), ) +``` diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index ad93ff05..e91d971a 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateIntegerAttribute( databases.WithCreateIntegerAttributeDefault(0), databases.WithCreateIntegerAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index 47df16ce..adac57ad 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateIpAttribute( databases.WithCreateIpAttributeDefault(""), databases.WithCreateIpAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md index 49931764..37659e9a 100644 --- a/docs/examples/databases/create-line-attribute.md +++ b/docs/examples/databases/create-line-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.CreateLineAttribute( false, databases.WithCreateLineAttributeDefault(interface{}{[1, 2], [3, 4], [5, 6]}), ) +``` diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md index 630412d0..bbbfa73d 100644 --- a/docs/examples/databases/create-longtext-attribute.md +++ b/docs/examples/databases/create-longtext-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateLongtextAttribute( databases.WithCreateLongtextAttributeDefault(""), databases.WithCreateLongtextAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md index 0b6c21bc..4c1f31eb 100644 --- a/docs/examples/databases/create-mediumtext-attribute.md +++ b/docs/examples/databases/create-mediumtext-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateMediumtextAttribute( databases.WithCreateMediumtextAttributeDefault(""), databases.WithCreateMediumtextAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-operations.md b/docs/examples/databases/create-operations.md index c73ad577..34f33c1f 100644 --- a/docs/examples/databases/create-operations.md +++ b/docs/examples/databases/create-operations.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.CreateOperations( } }), ) +``` diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md index 75d5e790..e66512a1 100644 --- a/docs/examples/databases/create-point-attribute.md +++ b/docs/examples/databases/create-point-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.CreatePointAttribute( false, databases.WithCreatePointAttributeDefault(interface{}{1, 2}), ) +``` diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md index 0f89b423..ba19973c 100644 --- a/docs/examples/databases/create-polygon-attribute.md +++ b/docs/examples/databases/create-polygon-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.CreatePolygonAttribute( false, databases.WithCreatePolygonAttributeDefault(interface{}{[[1, 2], [3, 4], [5, 6], [1, 2]]}), ) +``` diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index f63779ff..15d5a0ae 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateRelationshipAttribute( databases.WithCreateRelationshipAttributeTwoWayKey(""), databases.WithCreateRelationshipAttributeOnDelete("cascade"), ) +``` diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index 4082041a..8ecfdf60 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateStringAttribute( databases.WithCreateStringAttributeArray(false), databases.WithCreateStringAttributeEncrypt(false), ) +``` diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md index 40bde804..4b3dd653 100644 --- a/docs/examples/databases/create-text-attribute.md +++ b/docs/examples/databases/create-text-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateTextAttribute( databases.WithCreateTextAttributeDefault(""), databases.WithCreateTextAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-transaction.md b/docs/examples/databases/create-transaction.md index f74b9152..03c66138 100644 --- a/docs/examples/databases/create-transaction.md +++ b/docs/examples/databases/create-transaction.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := databases.New(client) response, error := service.CreateTransaction( databases.WithCreateTransactionTtl(60), ) +``` diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index 5b367e0c..f4cae997 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateUrlAttribute( databases.WithCreateUrlAttributeDefault("https://example.com"), databases.WithCreateUrlAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md index 53a80990..2536b27a 100644 --- a/docs/examples/databases/create-varchar-attribute.md +++ b/docs/examples/databases/create-varchar-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateVarcharAttribute( databases.WithCreateVarcharAttributeDefault(""), databases.WithCreateVarcharAttributeArray(false), ) +``` diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index 57c8e106..1c0b8e83 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.Create( "", databases.WithCreateEnabled(false), ) +``` diff --git a/docs/examples/databases/decrement-document-attribute.md b/docs/examples/databases/decrement-document-attribute.md index 7cb2c1c3..57f9a0ad 100644 --- a/docs/examples/databases/decrement-document-attribute.md +++ b/docs/examples/databases/decrement-document-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.DecrementDocumentAttribute( databases.WithDecrementDocumentAttributeMin(0), databases.WithDecrementDocumentAttributeTransactionId(""), ) +``` diff --git a/docs/examples/databases/delete-attribute.md b/docs/examples/databases/delete-attribute.md index 96409832..327d6a37 100644 --- a/docs/examples/databases/delete-attribute.md +++ b/docs/examples/databases/delete-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.DeleteAttribute( "", "", ) +``` diff --git a/docs/examples/databases/delete-collection.md b/docs/examples/databases/delete-collection.md index df303164..fbdc43b3 100644 --- a/docs/examples/databases/delete-collection.md +++ b/docs/examples/databases/delete-collection.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteCollection( "", "", ) +``` diff --git a/docs/examples/databases/delete-document.md b/docs/examples/databases/delete-document.md index 80e44b89..51ff7ee5 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/examples/databases/delete-document.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.DeleteDocument( "", databases.WithDeleteDocumentTransactionId(""), ) +``` diff --git a/docs/examples/databases/delete-documents.md b/docs/examples/databases/delete-documents.md index 5c070a0d..a6168c40 100644 --- a/docs/examples/databases/delete-documents.md +++ b/docs/examples/databases/delete-documents.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.DeleteDocuments( databases.WithDeleteDocumentsQueries([]interface{}{}), databases.WithDeleteDocumentsTransactionId(""), ) +``` diff --git a/docs/examples/databases/delete-index.md b/docs/examples/databases/delete-index.md index 229c50ca..5546c712 100644 --- a/docs/examples/databases/delete-index.md +++ b/docs/examples/databases/delete-index.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.DeleteIndex( "", "", ) +``` diff --git a/docs/examples/databases/delete-transaction.md b/docs/examples/databases/delete-transaction.md index b06f8bf6..0c5b842e 100644 --- a/docs/examples/databases/delete-transaction.md +++ b/docs/examples/databases/delete-transaction.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := databases.New(client) response, error := service.DeleteTransaction( "", ) +``` diff --git a/docs/examples/databases/delete.md b/docs/examples/databases/delete.md index eb7999cc..cc22faff 100644 --- a/docs/examples/databases/delete.md +++ b/docs/examples/databases/delete.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := databases.New(client) response, error := service.Delete( "", ) +``` diff --git a/docs/examples/databases/get-attribute.md b/docs/examples/databases/get-attribute.md index e1c5d10d..54f87a5b 100644 --- a/docs/examples/databases/get-attribute.md +++ b/docs/examples/databases/get-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetAttribute( "", "", ) +``` diff --git a/docs/examples/databases/get-collection.md b/docs/examples/databases/get-collection.md index 2827eec7..483cc827 100644 --- a/docs/examples/databases/get-collection.md +++ b/docs/examples/databases/get-collection.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetCollection( "", "", ) +``` diff --git a/docs/examples/databases/get-document.md b/docs/examples/databases/get-document.md index e075084f..50be7545 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/examples/databases/get-document.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.GetDocument( databases.WithGetDocumentQueries([]interface{}{}), databases.WithGetDocumentTransactionId(""), ) +``` diff --git a/docs/examples/databases/get-index.md b/docs/examples/databases/get-index.md index 54d57052..c608f356 100644 --- a/docs/examples/databases/get-index.md +++ b/docs/examples/databases/get-index.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetIndex( "", "", ) +``` diff --git a/docs/examples/databases/get-transaction.md b/docs/examples/databases/get-transaction.md index 4c15d732..79d010e6 100644 --- a/docs/examples/databases/get-transaction.md +++ b/docs/examples/databases/get-transaction.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := databases.New(client) response, error := service.GetTransaction( "", ) +``` diff --git a/docs/examples/databases/get.md b/docs/examples/databases/get.md index c92506cf..16c38a5a 100644 --- a/docs/examples/databases/get.md +++ b/docs/examples/databases/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := databases.New(client) response, error := service.Get( "", ) +``` diff --git a/docs/examples/databases/increment-document-attribute.md b/docs/examples/databases/increment-document-attribute.md index 510d6486..9a16bf06 100644 --- a/docs/examples/databases/increment-document-attribute.md +++ b/docs/examples/databases/increment-document-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.IncrementDocumentAttribute( databases.WithIncrementDocumentAttributeMax(0), databases.WithIncrementDocumentAttributeTransactionId(""), ) +``` diff --git a/docs/examples/databases/list-attributes.md b/docs/examples/databases/list-attributes.md index 27861ed6..935392f9 100644 --- a/docs/examples/databases/list-attributes.md +++ b/docs/examples/databases/list-attributes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListAttributes( databases.WithListAttributesQueries([]interface{}{}), databases.WithListAttributesTotal(false), ) +``` diff --git a/docs/examples/databases/list-collections.md b/docs/examples/databases/list-collections.md index 52f0da90..c1905e37 100644 --- a/docs/examples/databases/list-collections.md +++ b/docs/examples/databases/list-collections.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListCollections( databases.WithListCollectionsSearch(""), databases.WithListCollectionsTotal(false), ) +``` diff --git a/docs/examples/databases/list-documents.md b/docs/examples/databases/list-documents.md index d5c0c029..ab86f086 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/examples/databases/list-documents.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.ListDocuments( databases.WithListDocumentsTransactionId(""), databases.WithListDocumentsTotal(false), ) +``` diff --git a/docs/examples/databases/list-indexes.md b/docs/examples/databases/list-indexes.md index 9d9bb0b0..c3dddf76 100644 --- a/docs/examples/databases/list-indexes.md +++ b/docs/examples/databases/list-indexes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListIndexes( databases.WithListIndexesQueries([]interface{}{}), databases.WithListIndexesTotal(false), ) +``` diff --git a/docs/examples/databases/list-transactions.md b/docs/examples/databases/list-transactions.md index 662874bb..90fe1c02 100644 --- a/docs/examples/databases/list-transactions.md +++ b/docs/examples/databases/list-transactions.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := databases.New(client) response, error := service.ListTransactions( databases.WithListTransactionsQueries([]interface{}{}), ) +``` diff --git a/docs/examples/databases/list.md b/docs/examples/databases/list.md index 9b7d2f76..66bb89b2 100644 --- a/docs/examples/databases/list.md +++ b/docs/examples/databases/list.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.List( databases.WithListSearch(""), databases.WithListTotal(false), ) +``` diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index bf854b04..9dd6a5ce 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateBooleanAttribute( false, databases.WithUpdateBooleanAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index 7470d5a1..f48e6a69 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateCollection( databases.WithUpdateCollectionDocumentSecurity(false), databases.WithUpdateCollectionEnabled(false), ) +``` diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index d78d1b87..9c9d7c8d 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateDatetimeAttribute( "", databases.WithUpdateDatetimeAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-document.md b/docs/examples/databases/update-document.md index 51359e88..80472972 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/examples/databases/update-document.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.UpdateDocument( databases.WithUpdateDocumentPermissions(interface{}{"read("any")"}), databases.WithUpdateDocumentTransactionId(""), ) +``` diff --git a/docs/examples/databases/update-documents.md b/docs/examples/databases/update-documents.md index 1e1043c6..15c742cb 100644 --- a/docs/examples/databases/update-documents.md +++ b/docs/examples/databases/update-documents.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -27,3 +28,4 @@ response, error := service.UpdateDocuments( databases.WithUpdateDocumentsQueries([]interface{}{}), databases.WithUpdateDocumentsTransactionId(""), ) +``` diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index 728bbd7a..b10ee7a8 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateEmailAttribute( "email@example.com", databases.WithUpdateEmailAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index 86a5ea08..54d6fdc1 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.UpdateEnumAttribute( "", databases.WithUpdateEnumAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 9dd04e77..ad6dc0e6 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.UpdateFloatAttribute( databases.WithUpdateFloatAttributeMax(0), databases.WithUpdateFloatAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index b9d8bf16..6cd5552e 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.UpdateIntegerAttribute( databases.WithUpdateIntegerAttributeMax(0), databases.WithUpdateIntegerAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index fd1cfcc5..19ff5740 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateIpAttribute( "", databases.WithUpdateIpAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md index 20904415..ee4292ba 100644 --- a/docs/examples/databases/update-line-attribute.md +++ b/docs/examples/databases/update-line-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateLineAttribute( databases.WithUpdateLineAttributeDefault(interface{}{[1, 2], [3, 4], [5, 6]}), databases.WithUpdateLineAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-longtext-attribute.md b/docs/examples/databases/update-longtext-attribute.md index c6898226..96fa2ef0 100644 --- a/docs/examples/databases/update-longtext-attribute.md +++ b/docs/examples/databases/update-longtext-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateLongtextAttribute( "", databases.WithUpdateLongtextAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-mediumtext-attribute.md b/docs/examples/databases/update-mediumtext-attribute.md index 6519c6ff..eb2019e2 100644 --- a/docs/examples/databases/update-mediumtext-attribute.md +++ b/docs/examples/databases/update-mediumtext-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateMediumtextAttribute( "", databases.WithUpdateMediumtextAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md index 735b4d8c..21981983 100644 --- a/docs/examples/databases/update-point-attribute.md +++ b/docs/examples/databases/update-point-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdatePointAttribute( databases.WithUpdatePointAttributeDefault(interface{}{1, 2}), databases.WithUpdatePointAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md index 6499f364..8efcf619 100644 --- a/docs/examples/databases/update-polygon-attribute.md +++ b/docs/examples/databases/update-polygon-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdatePolygonAttribute( databases.WithUpdatePolygonAttributeDefault(interface{}{[[1, 2], [3, 4], [5, 6], [1, 2]]}), databases.WithUpdatePolygonAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 0c9ee73f..2e7fdff0 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.UpdateRelationshipAttribute( databases.WithUpdateRelationshipAttributeOnDelete("cascade"), databases.WithUpdateRelationshipAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 0d131001..161b5804 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.UpdateStringAttribute( databases.WithUpdateStringAttributeSize(1), databases.WithUpdateStringAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-text-attribute.md b/docs/examples/databases/update-text-attribute.md index ab2148b3..4ed090c5 100644 --- a/docs/examples/databases/update-text-attribute.md +++ b/docs/examples/databases/update-text-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateTextAttribute( "", databases.WithUpdateTextAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-transaction.md b/docs/examples/databases/update-transaction.md index 76ef4acb..bb660f9a 100644 --- a/docs/examples/databases/update-transaction.md +++ b/docs/examples/databases/update-transaction.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.UpdateTransaction( databases.WithUpdateTransactionCommit(false), databases.WithUpdateTransactionRollback(false), ) +``` diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index 56dfbf03..2295ba27 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateUrlAttribute( "https://example.com", databases.WithUpdateUrlAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update-varchar-attribute.md b/docs/examples/databases/update-varchar-attribute.md index 18ba57dc..c65799c2 100644 --- a/docs/examples/databases/update-varchar-attribute.md +++ b/docs/examples/databases/update-varchar-attribute.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.UpdateVarcharAttribute( databases.WithUpdateVarcharAttributeSize(1), databases.WithUpdateVarcharAttributeNewKey(""), ) +``` diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index 4aa4a4d7..ea968098 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.Update( databases.WithUpdateName(""), databases.WithUpdateEnabled(false), ) +``` diff --git a/docs/examples/databases/upsert-document.md b/docs/examples/databases/upsert-document.md index 95f1c4b6..b4b54759 100644 --- a/docs/examples/databases/upsert-document.md +++ b/docs/examples/databases/upsert-document.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.UpsertDocument( databases.WithUpsertDocumentPermissions(interface{}{"read("any")"}), databases.WithUpsertDocumentTransactionId(""), ) +``` diff --git a/docs/examples/databases/upsert-documents.md b/docs/examples/databases/upsert-documents.md index 9088883b..71d5a175 100644 --- a/docs/examples/databases/upsert-documents.md +++ b/docs/examples/databases/upsert-documents.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.UpsertDocuments( []interface{}{}, databases.WithUpsertDocumentsTransactionId(""), ) +``` diff --git a/docs/examples/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index 86eda6f0..035664a2 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/examples/functions/create-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.CreateDeployment( functions.WithCreateDeploymentEntrypoint(""), functions.WithCreateDeploymentCommands(""), ) +``` diff --git a/docs/examples/functions/create-duplicate-deployment.md b/docs/examples/functions/create-duplicate-deployment.md index 8c01a9e3..4e81af2d 100644 --- a/docs/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/functions/create-duplicate-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.CreateDuplicateDeployment( "", functions.WithCreateDuplicateDeploymentBuildId(""), ) +``` diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md index 1f723b80..cbcec47c 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateExecution( functions.WithCreateExecutionHeaders(map[string]interface{}{}), functions.WithCreateExecutionScheduledAt(""), ) +``` diff --git a/docs/examples/functions/create-template-deployment.md b/docs/examples/functions/create-template-deployment.md index df9591f4..e5523e8f 100644 --- a/docs/examples/functions/create-template-deployment.md +++ b/docs/examples/functions/create-template-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateTemplateDeployment( "", functions.WithCreateTemplateDeploymentActivate(false), ) +``` diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index 84b68b83..01cebf48 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateVariable( "", functions.WithCreateVariableSecret(false), ) +``` diff --git a/docs/examples/functions/create-vcs-deployment.md b/docs/examples/functions/create-vcs-deployment.md index 5ccb0455..8e58d4fc 100644 --- a/docs/examples/functions/create-vcs-deployment.md +++ b/docs/examples/functions/create-vcs-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateVcsDeployment( "", functions.WithCreateVcsDeploymentActivate(false), ) +``` diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index 5bacf3ce..b75cbe83 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -34,3 +35,4 @@ response, error := service.Create( functions.WithCreateProviderRootDirectory(""), functions.WithCreateSpecification(""), ) +``` diff --git a/docs/examples/functions/delete-deployment.md b/docs/examples/functions/delete-deployment.md index 297c4336..bccfb54b 100644 --- a/docs/examples/functions/delete-deployment.md +++ b/docs/examples/functions/delete-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteDeployment( "", "", ) +``` diff --git a/docs/examples/functions/delete-execution.md b/docs/examples/functions/delete-execution.md index 493488cf..dc18dc69 100644 --- a/docs/examples/functions/delete-execution.md +++ b/docs/examples/functions/delete-execution.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteExecution( "", "", ) +``` diff --git a/docs/examples/functions/delete-variable.md b/docs/examples/functions/delete-variable.md index 049afed8..80403639 100644 --- a/docs/examples/functions/delete-variable.md +++ b/docs/examples/functions/delete-variable.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteVariable( "", "", ) +``` diff --git a/docs/examples/functions/delete.md b/docs/examples/functions/delete.md index fe2a02d8..d7b67339 100644 --- a/docs/examples/functions/delete.md +++ b/docs/examples/functions/delete.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := functions.New(client) response, error := service.Delete( "", ) +``` diff --git a/docs/examples/functions/get-deployment-download.md b/docs/examples/functions/get-deployment-download.md index 26f14512..b1f15e12 100644 --- a/docs/examples/functions/get-deployment-download.md +++ b/docs/examples/functions/get-deployment-download.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetDeploymentDownload( "", functions.WithGetDeploymentDownloadType("source"), ) +``` diff --git a/docs/examples/functions/get-deployment.md b/docs/examples/functions/get-deployment.md index f05bfd73..935dcb69 100644 --- a/docs/examples/functions/get-deployment.md +++ b/docs/examples/functions/get-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetDeployment( "", "", ) +``` diff --git a/docs/examples/functions/get-execution.md b/docs/examples/functions/get-execution.md index 5fa2a32e..0a9ace45 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/examples/functions/get-execution.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetExecution( "", "", ) +``` diff --git a/docs/examples/functions/get-variable.md b/docs/examples/functions/get-variable.md index 78916740..dcdc3391 100644 --- a/docs/examples/functions/get-variable.md +++ b/docs/examples/functions/get-variable.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetVariable( "", "", ) +``` diff --git a/docs/examples/functions/get.md b/docs/examples/functions/get.md index 91e21e4e..56ce2053 100644 --- a/docs/examples/functions/get.md +++ b/docs/examples/functions/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := functions.New(client) response, error := service.Get( "", ) +``` diff --git a/docs/examples/functions/list-deployments.md b/docs/examples/functions/list-deployments.md index 57169848..45b20c18 100644 --- a/docs/examples/functions/list-deployments.md +++ b/docs/examples/functions/list-deployments.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListDeployments( functions.WithListDeploymentsSearch(""), functions.WithListDeploymentsTotal(false), ) +``` diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index 498d103e..ac9aeb45 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListExecutions( functions.WithListExecutionsQueries([]interface{}{}), functions.WithListExecutionsTotal(false), ) +``` diff --git a/docs/examples/functions/list-runtimes.md b/docs/examples/functions/list-runtimes.md index c40a08f1..a2a1120f 100644 --- a/docs/examples/functions/list-runtimes.md +++ b/docs/examples/functions/list-runtimes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := functions.New(client) response, error := service.ListRuntimes()) +``` diff --git a/docs/examples/functions/list-specifications.md b/docs/examples/functions/list-specifications.md index c0a29fc3..e7ee77de 100644 --- a/docs/examples/functions/list-specifications.md +++ b/docs/examples/functions/list-specifications.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := functions.New(client) response, error := service.ListSpecifications()) +``` diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md index e71f0170..9bea3674 100644 --- a/docs/examples/functions/list-variables.md +++ b/docs/examples/functions/list-variables.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := functions.New(client) response, error := service.ListVariables( "", ) +``` diff --git a/docs/examples/functions/list.md b/docs/examples/functions/list.md index f152c156..030260ba 100644 --- a/docs/examples/functions/list.md +++ b/docs/examples/functions/list.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.List( functions.WithListSearch(""), functions.WithListTotal(false), ) +``` diff --git a/docs/examples/functions/update-deployment-status.md b/docs/examples/functions/update-deployment-status.md index f29be755..369d13d1 100644 --- a/docs/examples/functions/update-deployment-status.md +++ b/docs/examples/functions/update-deployment-status.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateDeploymentStatus( "", "", ) +``` diff --git a/docs/examples/functions/update-function-deployment.md b/docs/examples/functions/update-function-deployment.md index 9e85be96..2c381ac0 100644 --- a/docs/examples/functions/update-function-deployment.md +++ b/docs/examples/functions/update-function-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateFunctionDeployment( "", "", ) +``` diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index aad017d8..35bc01d2 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.UpdateVariable( functions.WithUpdateVariableValue(""), functions.WithUpdateVariableSecret(false), ) +``` diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index 1e652489..2038abcc 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -34,3 +35,4 @@ response, error := service.Update( functions.WithUpdateProviderRootDirectory(""), functions.WithUpdateSpecification(""), ) +``` diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index 04d9d58f..eec8490e 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := graphql.New(client) response, error := service.Mutation( map[string]interface{}{}, ) +``` diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index 05699ad8..a5903d4a 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := graphql.New(client) response, error := service.Query( map[string]interface{}{}, ) +``` diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/health/get-antivirus.md index 0d7ffcec..dcb417b1 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/health/get-antivirus.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := health.New(client) response, error := service.GetAntivirus()) +``` diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md index 1d4dd1aa..935bcc09 100644 --- a/docs/examples/health/get-cache.md +++ b/docs/examples/health/get-cache.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := health.New(client) response, error := service.GetCache()) +``` diff --git a/docs/examples/health/get-certificate.md b/docs/examples/health/get-certificate.md index 3590e97c..819fdd38 100644 --- a/docs/examples/health/get-certificate.md +++ b/docs/examples/health/get-certificate.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetCertificate( health.WithGetCertificateDomain(""), ) +``` diff --git a/docs/examples/health/get-db.md b/docs/examples/health/get-db.md index 293e8666..1a198a7b 100644 --- a/docs/examples/health/get-db.md +++ b/docs/examples/health/get-db.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := health.New(client) response, error := service.GetDB()) +``` diff --git a/docs/examples/health/get-failed-jobs.md b/docs/examples/health/get-failed-jobs.md index 7dfcc5ed..97604e0c 100644 --- a/docs/examples/health/get-failed-jobs.md +++ b/docs/examples/health/get-failed-jobs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetFailedJobs( "v1-database", health.WithGetFailedJobsThreshold(0), ) +``` diff --git a/docs/examples/health/get-pub-sub.md b/docs/examples/health/get-pub-sub.md index 998de389..addf5253 100644 --- a/docs/examples/health/get-pub-sub.md +++ b/docs/examples/health/get-pub-sub.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := health.New(client) response, error := service.GetPubSub()) +``` diff --git a/docs/examples/health/get-queue-audits.md b/docs/examples/health/get-queue-audits.md index 413a7e6c..0ae8104e 100644 --- a/docs/examples/health/get-queue-audits.md +++ b/docs/examples/health/get-queue-audits.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueAudits( health.WithGetQueueAuditsThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-billing-project-aggregation.md b/docs/examples/health/get-queue-billing-project-aggregation.md new file mode 100644 index 00000000..d67dd084 --- /dev/null +++ b/docs/examples/health/get-queue-billing-project-aggregation.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := health.New(client) + +response, error := service.GetQueueBillingProjectAggregation( + health.WithGetQueueBillingProjectAggregationThreshold(0), +) +``` diff --git a/docs/examples/health/get-queue-billing-team-aggregation.md b/docs/examples/health/get-queue-billing-team-aggregation.md new file mode 100644 index 00000000..412a291e --- /dev/null +++ b/docs/examples/health/get-queue-billing-team-aggregation.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := health.New(client) + +response, error := service.GetQueueBillingTeamAggregation( + health.WithGetQueueBillingTeamAggregationThreshold(0), +) +``` diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md index 4f41ee57..722febe0 100644 --- a/docs/examples/health/get-queue-builds.md +++ b/docs/examples/health/get-queue-builds.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueBuilds( health.WithGetQueueBuildsThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/health/get-queue-certificates.md index 1cb06f49..86179864 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/health/get-queue-certificates.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueCertificates( health.WithGetQueueCertificatesThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md index 51ad2d8e..5f30c228 100644 --- a/docs/examples/health/get-queue-databases.md +++ b/docs/examples/health/get-queue-databases.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetQueueDatabases( health.WithGetQueueDatabasesName(""), health.WithGetQueueDatabasesThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md index 97ac4d2a..a4149816 100644 --- a/docs/examples/health/get-queue-deletes.md +++ b/docs/examples/health/get-queue-deletes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueDeletes( health.WithGetQueueDeletesThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md index 56c7517b..df8c7e70 100644 --- a/docs/examples/health/get-queue-functions.md +++ b/docs/examples/health/get-queue-functions.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueFunctions( health.WithGetQueueFunctionsThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md index 76952a31..309a2fbd 100644 --- a/docs/examples/health/get-queue-logs.md +++ b/docs/examples/health/get-queue-logs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueLogs( health.WithGetQueueLogsThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md index 3d85dda4..12d1fcae 100644 --- a/docs/examples/health/get-queue-mails.md +++ b/docs/examples/health/get-queue-mails.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueMails( health.WithGetQueueMailsThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md index db8a9034..07df816f 100644 --- a/docs/examples/health/get-queue-messaging.md +++ b/docs/examples/health/get-queue-messaging.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueMessaging( health.WithGetQueueMessagingThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md index ae5c5246..b7416cc1 100644 --- a/docs/examples/health/get-queue-migrations.md +++ b/docs/examples/health/get-queue-migrations.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueMigrations( health.WithGetQueueMigrationsThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-priority-builds.md b/docs/examples/health/get-queue-priority-builds.md new file mode 100644 index 00000000..2c5b5789 --- /dev/null +++ b/docs/examples/health/get-queue-priority-builds.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := health.New(client) + +response, error := service.GetQueuePriorityBuilds( + health.WithGetQueuePriorityBuildsThreshold(0), +) +``` diff --git a/docs/examples/health/get-queue-region-manager.md b/docs/examples/health/get-queue-region-manager.md new file mode 100644 index 00000000..deff19a6 --- /dev/null +++ b/docs/examples/health/get-queue-region-manager.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := health.New(client) + +response, error := service.GetQueueRegionManager( + health.WithGetQueueRegionManagerThreshold(0), +) +``` diff --git a/docs/examples/health/get-queue-stats-resources.md b/docs/examples/health/get-queue-stats-resources.md index 28de62a3..ef2bff33 100644 --- a/docs/examples/health/get-queue-stats-resources.md +++ b/docs/examples/health/get-queue-stats-resources.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueStatsResources( health.WithGetQueueStatsResourcesThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-threats.md b/docs/examples/health/get-queue-threats.md new file mode 100644 index 00000000..f996b067 --- /dev/null +++ b/docs/examples/health/get-queue-threats.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/client" + "github.com/appwrite/sdk-for-go/health" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := health.New(client) + +response, error := service.GetQueueThreats( + health.WithGetQueueThreatsThreshold(0), +) +``` diff --git a/docs/examples/health/get-queue-usage.md b/docs/examples/health/get-queue-usage.md index e081c077..0c6b28d2 100644 --- a/docs/examples/health/get-queue-usage.md +++ b/docs/examples/health/get-queue-usage.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueUsage( health.WithGetQueueUsageThreshold(0), ) +``` diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md index 85acb520..6c5d2a9d 100644 --- a/docs/examples/health/get-queue-webhooks.md +++ b/docs/examples/health/get-queue-webhooks.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := health.New(client) response, error := service.GetQueueWebhooks( health.WithGetQueueWebhooksThreshold(0), ) +``` diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md index 41b5dfaa..039c8a5d 100644 --- a/docs/examples/health/get-storage-local.md +++ b/docs/examples/health/get-storage-local.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := health.New(client) response, error := service.GetStorageLocal()) +``` diff --git a/docs/examples/health/get-storage.md b/docs/examples/health/get-storage.md index 33ad742e..c91f9e70 100644 --- a/docs/examples/health/get-storage.md +++ b/docs/examples/health/get-storage.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := health.New(client) response, error := service.GetStorage()) +``` diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md index f995ad9d..36763b1b 100644 --- a/docs/examples/health/get-time.md +++ b/docs/examples/health/get-time.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := health.New(client) response, error := service.GetTime()) +``` diff --git a/docs/examples/health/get.md b/docs/examples/health/get.md index da7e86a8..fbab1bf2 100644 --- a/docs/examples/health/get.md +++ b/docs/examples/health/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := health.New(client) response, error := service.Get()) +``` diff --git a/docs/examples/locale/get.md b/docs/examples/locale/get.md index 87a4513d..c12da752 100644 --- a/docs/examples/locale/get.md +++ b/docs/examples/locale/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := locale.New(client) response, error := service.Get()) +``` diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md index b204a13b..828cd7e5 100644 --- a/docs/examples/locale/list-codes.md +++ b/docs/examples/locale/list-codes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := locale.New(client) response, error := service.ListCodes()) +``` diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index 4db9555f..5827017b 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := locale.New(client) response, error := service.ListContinents()) +``` diff --git a/docs/examples/locale/list-countries-eu.md b/docs/examples/locale/list-countries-eu.md index e46c9235..199faf60 100644 --- a/docs/examples/locale/list-countries-eu.md +++ b/docs/examples/locale/list-countries-eu.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := locale.New(client) response, error := service.ListCountriesEU()) +``` diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index 301d94db..f6a6dd6b 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := locale.New(client) response, error := service.ListCountriesPhones()) +``` diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index b598adbb..375f8e30 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := locale.New(client) response, error := service.ListCountries()) +``` diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index 50464979..226f3676 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := locale.New(client) response, error := service.ListCurrencies()) +``` diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index 2737401b..06c26436 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := locale.New(client) response, error := service.ListLanguages()) +``` diff --git a/docs/examples/messaging/create-apns-provider.md b/docs/examples/messaging/create-apns-provider.md index ae9a95eb..ef481d20 100644 --- a/docs/examples/messaging/create-apns-provider.md +++ b/docs/examples/messaging/create-apns-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateAPNSProvider( messaging.WithCreateAPNSProviderSandbox(false), messaging.WithCreateAPNSProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index 2c9a09a3..ff36dfb8 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.CreateEmail( messaging.WithCreateEmailHtml(false), messaging.WithCreateEmailScheduledAt(""), ) +``` diff --git a/docs/examples/messaging/create-fcm-provider.md b/docs/examples/messaging/create-fcm-provider.md index dd6733bc..3bbab73b 100644 --- a/docs/examples/messaging/create-fcm-provider.md +++ b/docs/examples/messaging/create-fcm-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateFCMProvider( messaging.WithCreateFCMProviderServiceAccountJSON(map[string]interface{}{}), messaging.WithCreateFCMProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-mailgun-provider.md b/docs/examples/messaging/create-mailgun-provider.md index cbeefd4e..4149f591 100644 --- a/docs/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/messaging/create-mailgun-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -26,3 +27,4 @@ response, error := service.CreateMailgunProvider( messaging.WithCreateMailgunProviderReplyToEmail("email@example.com"), messaging.WithCreateMailgunProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-msg-91-provider.md b/docs/examples/messaging/create-msg-91-provider.md index 3cc3f90c..5a5f6d9d 100644 --- a/docs/examples/messaging/create-msg-91-provider.md +++ b/docs/examples/messaging/create-msg-91-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateMsg91Provider( messaging.WithCreateMsg91ProviderAuthKey(""), messaging.WithCreateMsg91ProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-push.md b/docs/examples/messaging/create-push.md index a607f439..f39eb3ac 100644 --- a/docs/examples/messaging/create-push.md +++ b/docs/examples/messaging/create-push.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -35,3 +36,4 @@ response, error := service.CreatePush( messaging.WithCreatePushCritical(false), messaging.WithCreatePushPriority("normal"), ) +``` diff --git a/docs/examples/messaging/create-resend-provider.md b/docs/examples/messaging/create-resend-provider.md index a8ec0ad3..5f693ba3 100644 --- a/docs/examples/messaging/create-resend-provider.md +++ b/docs/examples/messaging/create-resend-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateResendProvider( messaging.WithCreateResendProviderReplyToEmail("email@example.com"), messaging.WithCreateResendProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-sendgrid-provider.md b/docs/examples/messaging/create-sendgrid-provider.md index c2a67877..6d95b551 100644 --- a/docs/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/messaging/create-sendgrid-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateSendgridProvider( messaging.WithCreateSendgridProviderReplyToEmail("email@example.com"), messaging.WithCreateSendgridProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-sms.md b/docs/examples/messaging/create-sms.md index cb7d62e4..09ad8aaf 100644 --- a/docs/examples/messaging/create-sms.md +++ b/docs/examples/messaging/create-sms.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateSMS( messaging.WithCreateSMSDraft(false), messaging.WithCreateSMSScheduledAt(""), ) +``` diff --git a/docs/examples/messaging/create-smtp-provider.md b/docs/examples/messaging/create-smtp-provider.md index c469aa57..10eb6f85 100644 --- a/docs/examples/messaging/create-smtp-provider.md +++ b/docs/examples/messaging/create-smtp-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -30,3 +31,4 @@ response, error := service.CreateSMTPProvider( messaging.WithCreateSMTPProviderReplyToEmail("email@example.com"), messaging.WithCreateSMTPProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-subscriber.md b/docs/examples/messaging/create-subscriber.md index ebc0f6bb..122b0e2f 100644 --- a/docs/examples/messaging/create-subscriber.md +++ b/docs/examples/messaging/create-subscriber.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.CreateSubscriber( "", "", ) +``` diff --git a/docs/examples/messaging/create-telesign-provider.md b/docs/examples/messaging/create-telesign-provider.md index 4605ad37..38aecaeb 100644 --- a/docs/examples/messaging/create-telesign-provider.md +++ b/docs/examples/messaging/create-telesign-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateTelesignProvider( messaging.WithCreateTelesignProviderApiKey(""), messaging.WithCreateTelesignProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-textmagic-provider.md b/docs/examples/messaging/create-textmagic-provider.md index 2101fab6..ca64aaa1 100644 --- a/docs/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/messaging/create-textmagic-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateTextmagicProvider( messaging.WithCreateTextmagicProviderApiKey(""), messaging.WithCreateTextmagicProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index 71814b8d..0c2ea9e0 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.CreateTopic( "", messaging.WithCreateTopicSubscribe(interface{}{"any"}), ) +``` diff --git a/docs/examples/messaging/create-twilio-provider.md b/docs/examples/messaging/create-twilio-provider.md index 931a2538..938bf40e 100644 --- a/docs/examples/messaging/create-twilio-provider.md +++ b/docs/examples/messaging/create-twilio-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateTwilioProvider( messaging.WithCreateTwilioProviderAuthToken(""), messaging.WithCreateTwilioProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/create-vonage-provider.md b/docs/examples/messaging/create-vonage-provider.md index 6ef35761..de1eb14f 100644 --- a/docs/examples/messaging/create-vonage-provider.md +++ b/docs/examples/messaging/create-vonage-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateVonageProvider( messaging.WithCreateVonageProviderApiSecret(""), messaging.WithCreateVonageProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/delete-provider.md b/docs/examples/messaging/delete-provider.md index f2a07bbb..1aa13a7f 100644 --- a/docs/examples/messaging/delete-provider.md +++ b/docs/examples/messaging/delete-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := messaging.New(client) response, error := service.DeleteProvider( "", ) +``` diff --git a/docs/examples/messaging/delete-subscriber.md b/docs/examples/messaging/delete-subscriber.md index dd8b9889..e5168923 100644 --- a/docs/examples/messaging/delete-subscriber.md +++ b/docs/examples/messaging/delete-subscriber.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteSubscriber( "", "", ) +``` diff --git a/docs/examples/messaging/delete-topic.md b/docs/examples/messaging/delete-topic.md index 7ebf8705..016c78ff 100644 --- a/docs/examples/messaging/delete-topic.md +++ b/docs/examples/messaging/delete-topic.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := messaging.New(client) response, error := service.DeleteTopic( "", ) +``` diff --git a/docs/examples/messaging/delete.md b/docs/examples/messaging/delete.md index f8400c69..f62753f3 100644 --- a/docs/examples/messaging/delete.md +++ b/docs/examples/messaging/delete.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := messaging.New(client) response, error := service.Delete( "", ) +``` diff --git a/docs/examples/messaging/get-message.md b/docs/examples/messaging/get-message.md index ff1b8fa0..8fc3c2ca 100644 --- a/docs/examples/messaging/get-message.md +++ b/docs/examples/messaging/get-message.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := messaging.New(client) response, error := service.GetMessage( "", ) +``` diff --git a/docs/examples/messaging/get-provider.md b/docs/examples/messaging/get-provider.md index 34781802..1b3b903c 100644 --- a/docs/examples/messaging/get-provider.md +++ b/docs/examples/messaging/get-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := messaging.New(client) response, error := service.GetProvider( "", ) +``` diff --git a/docs/examples/messaging/get-subscriber.md b/docs/examples/messaging/get-subscriber.md index 7774204c..12f88522 100644 --- a/docs/examples/messaging/get-subscriber.md +++ b/docs/examples/messaging/get-subscriber.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetSubscriber( "", "", ) +``` diff --git a/docs/examples/messaging/get-topic.md b/docs/examples/messaging/get-topic.md index 2f258be4..9dcb6846 100644 --- a/docs/examples/messaging/get-topic.md +++ b/docs/examples/messaging/get-topic.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := messaging.New(client) response, error := service.GetTopic( "", ) +``` diff --git a/docs/examples/messaging/list-message-logs.md b/docs/examples/messaging/list-message-logs.md index b633f8ae..eb29e315 100644 --- a/docs/examples/messaging/list-message-logs.md +++ b/docs/examples/messaging/list-message-logs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListMessageLogs( messaging.WithListMessageLogsQueries([]interface{}{}), messaging.WithListMessageLogsTotal(false), ) +``` diff --git a/docs/examples/messaging/list-messages.md b/docs/examples/messaging/list-messages.md index 6eb2284f..612a0c14 100644 --- a/docs/examples/messaging/list-messages.md +++ b/docs/examples/messaging/list-messages.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListMessages( messaging.WithListMessagesSearch(""), messaging.WithListMessagesTotal(false), ) +``` diff --git a/docs/examples/messaging/list-provider-logs.md b/docs/examples/messaging/list-provider-logs.md index ba42f32d..8361034b 100644 --- a/docs/examples/messaging/list-provider-logs.md +++ b/docs/examples/messaging/list-provider-logs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListProviderLogs( messaging.WithListProviderLogsQueries([]interface{}{}), messaging.WithListProviderLogsTotal(false), ) +``` diff --git a/docs/examples/messaging/list-providers.md b/docs/examples/messaging/list-providers.md index 27df6f1c..6f354207 100644 --- a/docs/examples/messaging/list-providers.md +++ b/docs/examples/messaging/list-providers.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListProviders( messaging.WithListProvidersSearch(""), messaging.WithListProvidersTotal(false), ) +``` diff --git a/docs/examples/messaging/list-subscriber-logs.md b/docs/examples/messaging/list-subscriber-logs.md index 82aadb5d..12e163b2 100644 --- a/docs/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/messaging/list-subscriber-logs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListSubscriberLogs( messaging.WithListSubscriberLogsQueries([]interface{}{}), messaging.WithListSubscriberLogsTotal(false), ) +``` diff --git a/docs/examples/messaging/list-subscribers.md b/docs/examples/messaging/list-subscribers.md index fbdb0363..9c71bd94 100644 --- a/docs/examples/messaging/list-subscribers.md +++ b/docs/examples/messaging/list-subscribers.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListSubscribers( messaging.WithListSubscribersSearch(""), messaging.WithListSubscribersTotal(false), ) +``` diff --git a/docs/examples/messaging/list-targets.md b/docs/examples/messaging/list-targets.md index c268993b..15f0dea3 100644 --- a/docs/examples/messaging/list-targets.md +++ b/docs/examples/messaging/list-targets.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListTargets( messaging.WithListTargetsQueries([]interface{}{}), messaging.WithListTargetsTotal(false), ) +``` diff --git a/docs/examples/messaging/list-topic-logs.md b/docs/examples/messaging/list-topic-logs.md index 3777f61f..353d2aa4 100644 --- a/docs/examples/messaging/list-topic-logs.md +++ b/docs/examples/messaging/list-topic-logs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListTopicLogs( messaging.WithListTopicLogsQueries([]interface{}{}), messaging.WithListTopicLogsTotal(false), ) +``` diff --git a/docs/examples/messaging/list-topics.md b/docs/examples/messaging/list-topics.md index d4198f48..6f34f5dd 100644 --- a/docs/examples/messaging/list-topics.md +++ b/docs/examples/messaging/list-topics.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListTopics( messaging.WithListTopicsSearch(""), messaging.WithListTopicsTotal(false), ) +``` diff --git a/docs/examples/messaging/update-apns-provider.md b/docs/examples/messaging/update-apns-provider.md index f8c12e88..60e332ac 100644 --- a/docs/examples/messaging/update-apns-provider.md +++ b/docs/examples/messaging/update-apns-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.UpdateAPNSProvider( messaging.WithUpdateAPNSProviderBundleId(""), messaging.WithUpdateAPNSProviderSandbox(false), ) +``` diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index 91d6ad90..e6d70953 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.UpdateEmail( messaging.WithUpdateEmailScheduledAt(""), messaging.WithUpdateEmailAttachments([]interface{}{}), ) +``` diff --git a/docs/examples/messaging/update-fcm-provider.md b/docs/examples/messaging/update-fcm-provider.md index 28fd9153..938fa007 100644 --- a/docs/examples/messaging/update-fcm-provider.md +++ b/docs/examples/messaging/update-fcm-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.UpdateFCMProvider( messaging.WithUpdateFCMProviderEnabled(false), messaging.WithUpdateFCMProviderServiceAccountJSON(map[string]interface{}{}), ) +``` diff --git a/docs/examples/messaging/update-mailgun-provider.md b/docs/examples/messaging/update-mailgun-provider.md index d5f17b3d..25deb152 100644 --- a/docs/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/messaging/update-mailgun-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -26,3 +27,4 @@ response, error := service.UpdateMailgunProvider( messaging.WithUpdateMailgunProviderReplyToName(""), messaging.WithUpdateMailgunProviderReplyToEmail(""), ) +``` diff --git a/docs/examples/messaging/update-msg-91-provider.md b/docs/examples/messaging/update-msg-91-provider.md index 825d2d49..ff31ab94 100644 --- a/docs/examples/messaging/update-msg-91-provider.md +++ b/docs/examples/messaging/update-msg-91-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateMsg91Provider( messaging.WithUpdateMsg91ProviderSenderId(""), messaging.WithUpdateMsg91ProviderAuthKey(""), ) +``` diff --git a/docs/examples/messaging/update-push.md b/docs/examples/messaging/update-push.md index d364159e..19287fac 100644 --- a/docs/examples/messaging/update-push.md +++ b/docs/examples/messaging/update-push.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -35,3 +36,4 @@ response, error := service.UpdatePush( messaging.WithUpdatePushCritical(false), messaging.WithUpdatePushPriority("normal"), ) +``` diff --git a/docs/examples/messaging/update-resend-provider.md b/docs/examples/messaging/update-resend-provider.md index d67320f4..6ac8cc6b 100644 --- a/docs/examples/messaging/update-resend-provider.md +++ b/docs/examples/messaging/update-resend-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.UpdateResendProvider( messaging.WithUpdateResendProviderReplyToName(""), messaging.WithUpdateResendProviderReplyToEmail(""), ) +``` diff --git a/docs/examples/messaging/update-sendgrid-provider.md b/docs/examples/messaging/update-sendgrid-provider.md index 4a9f822c..59cb4fbd 100644 --- a/docs/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/messaging/update-sendgrid-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.UpdateSendgridProvider( messaging.WithUpdateSendgridProviderReplyToName(""), messaging.WithUpdateSendgridProviderReplyToEmail(""), ) +``` diff --git a/docs/examples/messaging/update-sms.md b/docs/examples/messaging/update-sms.md index 988de200..1adcdd26 100644 --- a/docs/examples/messaging/update-sms.md +++ b/docs/examples/messaging/update-sms.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.UpdateSMS( messaging.WithUpdateSMSDraft(false), messaging.WithUpdateSMSScheduledAt(""), ) +``` diff --git a/docs/examples/messaging/update-smtp-provider.md b/docs/examples/messaging/update-smtp-provider.md index 15197501..d707ee1b 100644 --- a/docs/examples/messaging/update-smtp-provider.md +++ b/docs/examples/messaging/update-smtp-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -30,3 +31,4 @@ response, error := service.UpdateSMTPProvider( messaging.WithUpdateSMTPProviderReplyToEmail(""), messaging.WithUpdateSMTPProviderEnabled(false), ) +``` diff --git a/docs/examples/messaging/update-telesign-provider.md b/docs/examples/messaging/update-telesign-provider.md index d00c6b6e..bbcf5638 100644 --- a/docs/examples/messaging/update-telesign-provider.md +++ b/docs/examples/messaging/update-telesign-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateTelesignProvider( messaging.WithUpdateTelesignProviderApiKey(""), messaging.WithUpdateTelesignProviderFrom(""), ) +``` diff --git a/docs/examples/messaging/update-textmagic-provider.md b/docs/examples/messaging/update-textmagic-provider.md index 38e1bed2..702a9f5c 100644 --- a/docs/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/messaging/update-textmagic-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateTextmagicProvider( messaging.WithUpdateTextmagicProviderApiKey(""), messaging.WithUpdateTextmagicProviderFrom(""), ) +``` diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index f7c0044b..794e0d0a 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.UpdateTopic( messaging.WithUpdateTopicName(""), messaging.WithUpdateTopicSubscribe(interface{}{"any"}), ) +``` diff --git a/docs/examples/messaging/update-twilio-provider.md b/docs/examples/messaging/update-twilio-provider.md index 644d6d87..1513ad98 100644 --- a/docs/examples/messaging/update-twilio-provider.md +++ b/docs/examples/messaging/update-twilio-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateTwilioProvider( messaging.WithUpdateTwilioProviderAuthToken(""), messaging.WithUpdateTwilioProviderFrom(""), ) +``` diff --git a/docs/examples/messaging/update-vonage-provider.md b/docs/examples/messaging/update-vonage-provider.md index 01ebeb33..133f7de2 100644 --- a/docs/examples/messaging/update-vonage-provider.md +++ b/docs/examples/messaging/update-vonage-provider.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateVonageProvider( messaging.WithUpdateVonageProviderApiSecret(""), messaging.WithUpdateVonageProviderFrom(""), ) +``` diff --git a/docs/examples/sites/create-deployment.md b/docs/examples/sites/create-deployment.md index 1c853723..ed2dfb70 100644 --- a/docs/examples/sites/create-deployment.md +++ b/docs/examples/sites/create-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateDeployment( sites.WithCreateDeploymentBuildCommand(""), sites.WithCreateDeploymentOutputDirectory(""), ) +``` diff --git a/docs/examples/sites/create-duplicate-deployment.md b/docs/examples/sites/create-duplicate-deployment.md index 177dc48b..d5db3d89 100644 --- a/docs/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/sites/create-duplicate-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.CreateDuplicateDeployment( "", "", ) +``` diff --git a/docs/examples/sites/create-template-deployment.md b/docs/examples/sites/create-template-deployment.md index 85bf2a3c..9d221bb7 100644 --- a/docs/examples/sites/create-template-deployment.md +++ b/docs/examples/sites/create-template-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateTemplateDeployment( "", sites.WithCreateTemplateDeploymentActivate(false), ) +``` diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md index 7681f0d5..a5d771c2 100644 --- a/docs/examples/sites/create-variable.md +++ b/docs/examples/sites/create-variable.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateVariable( "", sites.WithCreateVariableSecret(false), ) +``` diff --git a/docs/examples/sites/create-vcs-deployment.md b/docs/examples/sites/create-vcs-deployment.md index 2e39147d..1c207941 100644 --- a/docs/examples/sites/create-vcs-deployment.md +++ b/docs/examples/sites/create-vcs-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateVcsDeployment( "", sites.WithCreateVcsDeploymentActivate(false), ) +``` diff --git a/docs/examples/sites/create.md b/docs/examples/sites/create.md index e011baf9..a44a8d18 100644 --- a/docs/examples/sites/create.md +++ b/docs/examples/sites/create.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -34,3 +35,4 @@ response, error := service.Create( sites.WithCreateProviderRootDirectory(""), sites.WithCreateSpecification(""), ) +``` diff --git a/docs/examples/sites/delete-deployment.md b/docs/examples/sites/delete-deployment.md index 36d31334..e7937847 100644 --- a/docs/examples/sites/delete-deployment.md +++ b/docs/examples/sites/delete-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteDeployment( "", "", ) +``` diff --git a/docs/examples/sites/delete-log.md b/docs/examples/sites/delete-log.md index 34a77611..cd379336 100644 --- a/docs/examples/sites/delete-log.md +++ b/docs/examples/sites/delete-log.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteLog( "", "", ) +``` diff --git a/docs/examples/sites/delete-variable.md b/docs/examples/sites/delete-variable.md index 00e6c5c4..ee5c0dd3 100644 --- a/docs/examples/sites/delete-variable.md +++ b/docs/examples/sites/delete-variable.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteVariable( "", "", ) +``` diff --git a/docs/examples/sites/delete.md b/docs/examples/sites/delete.md index 4a93cdb1..f11542f5 100644 --- a/docs/examples/sites/delete.md +++ b/docs/examples/sites/delete.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := sites.New(client) response, error := service.Delete( "", ) +``` diff --git a/docs/examples/sites/get-deployment-download.md b/docs/examples/sites/get-deployment-download.md index b3f1101b..68437275 100644 --- a/docs/examples/sites/get-deployment-download.md +++ b/docs/examples/sites/get-deployment-download.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetDeploymentDownload( "", sites.WithGetDeploymentDownloadType("source"), ) +``` diff --git a/docs/examples/sites/get-deployment.md b/docs/examples/sites/get-deployment.md index 28f49174..9a8a93bd 100644 --- a/docs/examples/sites/get-deployment.md +++ b/docs/examples/sites/get-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetDeployment( "", "", ) +``` diff --git a/docs/examples/sites/get-log.md b/docs/examples/sites/get-log.md index 1d5aacb2..f77a0fe3 100644 --- a/docs/examples/sites/get-log.md +++ b/docs/examples/sites/get-log.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetLog( "", "", ) +``` diff --git a/docs/examples/sites/get-variable.md b/docs/examples/sites/get-variable.md index 91f1a0d1..08dab1a3 100644 --- a/docs/examples/sites/get-variable.md +++ b/docs/examples/sites/get-variable.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetVariable( "", "", ) +``` diff --git a/docs/examples/sites/get.md b/docs/examples/sites/get.md index 9c1f38da..b8d67cdf 100644 --- a/docs/examples/sites/get.md +++ b/docs/examples/sites/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := sites.New(client) response, error := service.Get( "", ) +``` diff --git a/docs/examples/sites/list-deployments.md b/docs/examples/sites/list-deployments.md index 626e89c8..5d8bf6b5 100644 --- a/docs/examples/sites/list-deployments.md +++ b/docs/examples/sites/list-deployments.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListDeployments( sites.WithListDeploymentsSearch(""), sites.WithListDeploymentsTotal(false), ) +``` diff --git a/docs/examples/sites/list-frameworks.md b/docs/examples/sites/list-frameworks.md index d876ac1a..36b78131 100644 --- a/docs/examples/sites/list-frameworks.md +++ b/docs/examples/sites/list-frameworks.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := sites.New(client) response, error := service.ListFrameworks()) +``` diff --git a/docs/examples/sites/list-logs.md b/docs/examples/sites/list-logs.md index 969c7660..c15d9894 100644 --- a/docs/examples/sites/list-logs.md +++ b/docs/examples/sites/list-logs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListLogs( sites.WithListLogsQueries([]interface{}{}), sites.WithListLogsTotal(false), ) +``` diff --git a/docs/examples/sites/list-specifications.md b/docs/examples/sites/list-specifications.md index f3a46b22..cfd22bd5 100644 --- a/docs/examples/sites/list-specifications.md +++ b/docs/examples/sites/list-specifications.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -15,3 +16,4 @@ client := client.New( service := sites.New(client) response, error := service.ListSpecifications()) +``` diff --git a/docs/examples/sites/list-variables.md b/docs/examples/sites/list-variables.md index 18d1e480..c57434aa 100644 --- a/docs/examples/sites/list-variables.md +++ b/docs/examples/sites/list-variables.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := sites.New(client) response, error := service.ListVariables( "", ) +``` diff --git a/docs/examples/sites/list.md b/docs/examples/sites/list.md index b6b39ebf..9bb8f323 100644 --- a/docs/examples/sites/list.md +++ b/docs/examples/sites/list.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.List( sites.WithListSearch(""), sites.WithListTotal(false), ) +``` diff --git a/docs/examples/sites/update-deployment-status.md b/docs/examples/sites/update-deployment-status.md index 29dad9b1..b3a1d889 100644 --- a/docs/examples/sites/update-deployment-status.md +++ b/docs/examples/sites/update-deployment-status.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateDeploymentStatus( "", "", ) +``` diff --git a/docs/examples/sites/update-site-deployment.md b/docs/examples/sites/update-site-deployment.md index 176d6410..d89ca75e 100644 --- a/docs/examples/sites/update-site-deployment.md +++ b/docs/examples/sites/update-site-deployment.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateSiteDeployment( "", "", ) +``` diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md index 99879be7..31792066 100644 --- a/docs/examples/sites/update-variable.md +++ b/docs/examples/sites/update-variable.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.UpdateVariable( sites.WithUpdateVariableValue(""), sites.WithUpdateVariableSecret(false), ) +``` diff --git a/docs/examples/sites/update.md b/docs/examples/sites/update.md index fee0eb8b..0f322edb 100644 --- a/docs/examples/sites/update.md +++ b/docs/examples/sites/update.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -34,3 +35,4 @@ response, error := service.Update( sites.WithUpdateProviderRootDirectory(""), sites.WithUpdateSpecification(""), ) +``` diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index 7bec2acb..e2f688b7 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -27,3 +28,4 @@ response, error := service.CreateBucket( storage.WithCreateBucketAntivirus(false), storage.WithCreateBucketTransformations(false), ) +``` diff --git a/docs/examples/storage/create-file.md b/docs/examples/storage/create-file.md index b195c66a..2104ae77 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/examples/storage/create-file.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateFile( file.NewInputFile("/path/to/file.png", "file.png"), storage.WithCreateFilePermissions(interface{}{"read("any")"}), ) +``` diff --git a/docs/examples/storage/delete-bucket.md b/docs/examples/storage/delete-bucket.md index 8142212a..0dd2b682 100644 --- a/docs/examples/storage/delete-bucket.md +++ b/docs/examples/storage/delete-bucket.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := storage.New(client) response, error := service.DeleteBucket( "", ) +``` diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index af3f921c..3e9a3de8 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/examples/storage/delete-file.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteFile( "", "", ) +``` diff --git a/docs/examples/storage/get-bucket.md b/docs/examples/storage/get-bucket.md index c52ebbe0..d949f80d 100644 --- a/docs/examples/storage/get-bucket.md +++ b/docs/examples/storage/get-bucket.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := storage.New(client) response, error := service.GetBucket( "", ) +``` diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index bc1d7333..c082c0b1 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/examples/storage/get-file-download.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetFileDownload( "", storage.WithGetFileDownloadToken(""), ) +``` diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index 956fbd19..96a876f9 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -30,3 +31,4 @@ response, error := service.GetFilePreview( storage.WithGetFilePreviewOutput("jpg"), storage.WithGetFilePreviewToken(""), ) +``` diff --git a/docs/examples/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index a2189750..cc35241b 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/examples/storage/get-file-view.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetFileView( "", storage.WithGetFileViewToken(""), ) +``` diff --git a/docs/examples/storage/get-file.md b/docs/examples/storage/get-file.md index 383d4052..0a22eaff 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/examples/storage/get-file.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetFile( "", "", ) +``` diff --git a/docs/examples/storage/list-buckets.md b/docs/examples/storage/list-buckets.md index 34b7ee78..04972e27 100644 --- a/docs/examples/storage/list-buckets.md +++ b/docs/examples/storage/list-buckets.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListBuckets( storage.WithListBucketsSearch(""), storage.WithListBucketsTotal(false), ) +``` diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index d764f53a..1393b19d 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListFiles( storage.WithListFilesSearch(""), storage.WithListFilesTotal(false), ) +``` diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index 7092c688..a3d2d421 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -27,3 +28,4 @@ response, error := service.UpdateBucket( storage.WithUpdateBucketAntivirus(false), storage.WithUpdateBucketTransformations(false), ) +``` diff --git a/docs/examples/storage/update-file.md b/docs/examples/storage/update-file.md index 79a75bab..e1ab83d0 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/examples/storage/update-file.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.UpdateFile( storage.WithUpdateFileName(""), storage.WithUpdateFilePermissions(interface{}{"read("any")"}), ) +``` diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index 6b356154..06b02734 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateBooleanColumn( tablesdb.WithCreateBooleanColumnDefault(false), tablesdb.WithCreateBooleanColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index 24a8aa75..e13f15cf 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateDatetimeColumn( tablesdb.WithCreateDatetimeColumnDefault(""), tablesdb.WithCreateDatetimeColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 918b3785..37648dce 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateEmailColumn( tablesdb.WithCreateEmailColumnDefault("email@example.com"), tablesdb.WithCreateEmailColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index 9eaef4be..d0aae3b0 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateEnumColumn( tablesdb.WithCreateEnumColumnDefault(""), tablesdb.WithCreateEnumColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index f630565e..32e9bd6d 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateFloatColumn( tablesdb.WithCreateFloatColumnDefault(0), tablesdb.WithCreateFloatColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index fb292b99..8f0adb3d 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateIndex( tablesdb.WithCreateIndexOrders([]interface{}{}), tablesdb.WithCreateIndexLengths([]interface{}{}), ) +``` diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index a56f5eec..ce9faa7b 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateIntegerColumn( tablesdb.WithCreateIntegerColumnDefault(0), tablesdb.WithCreateIntegerColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index 358b4cfa..5c29c003 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateIpColumn( tablesdb.WithCreateIpColumnDefault(""), tablesdb.WithCreateIpColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index 77b23f87..65532929 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.CreateLineColumn( false, tablesdb.WithCreateLineColumnDefault(interface{}{[1, 2], [3, 4], [5, 6]}), ) +``` diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index 910816db..4fca2539 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateLongtextColumn( tablesdb.WithCreateLongtextColumnDefault(""), tablesdb.WithCreateLongtextColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index caed1975..57687276 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateMediumtextColumn( tablesdb.WithCreateMediumtextColumnDefault(""), tablesdb.WithCreateMediumtextColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-operations.md b/docs/examples/tablesdb/create-operations.md index 330ece2b..c26ac618 100644 --- a/docs/examples/tablesdb/create-operations.md +++ b/docs/examples/tablesdb/create-operations.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.CreateOperations( } }), ) +``` diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index 7faaf786..41569ee8 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.CreatePointColumn( false, tablesdb.WithCreatePointColumnDefault(interface{}{1, 2}), ) +``` diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index 10946ef0..300bbf4e 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.CreatePolygonColumn( false, tablesdb.WithCreatePolygonColumnDefault(interface{}{[[1, 2], [3, 4], [5, 6], [1, 2]]}), ) +``` diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index 04235097..67122f11 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateRelationshipColumn( tablesdb.WithCreateRelationshipColumnTwoWayKey(""), tablesdb.WithCreateRelationshipColumnOnDelete("cascade"), ) +``` diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md index 24054ace..2068727b 100644 --- a/docs/examples/tablesdb/create-row.md +++ b/docs/examples/tablesdb/create-row.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.CreateRow( tablesdb.WithCreateRowPermissions(interface{}{"read("any")"}), tablesdb.WithCreateRowTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/create-rows.md b/docs/examples/tablesdb/create-rows.md index 6ddeb067..1a458204 100644 --- a/docs/examples/tablesdb/create-rows.md +++ b/docs/examples/tablesdb/create-rows.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateRows( []interface{}{}, tablesdb.WithCreateRowsTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index b31f5838..a4128e10 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateStringColumn( tablesdb.WithCreateStringColumnArray(false), tablesdb.WithCreateStringColumnEncrypt(false), ) +``` diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index c5e1826f..f08cbbbc 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.CreateTable( tablesdb.WithCreateTableColumns([]interface{}{}), tablesdb.WithCreateTableIndexes([]interface{}{}), ) +``` diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index 2b989d4a..f8fb4b19 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateTextColumn( tablesdb.WithCreateTextColumnDefault(""), tablesdb.WithCreateTextColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-transaction.md b/docs/examples/tablesdb/create-transaction.md index 165f897c..69fc2820 100644 --- a/docs/examples/tablesdb/create-transaction.md +++ b/docs/examples/tablesdb/create-transaction.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := tablesdb.New(client) response, error := service.CreateTransaction( tablesdb.WithCreateTransactionTtl(60), ) +``` diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index 55abd168..aae95af5 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateUrlColumn( tablesdb.WithCreateUrlColumnDefault("https://example.com"), tablesdb.WithCreateUrlColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index 99cce5dc..e669253f 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateVarcharColumn( tablesdb.WithCreateVarcharColumnDefault(""), tablesdb.WithCreateVarcharColumnArray(false), ) +``` diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index d09b6aea..96d3591e 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.Create( "", tablesdb.WithCreateEnabled(false), ) +``` diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md index a74bdda2..25e88937 100644 --- a/docs/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.DecrementRowColumn( tablesdb.WithDecrementRowColumnMin(0), tablesdb.WithDecrementRowColumnTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/delete-column.md b/docs/examples/tablesdb/delete-column.md index 475f4a4e..4b6ded52 100644 --- a/docs/examples/tablesdb/delete-column.md +++ b/docs/examples/tablesdb/delete-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.DeleteColumn( "", "", ) +``` diff --git a/docs/examples/tablesdb/delete-index.md b/docs/examples/tablesdb/delete-index.md index 2c3b7759..3b51b6b4 100644 --- a/docs/examples/tablesdb/delete-index.md +++ b/docs/examples/tablesdb/delete-index.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.DeleteIndex( "", "", ) +``` diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md index 39338452..ed2cedc2 100644 --- a/docs/examples/tablesdb/delete-row.md +++ b/docs/examples/tablesdb/delete-row.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.DeleteRow( "", tablesdb.WithDeleteRowTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/delete-rows.md b/docs/examples/tablesdb/delete-rows.md index b9fa49b5..f9a04cef 100644 --- a/docs/examples/tablesdb/delete-rows.md +++ b/docs/examples/tablesdb/delete-rows.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.DeleteRows( tablesdb.WithDeleteRowsQueries([]interface{}{}), tablesdb.WithDeleteRowsTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/delete-table.md b/docs/examples/tablesdb/delete-table.md index 9274fc61..1f6d922e 100644 --- a/docs/examples/tablesdb/delete-table.md +++ b/docs/examples/tablesdb/delete-table.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteTable( "", "", ) +``` diff --git a/docs/examples/tablesdb/delete-transaction.md b/docs/examples/tablesdb/delete-transaction.md index 16ee0505..be7918eb 100644 --- a/docs/examples/tablesdb/delete-transaction.md +++ b/docs/examples/tablesdb/delete-transaction.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := tablesdb.New(client) response, error := service.DeleteTransaction( "", ) +``` diff --git a/docs/examples/tablesdb/delete.md b/docs/examples/tablesdb/delete.md index fb00bf06..80507361 100644 --- a/docs/examples/tablesdb/delete.md +++ b/docs/examples/tablesdb/delete.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := tablesdb.New(client) response, error := service.Delete( "", ) +``` diff --git a/docs/examples/tablesdb/get-column.md b/docs/examples/tablesdb/get-column.md index 2cb626f9..28dcde5d 100644 --- a/docs/examples/tablesdb/get-column.md +++ b/docs/examples/tablesdb/get-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetColumn( "", "", ) +``` diff --git a/docs/examples/tablesdb/get-index.md b/docs/examples/tablesdb/get-index.md index a289d5ef..06a3dff3 100644 --- a/docs/examples/tablesdb/get-index.md +++ b/docs/examples/tablesdb/get-index.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.GetIndex( "", "", ) +``` diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md index 025c6b55..74172cf3 100644 --- a/docs/examples/tablesdb/get-row.md +++ b/docs/examples/tablesdb/get-row.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.GetRow( tablesdb.WithGetRowQueries([]interface{}{}), tablesdb.WithGetRowTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/get-table.md b/docs/examples/tablesdb/get-table.md index eb42f82c..bb3caada 100644 --- a/docs/examples/tablesdb/get-table.md +++ b/docs/examples/tablesdb/get-table.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetTable( "", "", ) +``` diff --git a/docs/examples/tablesdb/get-transaction.md b/docs/examples/tablesdb/get-transaction.md index d478007b..e33f9b22 100644 --- a/docs/examples/tablesdb/get-transaction.md +++ b/docs/examples/tablesdb/get-transaction.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := tablesdb.New(client) response, error := service.GetTransaction( "", ) +``` diff --git a/docs/examples/tablesdb/get.md b/docs/examples/tablesdb/get.md index 9bf18901..91eaa271 100644 --- a/docs/examples/tablesdb/get.md +++ b/docs/examples/tablesdb/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := tablesdb.New(client) response, error := service.Get( "", ) +``` diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md index 4548f3cb..c2ff437b 100644 --- a/docs/examples/tablesdb/increment-row-column.md +++ b/docs/examples/tablesdb/increment-row-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.IncrementRowColumn( tablesdb.WithIncrementRowColumnMax(0), tablesdb.WithIncrementRowColumnTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/list-columns.md b/docs/examples/tablesdb/list-columns.md index 9a7f4099..0bad3360 100644 --- a/docs/examples/tablesdb/list-columns.md +++ b/docs/examples/tablesdb/list-columns.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListColumns( tablesdb.WithListColumnsQueries([]interface{}{}), tablesdb.WithListColumnsTotal(false), ) +``` diff --git a/docs/examples/tablesdb/list-indexes.md b/docs/examples/tablesdb/list-indexes.md index 826c55dc..bb9b632d 100644 --- a/docs/examples/tablesdb/list-indexes.md +++ b/docs/examples/tablesdb/list-indexes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListIndexes( tablesdb.WithListIndexesQueries([]interface{}{}), tablesdb.WithListIndexesTotal(false), ) +``` diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md index 5a421ef6..b1977609 100644 --- a/docs/examples/tablesdb/list-rows.md +++ b/docs/examples/tablesdb/list-rows.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.ListRows( tablesdb.WithListRowsTransactionId(""), tablesdb.WithListRowsTotal(false), ) +``` diff --git a/docs/examples/tablesdb/list-tables.md b/docs/examples/tablesdb/list-tables.md index b9f77145..f16e9df4 100644 --- a/docs/examples/tablesdb/list-tables.md +++ b/docs/examples/tablesdb/list-tables.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListTables( tablesdb.WithListTablesSearch(""), tablesdb.WithListTablesTotal(false), ) +``` diff --git a/docs/examples/tablesdb/list-transactions.md b/docs/examples/tablesdb/list-transactions.md index 7379d855..edeff0ba 100644 --- a/docs/examples/tablesdb/list-transactions.md +++ b/docs/examples/tablesdb/list-transactions.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := tablesdb.New(client) response, error := service.ListTransactions( tablesdb.WithListTransactionsQueries([]interface{}{}), ) +``` diff --git a/docs/examples/tablesdb/list.md b/docs/examples/tablesdb/list.md index aba33d9c..596a8cc8 100644 --- a/docs/examples/tablesdb/list.md +++ b/docs/examples/tablesdb/list.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.List( tablesdb.WithListSearch(""), tablesdb.WithListTotal(false), ) +``` diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index 9b0bdd30..c1948aed 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateBooleanColumn( false, tablesdb.WithUpdateBooleanColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index 9c406cae..8a75b756 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateDatetimeColumn( "", tablesdb.WithUpdateDatetimeColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index 74483f31..d4e8e4ae 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateEmailColumn( "email@example.com", tablesdb.WithUpdateEmailColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index f2151725..4a43bc1f 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.UpdateEnumColumn( "", tablesdb.WithUpdateEnumColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index 9daf2c22..256b14b2 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.UpdateFloatColumn( tablesdb.WithUpdateFloatColumnMax(0), tablesdb.WithUpdateFloatColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index 86a11352..829fd09f 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -24,3 +25,4 @@ response, error := service.UpdateIntegerColumn( tablesdb.WithUpdateIntegerColumnMax(0), tablesdb.WithUpdateIntegerColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index 1c4bdb4f..1b9e5351 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateIpColumn( "", tablesdb.WithUpdateIpColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index 397e0b73..fa1d84e5 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateLineColumn( tablesdb.WithUpdateLineColumnDefault(interface{}{[1, 2], [3, 4], [5, 6]}), tablesdb.WithUpdateLineColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md index 604e35c0..89be1c6b 100644 --- a/docs/examples/tablesdb/update-longtext-column.md +++ b/docs/examples/tablesdb/update-longtext-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateLongtextColumn( "", tablesdb.WithUpdateLongtextColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md index 144cd744..115b75fa 100644 --- a/docs/examples/tablesdb/update-mediumtext-column.md +++ b/docs/examples/tablesdb/update-mediumtext-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateMediumtextColumn( "", tablesdb.WithUpdateMediumtextColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index 970536a6..1e3b0400 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdatePointColumn( tablesdb.WithUpdatePointColumnDefault(interface{}{1, 2}), tablesdb.WithUpdatePointColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index 8e627d17..1197f849 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdatePolygonColumn( tablesdb.WithUpdatePolygonColumnDefault(interface{}{[[1, 2], [3, 4], [5, 6], [1, 2]]}), tablesdb.WithUpdatePolygonColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index ed923a2d..f3b63f25 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.UpdateRelationshipColumn( tablesdb.WithUpdateRelationshipColumnOnDelete("cascade"), tablesdb.WithUpdateRelationshipColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md index 212be5b2..dd2b3b92 100644 --- a/docs/examples/tablesdb/update-row.md +++ b/docs/examples/tablesdb/update-row.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.UpdateRow( tablesdb.WithUpdateRowPermissions(interface{}{"read("any")"}), tablesdb.WithUpdateRowTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/update-rows.md b/docs/examples/tablesdb/update-rows.md index 706abaee..95203a20 100644 --- a/docs/examples/tablesdb/update-rows.md +++ b/docs/examples/tablesdb/update-rows.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -27,3 +28,4 @@ response, error := service.UpdateRows( tablesdb.WithUpdateRowsQueries([]interface{}{}), tablesdb.WithUpdateRowsTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index 4366602b..c3ad25ef 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.UpdateStringColumn( tablesdb.WithUpdateStringColumnSize(1), tablesdb.WithUpdateStringColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index a40cd597..f77781d6 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateTable( tablesdb.WithUpdateTableRowSecurity(false), tablesdb.WithUpdateTableEnabled(false), ) +``` diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md index dc417872..5b406f7e 100644 --- a/docs/examples/tablesdb/update-text-column.md +++ b/docs/examples/tablesdb/update-text-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateTextColumn( "", tablesdb.WithUpdateTextColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-transaction.md b/docs/examples/tablesdb/update-transaction.md index 9842a455..5cce91ae 100644 --- a/docs/examples/tablesdb/update-transaction.md +++ b/docs/examples/tablesdb/update-transaction.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.UpdateTransaction( tablesdb.WithUpdateTransactionCommit(false), tablesdb.WithUpdateTransactionRollback(false), ) +``` diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index 998d0e77..4a809e1e 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.UpdateUrlColumn( "https://example.com", tablesdb.WithUpdateUrlColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md index 97dfb744..7ee853e7 100644 --- a/docs/examples/tablesdb/update-varchar-column.md +++ b/docs/examples/tablesdb/update-varchar-column.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.UpdateVarcharColumn( tablesdb.WithUpdateVarcharColumnSize(1), tablesdb.WithUpdateVarcharColumnNewKey(""), ) +``` diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index 47641efc..268b1852 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.Update( tablesdb.WithUpdateName(""), tablesdb.WithUpdateEnabled(false), ) +``` diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md index 097b3550..2f1507de 100644 --- a/docs/examples/tablesdb/upsert-row.md +++ b/docs/examples/tablesdb/upsert-row.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -28,3 +29,4 @@ response, error := service.UpsertRow( tablesdb.WithUpsertRowPermissions(interface{}{"read("any")"}), tablesdb.WithUpsertRowTransactionId(""), ) +``` diff --git a/docs/examples/tablesdb/upsert-rows.md b/docs/examples/tablesdb/upsert-rows.md index a74d6ee9..322b1ccb 100644 --- a/docs/examples/tablesdb/upsert-rows.md +++ b/docs/examples/tablesdb/upsert-rows.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.UpsertRows( []interface{}{}, tablesdb.WithUpsertRowsTransactionId(""), ) +``` diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index b8a71c18..a640e661 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateMembership( teams.WithCreateMembershipUrl("https://example.com"), teams.WithCreateMembershipName(""), ) +``` diff --git a/docs/examples/teams/create.md b/docs/examples/teams/create.md index 0a0fa5aa..b86ee631 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.Create( "", teams.WithCreateRoles([]interface{}{}), ) +``` diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index 1d9e1983..77f058a3 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/examples/teams/delete-membership.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteMembership( "", "", ) +``` diff --git a/docs/examples/teams/delete.md b/docs/examples/teams/delete.md index 8cf9892d..88305907 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := teams.New(client) response, error := service.Delete( "", ) +``` diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index 47d63bbb..1688bdb9 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/examples/teams/get-membership.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetMembership( "", "", ) +``` diff --git a/docs/examples/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index fd487d2c..1de3006b 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := teams.New(client) response, error := service.GetPrefs( "", ) +``` diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index 64dfb9b6..ab8ee6cb 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := teams.New(client) response, error := service.Get( "", ) +``` diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index 8b71afe7..b7da5b3d 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListMemberships( teams.WithListMembershipsSearch(""), teams.WithListMembershipsTotal(false), ) +``` diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index 17776372..53332b2a 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.List( teams.WithListSearch(""), teams.WithListTotal(false), ) +``` diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index 72bb53e0..905e35d1 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.UpdateMembershipStatus( "", "", ) +``` diff --git a/docs/examples/teams/update-membership.md b/docs/examples/teams/update-membership.md index 4bfde072..b4ac9da8 100644 --- a/docs/examples/teams/update-membership.md +++ b/docs/examples/teams/update-membership.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.UpdateMembership( "", []interface{}{}, ) +``` diff --git a/docs/examples/teams/update-name.md b/docs/examples/teams/update-name.md index 02fba6b4..3de69240 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/examples/teams/update-name.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateName( "", "", ) +``` diff --git a/docs/examples/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index a5f44c07..c042d0af 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/examples/teams/update-prefs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePrefs( "", map[string]interface{}{}, ) +``` diff --git a/docs/examples/tokens/create-file-token.md b/docs/examples/tokens/create-file-token.md index b05e5f7e..f21569d3 100644 --- a/docs/examples/tokens/create-file-token.md +++ b/docs/examples/tokens/create-file-token.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.CreateFileToken( "", tokens.WithCreateFileTokenExpire(""), ) +``` diff --git a/docs/examples/tokens/delete.md b/docs/examples/tokens/delete.md index 807ba410..e0d72aed 100644 --- a/docs/examples/tokens/delete.md +++ b/docs/examples/tokens/delete.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := tokens.New(client) response, error := service.Delete( "", ) +``` diff --git a/docs/examples/tokens/get.md b/docs/examples/tokens/get.md index 277e4621..eef351dd 100644 --- a/docs/examples/tokens/get.md +++ b/docs/examples/tokens/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := tokens.New(client) response, error := service.Get( "", ) +``` diff --git a/docs/examples/tokens/list.md b/docs/examples/tokens/list.md index e84ee1e3..a702a858 100644 --- a/docs/examples/tokens/list.md +++ b/docs/examples/tokens/list.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.List( tokens.WithListQueries([]interface{}{}), tokens.WithListTotal(false), ) +``` diff --git a/docs/examples/tokens/update.md b/docs/examples/tokens/update.md index b4bbc547..a1c14c48 100644 --- a/docs/examples/tokens/update.md +++ b/docs/examples/tokens/update.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.Update( "", tokens.WithUpdateExpire(""), ) +``` diff --git a/docs/examples/users/create-argon-2-user.md b/docs/examples/users/create-argon-2-user.md index f5b651a1..cb795ee8 100644 --- a/docs/examples/users/create-argon-2-user.md +++ b/docs/examples/users/create-argon-2-user.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateArgon2User( "password", users.WithCreateArgon2UserName(""), ) +``` diff --git a/docs/examples/users/create-bcrypt-user.md b/docs/examples/users/create-bcrypt-user.md index b021f96f..bc0faa82 100644 --- a/docs/examples/users/create-bcrypt-user.md +++ b/docs/examples/users/create-bcrypt-user.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateBcryptUser( "password", users.WithCreateBcryptUserName(""), ) +``` diff --git a/docs/examples/users/create-jwt.md b/docs/examples/users/create-jwt.md index 426f832b..6530a21c 100644 --- a/docs/examples/users/create-jwt.md +++ b/docs/examples/users/create-jwt.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.CreateJWT( users.WithCreateJWTSessionId(""), users.WithCreateJWTDuration(0), ) +``` diff --git a/docs/examples/users/create-md-5-user.md b/docs/examples/users/create-md-5-user.md index 0da3f687..69b5d795 100644 --- a/docs/examples/users/create-md-5-user.md +++ b/docs/examples/users/create-md-5-user.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreateMD5User( "password", users.WithCreateMD5UserName(""), ) +``` diff --git a/docs/examples/users/create-mfa-recovery-codes.md b/docs/examples/users/create-mfa-recovery-codes.md index 4808f633..dbe85cb1 100644 --- a/docs/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/users/create-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.CreateMFARecoveryCodes( "", ) +``` diff --git a/docs/examples/users/create-ph-pass-user.md b/docs/examples/users/create-ph-pass-user.md index 28e77e37..da042352 100644 --- a/docs/examples/users/create-ph-pass-user.md +++ b/docs/examples/users/create-ph-pass-user.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.CreatePHPassUser( "password", users.WithCreatePHPassUserName(""), ) +``` diff --git a/docs/examples/users/create-scrypt-modified-user.md b/docs/examples/users/create-scrypt-modified-user.md index 51cc11bf..20930c4f 100644 --- a/docs/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/users/create-scrypt-modified-user.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -23,3 +24,4 @@ response, error := service.CreateScryptModifiedUser( "", users.WithCreateScryptModifiedUserName(""), ) +``` diff --git a/docs/examples/users/create-scrypt-user.md b/docs/examples/users/create-scrypt-user.md index a64fcfbb..16e76b4d 100644 --- a/docs/examples/users/create-scrypt-user.md +++ b/docs/examples/users/create-scrypt-user.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -25,3 +26,4 @@ response, error := service.CreateScryptUser( 0, users.WithCreateScryptUserName(""), ) +``` diff --git a/docs/examples/users/create-session.md b/docs/examples/users/create-session.md index 7bbd39de..3b87e89a 100644 --- a/docs/examples/users/create-session.md +++ b/docs/examples/users/create-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.CreateSession( "", ) +``` diff --git a/docs/examples/users/create-sha-user.md b/docs/examples/users/create-sha-user.md index 72115985..703897d6 100644 --- a/docs/examples/users/create-sha-user.md +++ b/docs/examples/users/create-sha-user.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.CreateSHAUser( users.WithCreateSHAUserPasswordVersion("sha1"), users.WithCreateSHAUserName(""), ) +``` diff --git a/docs/examples/users/create-target.md b/docs/examples/users/create-target.md index 8d4f2841..cf8e350c 100644 --- a/docs/examples/users/create-target.md +++ b/docs/examples/users/create-target.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -22,3 +23,4 @@ response, error := service.CreateTarget( users.WithCreateTargetProviderId(""), users.WithCreateTargetName(""), ) +``` diff --git a/docs/examples/users/create-token.md b/docs/examples/users/create-token.md index 44d96c1f..47c8fbe7 100644 --- a/docs/examples/users/create-token.md +++ b/docs/examples/users/create-token.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.CreateToken( users.WithCreateTokenLength(4), users.WithCreateTokenExpire(60), ) +``` diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index b4d1afca..8ccdd6b5 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.Create( users.WithCreatePassword(""), users.WithCreateName(""), ) +``` diff --git a/docs/examples/users/delete-identity.md b/docs/examples/users/delete-identity.md index 14baa660..6ecce869 100644 --- a/docs/examples/users/delete-identity.md +++ b/docs/examples/users/delete-identity.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.DeleteIdentity( "", ) +``` diff --git a/docs/examples/users/delete-mfa-authenticator.md b/docs/examples/users/delete-mfa-authenticator.md index d32a5c3e..1f7d7d9c 100644 --- a/docs/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/users/delete-mfa-authenticator.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteMFAAuthenticator( "", "totp", ) +``` diff --git a/docs/examples/users/delete-session.md b/docs/examples/users/delete-session.md index 3162ae92..d53a8be6 100644 --- a/docs/examples/users/delete-session.md +++ b/docs/examples/users/delete-session.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteSession( "", "", ) +``` diff --git a/docs/examples/users/delete-sessions.md b/docs/examples/users/delete-sessions.md index 8d0bbfc1..49cee0b6 100644 --- a/docs/examples/users/delete-sessions.md +++ b/docs/examples/users/delete-sessions.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.DeleteSessions( "", ) +``` diff --git a/docs/examples/users/delete-target.md b/docs/examples/users/delete-target.md index 2fa4ae91..15cbd4ef 100644 --- a/docs/examples/users/delete-target.md +++ b/docs/examples/users/delete-target.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.DeleteTarget( "", "", ) +``` diff --git a/docs/examples/users/delete.md b/docs/examples/users/delete.md index 72a4122b..04fe1ba6 100644 --- a/docs/examples/users/delete.md +++ b/docs/examples/users/delete.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.Delete( "", ) +``` diff --git a/docs/examples/users/get-mfa-recovery-codes.md b/docs/examples/users/get-mfa-recovery-codes.md index ff24b6ff..a745c402 100644 --- a/docs/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/users/get-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.GetMFARecoveryCodes( "", ) +``` diff --git a/docs/examples/users/get-prefs.md b/docs/examples/users/get-prefs.md index e4a05d1c..832a26bf 100644 --- a/docs/examples/users/get-prefs.md +++ b/docs/examples/users/get-prefs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.GetPrefs( "", ) +``` diff --git a/docs/examples/users/get-target.md b/docs/examples/users/get-target.md index b4b99c7e..5722608e 100644 --- a/docs/examples/users/get-target.md +++ b/docs/examples/users/get-target.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.GetTarget( "", "", ) +``` diff --git a/docs/examples/users/get.md b/docs/examples/users/get.md index 85a8440d..5b0d2265 100644 --- a/docs/examples/users/get.md +++ b/docs/examples/users/get.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.Get( "", ) +``` diff --git a/docs/examples/users/list-identities.md b/docs/examples/users/list-identities.md index 9858a2a2..ffd780de 100644 --- a/docs/examples/users/list-identities.md +++ b/docs/examples/users/list-identities.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListIdentities( users.WithListIdentitiesSearch(""), users.WithListIdentitiesTotal(false), ) +``` diff --git a/docs/examples/users/list-logs.md b/docs/examples/users/list-logs.md index d3b2840b..0906c3b5 100644 --- a/docs/examples/users/list-logs.md +++ b/docs/examples/users/list-logs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListLogs( users.WithListLogsQueries([]interface{}{}), users.WithListLogsTotal(false), ) +``` diff --git a/docs/examples/users/list-memberships.md b/docs/examples/users/list-memberships.md index 28b96dae..ac8469cf 100644 --- a/docs/examples/users/list-memberships.md +++ b/docs/examples/users/list-memberships.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -20,3 +21,4 @@ response, error := service.ListMemberships( users.WithListMembershipsSearch(""), users.WithListMembershipsTotal(false), ) +``` diff --git a/docs/examples/users/list-mfa-factors.md b/docs/examples/users/list-mfa-factors.md index 9a3c3263..a8c8df5a 100644 --- a/docs/examples/users/list-mfa-factors.md +++ b/docs/examples/users/list-mfa-factors.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.ListMFAFactors( "", ) +``` diff --git a/docs/examples/users/list-sessions.md b/docs/examples/users/list-sessions.md index 60ccd788..40047a7b 100644 --- a/docs/examples/users/list-sessions.md +++ b/docs/examples/users/list-sessions.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.ListSessions( "", users.WithListSessionsTotal(false), ) +``` diff --git a/docs/examples/users/list-targets.md b/docs/examples/users/list-targets.md index 1e738825..193282ea 100644 --- a/docs/examples/users/list-targets.md +++ b/docs/examples/users/list-targets.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.ListTargets( users.WithListTargetsQueries([]interface{}{}), users.WithListTargetsTotal(false), ) +``` diff --git a/docs/examples/users/list.md b/docs/examples/users/list.md index b50a818f..ca7d0763 100644 --- a/docs/examples/users/list.md +++ b/docs/examples/users/list.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -19,3 +20,4 @@ response, error := service.List( users.WithListSearch(""), users.WithListTotal(false), ) +``` diff --git a/docs/examples/users/update-email-verification.md b/docs/examples/users/update-email-verification.md index c2326b4c..72d2fa88 100644 --- a/docs/examples/users/update-email-verification.md +++ b/docs/examples/users/update-email-verification.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateEmailVerification( "", false, ) +``` diff --git a/docs/examples/users/update-email.md b/docs/examples/users/update-email.md index ac3938a6..22871898 100644 --- a/docs/examples/users/update-email.md +++ b/docs/examples/users/update-email.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateEmail( "", "email@example.com", ) +``` diff --git a/docs/examples/users/update-labels.md b/docs/examples/users/update-labels.md index 01c37f53..f02616b5 100644 --- a/docs/examples/users/update-labels.md +++ b/docs/examples/users/update-labels.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateLabels( "", []interface{}{}, ) +``` diff --git a/docs/examples/users/update-mfa-recovery-codes.md b/docs/examples/users/update-mfa-recovery-codes.md index f79ac5c5..e1f8351a 100644 --- a/docs/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/users/update-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -17,3 +18,4 @@ service := users.New(client) response, error := service.UpdateMFARecoveryCodes( "", ) +``` diff --git a/docs/examples/users/update-mfa.md b/docs/examples/users/update-mfa.md index 9cff007f..75dfe95a 100644 --- a/docs/examples/users/update-mfa.md +++ b/docs/examples/users/update-mfa.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateMFA( "", false, ) +``` diff --git a/docs/examples/users/update-name.md b/docs/examples/users/update-name.md index 73255e25..1bbed897 100644 --- a/docs/examples/users/update-name.md +++ b/docs/examples/users/update-name.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateName( "", "", ) +``` diff --git a/docs/examples/users/update-password.md b/docs/examples/users/update-password.md index 5aa6e9ef..54d67621 100644 --- a/docs/examples/users/update-password.md +++ b/docs/examples/users/update-password.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePassword( "", "", ) +``` diff --git a/docs/examples/users/update-phone-verification.md b/docs/examples/users/update-phone-verification.md index e90febf7..9f7fb5e9 100644 --- a/docs/examples/users/update-phone-verification.md +++ b/docs/examples/users/update-phone-verification.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePhoneVerification( "", false, ) +``` diff --git a/docs/examples/users/update-phone.md b/docs/examples/users/update-phone.md index 602a012a..f9a72c3c 100644 --- a/docs/examples/users/update-phone.md +++ b/docs/examples/users/update-phone.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePhone( "", "+12065550100", ) +``` diff --git a/docs/examples/users/update-prefs.md b/docs/examples/users/update-prefs.md index dd607f3c..cca857ea 100644 --- a/docs/examples/users/update-prefs.md +++ b/docs/examples/users/update-prefs.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdatePrefs( "", map[string]interface{}{}, ) +``` diff --git a/docs/examples/users/update-status.md b/docs/examples/users/update-status.md index f93dde9c..b31b714d 100644 --- a/docs/examples/users/update-status.md +++ b/docs/examples/users/update-status.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -18,3 +19,4 @@ response, error := service.UpdateStatus( "", false, ) +``` diff --git a/docs/examples/users/update-target.md b/docs/examples/users/update-target.md index 82f3d65d..c6f6d4a0 100644 --- a/docs/examples/users/update-target.md +++ b/docs/examples/users/update-target.md @@ -1,3 +1,4 @@ +```go package main import ( @@ -21,3 +22,4 @@ response, error := service.UpdateTarget( users.WithUpdateTargetProviderId(""), users.WithUpdateTargetName(""), ) +``` diff --git a/health/health.go b/health/health.go index a32f9a8f..c02f233b 100644 --- a/health/health.go +++ b/health/health.go @@ -295,6 +295,118 @@ func (srv *Health) GetQueueAudits(optionalSetters ...GetQueueAuditsOption)(*mode } return &parsed, nil +} +type GetQueueBillingProjectAggregationOptions struct { + Threshold int + enabledSetters map[string]bool +} +func (options GetQueueBillingProjectAggregationOptions) New() *GetQueueBillingProjectAggregationOptions { + options.enabledSetters = map[string]bool{ + "Threshold": false, + } + return &options +} +type GetQueueBillingProjectAggregationOption func(*GetQueueBillingProjectAggregationOptions) +func (srv *Health) WithGetQueueBillingProjectAggregationThreshold(v int) GetQueueBillingProjectAggregationOption { + return func(o *GetQueueBillingProjectAggregationOptions) { + o.Threshold = v + o.enabledSetters["Threshold"] = true + } +} + +// GetQueueBillingProjectAggregation get billing project aggregation queue. +func (srv *Health) GetQueueBillingProjectAggregation(optionalSetters ...GetQueueBillingProjectAggregationOption)(*models.HealthQueue, error) { + path := "/health/queue/billing-project-aggregation" + options := GetQueueBillingProjectAggregationOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Threshold"] { + params["threshold"] = options.Threshold + } + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.HealthQueue{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.HealthQueue + parsed, ok := resp.Result.(models.HealthQueue) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type GetQueueBillingTeamAggregationOptions struct { + Threshold int + enabledSetters map[string]bool +} +func (options GetQueueBillingTeamAggregationOptions) New() *GetQueueBillingTeamAggregationOptions { + options.enabledSetters = map[string]bool{ + "Threshold": false, + } + return &options +} +type GetQueueBillingTeamAggregationOption func(*GetQueueBillingTeamAggregationOptions) +func (srv *Health) WithGetQueueBillingTeamAggregationThreshold(v int) GetQueueBillingTeamAggregationOption { + return func(o *GetQueueBillingTeamAggregationOptions) { + o.Threshold = v + o.enabledSetters["Threshold"] = true + } +} + +// GetQueueBillingTeamAggregation get billing team aggregation queue. +func (srv *Health) GetQueueBillingTeamAggregation(optionalSetters ...GetQueueBillingTeamAggregationOption)(*models.HealthQueue, error) { + path := "/health/queue/billing-team-aggregation" + options := GetQueueBillingTeamAggregationOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Threshold"] { + params["threshold"] = options.Threshold + } + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.HealthQueue{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.HealthQueue + parsed, ok := resp.Result.(models.HealthQueue) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + } type GetQueueBuildsOptions struct { Threshold int @@ -352,6 +464,62 @@ func (srv *Health) GetQueueBuilds(optionalSetters ...GetQueueBuildsOption)(*mode } return &parsed, nil +} +type GetQueuePriorityBuildsOptions struct { + Threshold int + enabledSetters map[string]bool +} +func (options GetQueuePriorityBuildsOptions) New() *GetQueuePriorityBuildsOptions { + options.enabledSetters = map[string]bool{ + "Threshold": false, + } + return &options +} +type GetQueuePriorityBuildsOption func(*GetQueuePriorityBuildsOptions) +func (srv *Health) WithGetQueuePriorityBuildsThreshold(v int) GetQueuePriorityBuildsOption { + return func(o *GetQueuePriorityBuildsOptions) { + o.Threshold = v + o.enabledSetters["Threshold"] = true + } +} + +// GetQueuePriorityBuilds get the priority builds queue size. +func (srv *Health) GetQueuePriorityBuilds(optionalSetters ...GetQueuePriorityBuildsOption)(*models.HealthQueue, error) { + path := "/health/queue/builds-priority" + options := GetQueuePriorityBuildsOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Threshold"] { + params["threshold"] = options.Threshold + } + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.HealthQueue{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.HealthQueue + parsed, ok := resp.Result.(models.HealthQueue) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + } type GetQueueCertificatesOptions struct { Threshold int @@ -878,6 +1046,62 @@ func (srv *Health) GetQueueMigrations(optionalSetters ...GetQueueMigrationsOptio } return &parsed, nil +} +type GetQueueRegionManagerOptions struct { + Threshold int + enabledSetters map[string]bool +} +func (options GetQueueRegionManagerOptions) New() *GetQueueRegionManagerOptions { + options.enabledSetters = map[string]bool{ + "Threshold": false, + } + return &options +} +type GetQueueRegionManagerOption func(*GetQueueRegionManagerOptions) +func (srv *Health) WithGetQueueRegionManagerThreshold(v int) GetQueueRegionManagerOption { + return func(o *GetQueueRegionManagerOptions) { + o.Threshold = v + o.enabledSetters["Threshold"] = true + } +} + +// GetQueueRegionManager get region manager queue. +func (srv *Health) GetQueueRegionManager(optionalSetters ...GetQueueRegionManagerOption)(*models.HealthQueue, error) { + path := "/health/queue/region-manager" + options := GetQueueRegionManagerOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Threshold"] { + params["threshold"] = options.Threshold + } + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.HealthQueue{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.HealthQueue + parsed, ok := resp.Result.(models.HealthQueue) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + } type GetQueueStatsResourcesOptions struct { Threshold int @@ -992,6 +1216,62 @@ func (srv *Health) GetQueueUsage(optionalSetters ...GetQueueUsageOption)(*models } return &parsed, nil +} +type GetQueueThreatsOptions struct { + Threshold int + enabledSetters map[string]bool +} +func (options GetQueueThreatsOptions) New() *GetQueueThreatsOptions { + options.enabledSetters = map[string]bool{ + "Threshold": false, + } + return &options +} +type GetQueueThreatsOption func(*GetQueueThreatsOptions) +func (srv *Health) WithGetQueueThreatsThreshold(v int) GetQueueThreatsOption { + return func(o *GetQueueThreatsOptions) { + o.Threshold = v + o.enabledSetters["Threshold"] = true + } +} + +// GetQueueThreats get threats queue. +func (srv *Health) GetQueueThreats(optionalSetters ...GetQueueThreatsOption)(*models.HealthQueue, error) { + path := "/health/queue/threats" + options := GetQueueThreatsOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Threshold"] { + params["threshold"] = options.Threshold + } + headers := map[string]interface{}{ + } + + resp, err := srv.client.Call("GET", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.HealthQueue{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.HealthQueue + parsed, ok := resp.Result.(models.HealthQueue) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + } type GetQueueWebhooksOptions struct { Threshold int diff --git a/models/backup_archive.go b/models/backup_archive.go new file mode 100644 index 00000000..88b0395e --- /dev/null +++ b/models/backup_archive.go @@ -0,0 +1,58 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// Archive Model +type BackupArchive struct { + // Archive ID. + Id string `json:"$id"` + // Archive creation time in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Archive update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Archive policy ID. + PolicyId string `json:"policyId"` + // Archive size in bytes. + Size int `json:"size"` + // The status of the archive creation. Possible values: pending, processing, + // uploading, completed, failed. + Status string `json:"status"` + // The backup start time. + StartedAt string `json:"startedAt"` + // Migration ID. + MigrationId string `json:"migrationId"` + // The services that are backed up by this archive. + Services []string `json:"services"` + // The resources that are backed up by this archive. + Resources []string `json:"resources"` + // The resource ID to backup. Set only if this archive should backup a single + // resource. + ResourceId string `json:"resourceId"` + // The resource type to backup. Set only if this archive should backup a + // single resource. + ResourceType string `json:"resourceType"` + + // Used by Decode() method + data []byte +} + +func (model BackupArchive) New(data []byte) *BackupArchive { + model.data = data + return &model +} + +func (model *BackupArchive) Decode(value interface{}) error { + if len(model.data) <= 0 { + return errors.New("method Decode() cannot be used on nested struct") + } + + err := json.Unmarshal(model.data, value) + if err != nil { + return err + } + + return nil +} \ No newline at end of file diff --git a/models/backup_archive_list.go b/models/backup_archive_list.go new file mode 100644 index 00000000..8aebff87 --- /dev/null +++ b/models/backup_archive_list.go @@ -0,0 +1,35 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// BackupArchiveList Model +type BackupArchiveList struct { + // Total number of archives that matched your query. + Total int `json:"total"` + // List of archives. + Archives []BackupArchive `json:"archives"` + + // Used by Decode() method + data []byte +} + +func (model BackupArchiveList) New(data []byte) *BackupArchiveList { + model.data = data + return &model +} + +func (model *BackupArchiveList) Decode(value interface{}) error { + if len(model.data) <= 0 { + return errors.New("method Decode() cannot be used on nested struct") + } + + err := json.Unmarshal(model.data, value) + if err != nil { + return err + } + + return nil +} \ No newline at end of file diff --git a/models/backup_policy.go b/models/backup_policy.go new file mode 100644 index 00000000..015e190f --- /dev/null +++ b/models/backup_policy.go @@ -0,0 +1,55 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// Backup Model +type BackupPolicy struct { + // Backup policy ID. + Id string `json:"$id"` + // Backup policy name. + Name string `json:"name"` + // Policy creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Policy update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // The services that are backed up by this policy. + Services []string `json:"services"` + // The resources that are backed up by this policy. + Resources []string `json:"resources"` + // The resource ID to backup. Set only if this policy should backup a single + // resource. + ResourceId string `json:"resourceId"` + // The resource type to backup. Set only if this policy should backup a single + // resource. + ResourceType string `json:"resourceType"` + // How many days to keep the backup before it will be automatically deleted. + Retention int `json:"retention"` + // Policy backup schedule in CRON format. + Schedule string `json:"schedule"` + // Is this policy enabled. + Enabled bool `json:"enabled"` + + // Used by Decode() method + data []byte +} + +func (model BackupPolicy) New(data []byte) *BackupPolicy { + model.data = data + return &model +} + +func (model *BackupPolicy) Decode(value interface{}) error { + if len(model.data) <= 0 { + return errors.New("method Decode() cannot be used on nested struct") + } + + err := json.Unmarshal(model.data, value) + if err != nil { + return err + } + + return nil +} \ No newline at end of file diff --git a/models/backup_policy_list.go b/models/backup_policy_list.go new file mode 100644 index 00000000..fc2056df --- /dev/null +++ b/models/backup_policy_list.go @@ -0,0 +1,35 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// BackupPolicyList Model +type BackupPolicyList struct { + // Total number of policies that matched your query. + Total int `json:"total"` + // List of policies. + Policies []BackupPolicy `json:"policies"` + + // Used by Decode() method + data []byte +} + +func (model BackupPolicyList) New(data []byte) *BackupPolicyList { + model.data = data + return &model +} + +func (model *BackupPolicyList) Decode(value interface{}) error { + if len(model.data) <= 0 { + return errors.New("method Decode() cannot be used on nested struct") + } + + err := json.Unmarshal(model.data, value) + if err != nil { + return err + } + + return nil +} \ No newline at end of file diff --git a/models/backup_restoration.go b/models/backup_restoration.go new file mode 100644 index 00000000..56518e5c --- /dev/null +++ b/models/backup_restoration.go @@ -0,0 +1,54 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// Restoration Model +type BackupRestoration struct { + // Restoration ID. + Id string `json:"$id"` + // Restoration creation time in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Restoration update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Backup archive ID. + ArchiveId string `json:"archiveId"` + // Backup policy ID. + PolicyId string `json:"policyId"` + // The status of the restoration. Possible values: pending, downloading, + // processing, completed, failed. + Status string `json:"status"` + // The backup start time. + StartedAt string `json:"startedAt"` + // Migration ID. + MigrationId string `json:"migrationId"` + // The services that are backed up by this policy. + Services []string `json:"services"` + // The resources that are backed up by this policy. + Resources []string `json:"resources"` + // Optional data in key-value object. + Options string `json:"options"` + + // Used by Decode() method + data []byte +} + +func (model BackupRestoration) New(data []byte) *BackupRestoration { + model.data = data + return &model +} + +func (model *BackupRestoration) Decode(value interface{}) error { + if len(model.data) <= 0 { + return errors.New("method Decode() cannot be used on nested struct") + } + + err := json.Unmarshal(model.data, value) + if err != nil { + return err + } + + return nil +} \ No newline at end of file diff --git a/models/backup_restoration_list.go b/models/backup_restoration_list.go new file mode 100644 index 00000000..cb038e50 --- /dev/null +++ b/models/backup_restoration_list.go @@ -0,0 +1,35 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// BackupRestorationList Model +type BackupRestorationList struct { + // Total number of restorations that matched your query. + Total int `json:"total"` + // List of restorations. + Restorations []BackupRestoration `json:"restorations"` + + // Used by Decode() method + data []byte +} + +func (model BackupRestorationList) New(data []byte) *BackupRestorationList { + model.data = data + return &model +} + +func (model *BackupRestorationList) Decode(value interface{}) error { + if len(model.data) <= 0 { + return errors.New("method Decode() cannot be used on nested struct") + } + + err := json.Unmarshal(model.data, value) + if err != nil { + return err + } + + return nil +} \ No newline at end of file diff --git a/models/collection.go b/models/collection.go index b1b8fcaa..806fecbf 100644 --- a/models/collection.go +++ b/models/collection.go @@ -31,6 +31,10 @@ type Collection struct { Attributes []map[string]any `json:"attributes"` // Collection indexes. Indexes []Index `json:"indexes"` + // Maximum document size in bytes. Returns 0 when no limit applies. + BytesMax int `json:"bytesMax"` + // Currently used document size in bytes based on defined attributes. + BytesUsed int `json:"bytesUsed"` // Used by Decode() method data []byte diff --git a/models/database.go b/models/database.go index df410bab..2d81fe7e 100644 --- a/models/database.go +++ b/models/database.go @@ -21,6 +21,10 @@ type Database struct { Enabled bool `json:"enabled"` // Database type. Type string `json:"type"` + // Database backup policies. + Policies []Index `json:"policies"` + // Database backup archives. + Archives []Collection `json:"archives"` // Used by Decode() method data []byte diff --git a/models/table.go b/models/table.go index 09a040b2..906eca2b 100644 --- a/models/table.go +++ b/models/table.go @@ -31,6 +31,10 @@ type Table struct { Columns []interface{} `json:"columns"` // Table indexes. Indexes []ColumnIndex `json:"indexes"` + // Maximum row size in bytes. Returns 0 when no limit applies. + BytesMax int `json:"bytesMax"` + // Currently used row size in bytes based on defined columns. + BytesUsed int `json:"bytesUsed"` // Used by Decode() method data []byte