From d382e0394842488eda040ec4832373d3800ecef6 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 16 Apr 2026 17:19:52 +0530 Subject: [PATCH 1/2] chore: regenerate SDK with sdk-generator 1.19.0 --- CHANGELOG.md | 15 + README.md | 8 +- account/account.go | 4 +- account/account_test.go | 3 +- activities/activities.go | 4 +- activities/activities_test.go | 2 +- appwrite/appwrite.go | 38 +- avatars/avatars.go | 2 +- avatars/avatars_test.go | 2 +- backups/backups.go | 4 +- backups/backups_test.go | 2 +- client/client.go | 8 +- databases/databases.go | 29 +- databases/databases_test.go | 15 +- .../account/create-anonymous-session.md | 4 +- .../account/create-email-password-session.md | 4 +- docs/examples/account/create-email-token.md | 4 +- .../account/create-email-verification.md | 4 +- docs/examples/account/create-jwt.md | 4 +- .../account/create-magic-url-token.md | 4 +- .../account/create-mfa-authenticator.md | 4 +- docs/examples/account/create-mfa-challenge.md | 4 +- .../account/create-mfa-recovery-codes.md | 4 +- .../examples/account/create-o-auth-2-token.md | 4 +- docs/examples/account/create-phone-token.md | 4 +- .../account/create-phone-verification.md | 4 +- docs/examples/account/create-recovery.md | 4 +- docs/examples/account/create-session.md | 4 +- docs/examples/account/create-verification.md | 4 +- docs/examples/account/create.md | 4 +- docs/examples/account/delete-identity.md | 4 +- .../account/delete-mfa-authenticator.md | 4 +- docs/examples/account/delete-session.md | 4 +- docs/examples/account/delete-sessions.md | 4 +- .../account/get-mfa-recovery-codes.md | 4 +- docs/examples/account/get-prefs.md | 4 +- docs/examples/account/get-session.md | 4 +- docs/examples/account/get.md | 4 +- docs/examples/account/list-identities.md | 4 +- docs/examples/account/list-logs.md | 4 +- docs/examples/account/list-mfa-factors.md | 4 +- docs/examples/account/list-sessions.md | 4 +- .../account/update-email-verification.md | 4 +- docs/examples/account/update-email.md | 4 +- .../account/update-magic-url-session.md | 4 +- .../account/update-mfa-authenticator.md | 4 +- docs/examples/account/update-mfa-challenge.md | 4 +- .../account/update-mfa-recovery-codes.md | 4 +- docs/examples/account/update-mfa.md | 4 +- docs/examples/account/update-name.md | 4 +- docs/examples/account/update-password.md | 4 +- docs/examples/account/update-phone-session.md | 4 +- .../account/update-phone-verification.md | 4 +- docs/examples/account/update-phone.md | 4 +- docs/examples/account/update-prefs.md | 4 +- docs/examples/account/update-recovery.md | 4 +- docs/examples/account/update-session.md | 4 +- docs/examples/account/update-status.md | 4 +- docs/examples/account/update-verification.md | 4 +- docs/examples/activities/get-event.md | 4 +- docs/examples/activities/list-events.md | 4 +- docs/examples/avatars/get-browser.md | 4 +- docs/examples/avatars/get-credit-card.md | 4 +- docs/examples/avatars/get-favicon.md | 4 +- docs/examples/avatars/get-flag.md | 4 +- docs/examples/avatars/get-image.md | 4 +- docs/examples/avatars/get-initials.md | 4 +- docs/examples/avatars/get-qr.md | 4 +- docs/examples/avatars/get-screenshot.md | 4 +- docs/examples/backups/create-archive.md | 4 +- docs/examples/backups/create-policy.md | 4 +- docs/examples/backups/create-restoration.md | 4 +- docs/examples/backups/delete-archive.md | 4 +- docs/examples/backups/delete-policy.md | 4 +- docs/examples/backups/get-archive.md | 4 +- docs/examples/backups/get-policy.md | 4 +- docs/examples/backups/get-restoration.md | 4 +- docs/examples/backups/list-archives.md | 4 +- docs/examples/backups/list-policies.md | 4 +- docs/examples/backups/list-restorations.md | 4 +- docs/examples/backups/update-policy.md | 4 +- .../databases/create-boolean-attribute.md | 4 +- docs/examples/databases/create-collection.md | 4 +- .../databases/create-datetime-attribute.md | 4 +- docs/examples/databases/create-document.md | 4 +- docs/examples/databases/create-documents.md | 4 +- .../databases/create-email-attribute.md | 4 +- .../databases/create-enum-attribute.md | 4 +- .../databases/create-float-attribute.md | 4 +- docs/examples/databases/create-index.md | 4 +- .../databases/create-integer-attribute.md | 4 +- .../examples/databases/create-ip-attribute.md | 4 +- .../databases/create-line-attribute.md | 4 +- .../databases/create-longtext-attribute.md | 4 +- .../databases/create-mediumtext-attribute.md | 4 +- docs/examples/databases/create-operations.md | 4 +- .../databases/create-point-attribute.md | 4 +- .../databases/create-polygon-attribute.md | 4 +- .../create-relationship-attribute.md | 4 +- .../databases/create-string-attribute.md | 4 +- .../databases/create-text-attribute.md | 4 +- docs/examples/databases/create-transaction.md | 4 +- .../databases/create-url-attribute.md | 4 +- .../databases/create-varchar-attribute.md | 4 +- docs/examples/databases/create.md | 4 +- .../databases/decrement-document-attribute.md | 4 +- docs/examples/databases/delete-attribute.md | 4 +- docs/examples/databases/delete-collection.md | 4 +- docs/examples/databases/delete-document.md | 4 +- docs/examples/databases/delete-documents.md | 4 +- docs/examples/databases/delete-index.md | 4 +- docs/examples/databases/delete-transaction.md | 4 +- docs/examples/databases/delete.md | 4 +- docs/examples/databases/get-attribute.md | 4 +- docs/examples/databases/get-collection.md | 4 +- docs/examples/databases/get-document.md | 4 +- docs/examples/databases/get-index.md | 4 +- docs/examples/databases/get-transaction.md | 4 +- docs/examples/databases/get.md | 4 +- .../databases/increment-document-attribute.md | 4 +- docs/examples/databases/list-attributes.md | 4 +- docs/examples/databases/list-collections.md | 4 +- docs/examples/databases/list-documents.md | 4 +- docs/examples/databases/list-indexes.md | 4 +- docs/examples/databases/list-transactions.md | 4 +- docs/examples/databases/list.md | 4 +- .../databases/update-boolean-attribute.md | 4 +- docs/examples/databases/update-collection.md | 5 +- .../databases/update-datetime-attribute.md | 4 +- docs/examples/databases/update-document.md | 4 +- docs/examples/databases/update-documents.md | 4 +- .../databases/update-email-attribute.md | 4 +- .../databases/update-enum-attribute.md | 4 +- .../databases/update-float-attribute.md | 4 +- .../databases/update-integer-attribute.md | 4 +- .../examples/databases/update-ip-attribute.md | 4 +- .../databases/update-line-attribute.md | 4 +- .../databases/update-longtext-attribute.md | 4 +- .../databases/update-mediumtext-attribute.md | 4 +- .../databases/update-point-attribute.md | 4 +- .../databases/update-polygon-attribute.md | 4 +- .../update-relationship-attribute.md | 4 +- .../databases/update-string-attribute.md | 4 +- .../databases/update-text-attribute.md | 4 +- docs/examples/databases/update-transaction.md | 4 +- .../databases/update-url-attribute.md | 4 +- .../databases/update-varchar-attribute.md | 4 +- docs/examples/databases/update.md | 4 +- docs/examples/databases/upsert-document.md | 4 +- docs/examples/databases/upsert-documents.md | 4 +- docs/examples/functions/create-deployment.md | 4 +- .../functions/create-duplicate-deployment.md | 4 +- docs/examples/functions/create-execution.md | 4 +- .../functions/create-template-deployment.md | 4 +- docs/examples/functions/create-variable.md | 4 +- .../functions/create-vcs-deployment.md | 4 +- docs/examples/functions/create.md | 4 +- docs/examples/functions/delete-deployment.md | 4 +- docs/examples/functions/delete-execution.md | 4 +- docs/examples/functions/delete-variable.md | 4 +- docs/examples/functions/delete.md | 4 +- .../functions/get-deployment-download.md | 4 +- docs/examples/functions/get-deployment.md | 4 +- docs/examples/functions/get-execution.md | 4 +- docs/examples/functions/get-variable.md | 4 +- docs/examples/functions/get.md | 4 +- docs/examples/functions/list-deployments.md | 4 +- docs/examples/functions/list-executions.md | 4 +- docs/examples/functions/list-runtimes.md | 4 +- .../examples/functions/list-specifications.md | 4 +- docs/examples/functions/list-variables.md | 4 +- docs/examples/functions/list.md | 4 +- .../functions/update-deployment-status.md | 4 +- .../functions/update-function-deployment.md | 4 +- docs/examples/functions/update-variable.md | 4 +- docs/examples/functions/update.md | 4 +- docs/examples/graphql/mutation.md | 4 +- docs/examples/graphql/query.md | 4 +- docs/examples/health/get-antivirus.md | 4 +- docs/examples/health/get-cache.md | 4 +- docs/examples/health/get-certificate.md | 4 +- docs/examples/health/get-console-pausing.md | 4 +- docs/examples/health/get-db.md | 4 +- docs/examples/health/get-failed-jobs.md | 4 +- docs/examples/health/get-pub-sub.md | 4 +- docs/examples/health/get-queue-audits.md | 4 +- docs/examples/health/get-queue-builds.md | 4 +- .../examples/health/get-queue-certificates.md | 4 +- docs/examples/health/get-queue-databases.md | 4 +- docs/examples/health/get-queue-deletes.md | 4 +- docs/examples/health/get-queue-functions.md | 4 +- docs/examples/health/get-queue-logs.md | 4 +- docs/examples/health/get-queue-mails.md | 4 +- docs/examples/health/get-queue-messaging.md | 4 +- docs/examples/health/get-queue-migrations.md | 4 +- .../health/get-queue-stats-resources.md | 4 +- docs/examples/health/get-queue-usage.md | 4 +- docs/examples/health/get-queue-webhooks.md | 4 +- docs/examples/health/get-storage-local.md | 4 +- docs/examples/health/get-storage.md | 4 +- docs/examples/health/get-time.md | 4 +- docs/examples/health/get.md | 4 +- docs/examples/locale/get.md | 4 +- docs/examples/locale/list-codes.md | 4 +- docs/examples/locale/list-continents.md | 4 +- docs/examples/locale/list-countries-eu.md | 4 +- docs/examples/locale/list-countries-phones.md | 4 +- docs/examples/locale/list-countries.md | 4 +- docs/examples/locale/list-currencies.md | 4 +- docs/examples/locale/list-languages.md | 4 +- .../messaging/create-apns-provider.md | 4 +- docs/examples/messaging/create-email.md | 4 +- .../examples/messaging/create-fcm-provider.md | 4 +- .../messaging/create-mailgun-provider.md | 4 +- .../messaging/create-msg-91-provider.md | 4 +- docs/examples/messaging/create-push.md | 4 +- .../messaging/create-resend-provider.md | 4 +- .../messaging/create-sendgrid-provider.md | 4 +- docs/examples/messaging/create-sms.md | 4 +- .../messaging/create-smtp-provider.md | 4 +- docs/examples/messaging/create-subscriber.md | 4 +- .../messaging/create-telesign-provider.md | 4 +- .../messaging/create-textmagic-provider.md | 4 +- docs/examples/messaging/create-topic.md | 4 +- .../messaging/create-twilio-provider.md | 4 +- .../messaging/create-vonage-provider.md | 4 +- docs/examples/messaging/delete-provider.md | 4 +- docs/examples/messaging/delete-subscriber.md | 4 +- docs/examples/messaging/delete-topic.md | 4 +- docs/examples/messaging/delete.md | 4 +- docs/examples/messaging/get-message.md | 4 +- docs/examples/messaging/get-provider.md | 4 +- docs/examples/messaging/get-subscriber.md | 4 +- docs/examples/messaging/get-topic.md | 4 +- docs/examples/messaging/list-message-logs.md | 4 +- docs/examples/messaging/list-messages.md | 4 +- docs/examples/messaging/list-provider-logs.md | 4 +- docs/examples/messaging/list-providers.md | 4 +- .../messaging/list-subscriber-logs.md | 4 +- docs/examples/messaging/list-subscribers.md | 4 +- docs/examples/messaging/list-targets.md | 4 +- docs/examples/messaging/list-topic-logs.md | 4 +- docs/examples/messaging/list-topics.md | 4 +- .../messaging/update-apns-provider.md | 4 +- docs/examples/messaging/update-email.md | 4 +- .../examples/messaging/update-fcm-provider.md | 4 +- .../messaging/update-mailgun-provider.md | 4 +- .../messaging/update-msg-91-provider.md | 4 +- docs/examples/messaging/update-push.md | 4 +- .../messaging/update-resend-provider.md | 4 +- .../messaging/update-sendgrid-provider.md | 4 +- docs/examples/messaging/update-sms.md | 4 +- .../messaging/update-smtp-provider.md | 4 +- .../messaging/update-telesign-provider.md | 4 +- .../messaging/update-textmagic-provider.md | 4 +- docs/examples/messaging/update-topic.md | 4 +- .../messaging/update-twilio-provider.md | 4 +- .../messaging/update-vonage-provider.md | 4 +- .../project/create-android-platform.md | 23 + .../examples/project/create-apple-platform.md | 23 + docs/examples/project/create-key.md | 24 + .../examples/project/create-linux-platform.md | 23 + docs/examples/project/create-variable.md | 4 +- docs/examples/project/create-web-platform.md | 23 + .../project/create-windows-platform.md | 23 + docs/examples/project/delete-key.md | 21 + docs/examples/project/delete-platform.md | 21 + docs/examples/project/delete-variable.md | 4 +- docs/examples/project/get-key.md | 21 + docs/examples/project/get-platform.md | 21 + docs/examples/project/get-variable.md | 4 +- docs/examples/project/list-keys.md | 22 + docs/examples/project/list-platforms.md | 22 + docs/examples/project/list-variables.md | 4 +- .../project/update-android-platform.md | 23 + .../examples/project/update-apple-platform.md | 23 + docs/examples/project/update-key.md | 24 + docs/examples/project/update-labels.md | 21 + .../examples/project/update-linux-platform.md | 23 + .../project/update-protocol-status.md | 22 + .../examples/project/update-service-status.md | 22 + docs/examples/project/update-variable.md | 4 +- docs/examples/project/update-web-platform.md | 23 + .../project/update-windows-platform.md | 23 + docs/examples/sites/create-deployment.md | 4 +- .../sites/create-duplicate-deployment.md | 4 +- .../sites/create-template-deployment.md | 4 +- docs/examples/sites/create-variable.md | 4 +- docs/examples/sites/create-vcs-deployment.md | 4 +- docs/examples/sites/create.md | 4 +- docs/examples/sites/delete-deployment.md | 4 +- docs/examples/sites/delete-log.md | 4 +- docs/examples/sites/delete-variable.md | 4 +- docs/examples/sites/delete.md | 4 +- .../examples/sites/get-deployment-download.md | 4 +- docs/examples/sites/get-deployment.md | 4 +- docs/examples/sites/get-log.md | 4 +- docs/examples/sites/get-variable.md | 4 +- docs/examples/sites/get.md | 4 +- docs/examples/sites/list-deployments.md | 4 +- docs/examples/sites/list-frameworks.md | 4 +- docs/examples/sites/list-logs.md | 4 +- docs/examples/sites/list-specifications.md | 4 +- docs/examples/sites/list-variables.md | 4 +- docs/examples/sites/list.md | 4 +- .../sites/update-deployment-status.md | 4 +- docs/examples/sites/update-site-deployment.md | 4 +- docs/examples/sites/update-variable.md | 4 +- docs/examples/sites/update.md | 4 +- docs/examples/storage/create-bucket.md | 4 +- docs/examples/storage/create-file.md | 4 +- docs/examples/storage/delete-bucket.md | 4 +- docs/examples/storage/delete-file.md | 4 +- docs/examples/storage/get-bucket.md | 4 +- docs/examples/storage/get-file-download.md | 4 +- docs/examples/storage/get-file-preview.md | 4 +- docs/examples/storage/get-file-view.md | 4 +- docs/examples/storage/get-file.md | 4 +- docs/examples/storage/list-buckets.md | 4 +- docs/examples/storage/list-files.md | 4 +- docs/examples/storage/update-bucket.md | 4 +- docs/examples/storage/update-file.md | 4 +- .../tablesdb/create-boolean-column.md | 4 +- .../tablesdb/create-datetime-column.md | 4 +- docs/examples/tablesdb/create-email-column.md | 4 +- docs/examples/tablesdb/create-enum-column.md | 4 +- docs/examples/tablesdb/create-float-column.md | 4 +- docs/examples/tablesdb/create-index.md | 4 +- .../tablesdb/create-integer-column.md | 4 +- docs/examples/tablesdb/create-ip-column.md | 4 +- docs/examples/tablesdb/create-line-column.md | 4 +- .../tablesdb/create-longtext-column.md | 4 +- .../tablesdb/create-mediumtext-column.md | 4 +- docs/examples/tablesdb/create-operations.md | 4 +- docs/examples/tablesdb/create-point-column.md | 4 +- .../tablesdb/create-polygon-column.md | 4 +- .../tablesdb/create-relationship-column.md | 4 +- docs/examples/tablesdb/create-row.md | 4 +- docs/examples/tablesdb/create-rows.md | 4 +- .../examples/tablesdb/create-string-column.md | 4 +- docs/examples/tablesdb/create-table.md | 4 +- docs/examples/tablesdb/create-text-column.md | 4 +- docs/examples/tablesdb/create-transaction.md | 4 +- docs/examples/tablesdb/create-url-column.md | 4 +- .../tablesdb/create-varchar-column.md | 4 +- docs/examples/tablesdb/create.md | 4 +- .../examples/tablesdb/decrement-row-column.md | 4 +- docs/examples/tablesdb/delete-column.md | 4 +- docs/examples/tablesdb/delete-index.md | 4 +- docs/examples/tablesdb/delete-row.md | 4 +- docs/examples/tablesdb/delete-rows.md | 4 +- docs/examples/tablesdb/delete-table.md | 4 +- docs/examples/tablesdb/delete-transaction.md | 4 +- docs/examples/tablesdb/delete.md | 4 +- docs/examples/tablesdb/get-column.md | 4 +- docs/examples/tablesdb/get-index.md | 4 +- docs/examples/tablesdb/get-row.md | 4 +- docs/examples/tablesdb/get-table.md | 4 +- docs/examples/tablesdb/get-transaction.md | 4 +- docs/examples/tablesdb/get.md | 4 +- .../examples/tablesdb/increment-row-column.md | 4 +- docs/examples/tablesdb/list-columns.md | 4 +- docs/examples/tablesdb/list-indexes.md | 4 +- docs/examples/tablesdb/list-rows.md | 4 +- docs/examples/tablesdb/list-tables.md | 4 +- docs/examples/tablesdb/list-transactions.md | 4 +- docs/examples/tablesdb/list.md | 4 +- .../tablesdb/update-boolean-column.md | 4 +- .../tablesdb/update-datetime-column.md | 4 +- docs/examples/tablesdb/update-email-column.md | 4 +- docs/examples/tablesdb/update-enum-column.md | 4 +- docs/examples/tablesdb/update-float-column.md | 4 +- .../tablesdb/update-integer-column.md | 4 +- docs/examples/tablesdb/update-ip-column.md | 4 +- docs/examples/tablesdb/update-line-column.md | 4 +- .../tablesdb/update-longtext-column.md | 4 +- .../tablesdb/update-mediumtext-column.md | 4 +- docs/examples/tablesdb/update-point-column.md | 4 +- .../tablesdb/update-polygon-column.md | 4 +- .../tablesdb/update-relationship-column.md | 4 +- docs/examples/tablesdb/update-row.md | 4 +- docs/examples/tablesdb/update-rows.md | 4 +- .../examples/tablesdb/update-string-column.md | 4 +- docs/examples/tablesdb/update-table.md | 5 +- docs/examples/tablesdb/update-text-column.md | 4 +- docs/examples/tablesdb/update-transaction.md | 4 +- docs/examples/tablesdb/update-url-column.md | 4 +- .../tablesdb/update-varchar-column.md | 4 +- docs/examples/tablesdb/update.md | 4 +- docs/examples/tablesdb/upsert-row.md | 4 +- docs/examples/tablesdb/upsert-rows.md | 4 +- docs/examples/teams/create-membership.md | 4 +- docs/examples/teams/create.md | 4 +- docs/examples/teams/delete-membership.md | 4 +- docs/examples/teams/delete.md | 4 +- docs/examples/teams/get-membership.md | 4 +- docs/examples/teams/get-prefs.md | 4 +- docs/examples/teams/get.md | 4 +- docs/examples/teams/list-memberships.md | 4 +- docs/examples/teams/list.md | 4 +- .../teams/update-membership-status.md | 4 +- docs/examples/teams/update-membership.md | 4 +- docs/examples/teams/update-name.md | 4 +- docs/examples/teams/update-prefs.md | 4 +- docs/examples/tokens/create-file-token.md | 4 +- docs/examples/tokens/delete.md | 4 +- docs/examples/tokens/get.md | 4 +- docs/examples/tokens/list.md | 4 +- docs/examples/tokens/update.md | 4 +- docs/examples/users/create-argon-2-user.md | 4 +- docs/examples/users/create-bcrypt-user.md | 4 +- docs/examples/users/create-jwt.md | 4 +- docs/examples/users/create-md-5-user.md | 4 +- .../users/create-mfa-recovery-codes.md | 4 +- docs/examples/users/create-ph-pass-user.md | 4 +- .../users/create-scrypt-modified-user.md | 4 +- docs/examples/users/create-scrypt-user.md | 4 +- docs/examples/users/create-session.md | 4 +- docs/examples/users/create-sha-user.md | 4 +- docs/examples/users/create-target.md | 4 +- docs/examples/users/create-token.md | 4 +- docs/examples/users/create.md | 4 +- docs/examples/users/delete-identity.md | 4 +- .../users/delete-mfa-authenticator.md | 4 +- docs/examples/users/delete-session.md | 4 +- docs/examples/users/delete-sessions.md | 4 +- docs/examples/users/delete-target.md | 4 +- docs/examples/users/delete.md | 4 +- docs/examples/users/get-mfa-recovery-codes.md | 4 +- docs/examples/users/get-prefs.md | 4 +- docs/examples/users/get-target.md | 4 +- docs/examples/users/get.md | 4 +- docs/examples/users/list-identities.md | 4 +- docs/examples/users/list-logs.md | 4 +- docs/examples/users/list-memberships.md | 4 +- docs/examples/users/list-mfa-factors.md | 4 +- docs/examples/users/list-sessions.md | 4 +- docs/examples/users/list-targets.md | 4 +- docs/examples/users/list.md | 4 +- .../users/update-email-verification.md | 4 +- docs/examples/users/update-email.md | 4 +- docs/examples/users/update-impersonator.md | 4 +- docs/examples/users/update-labels.md | 4 +- .../users/update-mfa-recovery-codes.md | 4 +- docs/examples/users/update-mfa.md | 4 +- docs/examples/users/update-name.md | 4 +- docs/examples/users/update-password.md | 4 +- .../users/update-phone-verification.md | 4 +- docs/examples/users/update-phone.md | 4 +- docs/examples/users/update-prefs.md | 4 +- docs/examples/users/update-status.md | 4 +- docs/examples/users/update-target.md | 4 +- docs/examples/webhooks/create.md | 11 +- docs/examples/webhooks/delete.md | 4 +- docs/examples/webhooks/get.md | 4 +- docs/examples/webhooks/list.md | 4 +- .../{update-signature.md => update-secret.md} | 7 +- docs/examples/webhooks/update.md | 10 +- functions/functions.go | 14 +- functions/functions_test.go | 4 +- go.mod | 2 +- graphql/graphql.go | 2 +- graphql/graphql_test.go | 2 +- health/health.go | 4 +- health/health_test.go | 2 +- locale/locale.go | 4 +- locale/locale_test.go | 2 +- messaging/messaging.go | 4 +- messaging/messaging_test.go | 6 +- .../{activity_event.go => activityEvent.go} | 0 ...ity_event_list.go => activityEventList.go} | 0 ...list_test.go => activityEventList_test.go} | 0 ...ty_event_test.go => activityEvent_test.go} | 0 models/{algo_argon2.go => algoArgon2.go} | 0 ...algo_argon2_test.go => algoArgon2_test.go} | 0 models/{algo_bcrypt.go => algoBcrypt.go} | 0 ...algo_bcrypt_test.go => algoBcrypt_test.go} | 0 models/{algo_md5.go => algoMd5.go} | 0 models/{algo_md5_test.go => algoMd5_test.go} | 0 models/{algo_phpass.go => algoPhpass.go} | 0 ...algo_phpass_test.go => algoPhpass_test.go} | 0 models/{algo_scrypt.go => algoScrypt.go} | 0 ...rypt_modified.go => algoScryptModified.go} | 0 ...ied_test.go => algoScryptModified_test.go} | 0 ...algo_scrypt_test.go => algoScrypt_test.go} | 0 models/{algo_sha.go => algoSha.go} | 0 models/{algo_sha_test.go => algoSha_test.go} | 0 ...tribute_boolean.go => attributeBoolean.go} | 0 ...olean_test.go => attributeBoolean_test.go} | 0 ...ibute_datetime.go => attributeDatetime.go} | 0 ...time_test.go => attributeDatetime_test.go} | 0 .../{attribute_email.go => attributeEmail.go} | 0 ...e_email_test.go => attributeEmail_test.go} | 0 .../{attribute_enum.go => attributeEnum.go} | 0 ...ute_enum_test.go => attributeEnum_test.go} | 0 .../{attribute_float.go => attributeFloat.go} | 0 ...e_float_test.go => attributeFloat_test.go} | 0 ...tribute_integer.go => attributeInteger.go} | 0 ...teger_test.go => attributeInteger_test.go} | 0 models/{attribute_ip.go => attributeIp.go} | 0 ...tribute_ip_test.go => attributeIp_test.go} | 0 .../{attribute_line.go => attributeLine.go} | 0 ...ute_line_test.go => attributeLine_test.go} | 0 .../{attribute_list.go => attributeList.go} | 0 ...ute_list_test.go => attributeList_test.go} | 0 ...ibute_longtext.go => attributeLongtext.go} | 0 ...text_test.go => attributeLongtext_test.go} | 0 ...e_mediumtext.go => attributeMediumtext.go} | 0 ...xt_test.go => attributeMediumtext_test.go} | 0 .../{attribute_point.go => attributePoint.go} | 0 ...e_point_test.go => attributePoint_test.go} | 0 ...tribute_polygon.go => attributePolygon.go} | 0 ...lygon_test.go => attributePolygon_test.go} | 0 ...lationship.go => attributeRelationship.go} | 0 ..._test.go => attributeRelationship_test.go} | 0 ...attribute_string.go => attributeString.go} | 0 ...string_test.go => attributeString_test.go} | 0 .../{attribute_text.go => attributeText.go} | 0 ...ute_text_test.go => attributeText_test.go} | 0 models/{attribute_url.go => attributeUrl.go} | 0 ...ibute_url_test.go => attributeUrl_test.go} | 0 ...tribute_varchar.go => attributeVarchar.go} | 0 ...rchar_test.go => attributeVarchar_test.go} | 0 models/authProvider.go | 42 + models/authProvider_test.go | 35 + .../{backup_archive.go => backupArchive.go} | 0 ...p_archive_list.go => backupArchiveList.go} | 0 ...list_test.go => backupArchiveList_test.go} | 0 ..._archive_test.go => backupArchive_test.go} | 0 models/{backup_policy.go => backupPolicy.go} | 0 ...kup_policy_list.go => backupPolicyList.go} | 0 ..._list_test.go => backupPolicyList_test.go} | 0 ...up_policy_test.go => backupPolicy_test.go} | 0 ...up_restoration.go => backupRestoration.go} | 0 ...ation_list.go => backupRestorationList.go} | 0 ..._test.go => backupRestorationList_test.go} | 0 ...tion_test.go => backupRestoration_test.go} | 0 models/billingLimits.go | 47 + models/billingLimits_test.go | 44 + models/block.go | 42 + models/block_test.go | 29 + models/{bucket_list.go => bucketList.go} | 0 ...bucket_list_test.go => bucketList_test.go} | 0 .../{collection_list.go => collectionList.go} | 0 ...on_list_test.go => collectionList_test.go} | 0 .../{column_boolean.go => columnBoolean.go} | 0 ..._boolean_test.go => columnBoolean_test.go} | 0 .../{column_datetime.go => columnDatetime.go} | 0 ...atetime_test.go => columnDatetime_test.go} | 0 models/{column_email.go => columnEmail.go} | 0 ...lumn_email_test.go => columnEmail_test.go} | 0 models/{column_enum.go => columnEnum.go} | 0 ...column_enum_test.go => columnEnum_test.go} | 0 models/{column_float.go => columnFloat.go} | 0 ...lumn_float_test.go => columnFloat_test.go} | 0 models/{column_index.go => columnIndex.go} | 0 ...olumn_index_list.go => columnIndexList.go} | 0 ...x_list_test.go => columnIndexList_test.go} | 0 ...lumn_index_test.go => columnIndex_test.go} | 0 .../{column_integer.go => columnInteger.go} | 0 ..._integer_test.go => columnInteger_test.go} | 0 models/{column_ip.go => columnIp.go} | 0 .../{column_ip_test.go => columnIp_test.go} | 0 models/{column_line.go => columnLine.go} | 0 ...column_line_test.go => columnLine_test.go} | 0 models/{column_list.go => columnList.go} | 0 ...column_list_test.go => columnList_test.go} | 0 .../{column_longtext.go => columnLongtext.go} | 0 ...ongtext_test.go => columnLongtext_test.go} | 0 ...lumn_mediumtext.go => columnMediumtext.go} | 0 ...mtext_test.go => columnMediumtext_test.go} | 0 models/{column_point.go => columnPoint.go} | 0 ...lumn_point_test.go => columnPoint_test.go} | 0 .../{column_polygon.go => columnPolygon.go} | 0 ..._polygon_test.go => columnPolygon_test.go} | 0 ..._relationship.go => columnRelationship.go} | 0 ...hip_test.go => columnRelationship_test.go} | 0 models/{column_string.go => columnString.go} | 0 ...mn_string_test.go => columnString_test.go} | 0 models/{column_text.go => columnText.go} | 0 ...column_text_test.go => columnText_test.go} | 0 models/{column_url.go => columnUrl.go} | 0 .../{column_url_test.go => columnUrl_test.go} | 0 .../{column_varchar.go => columnVarchar.go} | 0 ..._varchar_test.go => columnVarchar_test.go} | 0 .../{continent_list.go => continentList.go} | 0 ...ent_list_test.go => continentList_test.go} | 0 models/{country_list.go => countryList.go} | 0 ...untry_list_test.go => countryList_test.go} | 0 models/{currency_list.go => currencyList.go} | 0 ...ency_list_test.go => currencyList_test.go} | 0 models/{database_list.go => databaseList.go} | 0 ...base_list_test.go => databaseList_test.go} | 0 .../{deployment_list.go => deploymentList.go} | 0 ...nt_list_test.go => deploymentList_test.go} | 0 models/devKey.go | 48 + models/devKey_test.go | 41 + models/{document_list.go => documentList.go} | 0 ...ment_list_test.go => documentList_test.go} | 0 .../{execution_list.go => executionList.go} | 0 ...ion_list_test.go => executionList_test.go} | 0 models/{file_list.go => fileList.go} | 0 .../{file_list_test.go => fileList_test.go} | 0 ...amework_adapter.go => frameworkAdapter.go} | 0 ...apter_test.go => frameworkAdapter_test.go} | 0 .../{framework_list.go => frameworkList.go} | 0 ...ork_list_test.go => frameworkList_test.go} | 0 models/{function_list.go => functionList.go} | 0 ...tion_list_test.go => functionList_test.go} | 0 ...health_antivirus.go => healthAntivirus.go} | 0 ...ivirus_test.go => healthAntivirus_test.go} | 0 ...th_certificate.go => healthCertificate.go} | 0 ...cate_test.go => healthCertificate_test.go} | 0 models/{health_queue.go => healthQueue.go} | 0 ...alth_queue_test.go => healthQueue_test.go} | 0 models/{health_status.go => healthStatus.go} | 0 ...lth_status_list.go => healthStatusList.go} | 0 ..._list_test.go => healthStatusList_test.go} | 0 ...th_status_test.go => healthStatus_test.go} | 0 models/{health_time.go => healthTime.go} | 0 ...health_time_test.go => healthTime_test.go} | 0 models/{identity_list.go => identityList.go} | 0 ...tity_list_test.go => identityList_test.go} | 0 models/{index_list.go => indexList.go} | 0 .../{index_list_test.go => indexList_test.go} | 0 models/key.go | 50 + models/keyList.go | 35 + models/keyList_test.go | 24 + models/key_test.go | 41 + models/{language_list.go => languageList.go} | 0 ...uage_list_test.go => languageList_test.go} | 0 models/{locale_code.go => localeCode.go} | 0 ...{locale_code_list.go => localeCodeList.go} | 0 ...de_list_test.go => localeCodeList_test.go} | 0 ...locale_code_test.go => localeCode_test.go} | 0 models/log.go | 3 + models/{log_list.go => logList.go} | 0 models/{log_list_test.go => logList_test.go} | 2 +- models/log_test.go | 5 +- .../{membership_list.go => membershipList.go} | 0 ...ip_list_test.go => membershipList_test.go} | 0 models/{message_list.go => messageList.go} | 0 ...ssage_list_test.go => messageList_test.go} | 0 models/{mfa_challenge.go => mfaChallenge.go} | 0 ...challenge_test.go => mfaChallenge_test.go} | 0 models/{mfa_factors.go => mfaFactors.go} | 0 ...mfa_factors_test.go => mfaFactors_test.go} | 0 ..._recovery_codes.go => mfaRecoveryCodes.go} | 0 ...codes_test.go => mfaRecoveryCodes_test.go} | 0 models/{mfa_type.go => mfaType.go} | 0 models/{mfa_type_test.go => mfaType_test.go} | 0 models/mockNumber.go | 36 + models/mockNumber_test.go | 26 + models/model_interface.go | 5 + models/{phone_list.go => phoneList.go} | 0 .../{phone_list_test.go => phoneList_test.go} | 0 models/platformAndroid.go | 43 + models/platformAndroid_test.go | 38 + models/platformApple.go | 43 + models/platformApple_test.go | 38 + models/platformLinux.go | 43 + models/platformLinux_test.go | 38 + models/platformList.go | 35 + models/platformList_test.go | 23 + models/platformWeb.go | 43 + models/platformWeb_test.go | 38 + models/platformWindows.go | 43 + models/platformWindows_test.go | 38 + models/project.go | 196 +++ models/project_test.go | 233 ++++ models/{provider_list.go => providerList.go} | 0 ...ider_list_test.go => providerList_test.go} | 0 .../{resource_token.go => resourceToken.go} | 0 ...rce_token_list.go => resourceTokenList.go} | 0 ...list_test.go => resourceTokenList_test.go} | 0 ...ce_token_test.go => resourceToken_test.go} | 0 models/{row_list.go => rowList.go} | 0 models/{row_list_test.go => rowList_test.go} | 0 models/{runtime_list.go => runtimeList.go} | 0 ...ntime_list_test.go => runtimeList_test.go} | 0 models/{session_list.go => sessionList.go} | 0 ...ssion_list_test.go => sessionList_test.go} | 0 models/{site_list.go => siteList.go} | 0 .../{site_list_test.go => siteList_test.go} | 0 ...ification_list.go => specificationList.go} | 0 ...list_test.go => specificationList_test.go} | 0 .../{subscriber_list.go => subscriberList.go} | 0 ...er_list_test.go => subscriberList_test.go} | 0 models/{table_list.go => tableList.go} | 0 .../{table_list_test.go => tableList_test.go} | 0 models/{target_list.go => targetList.go} | 0 ...target_list_test.go => targetList_test.go} | 0 models/{team_list.go => teamList.go} | 0 .../{team_list_test.go => teamList_test.go} | 0 models/{topic_list.go => topicList.go} | 0 .../{topic_list_test.go => topicList_test.go} | 0 ...transaction_list.go => transactionList.go} | 0 ...n_list_test.go => transactionList_test.go} | 0 models/{user_list.go => userList.go} | 0 .../{user_list_test.go => userList_test.go} | 0 models/{variable_list.go => variableList.go} | 0 ...able_list_test.go => variableList_test.go} | 0 models/webhook.go | 13 +- models/{webhook_list.go => webhookList.go} | 0 ...bhook_list_test.go => webhookList_test.go} | 2 +- models/webhook_test.go | 18 +- project/project.go | 889 +++++++++++++- project/project_test.go | 1077 ++++++++++++++++- sites/sites.go | 14 +- sites/sites_test.go | 4 +- storage/storage.go | 14 +- storage/storage_test.go | 4 +- tablesdb/tables_db.go | 29 +- tablesdb/tables_db_test.go | 15 +- teams/teams.go | 4 +- teams/teams_test.go | 2 +- tokens/tokens.go | 4 +- tokens/tokens_test.go | 2 +- users/users.go | 4 +- users/users_test.go | 3 +- webhooks/webhooks.go | 135 ++- webhooks/webhooks_test.go | 48 +- 722 files changed, 5032 insertions(+), 1059 deletions(-) create mode 100644 docs/examples/project/create-android-platform.md create mode 100644 docs/examples/project/create-apple-platform.md create mode 100644 docs/examples/project/create-key.md create mode 100644 docs/examples/project/create-linux-platform.md create mode 100644 docs/examples/project/create-web-platform.md create mode 100644 docs/examples/project/create-windows-platform.md create mode 100644 docs/examples/project/delete-key.md create mode 100644 docs/examples/project/delete-platform.md create mode 100644 docs/examples/project/get-key.md create mode 100644 docs/examples/project/get-platform.md create mode 100644 docs/examples/project/list-keys.md create mode 100644 docs/examples/project/list-platforms.md create mode 100644 docs/examples/project/update-android-platform.md create mode 100644 docs/examples/project/update-apple-platform.md create mode 100644 docs/examples/project/update-key.md create mode 100644 docs/examples/project/update-labels.md create mode 100644 docs/examples/project/update-linux-platform.md create mode 100644 docs/examples/project/update-protocol-status.md create mode 100644 docs/examples/project/update-service-status.md create mode 100644 docs/examples/project/update-web-platform.md create mode 100644 docs/examples/project/update-windows-platform.md rename docs/examples/webhooks/{update-signature.md => update-secret.md} (59%) rename models/{activity_event.go => activityEvent.go} (100%) rename models/{activity_event_list.go => activityEventList.go} (100%) rename models/{activity_event_list_test.go => activityEventList_test.go} (100%) rename models/{activity_event_test.go => activityEvent_test.go} (100%) rename models/{algo_argon2.go => algoArgon2.go} (100%) rename models/{algo_argon2_test.go => algoArgon2_test.go} (100%) rename models/{algo_bcrypt.go => algoBcrypt.go} (100%) rename models/{algo_bcrypt_test.go => algoBcrypt_test.go} (100%) rename models/{algo_md5.go => algoMd5.go} (100%) rename models/{algo_md5_test.go => algoMd5_test.go} (100%) rename models/{algo_phpass.go => algoPhpass.go} (100%) rename models/{algo_phpass_test.go => algoPhpass_test.go} (100%) rename models/{algo_scrypt.go => algoScrypt.go} (100%) rename models/{algo_scrypt_modified.go => algoScryptModified.go} (100%) rename models/{algo_scrypt_modified_test.go => algoScryptModified_test.go} (100%) rename models/{algo_scrypt_test.go => algoScrypt_test.go} (100%) rename models/{algo_sha.go => algoSha.go} (100%) rename models/{algo_sha_test.go => algoSha_test.go} (100%) rename models/{attribute_boolean.go => attributeBoolean.go} (100%) rename models/{attribute_boolean_test.go => attributeBoolean_test.go} (100%) rename models/{attribute_datetime.go => attributeDatetime.go} (100%) rename models/{attribute_datetime_test.go => attributeDatetime_test.go} (100%) rename models/{attribute_email.go => attributeEmail.go} (100%) rename models/{attribute_email_test.go => attributeEmail_test.go} (100%) rename models/{attribute_enum.go => attributeEnum.go} (100%) rename models/{attribute_enum_test.go => attributeEnum_test.go} (100%) rename models/{attribute_float.go => attributeFloat.go} (100%) rename models/{attribute_float_test.go => attributeFloat_test.go} (100%) rename models/{attribute_integer.go => attributeInteger.go} (100%) rename models/{attribute_integer_test.go => attributeInteger_test.go} (100%) rename models/{attribute_ip.go => attributeIp.go} (100%) rename models/{attribute_ip_test.go => attributeIp_test.go} (100%) rename models/{attribute_line.go => attributeLine.go} (100%) rename models/{attribute_line_test.go => attributeLine_test.go} (100%) rename models/{attribute_list.go => attributeList.go} (100%) rename models/{attribute_list_test.go => attributeList_test.go} (100%) rename models/{attribute_longtext.go => attributeLongtext.go} (100%) rename models/{attribute_longtext_test.go => attributeLongtext_test.go} (100%) rename models/{attribute_mediumtext.go => attributeMediumtext.go} (100%) rename models/{attribute_mediumtext_test.go => attributeMediumtext_test.go} (100%) rename models/{attribute_point.go => attributePoint.go} (100%) rename models/{attribute_point_test.go => attributePoint_test.go} (100%) rename models/{attribute_polygon.go => attributePolygon.go} (100%) rename models/{attribute_polygon_test.go => attributePolygon_test.go} (100%) rename models/{attribute_relationship.go => attributeRelationship.go} (100%) rename models/{attribute_relationship_test.go => attributeRelationship_test.go} (100%) rename models/{attribute_string.go => attributeString.go} (100%) rename models/{attribute_string_test.go => attributeString_test.go} (100%) rename models/{attribute_text.go => attributeText.go} (100%) rename models/{attribute_text_test.go => attributeText_test.go} (100%) rename models/{attribute_url.go => attributeUrl.go} (100%) rename models/{attribute_url_test.go => attributeUrl_test.go} (100%) rename models/{attribute_varchar.go => attributeVarchar.go} (100%) rename models/{attribute_varchar_test.go => attributeVarchar_test.go} (100%) create mode 100644 models/authProvider.go create mode 100644 models/authProvider_test.go rename models/{backup_archive.go => backupArchive.go} (100%) rename models/{backup_archive_list.go => backupArchiveList.go} (100%) rename models/{backup_archive_list_test.go => backupArchiveList_test.go} (100%) rename models/{backup_archive_test.go => backupArchive_test.go} (100%) rename models/{backup_policy.go => backupPolicy.go} (100%) rename models/{backup_policy_list.go => backupPolicyList.go} (100%) rename models/{backup_policy_list_test.go => backupPolicyList_test.go} (100%) rename models/{backup_policy_test.go => backupPolicy_test.go} (100%) rename models/{backup_restoration.go => backupRestoration.go} (100%) rename models/{backup_restoration_list.go => backupRestorationList.go} (100%) rename models/{backup_restoration_list_test.go => backupRestorationList_test.go} (100%) rename models/{backup_restoration_test.go => backupRestoration_test.go} (100%) create mode 100644 models/billingLimits.go create mode 100644 models/billingLimits_test.go create mode 100644 models/block.go create mode 100644 models/block_test.go rename models/{bucket_list.go => bucketList.go} (100%) rename models/{bucket_list_test.go => bucketList_test.go} (100%) rename models/{collection_list.go => collectionList.go} (100%) rename models/{collection_list_test.go => collectionList_test.go} (100%) rename models/{column_boolean.go => columnBoolean.go} (100%) rename models/{column_boolean_test.go => columnBoolean_test.go} (100%) rename models/{column_datetime.go => columnDatetime.go} (100%) rename models/{column_datetime_test.go => columnDatetime_test.go} (100%) rename models/{column_email.go => columnEmail.go} (100%) rename models/{column_email_test.go => columnEmail_test.go} (100%) rename models/{column_enum.go => columnEnum.go} (100%) rename models/{column_enum_test.go => columnEnum_test.go} (100%) rename models/{column_float.go => columnFloat.go} (100%) rename models/{column_float_test.go => columnFloat_test.go} (100%) rename models/{column_index.go => columnIndex.go} (100%) rename models/{column_index_list.go => columnIndexList.go} (100%) rename models/{column_index_list_test.go => columnIndexList_test.go} (100%) rename models/{column_index_test.go => columnIndex_test.go} (100%) rename models/{column_integer.go => columnInteger.go} (100%) rename models/{column_integer_test.go => columnInteger_test.go} (100%) rename models/{column_ip.go => columnIp.go} (100%) rename models/{column_ip_test.go => columnIp_test.go} (100%) rename models/{column_line.go => columnLine.go} (100%) rename models/{column_line_test.go => columnLine_test.go} (100%) rename models/{column_list.go => columnList.go} (100%) rename models/{column_list_test.go => columnList_test.go} (100%) rename models/{column_longtext.go => columnLongtext.go} (100%) rename models/{column_longtext_test.go => columnLongtext_test.go} (100%) rename models/{column_mediumtext.go => columnMediumtext.go} (100%) rename models/{column_mediumtext_test.go => columnMediumtext_test.go} (100%) rename models/{column_point.go => columnPoint.go} (100%) rename models/{column_point_test.go => columnPoint_test.go} (100%) rename models/{column_polygon.go => columnPolygon.go} (100%) rename models/{column_polygon_test.go => columnPolygon_test.go} (100%) rename models/{column_relationship.go => columnRelationship.go} (100%) rename models/{column_relationship_test.go => columnRelationship_test.go} (100%) rename models/{column_string.go => columnString.go} (100%) rename models/{column_string_test.go => columnString_test.go} (100%) rename models/{column_text.go => columnText.go} (100%) rename models/{column_text_test.go => columnText_test.go} (100%) rename models/{column_url.go => columnUrl.go} (100%) rename models/{column_url_test.go => columnUrl_test.go} (100%) rename models/{column_varchar.go => columnVarchar.go} (100%) rename models/{column_varchar_test.go => columnVarchar_test.go} (100%) rename models/{continent_list.go => continentList.go} (100%) rename models/{continent_list_test.go => continentList_test.go} (100%) rename models/{country_list.go => countryList.go} (100%) rename models/{country_list_test.go => countryList_test.go} (100%) rename models/{currency_list.go => currencyList.go} (100%) rename models/{currency_list_test.go => currencyList_test.go} (100%) rename models/{database_list.go => databaseList.go} (100%) rename models/{database_list_test.go => databaseList_test.go} (100%) rename models/{deployment_list.go => deploymentList.go} (100%) rename models/{deployment_list_test.go => deploymentList_test.go} (100%) create mode 100644 models/devKey.go create mode 100644 models/devKey_test.go rename models/{document_list.go => documentList.go} (100%) rename models/{document_list_test.go => documentList_test.go} (100%) rename models/{execution_list.go => executionList.go} (100%) rename models/{execution_list_test.go => executionList_test.go} (100%) rename models/{file_list.go => fileList.go} (100%) rename models/{file_list_test.go => fileList_test.go} (100%) rename models/{framework_adapter.go => frameworkAdapter.go} (100%) rename models/{framework_adapter_test.go => frameworkAdapter_test.go} (100%) rename models/{framework_list.go => frameworkList.go} (100%) rename models/{framework_list_test.go => frameworkList_test.go} (100%) rename models/{function_list.go => functionList.go} (100%) rename models/{function_list_test.go => functionList_test.go} (100%) rename models/{health_antivirus.go => healthAntivirus.go} (100%) rename models/{health_antivirus_test.go => healthAntivirus_test.go} (100%) rename models/{health_certificate.go => healthCertificate.go} (100%) rename models/{health_certificate_test.go => healthCertificate_test.go} (100%) rename models/{health_queue.go => healthQueue.go} (100%) rename models/{health_queue_test.go => healthQueue_test.go} (100%) rename models/{health_status.go => healthStatus.go} (100%) rename models/{health_status_list.go => healthStatusList.go} (100%) rename models/{health_status_list_test.go => healthStatusList_test.go} (100%) rename models/{health_status_test.go => healthStatus_test.go} (100%) rename models/{health_time.go => healthTime.go} (100%) rename models/{health_time_test.go => healthTime_test.go} (100%) rename models/{identity_list.go => identityList.go} (100%) rename models/{identity_list_test.go => identityList_test.go} (100%) rename models/{index_list.go => indexList.go} (100%) rename models/{index_list_test.go => indexList_test.go} (100%) create mode 100644 models/key.go create mode 100644 models/keyList.go create mode 100644 models/keyList_test.go create mode 100644 models/key_test.go rename models/{language_list.go => languageList.go} (100%) rename models/{language_list_test.go => languageList_test.go} (100%) rename models/{locale_code.go => localeCode.go} (100%) rename models/{locale_code_list.go => localeCodeList.go} (100%) rename models/{locale_code_list_test.go => localeCodeList_test.go} (100%) rename models/{locale_code_test.go => localeCode_test.go} (100%) rename models/{log_list.go => logList.go} (100%) rename models/{log_list_test.go => logList_test.go} (52%) rename models/{membership_list.go => membershipList.go} (100%) rename models/{membership_list_test.go => membershipList_test.go} (100%) rename models/{message_list.go => messageList.go} (100%) rename models/{message_list_test.go => messageList_test.go} (100%) rename models/{mfa_challenge.go => mfaChallenge.go} (100%) rename models/{mfa_challenge_test.go => mfaChallenge_test.go} (100%) rename models/{mfa_factors.go => mfaFactors.go} (100%) rename models/{mfa_factors_test.go => mfaFactors_test.go} (100%) rename models/{mfa_recovery_codes.go => mfaRecoveryCodes.go} (100%) rename models/{mfa_recovery_codes_test.go => mfaRecoveryCodes_test.go} (100%) rename models/{mfa_type.go => mfaType.go} (100%) rename models/{mfa_type_test.go => mfaType_test.go} (100%) create mode 100644 models/mockNumber.go create mode 100644 models/mockNumber_test.go create mode 100644 models/model_interface.go rename models/{phone_list.go => phoneList.go} (100%) rename models/{phone_list_test.go => phoneList_test.go} (100%) create mode 100644 models/platformAndroid.go create mode 100644 models/platformAndroid_test.go create mode 100644 models/platformApple.go create mode 100644 models/platformApple_test.go create mode 100644 models/platformLinux.go create mode 100644 models/platformLinux_test.go create mode 100644 models/platformList.go create mode 100644 models/platformList_test.go create mode 100644 models/platformWeb.go create mode 100644 models/platformWeb_test.go create mode 100644 models/platformWindows.go create mode 100644 models/platformWindows_test.go create mode 100644 models/project.go create mode 100644 models/project_test.go rename models/{provider_list.go => providerList.go} (100%) rename models/{provider_list_test.go => providerList_test.go} (100%) rename models/{resource_token.go => resourceToken.go} (100%) rename models/{resource_token_list.go => resourceTokenList.go} (100%) rename models/{resource_token_list_test.go => resourceTokenList_test.go} (100%) rename models/{resource_token_test.go => resourceToken_test.go} (100%) rename models/{row_list.go => rowList.go} (100%) rename models/{row_list_test.go => rowList_test.go} (100%) rename models/{runtime_list.go => runtimeList.go} (100%) rename models/{runtime_list_test.go => runtimeList_test.go} (100%) rename models/{session_list.go => sessionList.go} (100%) rename models/{session_list_test.go => sessionList_test.go} (100%) rename models/{site_list.go => siteList.go} (100%) rename models/{site_list_test.go => siteList_test.go} (100%) rename models/{specification_list.go => specificationList.go} (100%) rename models/{specification_list_test.go => specificationList_test.go} (100%) rename models/{subscriber_list.go => subscriberList.go} (100%) rename models/{subscriber_list_test.go => subscriberList_test.go} (100%) rename models/{table_list.go => tableList.go} (100%) rename models/{table_list_test.go => tableList_test.go} (100%) rename models/{target_list.go => targetList.go} (100%) rename models/{target_list_test.go => targetList_test.go} (100%) rename models/{team_list.go => teamList.go} (100%) rename models/{team_list_test.go => teamList_test.go} (100%) rename models/{topic_list.go => topicList.go} (100%) rename models/{topic_list_test.go => topicList_test.go} (100%) rename models/{transaction_list.go => transactionList.go} (100%) rename models/{transaction_list_test.go => transactionList_test.go} (100%) rename models/{user_list.go => userList.go} (100%) rename models/{user_list_test.go => userList_test.go} (100%) rename models/{variable_list.go => variableList.go} (100%) rename models/{variable_list_test.go => variableList_test.go} (100%) rename models/{webhook_list.go => webhookList.go} (100%) rename models/{webhook_list_test.go => webhookList_test.go} (70%) diff --git a/CHANGELOG.md b/CHANGELOG.md index c671ca1e..6d21b33e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Change Log +## v3.0.0 + +* [BREAKING] Renamed Webhook model fields: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword`, `signatureKey` → `secret` +* [BREAKING] Renamed Webhook service parameters to match: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword` +* Added `secret` parameter to Webhook create and update methods +* Added `x` OAuth provider to `OAuthProvider` enum +* Added `userType` field to `Log` model +* Added `purge` parameter to `updateCollection` and `updateTable` for cache invalidation +* Added Project service: platform CRUD, key CRUD, protocol/service status management +* Added new models: `Key`, `KeyList`, `PlatformAndroid`, `PlatformApple`, `PlatformLinux`, `PlatformList`, and others +* Added new enums: `PlatformType`, `ProtocolId`, `ServiceId` +* Updated `BuildRuntime`, `Runtime`, `Scopes` enums with new values +* Updated `X-Appwrite-Response-Format` header to `1.9.1` +* Updated TTL description for list caching in Databases and TablesDB + ## v2.1.0 * Added `GetHeaders` method to `Client` for retrieving current request headers diff --git a/README.md b/README.md index a4d112c9..7a60c04b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Appwrite Go SDK ![License](https://img.shields.io/github/license/appwrite/sdk-for-go.svg?style=flat-square) -![Version](https://img.shields.io/badge/api%20version-1.9.0-blue.svg?style=flat-square) +![Version](https://img.shields.io/badge/api%20version-1.9.1-blue.svg?style=flat-square) [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator) [![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) @@ -23,7 +23,7 @@ go mod init To install using `go get`: ```bash -go get github.com/appwrite/sdk-for-go/v2 +go get github.com/appwrite/sdk-for-go/v3 ``` ## Testing the SDK @@ -51,8 +51,8 @@ go get github.com/appwrite/sdk-for-go/v2 "os" "time" - "github.com/appwrite/sdk-for-go/v2/appwrite" - "github.com/appwrite/sdk-for-go/v2/id" + "github.com/appwrite/sdk-for-go/v3/appwrite" + "github.com/appwrite/sdk-for-go/v3/id" ) func main() { diff --git a/account/account.go b/account/account.go index bf991db1..fe8f295f 100644 --- a/account/account.go +++ b/account/account.go @@ -3,8 +3,8 @@ package account import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/account/account_test.go b/account/account_test.go index d5a6f5d9..b93f08c7 100644 --- a/account/account_test.go +++ b/account/account_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestAccount(t *testing.T) { @@ -278,6 +278,7 @@ func TestAccount(t *testing.T) { "userEmail": "john@appwrite.io", "userName": "John Doe", "mode": "admin", + "userType": "user", "ip": "127.0.0.1", "time": "2020-10-15T06:38:00.000+00:00", "osCode": "Mac", diff --git a/activities/activities.go b/activities/activities.go index d927c5e3..93d70f3a 100644 --- a/activities/activities.go +++ b/activities/activities.go @@ -3,8 +3,8 @@ package activities import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/activities/activities_test.go b/activities/activities_test.go index a9f1bb1f..08b96a6d 100644 --- a/activities/activities_test.go +++ b/activities/activities_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestActivities(t *testing.T) { diff --git a/appwrite/appwrite.go b/appwrite/appwrite.go index 08de7bc7..967d7b87 100644 --- a/appwrite/appwrite.go +++ b/appwrite/appwrite.go @@ -3,25 +3,25 @@ package appwrite import ( "time" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" - "github.com/appwrite/sdk-for-go/v2/activities" - "github.com/appwrite/sdk-for-go/v2/avatars" - "github.com/appwrite/sdk-for-go/v2/backups" - "github.com/appwrite/sdk-for-go/v2/databases" - "github.com/appwrite/sdk-for-go/v2/functions" - "github.com/appwrite/sdk-for-go/v2/graphql" - "github.com/appwrite/sdk-for-go/v2/health" - "github.com/appwrite/sdk-for-go/v2/locale" - "github.com/appwrite/sdk-for-go/v2/messaging" - "github.com/appwrite/sdk-for-go/v2/project" - "github.com/appwrite/sdk-for-go/v2/sites" - "github.com/appwrite/sdk-for-go/v2/storage" - "github.com/appwrite/sdk-for-go/v2/tablesdb" - "github.com/appwrite/sdk-for-go/v2/teams" - "github.com/appwrite/sdk-for-go/v2/tokens" - "github.com/appwrite/sdk-for-go/v2/users" - "github.com/appwrite/sdk-for-go/v2/webhooks" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" + "github.com/appwrite/sdk-for-go/v3/activities" + "github.com/appwrite/sdk-for-go/v3/avatars" + "github.com/appwrite/sdk-for-go/v3/backups" + "github.com/appwrite/sdk-for-go/v3/databases" + "github.com/appwrite/sdk-for-go/v3/functions" + "github.com/appwrite/sdk-for-go/v3/graphql" + "github.com/appwrite/sdk-for-go/v3/health" + "github.com/appwrite/sdk-for-go/v3/locale" + "github.com/appwrite/sdk-for-go/v3/messaging" + "github.com/appwrite/sdk-for-go/v3/project" + "github.com/appwrite/sdk-for-go/v3/sites" + "github.com/appwrite/sdk-for-go/v3/storage" + "github.com/appwrite/sdk-for-go/v3/tablesdb" + "github.com/appwrite/sdk-for-go/v3/teams" + "github.com/appwrite/sdk-for-go/v3/tokens" + "github.com/appwrite/sdk-for-go/v3/users" + "github.com/appwrite/sdk-for-go/v3/webhooks" ) func NewAccount(clt client.Client) *account.Account { diff --git a/avatars/avatars.go b/avatars/avatars.go index 651f9884..37a5a43a 100644 --- a/avatars/avatars.go +++ b/avatars/avatars.go @@ -3,7 +3,7 @@ package avatars import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" "net/url" "fmt" "strings" diff --git a/avatars/avatars_test.go b/avatars/avatars_test.go index 8de3f683..d14219f0 100644 --- a/avatars/avatars_test.go +++ b/avatars/avatars_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestAvatars(t *testing.T) { diff --git a/backups/backups.go b/backups/backups.go index 6c9a4818..5948df91 100644 --- a/backups/backups.go +++ b/backups/backups.go @@ -3,8 +3,8 @@ package backups import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/backups/backups_test.go b/backups/backups_test.go index cd85e92a..355a5efd 100644 --- a/backups/backups_test.go +++ b/backups/backups_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestBackups(t *testing.T) { diff --git a/client/client.go b/client/client.go index 6435ad9a..4cd174cb 100644 --- a/client/client.go +++ b/client/client.go @@ -19,7 +19,7 @@ import ( "time" "runtime" - "github.com/appwrite/sdk-for-go/v2/file" + "github.com/appwrite/sdk-for-go/v3/file" ) const ( @@ -73,12 +73,12 @@ type Client struct { // Initialize a new Appwrite client with a given timeout func New(optionalSetters ...ClientOption) Client { headers := map[string]string{ - "X-Appwrite-Response-Format" : "1.9.0", - "user-agent" : fmt.Sprintf("AppwriteGoSDK/v2.1.0 (%s; %s)", runtime.GOOS, runtime.GOARCH), + "X-Appwrite-Response-Format" : "1.9.1", + "user-agent" : fmt.Sprintf("AppwriteGoSDK/v3.0.0 (%s; %s)", runtime.GOOS, runtime.GOARCH), "x-sdk-name": "Go", "x-sdk-platform": "server", "x-sdk-language": "go", - "x-sdk-version": "v2.1.0", + "x-sdk-version": "v3.0.0", } httpClient, err := GetDefaultClient(defaultTimeout) if err != nil { diff --git a/databases/databases.go b/databases/databases.go index d15ea948..5a79ab55 100644 --- a/databases/databases.go +++ b/databases/databases.go @@ -3,8 +3,8 @@ package databases import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) @@ -854,6 +854,7 @@ type UpdateCollectionOptions struct { Permissions []string DocumentSecurity bool Enabled bool + Purge bool enabledSetters map[string]bool } func (options UpdateCollectionOptions) New() *UpdateCollectionOptions { @@ -862,6 +863,7 @@ func (options UpdateCollectionOptions) New() *UpdateCollectionOptions { "Permissions": false, "DocumentSecurity": false, "Enabled": false, + "Purge": false, } return &options } @@ -890,6 +892,12 @@ func (srv *Databases) WithUpdateCollectionEnabled(v bool) UpdateCollectionOption o.enabledSetters["Enabled"] = true } } +func (srv *Databases) WithUpdateCollectionPurge(v bool) UpdateCollectionOption { + return func(o *UpdateCollectionOptions) { + o.Purge = v + o.enabledSetters["Purge"] = true + } +} // UpdateCollection update a collection by its unique ID. // @@ -916,6 +924,9 @@ func (srv *Databases) UpdateCollection(DatabaseId string, CollectionId string, o if options.enabledSetters["Enabled"] { params["enabled"] = options.Enabled } + if options.enabledSetters["Purge"] { + params["purge"] = options.Purge + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -3643,7 +3654,7 @@ func (srv *Databases) UpdateVarcharAttribute(DatabaseId string, CollectionId str // GetAttribute get attribute by ID. // // Deprecated: This API has been deprecated since 1.8.0. Please use `TablesDB.getColumn` instead. -func (srv *Databases) GetAttribute(DatabaseId string, CollectionId string, Key string)(*interface{}, error) { +func (srv *Databases) GetAttribute(DatabaseId string, CollectionId string, Key string)(models.Model, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/{key}") params := map[string]interface{}{} @@ -3660,20 +3671,20 @@ func (srv *Databases) GetAttribute(DatabaseId string, CollectionId string, Key s if strings.HasPrefix(resp.Type, "application/json") { bytes := []byte(resp.Result.(string)) - var parsed interface{} + parsed := models.AttributeBoolean{}.New(bytes) - err = json.Unmarshal(bytes, &parsed) + err = json.Unmarshal(bytes, parsed) if err != nil { return nil, err } - return &parsed, nil + + return parsed, nil } - var parsed interface{} - parsed, ok := resp.Result.(interface{}) + parsed, ok := resp.Result.(models.Model) if !ok { return nil, errors.New("unexpected response type") } - return &parsed, nil + return parsed, nil } diff --git a/databases/databases_test.go b/databases/databases_test.go index fa62bf8b..7d15e65d 100644 --- a/databases/databases_test.go +++ b/databases/databases_test.go @@ -5,7 +5,8 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" ) func TestDatabases(t *testing.T) { @@ -1894,13 +1895,14 @@ func TestDatabases(t *testing.T) { t.Run("Test GetAttribute", func(t *testing.T) { mockResponse := ` { - "key": "isEnabled", - "type": "boolean", + "key": "fullName", + "type": "string", "status": "available", "error": "string", "required": true, "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128 } ` @@ -1917,10 +1919,13 @@ func TestDatabases(t *testing.T) { srv := New(newTestClient(ts)) - _, err := srv.GetAttribute("", "", "") + response, err := srv.GetAttribute("", "", "") if err != nil { t.Errorf("Method GetAttribute failed: %v", err) } + if _, ok := response.(*models.AttributeString); !ok { + t.Errorf("Expected response type *models.AttributeString, got %T", response) + } }) t.Run("Test DeleteAttribute", func(t *testing.T) { diff --git a/docs/examples/account/create-anonymous-session.md b/docs/examples/account/create-anonymous-session.md index 4a5e2c17..8367a0d1 100644 --- a/docs/examples/account/create-anonymous-session.md +++ b/docs/examples/account/create-anonymous-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md index 84c58943..1c116b94 100644 --- a/docs/examples/account/create-email-password-session.md +++ b/docs/examples/account/create-email-password-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-email-token.md b/docs/examples/account/create-email-token.md index d7dd31cb..2752f50a 100644 --- a/docs/examples/account/create-email-token.md +++ b/docs/examples/account/create-email-token.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-email-verification.md b/docs/examples/account/create-email-verification.md index 4e1ccb75..7d058fcb 100644 --- a/docs/examples/account/create-email-verification.md +++ b/docs/examples/account/create-email-verification.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-jwt.md b/docs/examples/account/create-jwt.md index 64bfd0b3..d012b453 100644 --- a/docs/examples/account/create-jwt.md +++ b/docs/examples/account/create-jwt.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-magic-url-token.md b/docs/examples/account/create-magic-url-token.md index 24f34c8c..cd1ee7e2 100644 --- a/docs/examples/account/create-magic-url-token.md +++ b/docs/examples/account/create-magic-url-token.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-mfa-authenticator.md b/docs/examples/account/create-mfa-authenticator.md index e387c34b..9cd7283e 100644 --- a/docs/examples/account/create-mfa-authenticator.md +++ b/docs/examples/account/create-mfa-authenticator.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-mfa-challenge.md b/docs/examples/account/create-mfa-challenge.md index c7741587..9d2cc2b9 100644 --- a/docs/examples/account/create-mfa-challenge.md +++ b/docs/examples/account/create-mfa-challenge.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-mfa-recovery-codes.md b/docs/examples/account/create-mfa-recovery-codes.md index 9c2f26ea..2f3144ed 100644 --- a/docs/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/account/create-mfa-recovery-codes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-o-auth-2-token.md b/docs/examples/account/create-o-auth-2-token.md index a11218bb..3467b5b3 100644 --- a/docs/examples/account/create-o-auth-2-token.md +++ b/docs/examples/account/create-o-auth-2-token.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-phone-token.md b/docs/examples/account/create-phone-token.md index 8e4e806a..d3529912 100644 --- a/docs/examples/account/create-phone-token.md +++ b/docs/examples/account/create-phone-token.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index ddb5906f..8ebf1d7c 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index e1d3af24..33112ba9 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-session.md b/docs/examples/account/create-session.md index a98aefb3..47941bf0 100644 --- a/docs/examples/account/create-session.md +++ b/docs/examples/account/create-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index f7eb0436..a5dde129 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/create.md b/docs/examples/account/create.md index b07bae54..17c86c14 100644 --- a/docs/examples/account/create.md +++ b/docs/examples/account/create.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/delete-identity.md b/docs/examples/account/delete-identity.md index 3d310fee..e785e437 100644 --- a/docs/examples/account/delete-identity.md +++ b/docs/examples/account/delete-identity.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/delete-mfa-authenticator.md b/docs/examples/account/delete-mfa-authenticator.md index 814750d1..714eed34 100644 --- a/docs/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/account/delete-mfa-authenticator.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index f605768b..d900479b 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index 6a32f18b..d669dc78 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/get-mfa-recovery-codes.md b/docs/examples/account/get-mfa-recovery-codes.md index e38eb105..2db7374f 100644 --- a/docs/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/account/get-mfa-recovery-codes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index e9ca50b6..78f2633f 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index a0d55360..9f4665f7 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index ca5373d4..6802c257 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/list-identities.md b/docs/examples/account/list-identities.md index c52f89a5..01a450bc 100644 --- a/docs/examples/account/list-identities.md +++ b/docs/examples/account/list-identities.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index a92ee938..2c06e186 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/list-mfa-factors.md b/docs/examples/account/list-mfa-factors.md index f8a0fcde..8ddab3a0 100644 --- a/docs/examples/account/list-mfa-factors.md +++ b/docs/examples/account/list-mfa-factors.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index 9d2fc075..d978f912 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-email-verification.md b/docs/examples/account/update-email-verification.md index aed8c239..4f48bef1 100644 --- a/docs/examples/account/update-email-verification.md +++ b/docs/examples/account/update-email-verification.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index 6e00f331..238e15da 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-magic-url-session.md b/docs/examples/account/update-magic-url-session.md index ef196a03..a38f6fd6 100644 --- a/docs/examples/account/update-magic-url-session.md +++ b/docs/examples/account/update-magic-url-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-mfa-authenticator.md b/docs/examples/account/update-mfa-authenticator.md index d533ffe2..4f9a3a14 100644 --- a/docs/examples/account/update-mfa-authenticator.md +++ b/docs/examples/account/update-mfa-authenticator.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-mfa-challenge.md b/docs/examples/account/update-mfa-challenge.md index cbe8b6dc..73a1b59e 100644 --- a/docs/examples/account/update-mfa-challenge.md +++ b/docs/examples/account/update-mfa-challenge.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-mfa-recovery-codes.md b/docs/examples/account/update-mfa-recovery-codes.md index 87b1cf4e..c0f7ba67 100644 --- a/docs/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/account/update-mfa-recovery-codes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-mfa.md b/docs/examples/account/update-mfa.md index 3b0f0e3f..d7f49aac 100644 --- a/docs/examples/account/update-mfa.md +++ b/docs/examples/account/update-mfa.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index a4e9145b..eb333df8 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 79626eed..35f256bc 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-phone-session.md b/docs/examples/account/update-phone-session.md index 7e10a146..5bfc041e 100644 --- a/docs/examples/account/update-phone-session.md +++ b/docs/examples/account/update-phone-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index 3923f789..706e39e7 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/examples/account/update-phone-verification.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-phone.md b/docs/examples/account/update-phone.md index d9979ca1..c5f081b5 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/examples/account/update-phone.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index 079ae1e8..91121ae8 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index a62e8888..cdff7dbc 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-session.md b/docs/examples/account/update-session.md index dc8ec84a..e9003805 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index 2ab7c13b..98e0ee41 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index 0de6aa3c..fac0b70d 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/account" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/account" ) client := client.New( diff --git a/docs/examples/activities/get-event.md b/docs/examples/activities/get-event.md index f9478d9c..2eb45394 100644 --- a/docs/examples/activities/get-event.md +++ b/docs/examples/activities/get-event.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/activities" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/activities" ) client := client.New( diff --git a/docs/examples/activities/list-events.md b/docs/examples/activities/list-events.md index 60653038..527ddaaf 100644 --- a/docs/examples/activities/list-events.md +++ b/docs/examples/activities/list-events.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/activities" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/activities" ) client := client.New( diff --git a/docs/examples/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index e3b1595f..53f019b1 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/examples/avatars/get-browser.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/avatars" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/avatars" ) client := client.New( diff --git a/docs/examples/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index 71cad026..a6014de4 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/examples/avatars/get-credit-card.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/avatars" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/avatars" ) client := client.New( diff --git a/docs/examples/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index b02741c1..12b778c1 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/examples/avatars/get-favicon.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/avatars" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/avatars" ) client := client.New( diff --git a/docs/examples/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index 58c01886..7ba6df28 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/examples/avatars/get-flag.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/avatars" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/avatars" ) client := client.New( diff --git a/docs/examples/avatars/get-image.md b/docs/examples/avatars/get-image.md index 57be5763..cd019ea2 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/examples/avatars/get-image.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/avatars" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/avatars" ) client := client.New( diff --git a/docs/examples/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index a226a56c..cbf7a656 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/avatars" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/avatars" ) client := client.New( diff --git a/docs/examples/avatars/get-qr.md b/docs/examples/avatars/get-qr.md index 291ca0ca..d36133c2 100644 --- a/docs/examples/avatars/get-qr.md +++ b/docs/examples/avatars/get-qr.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/avatars" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/avatars" ) client := client.New( diff --git a/docs/examples/avatars/get-screenshot.md b/docs/examples/avatars/get-screenshot.md index cc9561ad..01de170c 100644 --- a/docs/examples/avatars/get-screenshot.md +++ b/docs/examples/avatars/get-screenshot.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/avatars" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/avatars" ) client := client.New( diff --git a/docs/examples/backups/create-archive.md b/docs/examples/backups/create-archive.md index ef3dffd3..2fb11575 100644 --- a/docs/examples/backups/create-archive.md +++ b/docs/examples/backups/create-archive.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/create-policy.md b/docs/examples/backups/create-policy.md index cbaf5208..57fe20da 100644 --- a/docs/examples/backups/create-policy.md +++ b/docs/examples/backups/create-policy.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/create-restoration.md b/docs/examples/backups/create-restoration.md index 156e6a90..7f9614f9 100644 --- a/docs/examples/backups/create-restoration.md +++ b/docs/examples/backups/create-restoration.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/delete-archive.md b/docs/examples/backups/delete-archive.md index 7d34c75d..6efbbdfb 100644 --- a/docs/examples/backups/delete-archive.md +++ b/docs/examples/backups/delete-archive.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/delete-policy.md b/docs/examples/backups/delete-policy.md index 73d68cf9..f78a0afd 100644 --- a/docs/examples/backups/delete-policy.md +++ b/docs/examples/backups/delete-policy.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/get-archive.md b/docs/examples/backups/get-archive.md index 12ea0489..bf837e71 100644 --- a/docs/examples/backups/get-archive.md +++ b/docs/examples/backups/get-archive.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/get-policy.md b/docs/examples/backups/get-policy.md index 7e0e871a..4b063492 100644 --- a/docs/examples/backups/get-policy.md +++ b/docs/examples/backups/get-policy.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/get-restoration.md b/docs/examples/backups/get-restoration.md index d55145af..b9d2e522 100644 --- a/docs/examples/backups/get-restoration.md +++ b/docs/examples/backups/get-restoration.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/list-archives.md b/docs/examples/backups/list-archives.md index 5429a92e..8f6a19cd 100644 --- a/docs/examples/backups/list-archives.md +++ b/docs/examples/backups/list-archives.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/list-policies.md b/docs/examples/backups/list-policies.md index 43880516..bef71bb5 100644 --- a/docs/examples/backups/list-policies.md +++ b/docs/examples/backups/list-policies.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/list-restorations.md b/docs/examples/backups/list-restorations.md index 19783213..df523949 100644 --- a/docs/examples/backups/list-restorations.md +++ b/docs/examples/backups/list-restorations.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/backups/update-policy.md b/docs/examples/backups/update-policy.md index 56267e6f..568814b8 100644 --- a/docs/examples/backups/update-policy.md +++ b/docs/examples/backups/update-policy.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/backups" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/backups" ) client := client.New( diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index 9f9d6442..14c4ff6b 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 83d3a0e2..ecf716fe 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index 2298e7c9..6da484a3 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-document.md b/docs/examples/databases/create-document.md index 8dc9146d..a15ab21d 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-documents.md b/docs/examples/databases/create-documents.md index 16564c1c..9083d5cb 100644 --- a/docs/examples/databases/create-documents.md +++ b/docs/examples/databases/create-documents.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 935e721b..936dc6da 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index ba28a7ee..3b6c442e 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index c1de137d..2af36a1a 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index c9e85b22..7f3d2c3a 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index a84c31fa..19cf0bc5 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index 1ecf1eb6..8269985e 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md index 74b79f3e..e781be0e 100644 --- a/docs/examples/databases/create-line-attribute.md +++ b/docs/examples/databases/create-line-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md index 0325abcb..882e5420 100644 --- a/docs/examples/databases/create-longtext-attribute.md +++ b/docs/examples/databases/create-longtext-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md index 08f917c6..8dee88a0 100644 --- a/docs/examples/databases/create-mediumtext-attribute.md +++ b/docs/examples/databases/create-mediumtext-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-operations.md b/docs/examples/databases/create-operations.md index b934b87e..c4916803 100644 --- a/docs/examples/databases/create-operations.md +++ b/docs/examples/databases/create-operations.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md index 72a3ddd5..1374851f 100644 --- a/docs/examples/databases/create-point-attribute.md +++ b/docs/examples/databases/create-point-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md index 772aeb8f..b2a4b2ec 100644 --- a/docs/examples/databases/create-polygon-attribute.md +++ b/docs/examples/databases/create-polygon-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index 925a10f1..83bbfa31 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index b9be97f0..de7f1c57 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md index 35a67a79..c2b10e94 100644 --- a/docs/examples/databases/create-text-attribute.md +++ b/docs/examples/databases/create-text-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-transaction.md b/docs/examples/databases/create-transaction.md index 139c96ad..3695c143 100644 --- a/docs/examples/databases/create-transaction.md +++ b/docs/examples/databases/create-transaction.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index e62479aa..e3a0e6fc 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md index 58e6dca8..fc2a9bf5 100644 --- a/docs/examples/databases/create-varchar-attribute.md +++ b/docs/examples/databases/create-varchar-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index bae0a49d..535f0da0 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/decrement-document-attribute.md b/docs/examples/databases/decrement-document-attribute.md index 6493d371..1542fb5c 100644 --- a/docs/examples/databases/decrement-document-attribute.md +++ b/docs/examples/databases/decrement-document-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/delete-attribute.md b/docs/examples/databases/delete-attribute.md index 64b19244..58c1c627 100644 --- a/docs/examples/databases/delete-attribute.md +++ b/docs/examples/databases/delete-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/delete-collection.md b/docs/examples/databases/delete-collection.md index 856ba6f0..15e145e6 100644 --- a/docs/examples/databases/delete-collection.md +++ b/docs/examples/databases/delete-collection.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/delete-document.md b/docs/examples/databases/delete-document.md index 2e98535c..47aa1597 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/examples/databases/delete-document.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/delete-documents.md b/docs/examples/databases/delete-documents.md index c81165ce..e3d4c89d 100644 --- a/docs/examples/databases/delete-documents.md +++ b/docs/examples/databases/delete-documents.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/delete-index.md b/docs/examples/databases/delete-index.md index 8fc4eade..b5985c7a 100644 --- a/docs/examples/databases/delete-index.md +++ b/docs/examples/databases/delete-index.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/delete-transaction.md b/docs/examples/databases/delete-transaction.md index a515154c..f26b89c4 100644 --- a/docs/examples/databases/delete-transaction.md +++ b/docs/examples/databases/delete-transaction.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/delete.md b/docs/examples/databases/delete.md index e5f1a5ce..40a97a1c 100644 --- a/docs/examples/databases/delete.md +++ b/docs/examples/databases/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/get-attribute.md b/docs/examples/databases/get-attribute.md index 52e9a324..87a4bb3b 100644 --- a/docs/examples/databases/get-attribute.md +++ b/docs/examples/databases/get-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/get-collection.md b/docs/examples/databases/get-collection.md index 2871e17c..869d003f 100644 --- a/docs/examples/databases/get-collection.md +++ b/docs/examples/databases/get-collection.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/get-document.md b/docs/examples/databases/get-document.md index a8d8dbf0..f90c96de 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/examples/databases/get-document.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/get-index.md b/docs/examples/databases/get-index.md index 85be5f08..3816ac08 100644 --- a/docs/examples/databases/get-index.md +++ b/docs/examples/databases/get-index.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/get-transaction.md b/docs/examples/databases/get-transaction.md index c539e2dc..2aee0268 100644 --- a/docs/examples/databases/get-transaction.md +++ b/docs/examples/databases/get-transaction.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/get.md b/docs/examples/databases/get.md index c0ac6637..5f7d389b 100644 --- a/docs/examples/databases/get.md +++ b/docs/examples/databases/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/increment-document-attribute.md b/docs/examples/databases/increment-document-attribute.md index 5e9ee2ed..0e9a3213 100644 --- a/docs/examples/databases/increment-document-attribute.md +++ b/docs/examples/databases/increment-document-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/list-attributes.md b/docs/examples/databases/list-attributes.md index 7ba02550..34b42240 100644 --- a/docs/examples/databases/list-attributes.md +++ b/docs/examples/databases/list-attributes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/list-collections.md b/docs/examples/databases/list-collections.md index f5f534b4..7d0ab026 100644 --- a/docs/examples/databases/list-collections.md +++ b/docs/examples/databases/list-collections.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/list-documents.md b/docs/examples/databases/list-documents.md index ceebb642..72f8eb78 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/examples/databases/list-documents.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/list-indexes.md b/docs/examples/databases/list-indexes.md index 226bf23f..a4838c86 100644 --- a/docs/examples/databases/list-indexes.md +++ b/docs/examples/databases/list-indexes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/list-transactions.md b/docs/examples/databases/list-transactions.md index cf3d627a..e16fc881 100644 --- a/docs/examples/databases/list-transactions.md +++ b/docs/examples/databases/list-transactions.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/list.md b/docs/examples/databases/list.md index 1dbd3f5a..3d83311f 100644 --- a/docs/examples/databases/list.md +++ b/docs/examples/databases/list.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index cff8402f..6c017016 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index 7265f35a..22616efe 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( @@ -22,5 +22,6 @@ response, error := service.UpdateCollection( databases.WithUpdateCollectionPermissions(interface{}{"read("any")"}), databases.WithUpdateCollectionDocumentSecurity(false), databases.WithUpdateCollectionEnabled(false), + databases.WithUpdateCollectionPurge(false), ) ``` diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index 91ff28e5..35fca036 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-document.md b/docs/examples/databases/update-document.md index c2b90391..ad8f404b 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/examples/databases/update-document.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-documents.md b/docs/examples/databases/update-documents.md index a53a32cc..9508a53f 100644 --- a/docs/examples/databases/update-documents.md +++ b/docs/examples/databases/update-documents.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index 04b9beac..d4e45cb8 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index 82233f13..789e9653 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index c8c58b98..df87bb10 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index 05a3be59..c4a815a8 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index 349766c2..8101b727 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md index bb3a6d73..1ed9bce2 100644 --- a/docs/examples/databases/update-line-attribute.md +++ b/docs/examples/databases/update-line-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-longtext-attribute.md b/docs/examples/databases/update-longtext-attribute.md index 1e1e911e..e3da718b 100644 --- a/docs/examples/databases/update-longtext-attribute.md +++ b/docs/examples/databases/update-longtext-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-mediumtext-attribute.md b/docs/examples/databases/update-mediumtext-attribute.md index 10175d93..4778707a 100644 --- a/docs/examples/databases/update-mediumtext-attribute.md +++ b/docs/examples/databases/update-mediumtext-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md index be0bbf33..bde26cd2 100644 --- a/docs/examples/databases/update-point-attribute.md +++ b/docs/examples/databases/update-point-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md index c38c453a..866292fb 100644 --- a/docs/examples/databases/update-polygon-attribute.md +++ b/docs/examples/databases/update-polygon-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index c8564df7..96d0d728 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 076cefd3..51177a9e 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-text-attribute.md b/docs/examples/databases/update-text-attribute.md index 6d68bc39..60160ad0 100644 --- a/docs/examples/databases/update-text-attribute.md +++ b/docs/examples/databases/update-text-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-transaction.md b/docs/examples/databases/update-transaction.md index ee0dcdd3..1bcb37e1 100644 --- a/docs/examples/databases/update-transaction.md +++ b/docs/examples/databases/update-transaction.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index de07d257..1b6650ab 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update-varchar-attribute.md b/docs/examples/databases/update-varchar-attribute.md index 710b726e..a43c8d8c 100644 --- a/docs/examples/databases/update-varchar-attribute.md +++ b/docs/examples/databases/update-varchar-attribute.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index 61bc6993..f7ba53a6 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/upsert-document.md b/docs/examples/databases/upsert-document.md index a03c4369..4123bf00 100644 --- a/docs/examples/databases/upsert-document.md +++ b/docs/examples/databases/upsert-document.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/databases/upsert-documents.md b/docs/examples/databases/upsert-documents.md index f8897ad0..6c26d209 100644 --- a/docs/examples/databases/upsert-documents.md +++ b/docs/examples/databases/upsert-documents.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/databases" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/databases" ) client := client.New( diff --git a/docs/examples/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index 274cac39..316c7e75 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/examples/functions/create-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/create-duplicate-deployment.md b/docs/examples/functions/create-duplicate-deployment.md index ecba9990..a6ff18b0 100644 --- a/docs/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/functions/create-duplicate-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md index 8aa9c31f..9ea2a495 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/create-template-deployment.md b/docs/examples/functions/create-template-deployment.md index c086a396..d6cf3bc6 100644 --- a/docs/examples/functions/create-template-deployment.md +++ b/docs/examples/functions/create-template-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index 23d92449..f6035737 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/create-vcs-deployment.md b/docs/examples/functions/create-vcs-deployment.md index 9659dcaf..5d0d8ddb 100644 --- a/docs/examples/functions/create-vcs-deployment.md +++ b/docs/examples/functions/create-vcs-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index 87effee9..da8c57df 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/delete-deployment.md b/docs/examples/functions/delete-deployment.md index 971d2abd..14339919 100644 --- a/docs/examples/functions/delete-deployment.md +++ b/docs/examples/functions/delete-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/delete-execution.md b/docs/examples/functions/delete-execution.md index 37f0ee7d..c21cee1c 100644 --- a/docs/examples/functions/delete-execution.md +++ b/docs/examples/functions/delete-execution.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/delete-variable.md b/docs/examples/functions/delete-variable.md index d7eae9cc..84a450ed 100644 --- a/docs/examples/functions/delete-variable.md +++ b/docs/examples/functions/delete-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/delete.md b/docs/examples/functions/delete.md index 065afcef..b6bc97e7 100644 --- a/docs/examples/functions/delete.md +++ b/docs/examples/functions/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/get-deployment-download.md b/docs/examples/functions/get-deployment-download.md index aa200613..a987e896 100644 --- a/docs/examples/functions/get-deployment-download.md +++ b/docs/examples/functions/get-deployment-download.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/get-deployment.md b/docs/examples/functions/get-deployment.md index 7faa2353..b1088541 100644 --- a/docs/examples/functions/get-deployment.md +++ b/docs/examples/functions/get-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/get-execution.md b/docs/examples/functions/get-execution.md index f18a9d37..aa128f59 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/examples/functions/get-execution.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/get-variable.md b/docs/examples/functions/get-variable.md index cd41dfc6..588a43b1 100644 --- a/docs/examples/functions/get-variable.md +++ b/docs/examples/functions/get-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/get.md b/docs/examples/functions/get.md index 71a97328..53350c34 100644 --- a/docs/examples/functions/get.md +++ b/docs/examples/functions/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/list-deployments.md b/docs/examples/functions/list-deployments.md index eb66aceb..d7885aab 100644 --- a/docs/examples/functions/list-deployments.md +++ b/docs/examples/functions/list-deployments.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index 7f93c95c..c9cc43ef 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/list-runtimes.md b/docs/examples/functions/list-runtimes.md index 672058e2..b1267d78 100644 --- a/docs/examples/functions/list-runtimes.md +++ b/docs/examples/functions/list-runtimes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/list-specifications.md b/docs/examples/functions/list-specifications.md index f36d8098..2e6e0f34 100644 --- a/docs/examples/functions/list-specifications.md +++ b/docs/examples/functions/list-specifications.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md index 821f05b8..b01d4c04 100644 --- a/docs/examples/functions/list-variables.md +++ b/docs/examples/functions/list-variables.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/list.md b/docs/examples/functions/list.md index 8bbdceec..a7e9d678 100644 --- a/docs/examples/functions/list.md +++ b/docs/examples/functions/list.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/update-deployment-status.md b/docs/examples/functions/update-deployment-status.md index bfe52015..303aead8 100644 --- a/docs/examples/functions/update-deployment-status.md +++ b/docs/examples/functions/update-deployment-status.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/update-function-deployment.md b/docs/examples/functions/update-function-deployment.md index 4fd679d5..35e90537 100644 --- a/docs/examples/functions/update-function-deployment.md +++ b/docs/examples/functions/update-function-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index 6b90898b..287cf699 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index 3cd6285c..58d0cc10 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/functions" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/functions" ) client := client.New( diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index 41ae85c3..438e7e24 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/graphql" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/graphql" ) client := client.New( diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index 9cf1f7b3..f03e7997 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/graphql" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/graphql" ) client := client.New( diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/health/get-antivirus.md index bf9f3e61..68c11f79 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/health/get-antivirus.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md index 1b103d21..d2874b14 100644 --- a/docs/examples/health/get-cache.md +++ b/docs/examples/health/get-cache.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-certificate.md b/docs/examples/health/get-certificate.md index 4c39fa58..a1193e4f 100644 --- a/docs/examples/health/get-certificate.md +++ b/docs/examples/health/get-certificate.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-console-pausing.md b/docs/examples/health/get-console-pausing.md index ff1ffce1..2c470ea3 100644 --- a/docs/examples/health/get-console-pausing.md +++ b/docs/examples/health/get-console-pausing.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-db.md b/docs/examples/health/get-db.md index 8c9a21c1..9f27c64f 100644 --- a/docs/examples/health/get-db.md +++ b/docs/examples/health/get-db.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-failed-jobs.md b/docs/examples/health/get-failed-jobs.md index 52a42998..9b8cdafa 100644 --- a/docs/examples/health/get-failed-jobs.md +++ b/docs/examples/health/get-failed-jobs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-pub-sub.md b/docs/examples/health/get-pub-sub.md index 11676e7e..272417fe 100644 --- a/docs/examples/health/get-pub-sub.md +++ b/docs/examples/health/get-pub-sub.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-audits.md b/docs/examples/health/get-queue-audits.md index 36be36f9..305e5f66 100644 --- a/docs/examples/health/get-queue-audits.md +++ b/docs/examples/health/get-queue-audits.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md index 4e4dc219..a4d61a2a 100644 --- a/docs/examples/health/get-queue-builds.md +++ b/docs/examples/health/get-queue-builds.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/health/get-queue-certificates.md index cb9f9eaa..01ab001c 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/health/get-queue-certificates.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md index f84fca12..ae7bc5b4 100644 --- a/docs/examples/health/get-queue-databases.md +++ b/docs/examples/health/get-queue-databases.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md index dcd2300f..9b43624e 100644 --- a/docs/examples/health/get-queue-deletes.md +++ b/docs/examples/health/get-queue-deletes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md index 4b2ddf69..246e6708 100644 --- a/docs/examples/health/get-queue-functions.md +++ b/docs/examples/health/get-queue-functions.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md index 1f9af901..6b1e7ab8 100644 --- a/docs/examples/health/get-queue-logs.md +++ b/docs/examples/health/get-queue-logs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md index 62b9b7a3..163956df 100644 --- a/docs/examples/health/get-queue-mails.md +++ b/docs/examples/health/get-queue-mails.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md index 30116c8e..0444da61 100644 --- a/docs/examples/health/get-queue-messaging.md +++ b/docs/examples/health/get-queue-messaging.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md index 5e4e0c22..5cc0627a 100644 --- a/docs/examples/health/get-queue-migrations.md +++ b/docs/examples/health/get-queue-migrations.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-stats-resources.md b/docs/examples/health/get-queue-stats-resources.md index d1acaf1e..e8414f43 100644 --- a/docs/examples/health/get-queue-stats-resources.md +++ b/docs/examples/health/get-queue-stats-resources.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-usage.md b/docs/examples/health/get-queue-usage.md index d050a88d..98762730 100644 --- a/docs/examples/health/get-queue-usage.md +++ b/docs/examples/health/get-queue-usage.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md index 0112d81f..609fcd58 100644 --- a/docs/examples/health/get-queue-webhooks.md +++ b/docs/examples/health/get-queue-webhooks.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md index 6e6b190c..35e391ec 100644 --- a/docs/examples/health/get-storage-local.md +++ b/docs/examples/health/get-storage-local.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-storage.md b/docs/examples/health/get-storage.md index ef4e6b00..f498f048 100644 --- a/docs/examples/health/get-storage.md +++ b/docs/examples/health/get-storage.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md index 7c8a5133..2cd1c081 100644 --- a/docs/examples/health/get-time.md +++ b/docs/examples/health/get-time.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/health/get.md b/docs/examples/health/get.md index b015dd34..fbd88524 100644 --- a/docs/examples/health/get.md +++ b/docs/examples/health/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/health" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/health" ) client := client.New( diff --git a/docs/examples/locale/get.md b/docs/examples/locale/get.md index 65a62c7f..7cbb2cb4 100644 --- a/docs/examples/locale/get.md +++ b/docs/examples/locale/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/locale" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/locale" ) client := client.New( diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md index cbbcb8d3..9a904ce7 100644 --- a/docs/examples/locale/list-codes.md +++ b/docs/examples/locale/list-codes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/locale" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/locale" ) client := client.New( diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index d2e0596b..08edeb96 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/locale" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/locale" ) client := client.New( diff --git a/docs/examples/locale/list-countries-eu.md b/docs/examples/locale/list-countries-eu.md index 701dbe3b..1c056295 100644 --- a/docs/examples/locale/list-countries-eu.md +++ b/docs/examples/locale/list-countries-eu.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/locale" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/locale" ) client := client.New( diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index 00257e88..2ef6b7ea 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/locale" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/locale" ) client := client.New( diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index c92e67e3..10e1d048 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/locale" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/locale" ) client := client.New( diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index 6b81caf6..4b1a7521 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/locale" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/locale" ) client := client.New( diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index 38377e9d..48c5782f 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/locale" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/locale" ) client := client.New( diff --git a/docs/examples/messaging/create-apns-provider.md b/docs/examples/messaging/create-apns-provider.md index 23f991ef..95f01732 100644 --- a/docs/examples/messaging/create-apns-provider.md +++ b/docs/examples/messaging/create-apns-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index 539509a0..12e0f194 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-fcm-provider.md b/docs/examples/messaging/create-fcm-provider.md index a6e82a08..195b0d95 100644 --- a/docs/examples/messaging/create-fcm-provider.md +++ b/docs/examples/messaging/create-fcm-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-mailgun-provider.md b/docs/examples/messaging/create-mailgun-provider.md index fc10286f..2ea3698f 100644 --- a/docs/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/messaging/create-mailgun-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-msg-91-provider.md b/docs/examples/messaging/create-msg-91-provider.md index 0e5a448a..1b8ae023 100644 --- a/docs/examples/messaging/create-msg-91-provider.md +++ b/docs/examples/messaging/create-msg-91-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-push.md b/docs/examples/messaging/create-push.md index d62b1244..7d92df45 100644 --- a/docs/examples/messaging/create-push.md +++ b/docs/examples/messaging/create-push.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-resend-provider.md b/docs/examples/messaging/create-resend-provider.md index 664e756c..a16bd841 100644 --- a/docs/examples/messaging/create-resend-provider.md +++ b/docs/examples/messaging/create-resend-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-sendgrid-provider.md b/docs/examples/messaging/create-sendgrid-provider.md index 902bd6ef..658ad1c3 100644 --- a/docs/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/messaging/create-sendgrid-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-sms.md b/docs/examples/messaging/create-sms.md index b58170f4..bd14eb74 100644 --- a/docs/examples/messaging/create-sms.md +++ b/docs/examples/messaging/create-sms.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-smtp-provider.md b/docs/examples/messaging/create-smtp-provider.md index ad11652e..2004fc8d 100644 --- a/docs/examples/messaging/create-smtp-provider.md +++ b/docs/examples/messaging/create-smtp-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-subscriber.md b/docs/examples/messaging/create-subscriber.md index 8f7e2231..8abb6e3c 100644 --- a/docs/examples/messaging/create-subscriber.md +++ b/docs/examples/messaging/create-subscriber.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-telesign-provider.md b/docs/examples/messaging/create-telesign-provider.md index 6a78c234..b4a824d0 100644 --- a/docs/examples/messaging/create-telesign-provider.md +++ b/docs/examples/messaging/create-telesign-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-textmagic-provider.md b/docs/examples/messaging/create-textmagic-provider.md index c5f5241b..649346f0 100644 --- a/docs/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/messaging/create-textmagic-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index fa6da90b..f0cc8d4c 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-twilio-provider.md b/docs/examples/messaging/create-twilio-provider.md index ade526c9..043ce584 100644 --- a/docs/examples/messaging/create-twilio-provider.md +++ b/docs/examples/messaging/create-twilio-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/create-vonage-provider.md b/docs/examples/messaging/create-vonage-provider.md index 0007a9d0..25f8858f 100644 --- a/docs/examples/messaging/create-vonage-provider.md +++ b/docs/examples/messaging/create-vonage-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/delete-provider.md b/docs/examples/messaging/delete-provider.md index 0f5a2791..ee1d2aae 100644 --- a/docs/examples/messaging/delete-provider.md +++ b/docs/examples/messaging/delete-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/delete-subscriber.md b/docs/examples/messaging/delete-subscriber.md index 37411075..82a259ab 100644 --- a/docs/examples/messaging/delete-subscriber.md +++ b/docs/examples/messaging/delete-subscriber.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/delete-topic.md b/docs/examples/messaging/delete-topic.md index 249d098c..55ebbcf5 100644 --- a/docs/examples/messaging/delete-topic.md +++ b/docs/examples/messaging/delete-topic.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/delete.md b/docs/examples/messaging/delete.md index 5dda3d32..72f428a1 100644 --- a/docs/examples/messaging/delete.md +++ b/docs/examples/messaging/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/get-message.md b/docs/examples/messaging/get-message.md index e769899f..13d64d2a 100644 --- a/docs/examples/messaging/get-message.md +++ b/docs/examples/messaging/get-message.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/get-provider.md b/docs/examples/messaging/get-provider.md index 89e6c614..e908f85f 100644 --- a/docs/examples/messaging/get-provider.md +++ b/docs/examples/messaging/get-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/get-subscriber.md b/docs/examples/messaging/get-subscriber.md index 236b5c41..a728bf19 100644 --- a/docs/examples/messaging/get-subscriber.md +++ b/docs/examples/messaging/get-subscriber.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/get-topic.md b/docs/examples/messaging/get-topic.md index 6d97b7e8..23dad6fa 100644 --- a/docs/examples/messaging/get-topic.md +++ b/docs/examples/messaging/get-topic.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-message-logs.md b/docs/examples/messaging/list-message-logs.md index 9e6e01e9..7a8aa373 100644 --- a/docs/examples/messaging/list-message-logs.md +++ b/docs/examples/messaging/list-message-logs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-messages.md b/docs/examples/messaging/list-messages.md index 8bd8da39..929af984 100644 --- a/docs/examples/messaging/list-messages.md +++ b/docs/examples/messaging/list-messages.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-provider-logs.md b/docs/examples/messaging/list-provider-logs.md index 022f5f20..d7a37c1e 100644 --- a/docs/examples/messaging/list-provider-logs.md +++ b/docs/examples/messaging/list-provider-logs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-providers.md b/docs/examples/messaging/list-providers.md index f71c4c13..e421f17d 100644 --- a/docs/examples/messaging/list-providers.md +++ b/docs/examples/messaging/list-providers.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-subscriber-logs.md b/docs/examples/messaging/list-subscriber-logs.md index 20518ba8..40d2c1ea 100644 --- a/docs/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/messaging/list-subscriber-logs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-subscribers.md b/docs/examples/messaging/list-subscribers.md index fa9684bd..e4033bb9 100644 --- a/docs/examples/messaging/list-subscribers.md +++ b/docs/examples/messaging/list-subscribers.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-targets.md b/docs/examples/messaging/list-targets.md index f5cb0062..05a9d868 100644 --- a/docs/examples/messaging/list-targets.md +++ b/docs/examples/messaging/list-targets.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-topic-logs.md b/docs/examples/messaging/list-topic-logs.md index 1f673e15..4a5ef9e8 100644 --- a/docs/examples/messaging/list-topic-logs.md +++ b/docs/examples/messaging/list-topic-logs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/list-topics.md b/docs/examples/messaging/list-topics.md index 8fda7fc2..0615c731 100644 --- a/docs/examples/messaging/list-topics.md +++ b/docs/examples/messaging/list-topics.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-apns-provider.md b/docs/examples/messaging/update-apns-provider.md index 892b00a0..6dc5abab 100644 --- a/docs/examples/messaging/update-apns-provider.md +++ b/docs/examples/messaging/update-apns-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index 31a8c96f..945f9de4 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-fcm-provider.md b/docs/examples/messaging/update-fcm-provider.md index 99028c91..5cafcc76 100644 --- a/docs/examples/messaging/update-fcm-provider.md +++ b/docs/examples/messaging/update-fcm-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-mailgun-provider.md b/docs/examples/messaging/update-mailgun-provider.md index f80574f2..59a5c59b 100644 --- a/docs/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/messaging/update-mailgun-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-msg-91-provider.md b/docs/examples/messaging/update-msg-91-provider.md index 9fbb7796..8b3e691c 100644 --- a/docs/examples/messaging/update-msg-91-provider.md +++ b/docs/examples/messaging/update-msg-91-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-push.md b/docs/examples/messaging/update-push.md index 54948912..c21190da 100644 --- a/docs/examples/messaging/update-push.md +++ b/docs/examples/messaging/update-push.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-resend-provider.md b/docs/examples/messaging/update-resend-provider.md index 49addaa9..66ae75e6 100644 --- a/docs/examples/messaging/update-resend-provider.md +++ b/docs/examples/messaging/update-resend-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-sendgrid-provider.md b/docs/examples/messaging/update-sendgrid-provider.md index 550d75ff..c7a3e772 100644 --- a/docs/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/messaging/update-sendgrid-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-sms.md b/docs/examples/messaging/update-sms.md index 141d97fb..f1251fdb 100644 --- a/docs/examples/messaging/update-sms.md +++ b/docs/examples/messaging/update-sms.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-smtp-provider.md b/docs/examples/messaging/update-smtp-provider.md index 0684b166..64da31dc 100644 --- a/docs/examples/messaging/update-smtp-provider.md +++ b/docs/examples/messaging/update-smtp-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-telesign-provider.md b/docs/examples/messaging/update-telesign-provider.md index 02e7f42c..6cfdd1b5 100644 --- a/docs/examples/messaging/update-telesign-provider.md +++ b/docs/examples/messaging/update-telesign-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-textmagic-provider.md b/docs/examples/messaging/update-textmagic-provider.md index 751a6c01..69566e87 100644 --- a/docs/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/messaging/update-textmagic-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index ab307a4a..1859d742 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-twilio-provider.md b/docs/examples/messaging/update-twilio-provider.md index d2158b04..29258ed2 100644 --- a/docs/examples/messaging/update-twilio-provider.md +++ b/docs/examples/messaging/update-twilio-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/messaging/update-vonage-provider.md b/docs/examples/messaging/update-vonage-provider.md index 147e8ca1..60238226 100644 --- a/docs/examples/messaging/update-vonage-provider.md +++ b/docs/examples/messaging/update-vonage-provider.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/messaging" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/messaging" ) client := client.New( diff --git a/docs/examples/project/create-android-platform.md b/docs/examples/project/create-android-platform.md new file mode 100644 index 00000000..03c7f959 --- /dev/null +++ b/docs/examples/project/create-android-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.CreateAndroidPlatform( + "", + "", + "", +) +``` diff --git a/docs/examples/project/create-apple-platform.md b/docs/examples/project/create-apple-platform.md new file mode 100644 index 00000000..42481876 --- /dev/null +++ b/docs/examples/project/create-apple-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.CreateApplePlatform( + "", + "", + "", +) +``` diff --git a/docs/examples/project/create-key.md b/docs/examples/project/create-key.md new file mode 100644 index 00000000..9bbcf0d7 --- /dev/null +++ b/docs/examples/project/create-key.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.CreateKey( + "", + "", + []interface{}{}, + project.WithCreateKeyExpire("2020-10-15T06:38:00.000+00:00"), +) +``` diff --git a/docs/examples/project/create-linux-platform.md b/docs/examples/project/create-linux-platform.md new file mode 100644 index 00000000..7907326f --- /dev/null +++ b/docs/examples/project/create-linux-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.CreateLinuxPlatform( + "", + "", + "", +) +``` diff --git a/docs/examples/project/create-variable.md b/docs/examples/project/create-variable.md index f66969dd..c0cca836 100644 --- a/docs/examples/project/create-variable.md +++ b/docs/examples/project/create-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/project" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" ) client := client.New( diff --git a/docs/examples/project/create-web-platform.md b/docs/examples/project/create-web-platform.md new file mode 100644 index 00000000..e14065a3 --- /dev/null +++ b/docs/examples/project/create-web-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.CreateWebPlatform( + "", + "", + "app.example.com", +) +``` diff --git a/docs/examples/project/create-windows-platform.md b/docs/examples/project/create-windows-platform.md new file mode 100644 index 00000000..ec388b75 --- /dev/null +++ b/docs/examples/project/create-windows-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.CreateWindowsPlatform( + "", + "", + "", +) +``` diff --git a/docs/examples/project/delete-key.md b/docs/examples/project/delete-key.md new file mode 100644 index 00000000..0004a177 --- /dev/null +++ b/docs/examples/project/delete-key.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.DeleteKey( + "", +) +``` diff --git a/docs/examples/project/delete-platform.md b/docs/examples/project/delete-platform.md new file mode 100644 index 00000000..1083a59b --- /dev/null +++ b/docs/examples/project/delete-platform.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.DeletePlatform( + "", +) +``` diff --git a/docs/examples/project/delete-variable.md b/docs/examples/project/delete-variable.md index 5bd47512..3f21b1a7 100644 --- a/docs/examples/project/delete-variable.md +++ b/docs/examples/project/delete-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/project" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" ) client := client.New( diff --git a/docs/examples/project/get-key.md b/docs/examples/project/get-key.md new file mode 100644 index 00000000..2bc9d26d --- /dev/null +++ b/docs/examples/project/get-key.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.GetKey( + "", +) +``` diff --git a/docs/examples/project/get-platform.md b/docs/examples/project/get-platform.md new file mode 100644 index 00000000..7fcefd1b --- /dev/null +++ b/docs/examples/project/get-platform.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.GetPlatform( + "", +) +``` diff --git a/docs/examples/project/get-variable.md b/docs/examples/project/get-variable.md index d4bc824d..f8e078ac 100644 --- a/docs/examples/project/get-variable.md +++ b/docs/examples/project/get-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/project" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" ) client := client.New( diff --git a/docs/examples/project/list-keys.md b/docs/examples/project/list-keys.md new file mode 100644 index 00000000..c83b34bb --- /dev/null +++ b/docs/examples/project/list-keys.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.ListKeys( + project.WithListKeysQueries([]interface{}{}), + project.WithListKeysTotal(false), +) +``` diff --git a/docs/examples/project/list-platforms.md b/docs/examples/project/list-platforms.md new file mode 100644 index 00000000..2c1bd523 --- /dev/null +++ b/docs/examples/project/list-platforms.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.ListPlatforms( + project.WithListPlatformsQueries([]interface{}{}), + project.WithListPlatformsTotal(false), +) +``` diff --git a/docs/examples/project/list-variables.md b/docs/examples/project/list-variables.md index fb8d2c75..bc6531cd 100644 --- a/docs/examples/project/list-variables.md +++ b/docs/examples/project/list-variables.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/project" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" ) client := client.New( diff --git a/docs/examples/project/update-android-platform.md b/docs/examples/project/update-android-platform.md new file mode 100644 index 00000000..ee31a55a --- /dev/null +++ b/docs/examples/project/update-android-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateAndroidPlatform( + "", + "", + "", +) +``` diff --git a/docs/examples/project/update-apple-platform.md b/docs/examples/project/update-apple-platform.md new file mode 100644 index 00000000..79f3734b --- /dev/null +++ b/docs/examples/project/update-apple-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateApplePlatform( + "", + "", + "", +) +``` diff --git a/docs/examples/project/update-key.md b/docs/examples/project/update-key.md new file mode 100644 index 00000000..be969a3c --- /dev/null +++ b/docs/examples/project/update-key.md @@ -0,0 +1,24 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateKey( + "", + "", + []interface{}{}, + project.WithUpdateKeyExpire("2020-10-15T06:38:00.000+00:00"), +) +``` diff --git a/docs/examples/project/update-labels.md b/docs/examples/project/update-labels.md new file mode 100644 index 00000000..377a0085 --- /dev/null +++ b/docs/examples/project/update-labels.md @@ -0,0 +1,21 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateLabels( + []interface{}{}, +) +``` diff --git a/docs/examples/project/update-linux-platform.md b/docs/examples/project/update-linux-platform.md new file mode 100644 index 00000000..02af887b --- /dev/null +++ b/docs/examples/project/update-linux-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateLinuxPlatform( + "", + "", + "", +) +``` diff --git a/docs/examples/project/update-protocol-status.md b/docs/examples/project/update-protocol-status.md new file mode 100644 index 00000000..d156bcb0 --- /dev/null +++ b/docs/examples/project/update-protocol-status.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateProtocolStatus( + "rest", + false, +) +``` diff --git a/docs/examples/project/update-service-status.md b/docs/examples/project/update-service-status.md new file mode 100644 index 00000000..edd019c4 --- /dev/null +++ b/docs/examples/project/update-service-status.md @@ -0,0 +1,22 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateServiceStatus( + "account", + false, +) +``` diff --git a/docs/examples/project/update-variable.md b/docs/examples/project/update-variable.md index ff1d8789..28266ca6 100644 --- a/docs/examples/project/update-variable.md +++ b/docs/examples/project/update-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/project" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" ) client := client.New( diff --git a/docs/examples/project/update-web-platform.md b/docs/examples/project/update-web-platform.md new file mode 100644 index 00000000..2df096b6 --- /dev/null +++ b/docs/examples/project/update-web-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateWebPlatform( + "", + "", + "app.example.com", +) +``` diff --git a/docs/examples/project/update-windows-platform.md b/docs/examples/project/update-windows-platform.md new file mode 100644 index 00000000..ee074cf9 --- /dev/null +++ b/docs/examples/project/update-windows-platform.md @@ -0,0 +1,23 @@ +```go +package main + +import ( + "fmt" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/project" +) + +client := client.New( + client.WithEndpoint("https://.cloud.appwrite.io/v1") + client.WithProject("") + client.WithKey("") +) + +service := project.New(client) + +response, error := service.UpdateWindowsPlatform( + "", + "", + "", +) +``` diff --git a/docs/examples/sites/create-deployment.md b/docs/examples/sites/create-deployment.md index e1044038..a334d942 100644 --- a/docs/examples/sites/create-deployment.md +++ b/docs/examples/sites/create-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/create-duplicate-deployment.md b/docs/examples/sites/create-duplicate-deployment.md index b49962bf..c116b84d 100644 --- a/docs/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/sites/create-duplicate-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/create-template-deployment.md b/docs/examples/sites/create-template-deployment.md index 73597e91..c9037480 100644 --- a/docs/examples/sites/create-template-deployment.md +++ b/docs/examples/sites/create-template-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md index 6226b48d..55c7bc24 100644 --- a/docs/examples/sites/create-variable.md +++ b/docs/examples/sites/create-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/create-vcs-deployment.md b/docs/examples/sites/create-vcs-deployment.md index 6666fe28..e0cdc89d 100644 --- a/docs/examples/sites/create-vcs-deployment.md +++ b/docs/examples/sites/create-vcs-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/create.md b/docs/examples/sites/create.md index 194e2c95..87ae0eed 100644 --- a/docs/examples/sites/create.md +++ b/docs/examples/sites/create.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/delete-deployment.md b/docs/examples/sites/delete-deployment.md index 244f9abe..812b4e3f 100644 --- a/docs/examples/sites/delete-deployment.md +++ b/docs/examples/sites/delete-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/delete-log.md b/docs/examples/sites/delete-log.md index c96c2a02..37be545a 100644 --- a/docs/examples/sites/delete-log.md +++ b/docs/examples/sites/delete-log.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/delete-variable.md b/docs/examples/sites/delete-variable.md index 87eb7091..b38f2be9 100644 --- a/docs/examples/sites/delete-variable.md +++ b/docs/examples/sites/delete-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/delete.md b/docs/examples/sites/delete.md index a4675677..266479a1 100644 --- a/docs/examples/sites/delete.md +++ b/docs/examples/sites/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/get-deployment-download.md b/docs/examples/sites/get-deployment-download.md index d8ecb316..8443a18b 100644 --- a/docs/examples/sites/get-deployment-download.md +++ b/docs/examples/sites/get-deployment-download.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/get-deployment.md b/docs/examples/sites/get-deployment.md index 494e0fad..bfccb158 100644 --- a/docs/examples/sites/get-deployment.md +++ b/docs/examples/sites/get-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/get-log.md b/docs/examples/sites/get-log.md index 16145c85..7c90c304 100644 --- a/docs/examples/sites/get-log.md +++ b/docs/examples/sites/get-log.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/get-variable.md b/docs/examples/sites/get-variable.md index 0e8e1a3d..306a9adb 100644 --- a/docs/examples/sites/get-variable.md +++ b/docs/examples/sites/get-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/get.md b/docs/examples/sites/get.md index 25c8bc77..fff10db8 100644 --- a/docs/examples/sites/get.md +++ b/docs/examples/sites/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/list-deployments.md b/docs/examples/sites/list-deployments.md index 760edbde..4ebd5bb6 100644 --- a/docs/examples/sites/list-deployments.md +++ b/docs/examples/sites/list-deployments.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/list-frameworks.md b/docs/examples/sites/list-frameworks.md index 6f814bad..70dfae01 100644 --- a/docs/examples/sites/list-frameworks.md +++ b/docs/examples/sites/list-frameworks.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/list-logs.md b/docs/examples/sites/list-logs.md index 6b2f4347..d81ffdf4 100644 --- a/docs/examples/sites/list-logs.md +++ b/docs/examples/sites/list-logs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/list-specifications.md b/docs/examples/sites/list-specifications.md index f378164c..adfb5547 100644 --- a/docs/examples/sites/list-specifications.md +++ b/docs/examples/sites/list-specifications.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/list-variables.md b/docs/examples/sites/list-variables.md index e76d1bea..e156b586 100644 --- a/docs/examples/sites/list-variables.md +++ b/docs/examples/sites/list-variables.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/list.md b/docs/examples/sites/list.md index f6682f9b..6e15f6ab 100644 --- a/docs/examples/sites/list.md +++ b/docs/examples/sites/list.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/update-deployment-status.md b/docs/examples/sites/update-deployment-status.md index b7182dba..d2f67341 100644 --- a/docs/examples/sites/update-deployment-status.md +++ b/docs/examples/sites/update-deployment-status.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/update-site-deployment.md b/docs/examples/sites/update-site-deployment.md index 6bee6424..996241a6 100644 --- a/docs/examples/sites/update-site-deployment.md +++ b/docs/examples/sites/update-site-deployment.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md index ea4105a5..54c18b70 100644 --- a/docs/examples/sites/update-variable.md +++ b/docs/examples/sites/update-variable.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/sites/update.md b/docs/examples/sites/update.md index 2e3c0508..512c797b 100644 --- a/docs/examples/sites/update.md +++ b/docs/examples/sites/update.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/sites" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/sites" ) client := client.New( diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index 98af7b2a..5c9a270f 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/create-file.md b/docs/examples/storage/create-file.md index d0099a5c..dcb77b42 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/examples/storage/create-file.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/delete-bucket.md b/docs/examples/storage/delete-bucket.md index cef2af79..dd7c9994 100644 --- a/docs/examples/storage/delete-bucket.md +++ b/docs/examples/storage/delete-bucket.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index 74b594df..24d43e19 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/examples/storage/delete-file.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/get-bucket.md b/docs/examples/storage/get-bucket.md index ef83dd82..878309ef 100644 --- a/docs/examples/storage/get-bucket.md +++ b/docs/examples/storage/get-bucket.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index 3df62abc..bdd08b58 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/examples/storage/get-file-download.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index f8683f7c..9ebee1af 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index f16d672f..e3aef48a 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/examples/storage/get-file-view.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/get-file.md b/docs/examples/storage/get-file.md index f7301532..6d735d55 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/examples/storage/get-file.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/list-buckets.md b/docs/examples/storage/list-buckets.md index 020197fa..bd872875 100644 --- a/docs/examples/storage/list-buckets.md +++ b/docs/examples/storage/list-buckets.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index a2c9524c..b24d3744 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index f16606cc..c9b5ca15 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/storage/update-file.md b/docs/examples/storage/update-file.md index 90a16b7b..7c1381df 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/examples/storage/update-file.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/storage" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/storage" ) client := client.New( diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index 5daec556..7bfb230e 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index e3048a6a..edc7fd24 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index ecd11f5e..919d2ce3 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index a8126802..6832d412 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index f99a28cf..e3eebb45 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index 32e0d133..1952d3e4 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index 026bf062..e582d561 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index 7552bbff..090e6f58 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index 517da126..ef2fb104 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index 72c86433..bee85c26 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index fad86096..c27f8253 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-operations.md b/docs/examples/tablesdb/create-operations.md index f9527620..98fbecc3 100644 --- a/docs/examples/tablesdb/create-operations.md +++ b/docs/examples/tablesdb/create-operations.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index 8c5517a1..80010625 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index 18d18d11..d469cbeb 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index 5096aa5c..6504b6d0 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md index 3e1a9396..badc5b69 100644 --- a/docs/examples/tablesdb/create-row.md +++ b/docs/examples/tablesdb/create-row.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-rows.md b/docs/examples/tablesdb/create-rows.md index 4de6d38e..45263b64 100644 --- a/docs/examples/tablesdb/create-rows.md +++ b/docs/examples/tablesdb/create-rows.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index ec2648c0..86705db8 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index 6dd4221f..cb8b6453 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index e36becb2..446f194d 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-transaction.md b/docs/examples/tablesdb/create-transaction.md index bd3df135..095705dc 100644 --- a/docs/examples/tablesdb/create-transaction.md +++ b/docs/examples/tablesdb/create-transaction.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index 8a23dbfe..7dce3ad4 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index ebe6c96c..01c51d55 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index 0483cde4..ef6f1c71 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md index 202e80c1..9d1a3cd4 100644 --- a/docs/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/delete-column.md b/docs/examples/tablesdb/delete-column.md index ae17f3b8..8236b3b6 100644 --- a/docs/examples/tablesdb/delete-column.md +++ b/docs/examples/tablesdb/delete-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/delete-index.md b/docs/examples/tablesdb/delete-index.md index 346d8612..18b12275 100644 --- a/docs/examples/tablesdb/delete-index.md +++ b/docs/examples/tablesdb/delete-index.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md index 7f87b906..b27275f4 100644 --- a/docs/examples/tablesdb/delete-row.md +++ b/docs/examples/tablesdb/delete-row.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/delete-rows.md b/docs/examples/tablesdb/delete-rows.md index 8600cc4e..53fd1477 100644 --- a/docs/examples/tablesdb/delete-rows.md +++ b/docs/examples/tablesdb/delete-rows.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/delete-table.md b/docs/examples/tablesdb/delete-table.md index 088497ab..5d90ab72 100644 --- a/docs/examples/tablesdb/delete-table.md +++ b/docs/examples/tablesdb/delete-table.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/delete-transaction.md b/docs/examples/tablesdb/delete-transaction.md index 0c9bca71..56a2aed3 100644 --- a/docs/examples/tablesdb/delete-transaction.md +++ b/docs/examples/tablesdb/delete-transaction.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/delete.md b/docs/examples/tablesdb/delete.md index 096bd460..c14d3507 100644 --- a/docs/examples/tablesdb/delete.md +++ b/docs/examples/tablesdb/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/get-column.md b/docs/examples/tablesdb/get-column.md index a376d846..79cc8c16 100644 --- a/docs/examples/tablesdb/get-column.md +++ b/docs/examples/tablesdb/get-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/get-index.md b/docs/examples/tablesdb/get-index.md index 875e8cf5..bf43e34b 100644 --- a/docs/examples/tablesdb/get-index.md +++ b/docs/examples/tablesdb/get-index.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md index 070875ab..ce83bf63 100644 --- a/docs/examples/tablesdb/get-row.md +++ b/docs/examples/tablesdb/get-row.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/get-table.md b/docs/examples/tablesdb/get-table.md index 3012687d..5c565216 100644 --- a/docs/examples/tablesdb/get-table.md +++ b/docs/examples/tablesdb/get-table.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/get-transaction.md b/docs/examples/tablesdb/get-transaction.md index d7a209db..46b7f2e0 100644 --- a/docs/examples/tablesdb/get-transaction.md +++ b/docs/examples/tablesdb/get-transaction.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/get.md b/docs/examples/tablesdb/get.md index c4afad3f..37da48b7 100644 --- a/docs/examples/tablesdb/get.md +++ b/docs/examples/tablesdb/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md index 359bf503..914959df 100644 --- a/docs/examples/tablesdb/increment-row-column.md +++ b/docs/examples/tablesdb/increment-row-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/list-columns.md b/docs/examples/tablesdb/list-columns.md index 154bb0da..f18d66bf 100644 --- a/docs/examples/tablesdb/list-columns.md +++ b/docs/examples/tablesdb/list-columns.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/list-indexes.md b/docs/examples/tablesdb/list-indexes.md index 33429f8d..aa79d1bc 100644 --- a/docs/examples/tablesdb/list-indexes.md +++ b/docs/examples/tablesdb/list-indexes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md index e46c77e5..171928f5 100644 --- a/docs/examples/tablesdb/list-rows.md +++ b/docs/examples/tablesdb/list-rows.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/list-tables.md b/docs/examples/tablesdb/list-tables.md index 8c75c609..edb53e13 100644 --- a/docs/examples/tablesdb/list-tables.md +++ b/docs/examples/tablesdb/list-tables.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/list-transactions.md b/docs/examples/tablesdb/list-transactions.md index 4ac86de1..29b1a0ca 100644 --- a/docs/examples/tablesdb/list-transactions.md +++ b/docs/examples/tablesdb/list-transactions.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/list.md b/docs/examples/tablesdb/list.md index 06090987..106854d2 100644 --- a/docs/examples/tablesdb/list.md +++ b/docs/examples/tablesdb/list.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index 5daa856c..75615d7c 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index 86d221b5..9aa2ee04 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index befd622f..27fe465f 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index 0488f6e0..ef2cd5f2 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index 1bfa2dfd..33a4cc6d 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index 6a2ada84..65f8291e 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index 3a7b1c14..aa2f7715 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index 685be30b..14aefade 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md index 15d74dbe..b6ee833a 100644 --- a/docs/examples/tablesdb/update-longtext-column.md +++ b/docs/examples/tablesdb/update-longtext-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md index d356149d..666d5b00 100644 --- a/docs/examples/tablesdb/update-mediumtext-column.md +++ b/docs/examples/tablesdb/update-mediumtext-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index cfcef3c9..97439c17 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index f6cc4526..1529b34c 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index bacd7f44..317892da 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md index a4d22bae..8f7198c8 100644 --- a/docs/examples/tablesdb/update-row.md +++ b/docs/examples/tablesdb/update-row.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-rows.md b/docs/examples/tablesdb/update-rows.md index b43d27ad..17f8c277 100644 --- a/docs/examples/tablesdb/update-rows.md +++ b/docs/examples/tablesdb/update-rows.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index 8bfe5bb4..f029fd5c 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index 424fd935..a4f0b53c 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( @@ -22,5 +22,6 @@ response, error := service.UpdateTable( tablesdb.WithUpdateTablePermissions(interface{}{"read("any")"}), tablesdb.WithUpdateTableRowSecurity(false), tablesdb.WithUpdateTableEnabled(false), + tablesdb.WithUpdateTablePurge(false), ) ``` diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md index 16144e07..15824e23 100644 --- a/docs/examples/tablesdb/update-text-column.md +++ b/docs/examples/tablesdb/update-text-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-transaction.md b/docs/examples/tablesdb/update-transaction.md index 7f2e2f23..628dbba6 100644 --- a/docs/examples/tablesdb/update-transaction.md +++ b/docs/examples/tablesdb/update-transaction.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index 24b6faa2..42be4cd4 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md index 555806b6..3cf41f26 100644 --- a/docs/examples/tablesdb/update-varchar-column.md +++ b/docs/examples/tablesdb/update-varchar-column.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index d0f389f3..ba3b092c 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md index 9edb7d4c..85b33af3 100644 --- a/docs/examples/tablesdb/upsert-row.md +++ b/docs/examples/tablesdb/upsert-row.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/tablesdb/upsert-rows.md b/docs/examples/tablesdb/upsert-rows.md index 251c1df8..ea16f4b9 100644 --- a/docs/examples/tablesdb/upsert-rows.md +++ b/docs/examples/tablesdb/upsert-rows.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tablesdb" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tablesdb" ) client := client.New( diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index e6a49435..e0cf36c7 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/create.md b/docs/examples/teams/create.md index 28c7df26..12f61bc9 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index 4f2b49c1..729bfbbf 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/examples/teams/delete-membership.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/delete.md b/docs/examples/teams/delete.md index 39fe51b3..87f83363 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index 35644950..2846581b 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/examples/teams/get-membership.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index 58831987..b1e810c2 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index 72a9ec40..c8aa8a53 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index b9334139..05e657d5 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index 64ea913c..47eee9b0 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index 1526f30c..f7855ebf 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/update-membership.md b/docs/examples/teams/update-membership.md index bdba20ae..fe18e250 100644 --- a/docs/examples/teams/update-membership.md +++ b/docs/examples/teams/update-membership.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/update-name.md b/docs/examples/teams/update-name.md index 6c47b105..062e516a 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/examples/teams/update-name.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index 6b09ceff..bc1b957d 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/examples/teams/update-prefs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/teams" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/teams" ) client := client.New( diff --git a/docs/examples/tokens/create-file-token.md b/docs/examples/tokens/create-file-token.md index 34cf12c7..a548a250 100644 --- a/docs/examples/tokens/create-file-token.md +++ b/docs/examples/tokens/create-file-token.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tokens" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tokens" ) client := client.New( diff --git a/docs/examples/tokens/delete.md b/docs/examples/tokens/delete.md index 77d602ee..0163a669 100644 --- a/docs/examples/tokens/delete.md +++ b/docs/examples/tokens/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tokens" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tokens" ) client := client.New( diff --git a/docs/examples/tokens/get.md b/docs/examples/tokens/get.md index c422eb33..32795e18 100644 --- a/docs/examples/tokens/get.md +++ b/docs/examples/tokens/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tokens" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tokens" ) client := client.New( diff --git a/docs/examples/tokens/list.md b/docs/examples/tokens/list.md index f7d31a5d..ae03b174 100644 --- a/docs/examples/tokens/list.md +++ b/docs/examples/tokens/list.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tokens" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tokens" ) client := client.New( diff --git a/docs/examples/tokens/update.md b/docs/examples/tokens/update.md index b5ec9b44..bb1b592b 100644 --- a/docs/examples/tokens/update.md +++ b/docs/examples/tokens/update.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/tokens" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/tokens" ) client := client.New( diff --git a/docs/examples/users/create-argon-2-user.md b/docs/examples/users/create-argon-2-user.md index b235023f..0336afde 100644 --- a/docs/examples/users/create-argon-2-user.md +++ b/docs/examples/users/create-argon-2-user.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-bcrypt-user.md b/docs/examples/users/create-bcrypt-user.md index f62b2f17..e5d39203 100644 --- a/docs/examples/users/create-bcrypt-user.md +++ b/docs/examples/users/create-bcrypt-user.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-jwt.md b/docs/examples/users/create-jwt.md index a9d5ff89..447f7582 100644 --- a/docs/examples/users/create-jwt.md +++ b/docs/examples/users/create-jwt.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-md-5-user.md b/docs/examples/users/create-md-5-user.md index 9e49ca63..01c9d381 100644 --- a/docs/examples/users/create-md-5-user.md +++ b/docs/examples/users/create-md-5-user.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-mfa-recovery-codes.md b/docs/examples/users/create-mfa-recovery-codes.md index f41145bd..d6057fa1 100644 --- a/docs/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/users/create-mfa-recovery-codes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-ph-pass-user.md b/docs/examples/users/create-ph-pass-user.md index d3cde8db..99d27965 100644 --- a/docs/examples/users/create-ph-pass-user.md +++ b/docs/examples/users/create-ph-pass-user.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-scrypt-modified-user.md b/docs/examples/users/create-scrypt-modified-user.md index 54ba40c2..5aca1022 100644 --- a/docs/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/users/create-scrypt-modified-user.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-scrypt-user.md b/docs/examples/users/create-scrypt-user.md index 766f2f03..dd516efb 100644 --- a/docs/examples/users/create-scrypt-user.md +++ b/docs/examples/users/create-scrypt-user.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-session.md b/docs/examples/users/create-session.md index a6de8363..272e53eb 100644 --- a/docs/examples/users/create-session.md +++ b/docs/examples/users/create-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-sha-user.md b/docs/examples/users/create-sha-user.md index d81588ae..a6034235 100644 --- a/docs/examples/users/create-sha-user.md +++ b/docs/examples/users/create-sha-user.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-target.md b/docs/examples/users/create-target.md index 10f21353..b541958f 100644 --- a/docs/examples/users/create-target.md +++ b/docs/examples/users/create-target.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create-token.md b/docs/examples/users/create-token.md index 2332f3e4..a1034f48 100644 --- a/docs/examples/users/create-token.md +++ b/docs/examples/users/create-token.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index 4765d88b..fb1c32a8 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/delete-identity.md b/docs/examples/users/delete-identity.md index c901f5cc..6ac3f57a 100644 --- a/docs/examples/users/delete-identity.md +++ b/docs/examples/users/delete-identity.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/delete-mfa-authenticator.md b/docs/examples/users/delete-mfa-authenticator.md index d4efcbca..660daf57 100644 --- a/docs/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/users/delete-mfa-authenticator.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/delete-session.md b/docs/examples/users/delete-session.md index acbf44fe..65a3836c 100644 --- a/docs/examples/users/delete-session.md +++ b/docs/examples/users/delete-session.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/delete-sessions.md b/docs/examples/users/delete-sessions.md index 1a33547f..aad5b801 100644 --- a/docs/examples/users/delete-sessions.md +++ b/docs/examples/users/delete-sessions.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/delete-target.md b/docs/examples/users/delete-target.md index 85b3eb8b..dcc6da5a 100644 --- a/docs/examples/users/delete-target.md +++ b/docs/examples/users/delete-target.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/delete.md b/docs/examples/users/delete.md index 43f228d1..38a9349a 100644 --- a/docs/examples/users/delete.md +++ b/docs/examples/users/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/get-mfa-recovery-codes.md b/docs/examples/users/get-mfa-recovery-codes.md index d83e3cfa..0ee3a1e8 100644 --- a/docs/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/users/get-mfa-recovery-codes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/get-prefs.md b/docs/examples/users/get-prefs.md index b4c7b03d..20025c5b 100644 --- a/docs/examples/users/get-prefs.md +++ b/docs/examples/users/get-prefs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/get-target.md b/docs/examples/users/get-target.md index ab0ecb83..fa8d2003 100644 --- a/docs/examples/users/get-target.md +++ b/docs/examples/users/get-target.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/get.md b/docs/examples/users/get.md index 711e04f6..27c8c148 100644 --- a/docs/examples/users/get.md +++ b/docs/examples/users/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/list-identities.md b/docs/examples/users/list-identities.md index 840abc70..6fa04b80 100644 --- a/docs/examples/users/list-identities.md +++ b/docs/examples/users/list-identities.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/list-logs.md b/docs/examples/users/list-logs.md index 101c6902..3760b2ea 100644 --- a/docs/examples/users/list-logs.md +++ b/docs/examples/users/list-logs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/list-memberships.md b/docs/examples/users/list-memberships.md index 68d45d3e..d1e95e85 100644 --- a/docs/examples/users/list-memberships.md +++ b/docs/examples/users/list-memberships.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/list-mfa-factors.md b/docs/examples/users/list-mfa-factors.md index 8367b889..4e73eeaf 100644 --- a/docs/examples/users/list-mfa-factors.md +++ b/docs/examples/users/list-mfa-factors.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/list-sessions.md b/docs/examples/users/list-sessions.md index f1f1c825..5de5e05f 100644 --- a/docs/examples/users/list-sessions.md +++ b/docs/examples/users/list-sessions.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/list-targets.md b/docs/examples/users/list-targets.md index 03fce153..402117e2 100644 --- a/docs/examples/users/list-targets.md +++ b/docs/examples/users/list-targets.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/list.md b/docs/examples/users/list.md index b38f9918..bd0be38b 100644 --- a/docs/examples/users/list.md +++ b/docs/examples/users/list.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-email-verification.md b/docs/examples/users/update-email-verification.md index f35307c8..8efa65a1 100644 --- a/docs/examples/users/update-email-verification.md +++ b/docs/examples/users/update-email-verification.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-email.md b/docs/examples/users/update-email.md index bb3a676e..5ded8bad 100644 --- a/docs/examples/users/update-email.md +++ b/docs/examples/users/update-email.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-impersonator.md b/docs/examples/users/update-impersonator.md index bdc79e49..75a5a6b5 100644 --- a/docs/examples/users/update-impersonator.md +++ b/docs/examples/users/update-impersonator.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-labels.md b/docs/examples/users/update-labels.md index c8060145..cabb7218 100644 --- a/docs/examples/users/update-labels.md +++ b/docs/examples/users/update-labels.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-mfa-recovery-codes.md b/docs/examples/users/update-mfa-recovery-codes.md index e6994313..42d93588 100644 --- a/docs/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/users/update-mfa-recovery-codes.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-mfa.md b/docs/examples/users/update-mfa.md index 217b1eab..8852d4da 100644 --- a/docs/examples/users/update-mfa.md +++ b/docs/examples/users/update-mfa.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-name.md b/docs/examples/users/update-name.md index b3faa7d2..ade096fc 100644 --- a/docs/examples/users/update-name.md +++ b/docs/examples/users/update-name.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-password.md b/docs/examples/users/update-password.md index c582b499..7aafced9 100644 --- a/docs/examples/users/update-password.md +++ b/docs/examples/users/update-password.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-phone-verification.md b/docs/examples/users/update-phone-verification.md index 0e7bb827..9540c25f 100644 --- a/docs/examples/users/update-phone-verification.md +++ b/docs/examples/users/update-phone-verification.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-phone.md b/docs/examples/users/update-phone.md index 2d562764..9276a5ab 100644 --- a/docs/examples/users/update-phone.md +++ b/docs/examples/users/update-phone.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-prefs.md b/docs/examples/users/update-prefs.md index 42580160..5bc2a56b 100644 --- a/docs/examples/users/update-prefs.md +++ b/docs/examples/users/update-prefs.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-status.md b/docs/examples/users/update-status.md index 84c4e0ed..4098a39c 100644 --- a/docs/examples/users/update-status.md +++ b/docs/examples/users/update-status.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/users/update-target.md b/docs/examples/users/update-target.md index 6d87b86f..729b9892 100644 --- a/docs/examples/users/update-target.md +++ b/docs/examples/users/update-target.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/users" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/users" ) client := client.New( diff --git a/docs/examples/webhooks/create.md b/docs/examples/webhooks/create.md index 1ee686ec..5568e0f8 100644 --- a/docs/examples/webhooks/create.md +++ b/docs/examples/webhooks/create.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/webhooks" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/webhooks" ) client := client.New( @@ -21,8 +21,9 @@ response, error := service.Create( "", []interface{}{}, webhooks.WithCreateEnabled(false), - webhooks.WithCreateSecurity(false), - webhooks.WithCreateHttpUser(""), - webhooks.WithCreateHttpPass(""), + webhooks.WithCreateTls(false), + webhooks.WithCreateAuthUsername(""), + webhooks.WithCreateAuthPassword(""), + webhooks.WithCreateSecret(""), ) ``` diff --git a/docs/examples/webhooks/delete.md b/docs/examples/webhooks/delete.md index 687d4e91..1857cb15 100644 --- a/docs/examples/webhooks/delete.md +++ b/docs/examples/webhooks/delete.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/webhooks" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/webhooks" ) client := client.New( diff --git a/docs/examples/webhooks/get.md b/docs/examples/webhooks/get.md index 40c7108e..8ccef2b2 100644 --- a/docs/examples/webhooks/get.md +++ b/docs/examples/webhooks/get.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/webhooks" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/webhooks" ) client := client.New( diff --git a/docs/examples/webhooks/list.md b/docs/examples/webhooks/list.md index 9529fe19..6a314a76 100644 --- a/docs/examples/webhooks/list.md +++ b/docs/examples/webhooks/list.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/webhooks" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/webhooks" ) client := client.New( diff --git a/docs/examples/webhooks/update-signature.md b/docs/examples/webhooks/update-secret.md similarity index 59% rename from docs/examples/webhooks/update-signature.md rename to docs/examples/webhooks/update-secret.md index 421c0d71..fa08fb79 100644 --- a/docs/examples/webhooks/update-signature.md +++ b/docs/examples/webhooks/update-secret.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/webhooks" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/webhooks" ) client := client.New( @@ -15,7 +15,8 @@ client := client.New( service := webhooks.New(client) -response, error := service.UpdateSignature( +response, error := service.UpdateSecret( "", + webhooks.WithUpdateSecretSecret(""), ) ``` diff --git a/docs/examples/webhooks/update.md b/docs/examples/webhooks/update.md index 58ff0296..eb0de8d4 100644 --- a/docs/examples/webhooks/update.md +++ b/docs/examples/webhooks/update.md @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/webhooks" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/webhooks" ) client := client.New( @@ -21,8 +21,8 @@ response, error := service.Update( "", []interface{}{}, webhooks.WithUpdateEnabled(false), - webhooks.WithUpdateSecurity(false), - webhooks.WithUpdateHttpUser(""), - webhooks.WithUpdateHttpPass(""), + webhooks.WithUpdateTls(false), + webhooks.WithUpdateAuthUsername(""), + webhooks.WithUpdateAuthPassword(""), ) ``` diff --git a/functions/functions.go b/functions/functions.go index 814b2d6f..28e9660a 100644 --- a/functions/functions.go +++ b/functions/functions.go @@ -3,9 +3,9 @@ package functions import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" - "github.com/appwrite/sdk-for-go/v2/file" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" + "github.com/appwrite/sdk-for-go/v3/file" "net/url" "fmt" "strings" @@ -902,23 +902,25 @@ func (srv *Functions) CreateDeployment(FunctionId string, Code file.InputFile, A uploadId := "" - resp, err := srv.client.FileUpload(path, headers, params, paramName, uploadId) - if err != nil { + resp, err := srv.client.FileUpload(path, headers, params, paramName, uploadId) + if err != nil { return nil, err } - var parsed models.Deployment if strings.HasPrefix(resp.Type, "application/json") { + var parsed models.Deployment err = json.Unmarshal([]byte(resp.Result.(string)), &parsed) if err != nil { return nil, err } return &parsed, nil } + var parsed models.Deployment parsed, ok := resp.Result.(models.Deployment) if !ok { return nil, errors.New("unexpected response type") } return &parsed, nil + } type CreateDuplicateDeploymentOptions struct { BuildId string diff --git a/functions/functions_test.go b/functions/functions_test.go index 963934f3..d703514f 100644 --- a/functions/functions_test.go +++ b/functions/functions_test.go @@ -6,8 +6,8 @@ import ( "testing" "os" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/file") + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/file") func TestFunctions(t *testing.T) { tmpFile, err := os.CreateTemp("", "test") diff --git a/go.mod b/go.mod index 3026adf9..b05e6149 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/appwrite/sdk-for-go/v2 +module github.com/appwrite/sdk-for-go/v3 go 1.22.5 diff --git a/graphql/graphql.go b/graphql/graphql.go index 426e03c4..07bb8e16 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -3,7 +3,7 @@ package graphql import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" "strings" ) diff --git a/graphql/graphql_test.go b/graphql/graphql_test.go index 475ea589..5a2d31e9 100644 --- a/graphql/graphql_test.go +++ b/graphql/graphql_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestGraphql(t *testing.T) { diff --git a/health/health.go b/health/health.go index 81d251f4..f4eca716 100644 --- a/health/health.go +++ b/health/health.go @@ -3,8 +3,8 @@ package health import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/health/health_test.go b/health/health_test.go index 075c1bee..69583d4e 100644 --- a/health/health_test.go +++ b/health/health_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestHealth(t *testing.T) { diff --git a/locale/locale.go b/locale/locale.go index 787f6bf0..6715377b 100644 --- a/locale/locale.go +++ b/locale/locale.go @@ -3,8 +3,8 @@ package locale import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/locale/locale_test.go b/locale/locale_test.go index a1c04136..08ec2f84 100644 --- a/locale/locale_test.go +++ b/locale/locale_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestLocale(t *testing.T) { diff --git a/messaging/messaging.go b/messaging/messaging.go index 751406e5..ee358600 100644 --- a/messaging/messaging.go +++ b/messaging/messaging.go @@ -3,8 +3,8 @@ package messaging import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/messaging/messaging_test.go b/messaging/messaging_test.go index 0e8c535e..a0a4d618 100644 --- a/messaging/messaging_test.go +++ b/messaging/messaging_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestMessaging(t *testing.T) { @@ -408,6 +408,7 @@ func TestMessaging(t *testing.T) { "userEmail": "john@appwrite.io", "userName": "John Doe", "mode": "admin", + "userType": "user", "ip": "127.0.0.1", "time": "2020-10-15T06:38:00.000+00:00", "osCode": "Mac", @@ -1518,6 +1519,7 @@ func TestMessaging(t *testing.T) { "userEmail": "john@appwrite.io", "userName": "John Doe", "mode": "admin", + "userType": "user", "ip": "127.0.0.1", "time": "2020-10-15T06:38:00.000+00:00", "osCode": "Mac", @@ -1569,6 +1571,7 @@ func TestMessaging(t *testing.T) { "userEmail": "john@appwrite.io", "userName": "John Doe", "mode": "admin", + "userType": "user", "ip": "127.0.0.1", "time": "2020-10-15T06:38:00.000+00:00", "osCode": "Mac", @@ -1783,6 +1786,7 @@ func TestMessaging(t *testing.T) { "userEmail": "john@appwrite.io", "userName": "John Doe", "mode": "admin", + "userType": "user", "ip": "127.0.0.1", "time": "2020-10-15T06:38:00.000+00:00", "osCode": "Mac", diff --git a/models/activity_event.go b/models/activityEvent.go similarity index 100% rename from models/activity_event.go rename to models/activityEvent.go diff --git a/models/activity_event_list.go b/models/activityEventList.go similarity index 100% rename from models/activity_event_list.go rename to models/activityEventList.go diff --git a/models/activity_event_list_test.go b/models/activityEventList_test.go similarity index 100% rename from models/activity_event_list_test.go rename to models/activityEventList_test.go diff --git a/models/activity_event_test.go b/models/activityEvent_test.go similarity index 100% rename from models/activity_event_test.go rename to models/activityEvent_test.go diff --git a/models/algo_argon2.go b/models/algoArgon2.go similarity index 100% rename from models/algo_argon2.go rename to models/algoArgon2.go diff --git a/models/algo_argon2_test.go b/models/algoArgon2_test.go similarity index 100% rename from models/algo_argon2_test.go rename to models/algoArgon2_test.go diff --git a/models/algo_bcrypt.go b/models/algoBcrypt.go similarity index 100% rename from models/algo_bcrypt.go rename to models/algoBcrypt.go diff --git a/models/algo_bcrypt_test.go b/models/algoBcrypt_test.go similarity index 100% rename from models/algo_bcrypt_test.go rename to models/algoBcrypt_test.go diff --git a/models/algo_md5.go b/models/algoMd5.go similarity index 100% rename from models/algo_md5.go rename to models/algoMd5.go diff --git a/models/algo_md5_test.go b/models/algoMd5_test.go similarity index 100% rename from models/algo_md5_test.go rename to models/algoMd5_test.go diff --git a/models/algo_phpass.go b/models/algoPhpass.go similarity index 100% rename from models/algo_phpass.go rename to models/algoPhpass.go diff --git a/models/algo_phpass_test.go b/models/algoPhpass_test.go similarity index 100% rename from models/algo_phpass_test.go rename to models/algoPhpass_test.go diff --git a/models/algo_scrypt.go b/models/algoScrypt.go similarity index 100% rename from models/algo_scrypt.go rename to models/algoScrypt.go diff --git a/models/algo_scrypt_modified.go b/models/algoScryptModified.go similarity index 100% rename from models/algo_scrypt_modified.go rename to models/algoScryptModified.go diff --git a/models/algo_scrypt_modified_test.go b/models/algoScryptModified_test.go similarity index 100% rename from models/algo_scrypt_modified_test.go rename to models/algoScryptModified_test.go diff --git a/models/algo_scrypt_test.go b/models/algoScrypt_test.go similarity index 100% rename from models/algo_scrypt_test.go rename to models/algoScrypt_test.go diff --git a/models/algo_sha.go b/models/algoSha.go similarity index 100% rename from models/algo_sha.go rename to models/algoSha.go diff --git a/models/algo_sha_test.go b/models/algoSha_test.go similarity index 100% rename from models/algo_sha_test.go rename to models/algoSha_test.go diff --git a/models/attribute_boolean.go b/models/attributeBoolean.go similarity index 100% rename from models/attribute_boolean.go rename to models/attributeBoolean.go diff --git a/models/attribute_boolean_test.go b/models/attributeBoolean_test.go similarity index 100% rename from models/attribute_boolean_test.go rename to models/attributeBoolean_test.go diff --git a/models/attribute_datetime.go b/models/attributeDatetime.go similarity index 100% rename from models/attribute_datetime.go rename to models/attributeDatetime.go diff --git a/models/attribute_datetime_test.go b/models/attributeDatetime_test.go similarity index 100% rename from models/attribute_datetime_test.go rename to models/attributeDatetime_test.go diff --git a/models/attribute_email.go b/models/attributeEmail.go similarity index 100% rename from models/attribute_email.go rename to models/attributeEmail.go diff --git a/models/attribute_email_test.go b/models/attributeEmail_test.go similarity index 100% rename from models/attribute_email_test.go rename to models/attributeEmail_test.go diff --git a/models/attribute_enum.go b/models/attributeEnum.go similarity index 100% rename from models/attribute_enum.go rename to models/attributeEnum.go diff --git a/models/attribute_enum_test.go b/models/attributeEnum_test.go similarity index 100% rename from models/attribute_enum_test.go rename to models/attributeEnum_test.go diff --git a/models/attribute_float.go b/models/attributeFloat.go similarity index 100% rename from models/attribute_float.go rename to models/attributeFloat.go diff --git a/models/attribute_float_test.go b/models/attributeFloat_test.go similarity index 100% rename from models/attribute_float_test.go rename to models/attributeFloat_test.go diff --git a/models/attribute_integer.go b/models/attributeInteger.go similarity index 100% rename from models/attribute_integer.go rename to models/attributeInteger.go diff --git a/models/attribute_integer_test.go b/models/attributeInteger_test.go similarity index 100% rename from models/attribute_integer_test.go rename to models/attributeInteger_test.go diff --git a/models/attribute_ip.go b/models/attributeIp.go similarity index 100% rename from models/attribute_ip.go rename to models/attributeIp.go diff --git a/models/attribute_ip_test.go b/models/attributeIp_test.go similarity index 100% rename from models/attribute_ip_test.go rename to models/attributeIp_test.go diff --git a/models/attribute_line.go b/models/attributeLine.go similarity index 100% rename from models/attribute_line.go rename to models/attributeLine.go diff --git a/models/attribute_line_test.go b/models/attributeLine_test.go similarity index 100% rename from models/attribute_line_test.go rename to models/attributeLine_test.go diff --git a/models/attribute_list.go b/models/attributeList.go similarity index 100% rename from models/attribute_list.go rename to models/attributeList.go diff --git a/models/attribute_list_test.go b/models/attributeList_test.go similarity index 100% rename from models/attribute_list_test.go rename to models/attributeList_test.go diff --git a/models/attribute_longtext.go b/models/attributeLongtext.go similarity index 100% rename from models/attribute_longtext.go rename to models/attributeLongtext.go diff --git a/models/attribute_longtext_test.go b/models/attributeLongtext_test.go similarity index 100% rename from models/attribute_longtext_test.go rename to models/attributeLongtext_test.go diff --git a/models/attribute_mediumtext.go b/models/attributeMediumtext.go similarity index 100% rename from models/attribute_mediumtext.go rename to models/attributeMediumtext.go diff --git a/models/attribute_mediumtext_test.go b/models/attributeMediumtext_test.go similarity index 100% rename from models/attribute_mediumtext_test.go rename to models/attributeMediumtext_test.go diff --git a/models/attribute_point.go b/models/attributePoint.go similarity index 100% rename from models/attribute_point.go rename to models/attributePoint.go diff --git a/models/attribute_point_test.go b/models/attributePoint_test.go similarity index 100% rename from models/attribute_point_test.go rename to models/attributePoint_test.go diff --git a/models/attribute_polygon.go b/models/attributePolygon.go similarity index 100% rename from models/attribute_polygon.go rename to models/attributePolygon.go diff --git a/models/attribute_polygon_test.go b/models/attributePolygon_test.go similarity index 100% rename from models/attribute_polygon_test.go rename to models/attributePolygon_test.go diff --git a/models/attribute_relationship.go b/models/attributeRelationship.go similarity index 100% rename from models/attribute_relationship.go rename to models/attributeRelationship.go diff --git a/models/attribute_relationship_test.go b/models/attributeRelationship_test.go similarity index 100% rename from models/attribute_relationship_test.go rename to models/attributeRelationship_test.go diff --git a/models/attribute_string.go b/models/attributeString.go similarity index 100% rename from models/attribute_string.go rename to models/attributeString.go diff --git a/models/attribute_string_test.go b/models/attributeString_test.go similarity index 100% rename from models/attribute_string_test.go rename to models/attributeString_test.go diff --git a/models/attribute_text.go b/models/attributeText.go similarity index 100% rename from models/attribute_text.go rename to models/attributeText.go diff --git a/models/attribute_text_test.go b/models/attributeText_test.go similarity index 100% rename from models/attribute_text_test.go rename to models/attributeText_test.go diff --git a/models/attribute_url.go b/models/attributeUrl.go similarity index 100% rename from models/attribute_url.go rename to models/attributeUrl.go diff --git a/models/attribute_url_test.go b/models/attributeUrl_test.go similarity index 100% rename from models/attribute_url_test.go rename to models/attributeUrl_test.go diff --git a/models/attribute_varchar.go b/models/attributeVarchar.go similarity index 100% rename from models/attribute_varchar.go rename to models/attributeVarchar.go diff --git a/models/attribute_varchar_test.go b/models/attributeVarchar_test.go similarity index 100% rename from models/attribute_varchar_test.go rename to models/attributeVarchar_test.go diff --git a/models/authProvider.go b/models/authProvider.go new file mode 100644 index 00000000..5b2ea574 --- /dev/null +++ b/models/authProvider.go @@ -0,0 +1,42 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// AuthProvider Model +type AuthProvider struct { + // Auth Provider. + Key string `json:"key"` + // Auth Provider name. + Name string `json:"name"` + // OAuth 2.0 application ID. + AppId string `json:"appId"` + // OAuth 2.0 application secret. Might be JSON string if provider requires + // extra configuration. + Secret string `json:"secret"` + // Auth Provider is active and can be used to create session. + Enabled bool `json:"enabled"` + + // Used by Decode() method + data []byte +} + +func (model AuthProvider) New(data []byte) *AuthProvider { + model.data = data + return &model +} + +func (model *AuthProvider) 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/authProvider_test.go b/models/authProvider_test.go new file mode 100644 index 00000000..75577cb1 --- /dev/null +++ b/models/authProvider_test.go @@ -0,0 +1,35 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestAuthProviderModel(t *testing.T) { + model := AuthProvider{ Key: "github", Name: "GitHub", AppId: "259125845563242502", Secret: "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", Enabled: true, } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result AuthProvider + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Key != model.Key { + t.Errorf("Expected Key %v, got %v", model.Key, result.Key) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.AppId != model.AppId { + t.Errorf("Expected AppId %v, got %v", model.AppId, result.AppId) + } + if result.Secret != model.Secret { + t.Errorf("Expected Secret %v, got %v", model.Secret, result.Secret) + } + if result.Enabled != model.Enabled { + t.Errorf("Expected Enabled %v, got %v", model.Enabled, result.Enabled) + }} diff --git a/models/backup_archive.go b/models/backupArchive.go similarity index 100% rename from models/backup_archive.go rename to models/backupArchive.go diff --git a/models/backup_archive_list.go b/models/backupArchiveList.go similarity index 100% rename from models/backup_archive_list.go rename to models/backupArchiveList.go diff --git a/models/backup_archive_list_test.go b/models/backupArchiveList_test.go similarity index 100% rename from models/backup_archive_list_test.go rename to models/backupArchiveList_test.go diff --git a/models/backup_archive_test.go b/models/backupArchive_test.go similarity index 100% rename from models/backup_archive_test.go rename to models/backupArchive_test.go diff --git a/models/backup_policy.go b/models/backupPolicy.go similarity index 100% rename from models/backup_policy.go rename to models/backupPolicy.go diff --git a/models/backup_policy_list.go b/models/backupPolicyList.go similarity index 100% rename from models/backup_policy_list.go rename to models/backupPolicyList.go diff --git a/models/backup_policy_list_test.go b/models/backupPolicyList_test.go similarity index 100% rename from models/backup_policy_list_test.go rename to models/backupPolicyList_test.go diff --git a/models/backup_policy_test.go b/models/backupPolicy_test.go similarity index 100% rename from models/backup_policy_test.go rename to models/backupPolicy_test.go diff --git a/models/backup_restoration.go b/models/backupRestoration.go similarity index 100% rename from models/backup_restoration.go rename to models/backupRestoration.go diff --git a/models/backup_restoration_list.go b/models/backupRestorationList.go similarity index 100% rename from models/backup_restoration_list.go rename to models/backupRestorationList.go diff --git a/models/backup_restoration_list_test.go b/models/backupRestorationList_test.go similarity index 100% rename from models/backup_restoration_list_test.go rename to models/backupRestorationList_test.go diff --git a/models/backup_restoration_test.go b/models/backupRestoration_test.go similarity index 100% rename from models/backup_restoration_test.go rename to models/backupRestoration_test.go diff --git a/models/billingLimits.go b/models/billingLimits.go new file mode 100644 index 00000000..03c7714b --- /dev/null +++ b/models/billingLimits.go @@ -0,0 +1,47 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// BillingLimits Model +type BillingLimits struct { + // Bandwidth limit + Bandwidth int `json:"bandwidth"` + // Storage limit + Storage int `json:"storage"` + // Users limit + Users int `json:"users"` + // Executions limit + Executions int `json:"executions"` + // GBHours limit + GBHours int `json:"GBHours"` + // Image transformations limit + ImageTransformations int `json:"imageTransformations"` + // Auth phone limit + AuthPhone int `json:"authPhone"` + // Budget limit percentage + BudgetLimit int `json:"budgetLimit"` + + // Used by Decode() method + data []byte +} + +func (model BillingLimits) New(data []byte) *BillingLimits { + model.data = data + return &model +} + +func (model *BillingLimits) 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/billingLimits_test.go b/models/billingLimits_test.go new file mode 100644 index 00000000..60a369f7 --- /dev/null +++ b/models/billingLimits_test.go @@ -0,0 +1,44 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestBillingLimitsModel(t *testing.T) { + model := BillingLimits{ Bandwidth: 5, Storage: 150, Users: 200000, Executions: 750000, GBHours: 100, ImageTransformations: 100, AuthPhone: 10, BudgetLimit: 100, } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result BillingLimits + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Bandwidth != model.Bandwidth { + t.Errorf("Expected Bandwidth %v, got %v", model.Bandwidth, result.Bandwidth) + } + if result.Storage != model.Storage { + t.Errorf("Expected Storage %v, got %v", model.Storage, result.Storage) + } + if result.Users != model.Users { + t.Errorf("Expected Users %v, got %v", model.Users, result.Users) + } + if result.Executions != model.Executions { + t.Errorf("Expected Executions %v, got %v", model.Executions, result.Executions) + } + if result.GBHours != model.GBHours { + t.Errorf("Expected GBHours %v, got %v", model.GBHours, result.GBHours) + } + if result.ImageTransformations != model.ImageTransformations { + t.Errorf("Expected ImageTransformations %v, got %v", model.ImageTransformations, result.ImageTransformations) + } + if result.AuthPhone != model.AuthPhone { + t.Errorf("Expected AuthPhone %v, got %v", model.AuthPhone, result.AuthPhone) + } + if result.BudgetLimit != model.BudgetLimit { + t.Errorf("Expected BudgetLimit %v, got %v", model.BudgetLimit, result.BudgetLimit) + }} diff --git a/models/block.go b/models/block.go new file mode 100644 index 00000000..7d00c915 --- /dev/null +++ b/models/block.go @@ -0,0 +1,42 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// Block Model +type Block struct { + // Block creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Resource type that is blocked + ResourceType string `json:"resourceType"` + // Resource identifier that is blocked + ResourceId string `json:"resourceId"` + // Reason for the block. Can be null if no reason was provided. + Reason string `json:"reason"` + // Block expiration date in ISO 8601 format. Can be null if the block does not + // expire. + ExpiredAt string `json:"expiredAt"` + + // Used by Decode() method + data []byte +} + +func (model Block) New(data []byte) *Block { + model.data = data + return &model +} + +func (model *Block) 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/block_test.go b/models/block_test.go new file mode 100644 index 00000000..016ecd5a --- /dev/null +++ b/models/block_test.go @@ -0,0 +1,29 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestBlockModel(t *testing.T) { + model := Block{ CreatedAt: "2020-10-15T06:38:00.000+00:00", ResourceType: "project", ResourceId: "5e5ea5c16897e", } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result Block + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.ResourceType != model.ResourceType { + t.Errorf("Expected ResourceType %v, got %v", model.ResourceType, result.ResourceType) + } + if result.ResourceId != model.ResourceId { + t.Errorf("Expected ResourceId %v, got %v", model.ResourceId, result.ResourceId) + }} diff --git a/models/bucket_list.go b/models/bucketList.go similarity index 100% rename from models/bucket_list.go rename to models/bucketList.go diff --git a/models/bucket_list_test.go b/models/bucketList_test.go similarity index 100% rename from models/bucket_list_test.go rename to models/bucketList_test.go diff --git a/models/collection_list.go b/models/collectionList.go similarity index 100% rename from models/collection_list.go rename to models/collectionList.go diff --git a/models/collection_list_test.go b/models/collectionList_test.go similarity index 100% rename from models/collection_list_test.go rename to models/collectionList_test.go diff --git a/models/column_boolean.go b/models/columnBoolean.go similarity index 100% rename from models/column_boolean.go rename to models/columnBoolean.go diff --git a/models/column_boolean_test.go b/models/columnBoolean_test.go similarity index 100% rename from models/column_boolean_test.go rename to models/columnBoolean_test.go diff --git a/models/column_datetime.go b/models/columnDatetime.go similarity index 100% rename from models/column_datetime.go rename to models/columnDatetime.go diff --git a/models/column_datetime_test.go b/models/columnDatetime_test.go similarity index 100% rename from models/column_datetime_test.go rename to models/columnDatetime_test.go diff --git a/models/column_email.go b/models/columnEmail.go similarity index 100% rename from models/column_email.go rename to models/columnEmail.go diff --git a/models/column_email_test.go b/models/columnEmail_test.go similarity index 100% rename from models/column_email_test.go rename to models/columnEmail_test.go diff --git a/models/column_enum.go b/models/columnEnum.go similarity index 100% rename from models/column_enum.go rename to models/columnEnum.go diff --git a/models/column_enum_test.go b/models/columnEnum_test.go similarity index 100% rename from models/column_enum_test.go rename to models/columnEnum_test.go diff --git a/models/column_float.go b/models/columnFloat.go similarity index 100% rename from models/column_float.go rename to models/columnFloat.go diff --git a/models/column_float_test.go b/models/columnFloat_test.go similarity index 100% rename from models/column_float_test.go rename to models/columnFloat_test.go diff --git a/models/column_index.go b/models/columnIndex.go similarity index 100% rename from models/column_index.go rename to models/columnIndex.go diff --git a/models/column_index_list.go b/models/columnIndexList.go similarity index 100% rename from models/column_index_list.go rename to models/columnIndexList.go diff --git a/models/column_index_list_test.go b/models/columnIndexList_test.go similarity index 100% rename from models/column_index_list_test.go rename to models/columnIndexList_test.go diff --git a/models/column_index_test.go b/models/columnIndex_test.go similarity index 100% rename from models/column_index_test.go rename to models/columnIndex_test.go diff --git a/models/column_integer.go b/models/columnInteger.go similarity index 100% rename from models/column_integer.go rename to models/columnInteger.go diff --git a/models/column_integer_test.go b/models/columnInteger_test.go similarity index 100% rename from models/column_integer_test.go rename to models/columnInteger_test.go diff --git a/models/column_ip.go b/models/columnIp.go similarity index 100% rename from models/column_ip.go rename to models/columnIp.go diff --git a/models/column_ip_test.go b/models/columnIp_test.go similarity index 100% rename from models/column_ip_test.go rename to models/columnIp_test.go diff --git a/models/column_line.go b/models/columnLine.go similarity index 100% rename from models/column_line.go rename to models/columnLine.go diff --git a/models/column_line_test.go b/models/columnLine_test.go similarity index 100% rename from models/column_line_test.go rename to models/columnLine_test.go diff --git a/models/column_list.go b/models/columnList.go similarity index 100% rename from models/column_list.go rename to models/columnList.go diff --git a/models/column_list_test.go b/models/columnList_test.go similarity index 100% rename from models/column_list_test.go rename to models/columnList_test.go diff --git a/models/column_longtext.go b/models/columnLongtext.go similarity index 100% rename from models/column_longtext.go rename to models/columnLongtext.go diff --git a/models/column_longtext_test.go b/models/columnLongtext_test.go similarity index 100% rename from models/column_longtext_test.go rename to models/columnLongtext_test.go diff --git a/models/column_mediumtext.go b/models/columnMediumtext.go similarity index 100% rename from models/column_mediumtext.go rename to models/columnMediumtext.go diff --git a/models/column_mediumtext_test.go b/models/columnMediumtext_test.go similarity index 100% rename from models/column_mediumtext_test.go rename to models/columnMediumtext_test.go diff --git a/models/column_point.go b/models/columnPoint.go similarity index 100% rename from models/column_point.go rename to models/columnPoint.go diff --git a/models/column_point_test.go b/models/columnPoint_test.go similarity index 100% rename from models/column_point_test.go rename to models/columnPoint_test.go diff --git a/models/column_polygon.go b/models/columnPolygon.go similarity index 100% rename from models/column_polygon.go rename to models/columnPolygon.go diff --git a/models/column_polygon_test.go b/models/columnPolygon_test.go similarity index 100% rename from models/column_polygon_test.go rename to models/columnPolygon_test.go diff --git a/models/column_relationship.go b/models/columnRelationship.go similarity index 100% rename from models/column_relationship.go rename to models/columnRelationship.go diff --git a/models/column_relationship_test.go b/models/columnRelationship_test.go similarity index 100% rename from models/column_relationship_test.go rename to models/columnRelationship_test.go diff --git a/models/column_string.go b/models/columnString.go similarity index 100% rename from models/column_string.go rename to models/columnString.go diff --git a/models/column_string_test.go b/models/columnString_test.go similarity index 100% rename from models/column_string_test.go rename to models/columnString_test.go diff --git a/models/column_text.go b/models/columnText.go similarity index 100% rename from models/column_text.go rename to models/columnText.go diff --git a/models/column_text_test.go b/models/columnText_test.go similarity index 100% rename from models/column_text_test.go rename to models/columnText_test.go diff --git a/models/column_url.go b/models/columnUrl.go similarity index 100% rename from models/column_url.go rename to models/columnUrl.go diff --git a/models/column_url_test.go b/models/columnUrl_test.go similarity index 100% rename from models/column_url_test.go rename to models/columnUrl_test.go diff --git a/models/column_varchar.go b/models/columnVarchar.go similarity index 100% rename from models/column_varchar.go rename to models/columnVarchar.go diff --git a/models/column_varchar_test.go b/models/columnVarchar_test.go similarity index 100% rename from models/column_varchar_test.go rename to models/columnVarchar_test.go diff --git a/models/continent_list.go b/models/continentList.go similarity index 100% rename from models/continent_list.go rename to models/continentList.go diff --git a/models/continent_list_test.go b/models/continentList_test.go similarity index 100% rename from models/continent_list_test.go rename to models/continentList_test.go diff --git a/models/country_list.go b/models/countryList.go similarity index 100% rename from models/country_list.go rename to models/countryList.go diff --git a/models/country_list_test.go b/models/countryList_test.go similarity index 100% rename from models/country_list_test.go rename to models/countryList_test.go diff --git a/models/currency_list.go b/models/currencyList.go similarity index 100% rename from models/currency_list.go rename to models/currencyList.go diff --git a/models/currency_list_test.go b/models/currencyList_test.go similarity index 100% rename from models/currency_list_test.go rename to models/currencyList_test.go diff --git a/models/database_list.go b/models/databaseList.go similarity index 100% rename from models/database_list.go rename to models/databaseList.go diff --git a/models/database_list_test.go b/models/databaseList_test.go similarity index 100% rename from models/database_list_test.go rename to models/databaseList_test.go diff --git a/models/deployment_list.go b/models/deploymentList.go similarity index 100% rename from models/deployment_list.go rename to models/deploymentList.go diff --git a/models/deployment_list_test.go b/models/deploymentList_test.go similarity index 100% rename from models/deployment_list_test.go rename to models/deploymentList_test.go diff --git a/models/devKey.go b/models/devKey.go new file mode 100644 index 00000000..bfaa63d7 --- /dev/null +++ b/models/devKey.go @@ -0,0 +1,48 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// DevKey Model +type DevKey struct { + // Key ID. + Id string `json:"$id"` + // Key creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Key update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Key name. + Name string `json:"name"` + // Key expiration date in ISO 8601 format. + Expire string `json:"expire"` + // Secret key. + Secret string `json:"secret"` + // Most recent access date in ISO 8601 format. This attribute is only updated + // again after 24 hours. + AccessedAt string `json:"accessedAt"` + // List of SDK user agents that used this key. + Sdks []string `json:"sdks"` + + // Used by Decode() method + data []byte +} + +func (model DevKey) New(data []byte) *DevKey { + model.data = data + return &model +} + +func (model *DevKey) 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/devKey_test.go b/models/devKey_test.go new file mode 100644 index 00000000..127926da --- /dev/null +++ b/models/devKey_test.go @@ -0,0 +1,41 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestDevKeyModel(t *testing.T) { + model := DevKey{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "Dev API Key", Expire: "2020-10-15T06:38:00.000+00:00", Secret: "919c2d18fb5d4...a2ae413da83346ad2", AccessedAt: "2020-10-15T06:38:00.000+00:00", Sdks: []string{"test"}, } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result DevKey + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Id != model.Id { + t.Errorf("Expected Id %v, got %v", model.Id, result.Id) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.UpdatedAt != model.UpdatedAt { + t.Errorf("Expected UpdatedAt %v, got %v", model.UpdatedAt, result.UpdatedAt) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.Expire != model.Expire { + t.Errorf("Expected Expire %v, got %v", model.Expire, result.Expire) + } + if result.Secret != model.Secret { + t.Errorf("Expected Secret %v, got %v", model.Secret, result.Secret) + } + if result.AccessedAt != model.AccessedAt { + t.Errorf("Expected AccessedAt %v, got %v", model.AccessedAt, result.AccessedAt) + }} diff --git a/models/document_list.go b/models/documentList.go similarity index 100% rename from models/document_list.go rename to models/documentList.go diff --git a/models/document_list_test.go b/models/documentList_test.go similarity index 100% rename from models/document_list_test.go rename to models/documentList_test.go diff --git a/models/execution_list.go b/models/executionList.go similarity index 100% rename from models/execution_list.go rename to models/executionList.go diff --git a/models/execution_list_test.go b/models/executionList_test.go similarity index 100% rename from models/execution_list_test.go rename to models/executionList_test.go diff --git a/models/file_list.go b/models/fileList.go similarity index 100% rename from models/file_list.go rename to models/fileList.go diff --git a/models/file_list_test.go b/models/fileList_test.go similarity index 100% rename from models/file_list_test.go rename to models/fileList_test.go diff --git a/models/framework_adapter.go b/models/frameworkAdapter.go similarity index 100% rename from models/framework_adapter.go rename to models/frameworkAdapter.go diff --git a/models/framework_adapter_test.go b/models/frameworkAdapter_test.go similarity index 100% rename from models/framework_adapter_test.go rename to models/frameworkAdapter_test.go diff --git a/models/framework_list.go b/models/frameworkList.go similarity index 100% rename from models/framework_list.go rename to models/frameworkList.go diff --git a/models/framework_list_test.go b/models/frameworkList_test.go similarity index 100% rename from models/framework_list_test.go rename to models/frameworkList_test.go diff --git a/models/function_list.go b/models/functionList.go similarity index 100% rename from models/function_list.go rename to models/functionList.go diff --git a/models/function_list_test.go b/models/functionList_test.go similarity index 100% rename from models/function_list_test.go rename to models/functionList_test.go diff --git a/models/health_antivirus.go b/models/healthAntivirus.go similarity index 100% rename from models/health_antivirus.go rename to models/healthAntivirus.go diff --git a/models/health_antivirus_test.go b/models/healthAntivirus_test.go similarity index 100% rename from models/health_antivirus_test.go rename to models/healthAntivirus_test.go diff --git a/models/health_certificate.go b/models/healthCertificate.go similarity index 100% rename from models/health_certificate.go rename to models/healthCertificate.go diff --git a/models/health_certificate_test.go b/models/healthCertificate_test.go similarity index 100% rename from models/health_certificate_test.go rename to models/healthCertificate_test.go diff --git a/models/health_queue.go b/models/healthQueue.go similarity index 100% rename from models/health_queue.go rename to models/healthQueue.go diff --git a/models/health_queue_test.go b/models/healthQueue_test.go similarity index 100% rename from models/health_queue_test.go rename to models/healthQueue_test.go diff --git a/models/health_status.go b/models/healthStatus.go similarity index 100% rename from models/health_status.go rename to models/healthStatus.go diff --git a/models/health_status_list.go b/models/healthStatusList.go similarity index 100% rename from models/health_status_list.go rename to models/healthStatusList.go diff --git a/models/health_status_list_test.go b/models/healthStatusList_test.go similarity index 100% rename from models/health_status_list_test.go rename to models/healthStatusList_test.go diff --git a/models/health_status_test.go b/models/healthStatus_test.go similarity index 100% rename from models/health_status_test.go rename to models/healthStatus_test.go diff --git a/models/health_time.go b/models/healthTime.go similarity index 100% rename from models/health_time.go rename to models/healthTime.go diff --git a/models/health_time_test.go b/models/healthTime_test.go similarity index 100% rename from models/health_time_test.go rename to models/healthTime_test.go diff --git a/models/identity_list.go b/models/identityList.go similarity index 100% rename from models/identity_list.go rename to models/identityList.go diff --git a/models/identity_list_test.go b/models/identityList_test.go similarity index 100% rename from models/identity_list_test.go rename to models/identityList_test.go diff --git a/models/index_list.go b/models/indexList.go similarity index 100% rename from models/index_list.go rename to models/indexList.go diff --git a/models/index_list_test.go b/models/indexList_test.go similarity index 100% rename from models/index_list_test.go rename to models/indexList_test.go diff --git a/models/key.go b/models/key.go new file mode 100644 index 00000000..31bb79e5 --- /dev/null +++ b/models/key.go @@ -0,0 +1,50 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// Key Model +type Key struct { + // Key ID. + Id string `json:"$id"` + // Key creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Key update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Key name. + Name string `json:"name"` + // Key expiration date in ISO 8601 format. + Expire string `json:"expire"` + // Allowed permission scopes. + Scopes []string `json:"scopes"` + // Secret key. + Secret string `json:"secret"` + // Most recent access date in ISO 8601 format. This attribute is only updated + // again after 24 hours. + AccessedAt string `json:"accessedAt"` + // List of SDK user agents that used this key. + Sdks []string `json:"sdks"` + + // Used by Decode() method + data []byte +} + +func (model Key) New(data []byte) *Key { + model.data = data + return &model +} + +func (model *Key) 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/keyList.go b/models/keyList.go new file mode 100644 index 00000000..abfc9f6c --- /dev/null +++ b/models/keyList.go @@ -0,0 +1,35 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// APIKeysList Model +type KeyList struct { + // Total number of keys that matched your query. + Total int `json:"total"` + // List of keys. + Keys []Key `json:"keys"` + + // Used by Decode() method + data []byte +} + +func (model KeyList) New(data []byte) *KeyList { + model.data = data + return &model +} + +func (model *KeyList) 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/keyList_test.go b/models/keyList_test.go new file mode 100644 index 00000000..2125b56b --- /dev/null +++ b/models/keyList_test.go @@ -0,0 +1,24 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestKeyListModel(t *testing.T) { + model := KeyList{ Total: 5, Keys: []Key{Key{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My API Key", Expire: "2020-10-15T06:38:00.000+00:00", Scopes: []string{"test"}, Secret: "919c2d18fb5d4...a2ae413da83346ad2", AccessedAt: "2020-10-15T06:38:00.000+00:00", Sdks: []string{"test"}, }, + }, } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result KeyList + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Total != model.Total { + t.Errorf("Expected Total %v, got %v", model.Total, result.Total) + }} diff --git a/models/key_test.go b/models/key_test.go new file mode 100644 index 00000000..2f11094b --- /dev/null +++ b/models/key_test.go @@ -0,0 +1,41 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestKeyModel(t *testing.T) { + model := Key{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My API Key", Expire: "2020-10-15T06:38:00.000+00:00", Scopes: []string{"test"}, Secret: "919c2d18fb5d4...a2ae413da83346ad2", AccessedAt: "2020-10-15T06:38:00.000+00:00", Sdks: []string{"test"}, } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result Key + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Id != model.Id { + t.Errorf("Expected Id %v, got %v", model.Id, result.Id) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.UpdatedAt != model.UpdatedAt { + t.Errorf("Expected UpdatedAt %v, got %v", model.UpdatedAt, result.UpdatedAt) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.Expire != model.Expire { + t.Errorf("Expected Expire %v, got %v", model.Expire, result.Expire) + } + if result.Secret != model.Secret { + t.Errorf("Expected Secret %v, got %v", model.Secret, result.Secret) + } + if result.AccessedAt != model.AccessedAt { + t.Errorf("Expected AccessedAt %v, got %v", model.AccessedAt, result.AccessedAt) + }} diff --git a/models/language_list.go b/models/languageList.go similarity index 100% rename from models/language_list.go rename to models/languageList.go diff --git a/models/language_list_test.go b/models/languageList_test.go similarity index 100% rename from models/language_list_test.go rename to models/languageList_test.go diff --git a/models/locale_code.go b/models/localeCode.go similarity index 100% rename from models/locale_code.go rename to models/localeCode.go diff --git a/models/locale_code_list.go b/models/localeCodeList.go similarity index 100% rename from models/locale_code_list.go rename to models/localeCodeList.go diff --git a/models/locale_code_list_test.go b/models/localeCodeList_test.go similarity index 100% rename from models/locale_code_list_test.go rename to models/localeCodeList_test.go diff --git a/models/locale_code_test.go b/models/localeCode_test.go similarity index 100% rename from models/locale_code_test.go rename to models/localeCode_test.go diff --git a/models/log.go b/models/log.go index 734ae0b8..2ca0c63a 100644 --- a/models/log.go +++ b/models/log.go @@ -20,6 +20,9 @@ type Log struct { UserName string `json:"userName"` // API mode when event triggered. Mode string `json:"mode"` + // User type who triggered the audit log. Possible values: user, admin, guest, + // keyProject, keyAccount, keyOrganization. + UserType string `json:"userType"` // IP session in use when the session was created. Ip string `json:"ip"` // Log creation date in ISO 8601 format. diff --git a/models/log_list.go b/models/logList.go similarity index 100% rename from models/log_list.go rename to models/logList.go diff --git a/models/log_list_test.go b/models/logList_test.go similarity index 52% rename from models/log_list_test.go rename to models/logList_test.go index f5878dfd..64dd3458 100644 --- a/models/log_list_test.go +++ b/models/logList_test.go @@ -6,7 +6,7 @@ import ( ) func TestLogListModel(t *testing.T) { - model := LogList{ Total: 5, Logs: []Log{Log{ Event: "account.sessions.create", UserId: "610fc2f985ee0", UserEmail: "john@appwrite.io", UserName: "John Doe", Mode: "admin", Ip: "127.0.0.1", Time: "2020-10-15T06:38:00.000+00:00", OsCode: "Mac", OsName: "Mac", OsVersion: "Mac", ClientType: "browser", ClientCode: "CM", ClientName: "Chrome Mobile iOS", ClientVersion: "84.0", ClientEngine: "WebKit", ClientEngineVersion: "605.1.15", DeviceName: "smartphone", DeviceBrand: "Google", DeviceModel: "Nexus 5", CountryCode: "US", CountryName: "United States", }, + model := LogList{ Total: 5, Logs: []Log{Log{ Event: "account.sessions.create", UserId: "610fc2f985ee0", UserEmail: "john@appwrite.io", UserName: "John Doe", Mode: "admin", UserType: "user", Ip: "127.0.0.1", Time: "2020-10-15T06:38:00.000+00:00", OsCode: "Mac", OsName: "Mac", OsVersion: "Mac", ClientType: "browser", ClientCode: "CM", ClientName: "Chrome Mobile iOS", ClientVersion: "84.0", ClientEngine: "WebKit", ClientEngineVersion: "605.1.15", DeviceName: "smartphone", DeviceBrand: "Google", DeviceModel: "Nexus 5", CountryCode: "US", CountryName: "United States", }, }, } data, err := json.Marshal(model) diff --git a/models/log_test.go b/models/log_test.go index e8d07527..4d0f3a09 100644 --- a/models/log_test.go +++ b/models/log_test.go @@ -6,7 +6,7 @@ import ( ) func TestLogModel(t *testing.T) { - model := Log{ Event: "account.sessions.create", UserId: "610fc2f985ee0", UserEmail: "john@appwrite.io", UserName: "John Doe", Mode: "admin", Ip: "127.0.0.1", Time: "2020-10-15T06:38:00.000+00:00", OsCode: "Mac", OsName: "Mac", OsVersion: "Mac", ClientType: "browser", ClientCode: "CM", ClientName: "Chrome Mobile iOS", ClientVersion: "84.0", ClientEngine: "WebKit", ClientEngineVersion: "605.1.15", DeviceName: "smartphone", DeviceBrand: "Google", DeviceModel: "Nexus 5", CountryCode: "US", CountryName: "United States", } + model := Log{ Event: "account.sessions.create", UserId: "610fc2f985ee0", UserEmail: "john@appwrite.io", UserName: "John Doe", Mode: "admin", UserType: "user", Ip: "127.0.0.1", Time: "2020-10-15T06:38:00.000+00:00", OsCode: "Mac", OsName: "Mac", OsVersion: "Mac", ClientType: "browser", ClientCode: "CM", ClientName: "Chrome Mobile iOS", ClientVersion: "84.0", ClientEngine: "WebKit", ClientEngineVersion: "605.1.15", DeviceName: "smartphone", DeviceBrand: "Google", DeviceModel: "Nexus 5", CountryCode: "US", CountryName: "United States", } data, err := json.Marshal(model) if err != nil { @@ -33,6 +33,9 @@ func TestLogModel(t *testing.T) { if result.Mode != model.Mode { t.Errorf("Expected Mode %v, got %v", model.Mode, result.Mode) } + if result.UserType != model.UserType { + t.Errorf("Expected UserType %v, got %v", model.UserType, result.UserType) + } if result.Ip != model.Ip { t.Errorf("Expected Ip %v, got %v", model.Ip, result.Ip) } diff --git a/models/membership_list.go b/models/membershipList.go similarity index 100% rename from models/membership_list.go rename to models/membershipList.go diff --git a/models/membership_list_test.go b/models/membershipList_test.go similarity index 100% rename from models/membership_list_test.go rename to models/membershipList_test.go diff --git a/models/message_list.go b/models/messageList.go similarity index 100% rename from models/message_list.go rename to models/messageList.go diff --git a/models/message_list_test.go b/models/messageList_test.go similarity index 100% rename from models/message_list_test.go rename to models/messageList_test.go diff --git a/models/mfa_challenge.go b/models/mfaChallenge.go similarity index 100% rename from models/mfa_challenge.go rename to models/mfaChallenge.go diff --git a/models/mfa_challenge_test.go b/models/mfaChallenge_test.go similarity index 100% rename from models/mfa_challenge_test.go rename to models/mfaChallenge_test.go diff --git a/models/mfa_factors.go b/models/mfaFactors.go similarity index 100% rename from models/mfa_factors.go rename to models/mfaFactors.go diff --git a/models/mfa_factors_test.go b/models/mfaFactors_test.go similarity index 100% rename from models/mfa_factors_test.go rename to models/mfaFactors_test.go diff --git a/models/mfa_recovery_codes.go b/models/mfaRecoveryCodes.go similarity index 100% rename from models/mfa_recovery_codes.go rename to models/mfaRecoveryCodes.go diff --git a/models/mfa_recovery_codes_test.go b/models/mfaRecoveryCodes_test.go similarity index 100% rename from models/mfa_recovery_codes_test.go rename to models/mfaRecoveryCodes_test.go diff --git a/models/mfa_type.go b/models/mfaType.go similarity index 100% rename from models/mfa_type.go rename to models/mfaType.go diff --git a/models/mfa_type_test.go b/models/mfaType_test.go similarity index 100% rename from models/mfa_type_test.go rename to models/mfaType_test.go diff --git a/models/mockNumber.go b/models/mockNumber.go new file mode 100644 index 00000000..b9d0647b --- /dev/null +++ b/models/mockNumber.go @@ -0,0 +1,36 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// MockNumber Model +type MockNumber struct { + // Mock phone number for testing phone authentication. Useful for testing + // phone authentication without sending an SMS. + Phone string `json:"phone"` + // Mock OTP for the number. + Otp string `json:"otp"` + + // Used by Decode() method + data []byte +} + +func (model MockNumber) New(data []byte) *MockNumber { + model.data = data + return &model +} + +func (model *MockNumber) 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/mockNumber_test.go b/models/mockNumber_test.go new file mode 100644 index 00000000..422ad244 --- /dev/null +++ b/models/mockNumber_test.go @@ -0,0 +1,26 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestMockNumberModel(t *testing.T) { + model := MockNumber{ Phone: "+1612842323", Otp: "123456", } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result MockNumber + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Phone != model.Phone { + t.Errorf("Expected Phone %v, got %v", model.Phone, result.Phone) + } + if result.Otp != model.Otp { + t.Errorf("Expected Otp %v, got %v", model.Otp, result.Otp) + }} diff --git a/models/model_interface.go b/models/model_interface.go new file mode 100644 index 00000000..7c1e2403 --- /dev/null +++ b/models/model_interface.go @@ -0,0 +1,5 @@ +package models + +type Model interface { + Decode(value interface{}) error +} diff --git a/models/phone_list.go b/models/phoneList.go similarity index 100% rename from models/phone_list.go rename to models/phoneList.go diff --git a/models/phone_list_test.go b/models/phoneList_test.go similarity index 100% rename from models/phone_list_test.go rename to models/phoneList_test.go diff --git a/models/platformAndroid.go b/models/platformAndroid.go new file mode 100644 index 00000000..0608c5d4 --- /dev/null +++ b/models/platformAndroid.go @@ -0,0 +1,43 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// PlatformAndroid Model +type PlatformAndroid struct { + // Platform ID. + Id string `json:"$id"` + // Platform creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Platform update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Platform name. + Name string `json:"name"` + // Platform type. Possible values are: windows, apple, android, linux, web. + Type string `json:"type"` + // Android application ID. + ApplicationId string `json:"applicationId"` + + // Used by Decode() method + data []byte +} + +func (model PlatformAndroid) New(data []byte) *PlatformAndroid { + model.data = data + return &model +} + +func (model *PlatformAndroid) 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/platformAndroid_test.go b/models/platformAndroid_test.go new file mode 100644 index 00000000..3b06e340 --- /dev/null +++ b/models/platformAndroid_test.go @@ -0,0 +1,38 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestPlatformAndroidModel(t *testing.T) { + model := PlatformAndroid{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Web App", Type: "web", ApplicationId: "com.company.appname", } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result PlatformAndroid + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Id != model.Id { + t.Errorf("Expected Id %v, got %v", model.Id, result.Id) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.UpdatedAt != model.UpdatedAt { + t.Errorf("Expected UpdatedAt %v, got %v", model.UpdatedAt, result.UpdatedAt) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.Type != model.Type { + t.Errorf("Expected Type %v, got %v", model.Type, result.Type) + } + if result.ApplicationId != model.ApplicationId { + t.Errorf("Expected ApplicationId %v, got %v", model.ApplicationId, result.ApplicationId) + }} diff --git a/models/platformApple.go b/models/platformApple.go new file mode 100644 index 00000000..2cdfe100 --- /dev/null +++ b/models/platformApple.go @@ -0,0 +1,43 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// PlatformApple Model +type PlatformApple struct { + // Platform ID. + Id string `json:"$id"` + // Platform creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Platform update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Platform name. + Name string `json:"name"` + // Platform type. Possible values are: windows, apple, android, linux, web. + Type string `json:"type"` + // Apple bundle identifier. + BundleIdentifier string `json:"bundleIdentifier"` + + // Used by Decode() method + data []byte +} + +func (model PlatformApple) New(data []byte) *PlatformApple { + model.data = data + return &model +} + +func (model *PlatformApple) 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/platformApple_test.go b/models/platformApple_test.go new file mode 100644 index 00000000..23ee5ac4 --- /dev/null +++ b/models/platformApple_test.go @@ -0,0 +1,38 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestPlatformAppleModel(t *testing.T) { + model := PlatformApple{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Web App", Type: "web", BundleIdentifier: "com.company.appname", } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result PlatformApple + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Id != model.Id { + t.Errorf("Expected Id %v, got %v", model.Id, result.Id) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.UpdatedAt != model.UpdatedAt { + t.Errorf("Expected UpdatedAt %v, got %v", model.UpdatedAt, result.UpdatedAt) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.Type != model.Type { + t.Errorf("Expected Type %v, got %v", model.Type, result.Type) + } + if result.BundleIdentifier != model.BundleIdentifier { + t.Errorf("Expected BundleIdentifier %v, got %v", model.BundleIdentifier, result.BundleIdentifier) + }} diff --git a/models/platformLinux.go b/models/platformLinux.go new file mode 100644 index 00000000..5cd6051c --- /dev/null +++ b/models/platformLinux.go @@ -0,0 +1,43 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// PlatformLinux Model +type PlatformLinux struct { + // Platform ID. + Id string `json:"$id"` + // Platform creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Platform update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Platform name. + Name string `json:"name"` + // Platform type. Possible values are: windows, apple, android, linux, web. + Type string `json:"type"` + // Linux package name. + PackageName string `json:"packageName"` + + // Used by Decode() method + data []byte +} + +func (model PlatformLinux) New(data []byte) *PlatformLinux { + model.data = data + return &model +} + +func (model *PlatformLinux) 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/platformLinux_test.go b/models/platformLinux_test.go new file mode 100644 index 00000000..a4f8813c --- /dev/null +++ b/models/platformLinux_test.go @@ -0,0 +1,38 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestPlatformLinuxModel(t *testing.T) { + model := PlatformLinux{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Web App", Type: "web", PackageName: "com.company.appname", } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result PlatformLinux + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Id != model.Id { + t.Errorf("Expected Id %v, got %v", model.Id, result.Id) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.UpdatedAt != model.UpdatedAt { + t.Errorf("Expected UpdatedAt %v, got %v", model.UpdatedAt, result.UpdatedAt) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.Type != model.Type { + t.Errorf("Expected Type %v, got %v", model.Type, result.Type) + } + if result.PackageName != model.PackageName { + t.Errorf("Expected PackageName %v, got %v", model.PackageName, result.PackageName) + }} diff --git a/models/platformList.go b/models/platformList.go new file mode 100644 index 00000000..de54bdf5 --- /dev/null +++ b/models/platformList.go @@ -0,0 +1,35 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// PlatformsList Model +type PlatformList struct { + // Total number of platforms in the given project. + Total int `json:"total"` + // List of platforms. + Platforms []interface{} `json:"platforms"` + + // Used by Decode() method + data []byte +} + +func (model PlatformList) New(data []byte) *PlatformList { + model.data = data + return &model +} + +func (model *PlatformList) 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/platformList_test.go b/models/platformList_test.go new file mode 100644 index 00000000..259c72cb --- /dev/null +++ b/models/platformList_test.go @@ -0,0 +1,23 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestPlatformListModel(t *testing.T) { + model := PlatformList{ Total: 5, Platforms: []interface{}{}, } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result PlatformList + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Total != model.Total { + t.Errorf("Expected Total %v, got %v", model.Total, result.Total) + }} diff --git a/models/platformWeb.go b/models/platformWeb.go new file mode 100644 index 00000000..18714b02 --- /dev/null +++ b/models/platformWeb.go @@ -0,0 +1,43 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// PlatformWeb Model +type PlatformWeb struct { + // Platform ID. + Id string `json:"$id"` + // Platform creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Platform update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Platform name. + Name string `json:"name"` + // Platform type. Possible values are: windows, apple, android, linux, web. + Type string `json:"type"` + // Web app hostname. Empty string for other platforms. + Hostname string `json:"hostname"` + + // Used by Decode() method + data []byte +} + +func (model PlatformWeb) New(data []byte) *PlatformWeb { + model.data = data + return &model +} + +func (model *PlatformWeb) 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/platformWeb_test.go b/models/platformWeb_test.go new file mode 100644 index 00000000..e66bab48 --- /dev/null +++ b/models/platformWeb_test.go @@ -0,0 +1,38 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestPlatformWebModel(t *testing.T) { + model := PlatformWeb{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Web App", Type: "web", Hostname: "app.example.com", } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result PlatformWeb + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Id != model.Id { + t.Errorf("Expected Id %v, got %v", model.Id, result.Id) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.UpdatedAt != model.UpdatedAt { + t.Errorf("Expected UpdatedAt %v, got %v", model.UpdatedAt, result.UpdatedAt) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.Type != model.Type { + t.Errorf("Expected Type %v, got %v", model.Type, result.Type) + } + if result.Hostname != model.Hostname { + t.Errorf("Expected Hostname %v, got %v", model.Hostname, result.Hostname) + }} diff --git a/models/platformWindows.go b/models/platformWindows.go new file mode 100644 index 00000000..721da40b --- /dev/null +++ b/models/platformWindows.go @@ -0,0 +1,43 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// PlatformWindows Model +type PlatformWindows struct { + // Platform ID. + Id string `json:"$id"` + // Platform creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Platform update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Platform name. + Name string `json:"name"` + // Platform type. Possible values are: windows, apple, android, linux, web. + Type string `json:"type"` + // Windows package identifier name. + PackageIdentifierName string `json:"packageIdentifierName"` + + // Used by Decode() method + data []byte +} + +func (model PlatformWindows) New(data []byte) *PlatformWindows { + model.data = data + return &model +} + +func (model *PlatformWindows) 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/platformWindows_test.go b/models/platformWindows_test.go new file mode 100644 index 00000000..f7aaffe4 --- /dev/null +++ b/models/platformWindows_test.go @@ -0,0 +1,38 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestPlatformWindowsModel(t *testing.T) { + model := PlatformWindows{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Web App", Type: "web", PackageIdentifierName: "com.company.appname", } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result PlatformWindows + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Id != model.Id { + t.Errorf("Expected Id %v, got %v", model.Id, result.Id) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.UpdatedAt != model.UpdatedAt { + t.Errorf("Expected UpdatedAt %v, got %v", model.UpdatedAt, result.UpdatedAt) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.Type != model.Type { + t.Errorf("Expected Type %v, got %v", model.Type, result.Type) + } + if result.PackageIdentifierName != model.PackageIdentifierName { + t.Errorf("Expected PackageIdentifierName %v, got %v", model.PackageIdentifierName, result.PackageIdentifierName) + }} diff --git a/models/project.go b/models/project.go new file mode 100644 index 00000000..82f2d3f7 --- /dev/null +++ b/models/project.go @@ -0,0 +1,196 @@ +package models + +import ( + "encoding/json" + "errors" +) + +// Project Model +type Project struct { + // Project ID. + Id string `json:"$id"` + // Project creation date in ISO 8601 format. + CreatedAt string `json:"$createdAt"` + // Project update date in ISO 8601 format. + UpdatedAt string `json:"$updatedAt"` + // Project name. + Name string `json:"name"` + // Project description. + Description string `json:"description"` + // Project team ID. + TeamId string `json:"teamId"` + // Project logo file ID. + Logo string `json:"logo"` + // Project website URL. + Url string `json:"url"` + // Company legal name. + LegalName string `json:"legalName"` + // Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) + // two-character format. + LegalCountry string `json:"legalCountry"` + // State name. + LegalState string `json:"legalState"` + // City name. + LegalCity string `json:"legalCity"` + // Company Address. + LegalAddress string `json:"legalAddress"` + // Company Tax ID. + LegalTaxId string `json:"legalTaxId"` + // Session duration in seconds. + AuthDuration int `json:"authDuration"` + // Max users allowed. 0 is unlimited. + AuthLimit int `json:"authLimit"` + // Max sessions allowed per user. 100 maximum. + AuthSessionsLimit int `json:"authSessionsLimit"` + // Max allowed passwords in the history list per user. Max passwords limit + // allowed in history is 20. Use 0 for disabling password history. + AuthPasswordHistory int `json:"authPasswordHistory"` + // Whether or not to check user's password against most commonly used + // passwords. + AuthPasswordDictionary bool `json:"authPasswordDictionary"` + // Whether or not to check the user password for similarity with their + // personal data. + AuthPersonalDataCheck bool `json:"authPersonalDataCheck"` + // Whether or not to disallow disposable email addresses during signup and + // email updates. + AuthDisposableEmails bool `json:"authDisposableEmails"` + // Whether or not to require canonical email addresses during signup and email + // updates. + AuthCanonicalEmails bool `json:"authCanonicalEmails"` + // Whether or not to disallow free email addresses during signup and email + // updates. + AuthFreeEmails bool `json:"authFreeEmails"` + // An array of mock numbers and their corresponding verification codes (OTPs). + AuthMockNumbers []MockNumber `json:"authMockNumbers"` + // Whether or not to send session alert emails to users. + AuthSessionAlerts bool `json:"authSessionAlerts"` + // Whether or not to show user names in the teams membership response. + AuthMembershipsUserName bool `json:"authMembershipsUserName"` + // Whether or not to show user emails in the teams membership response. + AuthMembershipsUserEmail bool `json:"authMembershipsUserEmail"` + // Whether or not to show user MFA status in the teams membership response. + AuthMembershipsMfa bool `json:"authMembershipsMfa"` + // Whether or not all existing sessions should be invalidated on password + // change + AuthInvalidateSessions bool `json:"authInvalidateSessions"` + // List of Auth Providers. + OAuthProviders []AuthProvider `json:"oAuthProviders"` + // List of Platforms. + Platforms []interface{} `json:"platforms"` + // List of Webhooks. + Webhooks []Webhook `json:"webhooks"` + // List of API Keys. + Keys []Key `json:"keys"` + // List of dev keys. + DevKeys []DevKey `json:"devKeys"` + // Status for custom SMTP + SmtpEnabled bool `json:"smtpEnabled"` + // SMTP sender name + SmtpSenderName string `json:"smtpSenderName"` + // SMTP sender email + SmtpSenderEmail string `json:"smtpSenderEmail"` + // SMTP reply to email + SmtpReplyTo string `json:"smtpReplyTo"` + // SMTP server host name + SmtpHost string `json:"smtpHost"` + // SMTP server port + SmtpPort int `json:"smtpPort"` + // SMTP server username + SmtpUsername string `json:"smtpUsername"` + // SMTP server password + SmtpPassword string `json:"smtpPassword"` + // SMTP server secure protocol + SmtpSecure string `json:"smtpSecure"` + // Number of times the ping was received for this project. + PingCount int `json:"pingCount"` + // Last ping datetime in ISO 8601 format. + PingedAt string `json:"pingedAt"` + // Labels for the project. + Labels []string `json:"labels"` + // Project status + Status string `json:"status"` + // Email/Password auth method status + AuthEmailPassword bool `json:"authEmailPassword"` + // Magic URL auth method status + AuthUsersAuthMagicURL bool `json:"authUsersAuthMagicURL"` + // Email (OTP) auth method status + AuthEmailOtp bool `json:"authEmailOtp"` + // Anonymous auth method status + AuthAnonymous bool `json:"authAnonymous"` + // Invites auth method status + AuthInvites bool `json:"authInvites"` + // JWT auth method status + AuthJWT bool `json:"authJWT"` + // Phone auth method status + AuthPhone bool `json:"authPhone"` + // Account service status + ServiceStatusForAccount bool `json:"serviceStatusForAccount"` + // Avatars service status + ServiceStatusForAvatars bool `json:"serviceStatusForAvatars"` + // Databases (legacy) service status + ServiceStatusForDatabases bool `json:"serviceStatusForDatabases"` + // TablesDB service status + ServiceStatusForTablesdb bool `json:"serviceStatusForTablesdb"` + // Locale service status + ServiceStatusForLocale bool `json:"serviceStatusForLocale"` + // Health service status + ServiceStatusForHealth bool `json:"serviceStatusForHealth"` + // Project service status + ServiceStatusForProject bool `json:"serviceStatusForProject"` + // Storage service status + ServiceStatusForStorage bool `json:"serviceStatusForStorage"` + // Teams service status + ServiceStatusForTeams bool `json:"serviceStatusForTeams"` + // Users service status + ServiceStatusForUsers bool `json:"serviceStatusForUsers"` + // VCS service status + ServiceStatusForVcs bool `json:"serviceStatusForVcs"` + // Sites service status + ServiceStatusForSites bool `json:"serviceStatusForSites"` + // Functions service status + ServiceStatusForFunctions bool `json:"serviceStatusForFunctions"` + // Proxy service status + ServiceStatusForProxy bool `json:"serviceStatusForProxy"` + // GraphQL service status + ServiceStatusForGraphql bool `json:"serviceStatusForGraphql"` + // Migrations service status + ServiceStatusForMigrations bool `json:"serviceStatusForMigrations"` + // Messaging service status + ServiceStatusForMessaging bool `json:"serviceStatusForMessaging"` + // REST protocol status + ProtocolStatusForRest bool `json:"protocolStatusForRest"` + // GraphQL protocol status + ProtocolStatusForGraphql bool `json:"protocolStatusForGraphql"` + // Websocket protocol status + ProtocolStatusForWebsocket bool `json:"protocolStatusForWebsocket"` + // Project region + Region string `json:"region"` + // Billing limits reached + BillingLimits BillingLimits `json:"billingLimits"` + // Project blocks information + Blocks []Block `json:"blocks"` + // Last time the project was accessed via console. Used with plan's + // projectInactivityDays to determine if project is paused. + ConsoleAccessedAt string `json:"consoleAccessedAt"` + + // Used by Decode() method + data []byte +} + +func (model Project) New(data []byte) *Project { + model.data = data + return &model +} + +func (model *Project) 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/project_test.go b/models/project_test.go new file mode 100644 index 00000000..80a75cee --- /dev/null +++ b/models/project_test.go @@ -0,0 +1,233 @@ +package models + +import ( + "encoding/json" + "testing" +) + +func TestProjectModel(t *testing.T) { + model := Project{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "New Project", Description: "This is a new project.", TeamId: "1592981250", Logo: "5f5c451b403cb", Url: "5f5c451b403cb", LegalName: "Company LTD.", LegalCountry: "US", LegalState: "New York", LegalCity: "New York City.", LegalAddress: "620 Eighth Avenue, New York, NY 10018", LegalTaxId: "131102020", AuthDuration: 60, AuthLimit: 100, AuthSessionsLimit: 10, AuthPasswordHistory: 5, AuthPasswordDictionary: true, AuthPersonalDataCheck: true, AuthDisposableEmails: true, AuthCanonicalEmails: true, AuthFreeEmails: true, AuthMockNumbers: []MockNumber{MockNumber{ Phone: "+1612842323", Otp: "123456", }, + }, AuthSessionAlerts: true, AuthMembershipsUserName: true, AuthMembershipsUserEmail: true, AuthMembershipsMfa: true, AuthInvalidateSessions: true, OAuthProviders: []AuthProvider{AuthProvider{ Key: "github", Name: "GitHub", AppId: "259125845563242502", Secret: "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", Enabled: true, }, + }, Platforms: []interface{}{}, Webhooks: []Webhook{Webhook{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Webhook", Url: "https://example.com/webhook", Events: []string{"test"}, Tls: true, AuthUsername: "username", AuthPassword: "password", Secret: "ad3d581ca230e2b7059c545e5a", Enabled: true, Logs: "Failed to connect to remote server.", Attempts: 10, }, + }, Keys: []Key{Key{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My API Key", Expire: "2020-10-15T06:38:00.000+00:00", Scopes: []string{"test"}, Secret: "919c2d18fb5d4...a2ae413da83346ad2", AccessedAt: "2020-10-15T06:38:00.000+00:00", Sdks: []string{"test"}, }, + }, DevKeys: []DevKey{DevKey{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "Dev API Key", Expire: "2020-10-15T06:38:00.000+00:00", Secret: "919c2d18fb5d4...a2ae413da83346ad2", AccessedAt: "2020-10-15T06:38:00.000+00:00", Sdks: []string{"test"}, }, + }, SmtpEnabled: true, SmtpSenderName: "John Appwrite", SmtpSenderEmail: "john@appwrite.io", SmtpReplyTo: "support@appwrite.io", SmtpHost: "mail.appwrite.io", SmtpPort: 25, SmtpUsername: "emailuser", SmtpPassword: "securepassword", SmtpSecure: "tls", PingCount: 1, PingedAt: "2020-10-15T06:38:00.000+00:00", Labels: []string{"test"}, Status: "active", AuthEmailPassword: true, AuthUsersAuthMagicURL: true, AuthEmailOtp: true, AuthAnonymous: true, AuthInvites: true, AuthJWT: true, AuthPhone: true, ServiceStatusForAccount: true, ServiceStatusForAvatars: true, ServiceStatusForDatabases: true, ServiceStatusForTablesdb: true, ServiceStatusForLocale: true, ServiceStatusForHealth: true, ServiceStatusForProject: true, ServiceStatusForStorage: true, ServiceStatusForTeams: true, ServiceStatusForUsers: true, ServiceStatusForVcs: true, ServiceStatusForSites: true, ServiceStatusForFunctions: true, ServiceStatusForProxy: true, ServiceStatusForGraphql: true, ServiceStatusForMigrations: true, ServiceStatusForMessaging: true, ProtocolStatusForRest: true, ProtocolStatusForGraphql: true, ProtocolStatusForWebsocket: true, Region: "fra", BillingLimits: BillingLimits{ Bandwidth: 5, Storage: 150, Users: 200000, Executions: 750000, GBHours: 100, ImageTransformations: 100, AuthPhone: 10, BudgetLimit: 100, }, Blocks: []Block{Block{ CreatedAt: "2020-10-15T06:38:00.000+00:00", ResourceType: "project", ResourceId: "5e5ea5c16897e", }, + }, ConsoleAccessedAt: "2020-10-15T06:38:00.000+00:00", } + + data, err := json.Marshal(model) + if err != nil { + t.Fatal(err) + } + + var result Project + err = json.Unmarshal(data, &result) + if err != nil { + t.Fatal(err) + } + if result.Id != model.Id { + t.Errorf("Expected Id %v, got %v", model.Id, result.Id) + } + if result.CreatedAt != model.CreatedAt { + t.Errorf("Expected CreatedAt %v, got %v", model.CreatedAt, result.CreatedAt) + } + if result.UpdatedAt != model.UpdatedAt { + t.Errorf("Expected UpdatedAt %v, got %v", model.UpdatedAt, result.UpdatedAt) + } + if result.Name != model.Name { + t.Errorf("Expected Name %v, got %v", model.Name, result.Name) + } + if result.Description != model.Description { + t.Errorf("Expected Description %v, got %v", model.Description, result.Description) + } + if result.TeamId != model.TeamId { + t.Errorf("Expected TeamId %v, got %v", model.TeamId, result.TeamId) + } + if result.Logo != model.Logo { + t.Errorf("Expected Logo %v, got %v", model.Logo, result.Logo) + } + if result.Url != model.Url { + t.Errorf("Expected Url %v, got %v", model.Url, result.Url) + } + if result.LegalName != model.LegalName { + t.Errorf("Expected LegalName %v, got %v", model.LegalName, result.LegalName) + } + if result.LegalCountry != model.LegalCountry { + t.Errorf("Expected LegalCountry %v, got %v", model.LegalCountry, result.LegalCountry) + } + if result.LegalState != model.LegalState { + t.Errorf("Expected LegalState %v, got %v", model.LegalState, result.LegalState) + } + if result.LegalCity != model.LegalCity { + t.Errorf("Expected LegalCity %v, got %v", model.LegalCity, result.LegalCity) + } + if result.LegalAddress != model.LegalAddress { + t.Errorf("Expected LegalAddress %v, got %v", model.LegalAddress, result.LegalAddress) + } + if result.LegalTaxId != model.LegalTaxId { + t.Errorf("Expected LegalTaxId %v, got %v", model.LegalTaxId, result.LegalTaxId) + } + if result.AuthDuration != model.AuthDuration { + t.Errorf("Expected AuthDuration %v, got %v", model.AuthDuration, result.AuthDuration) + } + if result.AuthLimit != model.AuthLimit { + t.Errorf("Expected AuthLimit %v, got %v", model.AuthLimit, result.AuthLimit) + } + if result.AuthSessionsLimit != model.AuthSessionsLimit { + t.Errorf("Expected AuthSessionsLimit %v, got %v", model.AuthSessionsLimit, result.AuthSessionsLimit) + } + if result.AuthPasswordHistory != model.AuthPasswordHistory { + t.Errorf("Expected AuthPasswordHistory %v, got %v", model.AuthPasswordHistory, result.AuthPasswordHistory) + } + if result.AuthPasswordDictionary != model.AuthPasswordDictionary { + t.Errorf("Expected AuthPasswordDictionary %v, got %v", model.AuthPasswordDictionary, result.AuthPasswordDictionary) + } + if result.AuthPersonalDataCheck != model.AuthPersonalDataCheck { + t.Errorf("Expected AuthPersonalDataCheck %v, got %v", model.AuthPersonalDataCheck, result.AuthPersonalDataCheck) + } + if result.AuthDisposableEmails != model.AuthDisposableEmails { + t.Errorf("Expected AuthDisposableEmails %v, got %v", model.AuthDisposableEmails, result.AuthDisposableEmails) + } + if result.AuthCanonicalEmails != model.AuthCanonicalEmails { + t.Errorf("Expected AuthCanonicalEmails %v, got %v", model.AuthCanonicalEmails, result.AuthCanonicalEmails) + } + if result.AuthFreeEmails != model.AuthFreeEmails { + t.Errorf("Expected AuthFreeEmails %v, got %v", model.AuthFreeEmails, result.AuthFreeEmails) + } + if result.AuthSessionAlerts != model.AuthSessionAlerts { + t.Errorf("Expected AuthSessionAlerts %v, got %v", model.AuthSessionAlerts, result.AuthSessionAlerts) + } + if result.AuthMembershipsUserName != model.AuthMembershipsUserName { + t.Errorf("Expected AuthMembershipsUserName %v, got %v", model.AuthMembershipsUserName, result.AuthMembershipsUserName) + } + if result.AuthMembershipsUserEmail != model.AuthMembershipsUserEmail { + t.Errorf("Expected AuthMembershipsUserEmail %v, got %v", model.AuthMembershipsUserEmail, result.AuthMembershipsUserEmail) + } + if result.AuthMembershipsMfa != model.AuthMembershipsMfa { + t.Errorf("Expected AuthMembershipsMfa %v, got %v", model.AuthMembershipsMfa, result.AuthMembershipsMfa) + } + if result.AuthInvalidateSessions != model.AuthInvalidateSessions { + t.Errorf("Expected AuthInvalidateSessions %v, got %v", model.AuthInvalidateSessions, result.AuthInvalidateSessions) + } + if result.SmtpEnabled != model.SmtpEnabled { + t.Errorf("Expected SmtpEnabled %v, got %v", model.SmtpEnabled, result.SmtpEnabled) + } + if result.SmtpSenderName != model.SmtpSenderName { + t.Errorf("Expected SmtpSenderName %v, got %v", model.SmtpSenderName, result.SmtpSenderName) + } + if result.SmtpSenderEmail != model.SmtpSenderEmail { + t.Errorf("Expected SmtpSenderEmail %v, got %v", model.SmtpSenderEmail, result.SmtpSenderEmail) + } + if result.SmtpReplyTo != model.SmtpReplyTo { + t.Errorf("Expected SmtpReplyTo %v, got %v", model.SmtpReplyTo, result.SmtpReplyTo) + } + if result.SmtpHost != model.SmtpHost { + t.Errorf("Expected SmtpHost %v, got %v", model.SmtpHost, result.SmtpHost) + } + if result.SmtpPort != model.SmtpPort { + t.Errorf("Expected SmtpPort %v, got %v", model.SmtpPort, result.SmtpPort) + } + if result.SmtpUsername != model.SmtpUsername { + t.Errorf("Expected SmtpUsername %v, got %v", model.SmtpUsername, result.SmtpUsername) + } + if result.SmtpPassword != model.SmtpPassword { + t.Errorf("Expected SmtpPassword %v, got %v", model.SmtpPassword, result.SmtpPassword) + } + if result.SmtpSecure != model.SmtpSecure { + t.Errorf("Expected SmtpSecure %v, got %v", model.SmtpSecure, result.SmtpSecure) + } + if result.PingCount != model.PingCount { + t.Errorf("Expected PingCount %v, got %v", model.PingCount, result.PingCount) + } + if result.PingedAt != model.PingedAt { + t.Errorf("Expected PingedAt %v, got %v", model.PingedAt, result.PingedAt) + } + if result.Status != model.Status { + t.Errorf("Expected Status %v, got %v", model.Status, result.Status) + } + if result.AuthEmailPassword != model.AuthEmailPassword { + t.Errorf("Expected AuthEmailPassword %v, got %v", model.AuthEmailPassword, result.AuthEmailPassword) + } + if result.AuthUsersAuthMagicURL != model.AuthUsersAuthMagicURL { + t.Errorf("Expected AuthUsersAuthMagicURL %v, got %v", model.AuthUsersAuthMagicURL, result.AuthUsersAuthMagicURL) + } + if result.AuthEmailOtp != model.AuthEmailOtp { + t.Errorf("Expected AuthEmailOtp %v, got %v", model.AuthEmailOtp, result.AuthEmailOtp) + } + if result.AuthAnonymous != model.AuthAnonymous { + t.Errorf("Expected AuthAnonymous %v, got %v", model.AuthAnonymous, result.AuthAnonymous) + } + if result.AuthInvites != model.AuthInvites { + t.Errorf("Expected AuthInvites %v, got %v", model.AuthInvites, result.AuthInvites) + } + if result.AuthJWT != model.AuthJWT { + t.Errorf("Expected AuthJWT %v, got %v", model.AuthJWT, result.AuthJWT) + } + if result.AuthPhone != model.AuthPhone { + t.Errorf("Expected AuthPhone %v, got %v", model.AuthPhone, result.AuthPhone) + } + if result.ServiceStatusForAccount != model.ServiceStatusForAccount { + t.Errorf("Expected ServiceStatusForAccount %v, got %v", model.ServiceStatusForAccount, result.ServiceStatusForAccount) + } + if result.ServiceStatusForAvatars != model.ServiceStatusForAvatars { + t.Errorf("Expected ServiceStatusForAvatars %v, got %v", model.ServiceStatusForAvatars, result.ServiceStatusForAvatars) + } + if result.ServiceStatusForDatabases != model.ServiceStatusForDatabases { + t.Errorf("Expected ServiceStatusForDatabases %v, got %v", model.ServiceStatusForDatabases, result.ServiceStatusForDatabases) + } + if result.ServiceStatusForTablesdb != model.ServiceStatusForTablesdb { + t.Errorf("Expected ServiceStatusForTablesdb %v, got %v", model.ServiceStatusForTablesdb, result.ServiceStatusForTablesdb) + } + if result.ServiceStatusForLocale != model.ServiceStatusForLocale { + t.Errorf("Expected ServiceStatusForLocale %v, got %v", model.ServiceStatusForLocale, result.ServiceStatusForLocale) + } + if result.ServiceStatusForHealth != model.ServiceStatusForHealth { + t.Errorf("Expected ServiceStatusForHealth %v, got %v", model.ServiceStatusForHealth, result.ServiceStatusForHealth) + } + if result.ServiceStatusForProject != model.ServiceStatusForProject { + t.Errorf("Expected ServiceStatusForProject %v, got %v", model.ServiceStatusForProject, result.ServiceStatusForProject) + } + if result.ServiceStatusForStorage != model.ServiceStatusForStorage { + t.Errorf("Expected ServiceStatusForStorage %v, got %v", model.ServiceStatusForStorage, result.ServiceStatusForStorage) + } + if result.ServiceStatusForTeams != model.ServiceStatusForTeams { + t.Errorf("Expected ServiceStatusForTeams %v, got %v", model.ServiceStatusForTeams, result.ServiceStatusForTeams) + } + if result.ServiceStatusForUsers != model.ServiceStatusForUsers { + t.Errorf("Expected ServiceStatusForUsers %v, got %v", model.ServiceStatusForUsers, result.ServiceStatusForUsers) + } + if result.ServiceStatusForVcs != model.ServiceStatusForVcs { + t.Errorf("Expected ServiceStatusForVcs %v, got %v", model.ServiceStatusForVcs, result.ServiceStatusForVcs) + } + if result.ServiceStatusForSites != model.ServiceStatusForSites { + t.Errorf("Expected ServiceStatusForSites %v, got %v", model.ServiceStatusForSites, result.ServiceStatusForSites) + } + if result.ServiceStatusForFunctions != model.ServiceStatusForFunctions { + t.Errorf("Expected ServiceStatusForFunctions %v, got %v", model.ServiceStatusForFunctions, result.ServiceStatusForFunctions) + } + if result.ServiceStatusForProxy != model.ServiceStatusForProxy { + t.Errorf("Expected ServiceStatusForProxy %v, got %v", model.ServiceStatusForProxy, result.ServiceStatusForProxy) + } + if result.ServiceStatusForGraphql != model.ServiceStatusForGraphql { + t.Errorf("Expected ServiceStatusForGraphql %v, got %v", model.ServiceStatusForGraphql, result.ServiceStatusForGraphql) + } + if result.ServiceStatusForMigrations != model.ServiceStatusForMigrations { + t.Errorf("Expected ServiceStatusForMigrations %v, got %v", model.ServiceStatusForMigrations, result.ServiceStatusForMigrations) + } + if result.ServiceStatusForMessaging != model.ServiceStatusForMessaging { + t.Errorf("Expected ServiceStatusForMessaging %v, got %v", model.ServiceStatusForMessaging, result.ServiceStatusForMessaging) + } + if result.ProtocolStatusForRest != model.ProtocolStatusForRest { + t.Errorf("Expected ProtocolStatusForRest %v, got %v", model.ProtocolStatusForRest, result.ProtocolStatusForRest) + } + if result.ProtocolStatusForGraphql != model.ProtocolStatusForGraphql { + t.Errorf("Expected ProtocolStatusForGraphql %v, got %v", model.ProtocolStatusForGraphql, result.ProtocolStatusForGraphql) + } + if result.ProtocolStatusForWebsocket != model.ProtocolStatusForWebsocket { + t.Errorf("Expected ProtocolStatusForWebsocket %v, got %v", model.ProtocolStatusForWebsocket, result.ProtocolStatusForWebsocket) + } + if result.Region != model.Region { + t.Errorf("Expected Region %v, got %v", model.Region, result.Region) + } + if result.ConsoleAccessedAt != model.ConsoleAccessedAt { + t.Errorf("Expected ConsoleAccessedAt %v, got %v", model.ConsoleAccessedAt, result.ConsoleAccessedAt) + }} diff --git a/models/provider_list.go b/models/providerList.go similarity index 100% rename from models/provider_list.go rename to models/providerList.go diff --git a/models/provider_list_test.go b/models/providerList_test.go similarity index 100% rename from models/provider_list_test.go rename to models/providerList_test.go diff --git a/models/resource_token.go b/models/resourceToken.go similarity index 100% rename from models/resource_token.go rename to models/resourceToken.go diff --git a/models/resource_token_list.go b/models/resourceTokenList.go similarity index 100% rename from models/resource_token_list.go rename to models/resourceTokenList.go diff --git a/models/resource_token_list_test.go b/models/resourceTokenList_test.go similarity index 100% rename from models/resource_token_list_test.go rename to models/resourceTokenList_test.go diff --git a/models/resource_token_test.go b/models/resourceToken_test.go similarity index 100% rename from models/resource_token_test.go rename to models/resourceToken_test.go diff --git a/models/row_list.go b/models/rowList.go similarity index 100% rename from models/row_list.go rename to models/rowList.go diff --git a/models/row_list_test.go b/models/rowList_test.go similarity index 100% rename from models/row_list_test.go rename to models/rowList_test.go diff --git a/models/runtime_list.go b/models/runtimeList.go similarity index 100% rename from models/runtime_list.go rename to models/runtimeList.go diff --git a/models/runtime_list_test.go b/models/runtimeList_test.go similarity index 100% rename from models/runtime_list_test.go rename to models/runtimeList_test.go diff --git a/models/session_list.go b/models/sessionList.go similarity index 100% rename from models/session_list.go rename to models/sessionList.go diff --git a/models/session_list_test.go b/models/sessionList_test.go similarity index 100% rename from models/session_list_test.go rename to models/sessionList_test.go diff --git a/models/site_list.go b/models/siteList.go similarity index 100% rename from models/site_list.go rename to models/siteList.go diff --git a/models/site_list_test.go b/models/siteList_test.go similarity index 100% rename from models/site_list_test.go rename to models/siteList_test.go diff --git a/models/specification_list.go b/models/specificationList.go similarity index 100% rename from models/specification_list.go rename to models/specificationList.go diff --git a/models/specification_list_test.go b/models/specificationList_test.go similarity index 100% rename from models/specification_list_test.go rename to models/specificationList_test.go diff --git a/models/subscriber_list.go b/models/subscriberList.go similarity index 100% rename from models/subscriber_list.go rename to models/subscriberList.go diff --git a/models/subscriber_list_test.go b/models/subscriberList_test.go similarity index 100% rename from models/subscriber_list_test.go rename to models/subscriberList_test.go diff --git a/models/table_list.go b/models/tableList.go similarity index 100% rename from models/table_list.go rename to models/tableList.go diff --git a/models/table_list_test.go b/models/tableList_test.go similarity index 100% rename from models/table_list_test.go rename to models/tableList_test.go diff --git a/models/target_list.go b/models/targetList.go similarity index 100% rename from models/target_list.go rename to models/targetList.go diff --git a/models/target_list_test.go b/models/targetList_test.go similarity index 100% rename from models/target_list_test.go rename to models/targetList_test.go diff --git a/models/team_list.go b/models/teamList.go similarity index 100% rename from models/team_list.go rename to models/teamList.go diff --git a/models/team_list_test.go b/models/teamList_test.go similarity index 100% rename from models/team_list_test.go rename to models/teamList_test.go diff --git a/models/topic_list.go b/models/topicList.go similarity index 100% rename from models/topic_list.go rename to models/topicList.go diff --git a/models/topic_list_test.go b/models/topicList_test.go similarity index 100% rename from models/topic_list_test.go rename to models/topicList_test.go diff --git a/models/transaction_list.go b/models/transactionList.go similarity index 100% rename from models/transaction_list.go rename to models/transactionList.go diff --git a/models/transaction_list_test.go b/models/transactionList_test.go similarity index 100% rename from models/transaction_list_test.go rename to models/transactionList_test.go diff --git a/models/user_list.go b/models/userList.go similarity index 100% rename from models/user_list.go rename to models/userList.go diff --git a/models/user_list_test.go b/models/userList_test.go similarity index 100% rename from models/user_list_test.go rename to models/userList_test.go diff --git a/models/variable_list.go b/models/variableList.go similarity index 100% rename from models/variable_list.go rename to models/variableList.go diff --git a/models/variable_list_test.go b/models/variableList_test.go similarity index 100% rename from models/variable_list_test.go rename to models/variableList_test.go diff --git a/models/webhook.go b/models/webhook.go index b9acbe14..c5137065 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -19,14 +19,15 @@ type Webhook struct { Url string `json:"url"` // Webhook trigger events. Events []string `json:"events"` - // Indicated if SSL / TLS Certificate verification is enabled. - Security bool `json:"security"` + // Indicates if SSL / TLS certificate verification is enabled. + Tls bool `json:"tls"` // HTTP basic authentication username. - HttpUser string `json:"httpUser"` + AuthUsername string `json:"authUsername"` // HTTP basic authentication password. - HttpPass string `json:"httpPass"` - // Signature key which can be used to validated incoming - SignatureKey string `json:"signatureKey"` + AuthPassword string `json:"authPassword"` + // Signature key which can be used to validate incoming webhook payloads. Only + // returned on creation and secret rotation. + Secret string `json:"secret"` // Indicates if this webhook is enabled. Enabled bool `json:"enabled"` // Webhook error logs from the most recent failure. diff --git a/models/webhook_list.go b/models/webhookList.go similarity index 100% rename from models/webhook_list.go rename to models/webhookList.go diff --git a/models/webhook_list_test.go b/models/webhookList_test.go similarity index 70% rename from models/webhook_list_test.go rename to models/webhookList_test.go index 6135451c..5f4519f0 100644 --- a/models/webhook_list_test.go +++ b/models/webhookList_test.go @@ -6,7 +6,7 @@ import ( ) func TestWebhookListModel(t *testing.T) { - model := WebhookList{ Total: 5, Webhooks: []Webhook{Webhook{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Webhook", Url: "https://example.com/webhook", Events: []string{"test"}, Security: true, HttpUser: "username", HttpPass: "password", SignatureKey: "ad3d581ca230e2b7059c545e5a", Enabled: true, Logs: "Failed to connect to remote server.", Attempts: 10, }, + model := WebhookList{ Total: 5, Webhooks: []Webhook{Webhook{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Webhook", Url: "https://example.com/webhook", Events: []string{"test"}, Tls: true, AuthUsername: "username", AuthPassword: "password", Secret: "ad3d581ca230e2b7059c545e5a", Enabled: true, Logs: "Failed to connect to remote server.", Attempts: 10, }, }, } data, err := json.Marshal(model) diff --git a/models/webhook_test.go b/models/webhook_test.go index ea599948..3bc53f52 100644 --- a/models/webhook_test.go +++ b/models/webhook_test.go @@ -6,7 +6,7 @@ import ( ) func TestWebhookModel(t *testing.T) { - model := Webhook{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Webhook", Url: "https://example.com/webhook", Events: []string{"test"}, Security: true, HttpUser: "username", HttpPass: "password", SignatureKey: "ad3d581ca230e2b7059c545e5a", Enabled: true, Logs: "Failed to connect to remote server.", Attempts: 10, } + model := Webhook{ Id: "5e5ea5c16897e", CreatedAt: "2020-10-15T06:38:00.000+00:00", UpdatedAt: "2020-10-15T06:38:00.000+00:00", Name: "My Webhook", Url: "https://example.com/webhook", Events: []string{"test"}, Tls: true, AuthUsername: "username", AuthPassword: "password", Secret: "ad3d581ca230e2b7059c545e5a", Enabled: true, Logs: "Failed to connect to remote server.", Attempts: 10, } data, err := json.Marshal(model) if err != nil { @@ -33,17 +33,17 @@ func TestWebhookModel(t *testing.T) { if result.Url != model.Url { t.Errorf("Expected Url %v, got %v", model.Url, result.Url) } - if result.Security != model.Security { - t.Errorf("Expected Security %v, got %v", model.Security, result.Security) + if result.Tls != model.Tls { + t.Errorf("Expected Tls %v, got %v", model.Tls, result.Tls) } - if result.HttpUser != model.HttpUser { - t.Errorf("Expected HttpUser %v, got %v", model.HttpUser, result.HttpUser) + if result.AuthUsername != model.AuthUsername { + t.Errorf("Expected AuthUsername %v, got %v", model.AuthUsername, result.AuthUsername) } - if result.HttpPass != model.HttpPass { - t.Errorf("Expected HttpPass %v, got %v", model.HttpPass, result.HttpPass) + if result.AuthPassword != model.AuthPassword { + t.Errorf("Expected AuthPassword %v, got %v", model.AuthPassword, result.AuthPassword) } - if result.SignatureKey != model.SignatureKey { - t.Errorf("Expected SignatureKey %v, got %v", model.SignatureKey, result.SignatureKey) + if result.Secret != model.Secret { + t.Errorf("Expected Secret %v, got %v", model.Secret, result.Secret) } if result.Enabled != model.Enabled { t.Errorf("Expected Enabled %v, got %v", model.Enabled, result.Enabled) diff --git a/project/project.go b/project/project.go index 9f5d3b89..8894edcf 100644 --- a/project/project.go +++ b/project/project.go @@ -3,8 +3,8 @@ package project import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) @@ -19,6 +19,891 @@ func New(clt client.Client) *Project { } } +type ListKeysOptions struct { + Queries []string + Total bool + enabledSetters map[string]bool +} +func (options ListKeysOptions) New() *ListKeysOptions { + options.enabledSetters = map[string]bool{ + "Queries": false, + "Total": false, + } + return &options +} +type ListKeysOption func(*ListKeysOptions) +func (srv *Project) WithListKeysQueries(v []string) ListKeysOption { + return func(o *ListKeysOptions) { + o.Queries = v + o.enabledSetters["Queries"] = true + } +} +func (srv *Project) WithListKeysTotal(v bool) ListKeysOption { + return func(o *ListKeysOptions) { + o.Total = v + o.enabledSetters["Total"] = true + } +} + +// ListKeys get a list of all API keys from the current project. +func (srv *Project) ListKeys(optionalSetters ...ListKeysOption)(*models.KeyList, error) { + path := "/project/keys" + options := ListKeysOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Queries"] { + params["queries"] = options.Queries + } + if options.enabledSetters["Total"] { + params["total"] = options.Total + } + 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.KeyList{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.KeyList + parsed, ok := resp.Result.(models.KeyList) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type CreateKeyOptions struct { + Expire string + enabledSetters map[string]bool +} +func (options CreateKeyOptions) New() *CreateKeyOptions { + options.enabledSetters = map[string]bool{ + "Expire": false, + } + return &options +} +type CreateKeyOption func(*CreateKeyOptions) +func (srv *Project) WithCreateKeyExpire(v string) CreateKeyOption { + return func(o *CreateKeyOptions) { + o.Expire = v + o.enabledSetters["Expire"] = true + } +} + +// CreateKey create a new API key. It's recommended to have multiple API keys +// with strict scopes for separate functions within your project. +func (srv *Project) CreateKey(KeyId string, Name string, Scopes []string, optionalSetters ...CreateKeyOption)(*models.Key, error) { + path := "/project/keys" + options := CreateKeyOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + params["keyId"] = KeyId + params["name"] = Name + params["scopes"] = Scopes + if options.enabledSetters["Expire"] { + params["expire"] = options.Expire + } + 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.Key{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.Key + parsed, ok := resp.Result.(models.Key) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// GetKey get a key by its unique ID. +func (srv *Project) GetKey(KeyId string)(*models.Key, error) { + r := strings.NewReplacer("{keyId}", KeyId) + path := r.Replace("/project/keys/{keyId}") + params := map[string]interface{}{} + params["keyId"] = KeyId + 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.Key{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.Key + parsed, ok := resp.Result.(models.Key) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type UpdateKeyOptions struct { + Expire string + enabledSetters map[string]bool +} +func (options UpdateKeyOptions) New() *UpdateKeyOptions { + options.enabledSetters = map[string]bool{ + "Expire": false, + } + return &options +} +type UpdateKeyOption func(*UpdateKeyOptions) +func (srv *Project) WithUpdateKeyExpire(v string) UpdateKeyOption { + return func(o *UpdateKeyOptions) { + o.Expire = v + o.enabledSetters["Expire"] = true + } +} + +// UpdateKey update a key by its unique ID. Use this endpoint to update the +// name, scopes, or expiration time of an API key. +func (srv *Project) UpdateKey(KeyId string, Name string, Scopes []string, optionalSetters ...UpdateKeyOption)(*models.Key, error) { + r := strings.NewReplacer("{keyId}", KeyId) + path := r.Replace("/project/keys/{keyId}") + options := UpdateKeyOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + params["keyId"] = KeyId + params["name"] = Name + params["scopes"] = Scopes + if options.enabledSetters["Expire"] { + params["expire"] = options.Expire + } + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("PUT", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.Key{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.Key + parsed, ok := resp.Result.(models.Key) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// DeleteKey delete a key by its unique ID. Once deleted, the key can no +// longer be used to authenticate API calls. +func (srv *Project) DeleteKey(KeyId string)(*interface{}, error) { + r := strings.NewReplacer("{keyId}", KeyId) + path := r.Replace("/project/keys/{keyId}") + params := map[string]interface{}{} + params["keyId"] = KeyId + 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 + +} + +// UpdateLabels update the project labels. Labels can be used to easily filter +// projects in an organization. +func (srv *Project) UpdateLabels(Labels []string)(*models.Project, error) { + path := "/project/labels" + params := map[string]interface{}{} + params["labels"] = Labels + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("PUT", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.Project{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.Project + parsed, ok := resp.Result.(models.Project) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} +type ListPlatformsOptions struct { + Queries []string + Total bool + enabledSetters map[string]bool +} +func (options ListPlatformsOptions) New() *ListPlatformsOptions { + options.enabledSetters = map[string]bool{ + "Queries": false, + "Total": false, + } + return &options +} +type ListPlatformsOption func(*ListPlatformsOptions) +func (srv *Project) WithListPlatformsQueries(v []string) ListPlatformsOption { + return func(o *ListPlatformsOptions) { + o.Queries = v + o.enabledSetters["Queries"] = true + } +} +func (srv *Project) WithListPlatformsTotal(v bool) ListPlatformsOption { + return func(o *ListPlatformsOptions) { + o.Total = v + o.enabledSetters["Total"] = true + } +} + +// ListPlatforms get a list of all platforms in the project. This endpoint +// returns an array of all platforms and their configurations. +func (srv *Project) ListPlatforms(optionalSetters ...ListPlatformsOption)(*models.PlatformList, error) { + path := "/project/platforms" + options := ListPlatformsOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } + params := map[string]interface{}{} + if options.enabledSetters["Queries"] { + params["queries"] = options.Queries + } + if options.enabledSetters["Total"] { + params["total"] = options.Total + } + 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.PlatformList{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformList + parsed, ok := resp.Result.(models.PlatformList) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// CreateAndroidPlatform create a new Android platform for your project. Use +// this endpoint to register a new Android platform where your users will run +// your application which will interact with the Appwrite API. +func (srv *Project) CreateAndroidPlatform(PlatformId string, Name string, ApplicationId string)(*models.PlatformAndroid, error) { + path := "/project/platforms/android" + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["applicationId"] = ApplicationId + 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.PlatformAndroid{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformAndroid + parsed, ok := resp.Result.(models.PlatformAndroid) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// UpdateAndroidPlatform update an Android platform by its unique ID. Use this +// endpoint to update the platform's name or application ID. +func (srv *Project) UpdateAndroidPlatform(PlatformId string, Name string, ApplicationId string)(*models.PlatformAndroid, error) { + r := strings.NewReplacer("{platformId}", PlatformId) + path := r.Replace("/project/platforms/android/{platformId}") + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["applicationId"] = ApplicationId + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("PUT", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.PlatformAndroid{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformAndroid + parsed, ok := resp.Result.(models.PlatformAndroid) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// CreateApplePlatform create a new Apple platform for your project. Use this +// endpoint to register a new Apple platform where your users will run your +// application which will interact with the Appwrite API. +func (srv *Project) CreateApplePlatform(PlatformId string, Name string, BundleIdentifier string)(*models.PlatformApple, error) { + path := "/project/platforms/apple" + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["bundleIdentifier"] = BundleIdentifier + 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.PlatformApple{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformApple + parsed, ok := resp.Result.(models.PlatformApple) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// UpdateApplePlatform update an Apple platform by its unique ID. Use this +// endpoint to update the platform's name or bundle identifier. +func (srv *Project) UpdateApplePlatform(PlatformId string, Name string, BundleIdentifier string)(*models.PlatformApple, error) { + r := strings.NewReplacer("{platformId}", PlatformId) + path := r.Replace("/project/platforms/apple/{platformId}") + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["bundleIdentifier"] = BundleIdentifier + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("PUT", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.PlatformApple{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformApple + parsed, ok := resp.Result.(models.PlatformApple) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// CreateLinuxPlatform create a new Linux platform for your project. Use this +// endpoint to register a new Linux platform where your users will run your +// application which will interact with the Appwrite API. +func (srv *Project) CreateLinuxPlatform(PlatformId string, Name string, PackageName string)(*models.PlatformLinux, error) { + path := "/project/platforms/linux" + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["packageName"] = PackageName + 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.PlatformLinux{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformLinux + parsed, ok := resp.Result.(models.PlatformLinux) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// UpdateLinuxPlatform update a Linux platform by its unique ID. Use this +// endpoint to update the platform's name or package name. +func (srv *Project) UpdateLinuxPlatform(PlatformId string, Name string, PackageName string)(*models.PlatformLinux, error) { + r := strings.NewReplacer("{platformId}", PlatformId) + path := r.Replace("/project/platforms/linux/{platformId}") + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["packageName"] = PackageName + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("PUT", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.PlatformLinux{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformLinux + parsed, ok := resp.Result.(models.PlatformLinux) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// CreateWebPlatform create a new web platform for your project. Use this +// endpoint to register a new platform where your users will run your +// application which will interact with the Appwrite API. +func (srv *Project) CreateWebPlatform(PlatformId string, Name string, Hostname string)(*models.PlatformWeb, error) { + path := "/project/platforms/web" + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["hostname"] = Hostname + 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.PlatformWeb{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformWeb + parsed, ok := resp.Result.(models.PlatformWeb) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// UpdateWebPlatform update a web platform by its unique ID. Use this endpoint +// to update the platform's name or hostname. +func (srv *Project) UpdateWebPlatform(PlatformId string, Name string, Hostname string)(*models.PlatformWeb, error) { + r := strings.NewReplacer("{platformId}", PlatformId) + path := r.Replace("/project/platforms/web/{platformId}") + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["hostname"] = Hostname + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("PUT", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.PlatformWeb{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformWeb + parsed, ok := resp.Result.(models.PlatformWeb) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// CreateWindowsPlatform create a new Windows platform for your project. Use +// this endpoint to register a new Windows platform where your users will run +// your application which will interact with the Appwrite API. +func (srv *Project) CreateWindowsPlatform(PlatformId string, Name string, PackageIdentifierName string)(*models.PlatformWindows, error) { + path := "/project/platforms/windows" + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["packageIdentifierName"] = PackageIdentifierName + 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.PlatformWindows{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformWindows + parsed, ok := resp.Result.(models.PlatformWindows) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// UpdateWindowsPlatform update a Windows platform by its unique ID. Use this +// endpoint to update the platform's name or package identifier name. +func (srv *Project) UpdateWindowsPlatform(PlatformId string, Name string, PackageIdentifierName string)(*models.PlatformWindows, error) { + r := strings.NewReplacer("{platformId}", PlatformId) + path := r.Replace("/project/platforms/windows/{platformId}") + params := map[string]interface{}{} + params["platformId"] = PlatformId + params["name"] = Name + params["packageIdentifierName"] = PackageIdentifierName + headers := map[string]interface{}{ + "content-type": "application/json", + } + + resp, err := srv.client.Call("PUT", path, headers, params) + if err != nil { + return nil, err + } + if strings.HasPrefix(resp.Type, "application/json") { + bytes := []byte(resp.Result.(string)) + + parsed := models.PlatformWindows{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.PlatformWindows + parsed, ok := resp.Result.(models.PlatformWindows) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// GetPlatform get a platform by its unique ID. This endpoint returns the +// platform's details, including its name, type, and key configurations. +func (srv *Project) GetPlatform(PlatformId string)(models.Model, error) { + r := strings.NewReplacer("{platformId}", PlatformId) + path := r.Replace("/project/platforms/{platformId}") + params := map[string]interface{}{} + params["platformId"] = PlatformId + 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.PlatformWeb{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + parsed, ok := resp.Result.(models.Model) + if !ok { + return nil, errors.New("unexpected response type") + } + return parsed, nil + +} + +// DeletePlatform delete a platform by its unique ID. This endpoint removes +// the platform and all its configurations from the project. +func (srv *Project) DeletePlatform(PlatformId string)(*interface{}, error) { + r := strings.NewReplacer("{platformId}", PlatformId) + path := r.Replace("/project/platforms/{platformId}") + params := map[string]interface{}{} + params["platformId"] = PlatformId + 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 + +} + +// UpdateProtocolStatus update the status of a specific protocol. Use this +// endpoint to enable or disable a protocol in your project. +func (srv *Project) UpdateProtocolStatus(ProtocolId string, Enabled bool)(*models.Project, error) { + r := strings.NewReplacer("{protocolId}", ProtocolId) + path := r.Replace("/project/protocols/{protocolId}/status") + params := map[string]interface{}{} + params["protocolId"] = ProtocolId + params["enabled"] = 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.Project{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.Project + parsed, ok := resp.Result.(models.Project) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} + +// UpdateServiceStatus update the status of a specific service. Use this +// endpoint to enable or disable a service in your project. +func (srv *Project) UpdateServiceStatus(ServiceId string, Enabled bool)(*models.Project, error) { + r := strings.NewReplacer("{serviceId}", ServiceId) + path := r.Replace("/project/services/{serviceId}/status") + params := map[string]interface{}{} + params["serviceId"] = ServiceId + params["enabled"] = 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.Project{}.New(bytes) + + err = json.Unmarshal(bytes, parsed) + if err != nil { + return nil, err + } + + return parsed, nil + } + var parsed models.Project + parsed, ok := resp.Result.(models.Project) + if !ok { + return nil, errors.New("unexpected response type") + } + return &parsed, nil + +} type ListVariablesOptions struct { Queries []string Total bool diff --git a/project/project_test.go b/project/project_test.go index f186f04a..3005d005 100644 --- a/project/project_test.go +++ b/project/project_test.go @@ -5,7 +5,8 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" ) func TestProject(t *testing.T) { @@ -16,6 +17,1080 @@ func TestProject(t *testing.T) { return c } + t.Run("Test ListKeys", func(t *testing.T) { + mockResponse := ` +{ + "total": 5, + "keys": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": [], + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] + } + ] +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Errorf("Expected method GET, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.ListKeys() + if err != nil { + t.Errorf("Method ListKeys failed: %v", err) + } + }) + + t.Run("Test CreateKey", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": [], + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Errorf("Expected method POST, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.CreateKey("", "", []string{}) + if err != nil { + t.Errorf("Method CreateKey failed: %v", err) + } + }) + + t.Run("Test GetKey", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": [], + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Errorf("Expected method GET, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.GetKey("") + if err != nil { + t.Errorf("Method GetKey failed: %v", err) + } + }) + + t.Run("Test UpdateKey", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": [], + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PUT" { + t.Errorf("Expected method PUT, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateKey("", "", []string{}) + if err != nil { + t.Errorf("Method UpdateKey failed: %v", err) + } + }) + + t.Run("Test DeleteKey", func(t *testing.T) { + mockResponse := ` +{ + "message": "success" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "DELETE" { + t.Errorf("Expected method DELETE, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.DeleteKey("") + if err != nil { + t.Errorf("Method DeleteKey failed: %v", err) + } + }) + + t.Run("Test UpdateLabels", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authDisposableEmails": true, + "authCanonicalEmails": true, + "authFreeEmails": true, + "authMockNumbers": [ + { + "phone": "+1612842323", + "otp": "123456" + } + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": true + } + ], + "platforms": [], + "webhooks": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https://example.com/webhook", + "events": [], + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } + ], + "keys": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": [], + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] + } + ], + "devKeys": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] + } + ], + "smtpEnabled": true, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [], + "status": "active", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForProject": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForVcs": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForProxy": true, + "serviceStatusForGraphql": true, + "serviceStatusForMigrations": true, + "serviceStatusForMessaging": true, + "protocolStatusForRest": true, + "protocolStatusForGraphql": true, + "protocolStatusForWebsocket": true, + "region": "fra", + "billingLimits": { + "bandwidth": 5, + "storage": 150, + "users": 200000, + "executions": 750000, + "GBHours": 100, + "imageTransformations": 100, + "authPhone": 10, + "budgetLimit": 100 + }, + "blocks": [ + { + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "project", + "resourceId": "5e5ea5c16897e" + } + ], + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PUT" { + t.Errorf("Expected method PUT, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateLabels([]string{}) + if err != nil { + t.Errorf("Method UpdateLabels failed: %v", err) + } + }) + + t.Run("Test ListPlatforms", func(t *testing.T) { + mockResponse := ` +{ + "total": 5, + "platforms": [] +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Errorf("Expected method GET, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.ListPlatforms() + if err != nil { + t.Errorf("Method ListPlatforms failed: %v", err) + } + }) + + t.Run("Test CreateAndroidPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "applicationId": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Errorf("Expected method POST, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.CreateAndroidPlatform("", "", "") + if err != nil { + t.Errorf("Method CreateAndroidPlatform failed: %v", err) + } + }) + + t.Run("Test UpdateAndroidPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "applicationId": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PUT" { + t.Errorf("Expected method PUT, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateAndroidPlatform("", "", "") + if err != nil { + t.Errorf("Method UpdateAndroidPlatform failed: %v", err) + } + }) + + t.Run("Test CreateApplePlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "bundleIdentifier": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Errorf("Expected method POST, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.CreateApplePlatform("", "", "") + if err != nil { + t.Errorf("Method CreateApplePlatform failed: %v", err) + } + }) + + t.Run("Test UpdateApplePlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "bundleIdentifier": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PUT" { + t.Errorf("Expected method PUT, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateApplePlatform("", "", "") + if err != nil { + t.Errorf("Method UpdateApplePlatform failed: %v", err) + } + }) + + t.Run("Test CreateLinuxPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Errorf("Expected method POST, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.CreateLinuxPlatform("", "", "") + if err != nil { + t.Errorf("Method CreateLinuxPlatform failed: %v", err) + } + }) + + t.Run("Test UpdateLinuxPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PUT" { + t.Errorf("Expected method PUT, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateLinuxPlatform("", "", "") + if err != nil { + t.Errorf("Method UpdateLinuxPlatform failed: %v", err) + } + }) + + t.Run("Test CreateWebPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "hostname": "app.example.com" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Errorf("Expected method POST, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.CreateWebPlatform("", "", "app.example.com") + if err != nil { + t.Errorf("Method CreateWebPlatform failed: %v", err) + } + }) + + t.Run("Test UpdateWebPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "hostname": "app.example.com" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PUT" { + t.Errorf("Expected method PUT, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateWebPlatform("", "", "app.example.com") + if err != nil { + t.Errorf("Method UpdateWebPlatform failed: %v", err) + } + }) + + t.Run("Test CreateWindowsPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageIdentifierName": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Errorf("Expected method POST, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.CreateWindowsPlatform("", "", "") + if err != nil { + t.Errorf("Method CreateWindowsPlatform failed: %v", err) + } + }) + + t.Run("Test UpdateWindowsPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageIdentifierName": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PUT" { + t.Errorf("Expected method PUT, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateWindowsPlatform("", "", "") + if err != nil { + t.Errorf("Method UpdateWindowsPlatform failed: %v", err) + } + }) + + t.Run("Test GetPlatform", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Web App", + "type": "web", + "packageName": "com.company.appname" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Errorf("Expected method GET, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + response, err := srv.GetPlatform("") + if err != nil { + t.Errorf("Method GetPlatform failed: %v", err) + } + if _, ok := response.(*models.PlatformLinux); !ok { + t.Errorf("Expected response type *models.PlatformLinux, got %T", response) + } + }) + + t.Run("Test DeletePlatform", func(t *testing.T) { + mockResponse := ` +{ + "message": "success" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "DELETE" { + t.Errorf("Expected method DELETE, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.DeletePlatform("") + if err != nil { + t.Errorf("Method DeletePlatform failed: %v", err) + } + }) + + t.Run("Test UpdateProtocolStatus", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authDisposableEmails": true, + "authCanonicalEmails": true, + "authFreeEmails": true, + "authMockNumbers": [ + { + "phone": "+1612842323", + "otp": "123456" + } + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": true + } + ], + "platforms": [], + "webhooks": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https://example.com/webhook", + "events": [], + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } + ], + "keys": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": [], + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] + } + ], + "devKeys": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] + } + ], + "smtpEnabled": true, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [], + "status": "active", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForProject": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForVcs": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForProxy": true, + "serviceStatusForGraphql": true, + "serviceStatusForMigrations": true, + "serviceStatusForMessaging": true, + "protocolStatusForRest": true, + "protocolStatusForGraphql": true, + "protocolStatusForWebsocket": true, + "region": "fra", + "billingLimits": { + "bandwidth": 5, + "storage": 150, + "users": 200000, + "executions": 750000, + "GBHours": 100, + "imageTransformations": 100, + "authPhone": 10, + "budgetLimit": 100 + }, + "blocks": [ + { + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "project", + "resourceId": "5e5ea5c16897e" + } + ], + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PATCH" { + t.Errorf("Expected method PATCH, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateProtocolStatus("rest", true) + if err != nil { + t.Errorf("Method UpdateProtocolStatus failed: %v", err) + } + }) + + t.Run("Test UpdateServiceStatus", func(t *testing.T) { + mockResponse := ` +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "New Project", + "description": "This is a new project.", + "teamId": "1592981250", + "logo": "5f5c451b403cb", + "url": "5f5c451b403cb", + "legalName": "Company LTD.", + "legalCountry": "US", + "legalState": "New York", + "legalCity": "New York City.", + "legalAddress": "620 Eighth Avenue, New York, NY 10018", + "legalTaxId": "131102020", + "authDuration": 60, + "authLimit": 100, + "authSessionsLimit": 10, + "authPasswordHistory": 5, + "authPasswordDictionary": true, + "authPersonalDataCheck": true, + "authDisposableEmails": true, + "authCanonicalEmails": true, + "authFreeEmails": true, + "authMockNumbers": [ + { + "phone": "+1612842323", + "otp": "123456" + } + ], + "authSessionAlerts": true, + "authMembershipsUserName": true, + "authMembershipsUserEmail": true, + "authMembershipsMfa": true, + "authInvalidateSessions": true, + "oAuthProviders": [ + { + "key": "github", + "name": "GitHub", + "appId": "259125845563242502", + "secret": "Bpw_g9c2TGXxfgLshDbSaL8tsCcqgczQ", + "enabled": true + } + ], + "platforms": [], + "webhooks": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Webhook", + "url": "https://example.com/webhook", + "events": [], + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", + "enabled": true, + "logs": "Failed to connect to remote server.", + "attempts": 10 + } + ], + "keys": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "scopes": [], + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] + } + ], + "devKeys": [ + { + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "Dev API Key", + "expire": "2020-10-15T06:38:00.000+00:00", + "secret": "919c2d18fb5d4...a2ae413da83346ad2", + "accessedAt": "2020-10-15T06:38:00.000+00:00", + "sdks": [] + } + ], + "smtpEnabled": true, + "smtpSenderName": "John Appwrite", + "smtpSenderEmail": "john@appwrite.io", + "smtpReplyTo": "support@appwrite.io", + "smtpHost": "mail.appwrite.io", + "smtpPort": 25, + "smtpUsername": "emailuser", + "smtpPassword": "securepassword", + "smtpSecure": "tls", + "pingCount": 1, + "pingedAt": "2020-10-15T06:38:00.000+00:00", + "labels": [], + "status": "active", + "authEmailPassword": true, + "authUsersAuthMagicURL": true, + "authEmailOtp": true, + "authAnonymous": true, + "authInvites": true, + "authJWT": true, + "authPhone": true, + "serviceStatusForAccount": true, + "serviceStatusForAvatars": true, + "serviceStatusForDatabases": true, + "serviceStatusForTablesdb": true, + "serviceStatusForLocale": true, + "serviceStatusForHealth": true, + "serviceStatusForProject": true, + "serviceStatusForStorage": true, + "serviceStatusForTeams": true, + "serviceStatusForUsers": true, + "serviceStatusForVcs": true, + "serviceStatusForSites": true, + "serviceStatusForFunctions": true, + "serviceStatusForProxy": true, + "serviceStatusForGraphql": true, + "serviceStatusForMigrations": true, + "serviceStatusForMessaging": true, + "protocolStatusForRest": true, + "protocolStatusForGraphql": true, + "protocolStatusForWebsocket": true, + "region": "fra", + "billingLimits": { + "bandwidth": 5, + "storage": 150, + "users": 200000, + "executions": 750000, + "GBHours": 100, + "imageTransformations": 100, + "authPhone": 10, + "budgetLimit": 100 + }, + "blocks": [ + { + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "resourceType": "project", + "resourceId": "5e5ea5c16897e" + } + ], + "consoleAccessedAt": "2020-10-15T06:38:00.000+00:00" +} +` + + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PATCH" { + t.Errorf("Expected method PATCH, got %s", r.Method) + } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte(mockResponse)) + })) + defer ts.Close() + + srv := New(newTestClient(ts)) + + _, err := srv.UpdateServiceStatus("account", true) + if err != nil { + t.Errorf("Method UpdateServiceStatus failed: %v", err) + } + }) + t.Run("Test ListVariables", func(t *testing.T) { mockResponse := ` { diff --git a/sites/sites.go b/sites/sites.go index 3efc0ebf..a570400b 100644 --- a/sites/sites.go +++ b/sites/sites.go @@ -3,9 +3,9 @@ package sites import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" - "github.com/appwrite/sdk-for-go/v2/file" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" + "github.com/appwrite/sdk-for-go/v3/file" "net/url" "fmt" "strings" @@ -915,23 +915,25 @@ func (srv *Sites) CreateDeployment(SiteId string, Code file.InputFile, optionalS uploadId := "" - resp, err := srv.client.FileUpload(path, headers, params, paramName, uploadId) - if err != nil { + resp, err := srv.client.FileUpload(path, headers, params, paramName, uploadId) + if err != nil { return nil, err } - var parsed models.Deployment if strings.HasPrefix(resp.Type, "application/json") { + var parsed models.Deployment err = json.Unmarshal([]byte(resp.Result.(string)), &parsed) if err != nil { return nil, err } return &parsed, nil } + var parsed models.Deployment parsed, ok := resp.Result.(models.Deployment) if !ok { return nil, errors.New("unexpected response type") } return &parsed, nil + } // CreateDuplicateDeployment create a new build for an existing site diff --git a/sites/sites_test.go b/sites/sites_test.go index a5ce6862..34bbf474 100644 --- a/sites/sites_test.go +++ b/sites/sites_test.go @@ -6,8 +6,8 @@ import ( "testing" "os" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/file") + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/file") func TestSites(t *testing.T) { tmpFile, err := os.CreateTemp("", "test") diff --git a/storage/storage.go b/storage/storage.go index c35248ce..86283d94 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -3,9 +3,9 @@ package storage import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" - "github.com/appwrite/sdk-for-go/v2/file" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" + "github.com/appwrite/sdk-for-go/v3/file" "net/url" "fmt" "strings" @@ -605,23 +605,25 @@ func (srv *Storage) CreateFile(BucketId string, FileId string, File file.InputFi uploadId := "" uploadId = FileId - resp, err := srv.client.FileUpload(path, headers, params, paramName, uploadId) - if err != nil { + resp, err := srv.client.FileUpload(path, headers, params, paramName, uploadId) + if err != nil { return nil, err } - var parsed models.File if strings.HasPrefix(resp.Type, "application/json") { + var parsed models.File err = json.Unmarshal([]byte(resp.Result.(string)), &parsed) if err != nil { return nil, err } return &parsed, nil } + var parsed models.File parsed, ok := resp.Result.(models.File) if !ok { return nil, errors.New("unexpected response type") } return &parsed, nil + } // GetFile get a file by its unique ID. This endpoint response returns a JSON diff --git a/storage/storage_test.go b/storage/storage_test.go index 8f6556dc..658bbd97 100644 --- a/storage/storage_test.go +++ b/storage/storage_test.go @@ -6,8 +6,8 @@ import ( "testing" "os" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/file") + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/file") func TestStorage(t *testing.T) { tmpFile, err := os.CreateTemp("", "test") diff --git a/tablesdb/tables_db.go b/tablesdb/tables_db.go index bbac17d5..3aaebb48 100644 --- a/tablesdb/tables_db.go +++ b/tablesdb/tables_db.go @@ -3,8 +3,8 @@ package tablesdb import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) @@ -838,6 +838,7 @@ type UpdateTableOptions struct { Permissions []string RowSecurity bool Enabled bool + Purge bool enabledSetters map[string]bool } func (options UpdateTableOptions) New() *UpdateTableOptions { @@ -846,6 +847,7 @@ func (options UpdateTableOptions) New() *UpdateTableOptions { "Permissions": false, "RowSecurity": false, "Enabled": false, + "Purge": false, } return &options } @@ -874,6 +876,12 @@ func (srv *TablesDB) WithUpdateTableEnabled(v bool) UpdateTableOption { o.enabledSetters["Enabled"] = true } } +func (srv *TablesDB) WithUpdateTablePurge(v bool) UpdateTableOption { + return func(o *UpdateTableOptions) { + o.Purge = v + o.enabledSetters["Purge"] = true + } +} // UpdateTable update a table by its unique ID. func (srv *TablesDB) UpdateTable(DatabaseId string, TableId string, optionalSetters ...UpdateTableOption)(*models.Table, error) { @@ -898,6 +906,9 @@ func (srv *TablesDB) UpdateTable(DatabaseId string, TableId string, optionalSett if options.enabledSetters["Enabled"] { params["enabled"] = options.Enabled } + if options.enabledSetters["Purge"] { + params["purge"] = options.Purge + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -3497,7 +3508,7 @@ func (srv *TablesDB) UpdateVarcharColumn(DatabaseId string, TableId string, Key } // GetColumn get column by ID. -func (srv *TablesDB) GetColumn(DatabaseId string, TableId string, Key string)(*interface{}, error) { +func (srv *TablesDB) GetColumn(DatabaseId string, TableId string, Key string)(models.Model, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{tableId}", TableId, "{key}", Key) path := r.Replace("/tablesdb/{databaseId}/tables/{tableId}/columns/{key}") params := map[string]interface{}{} @@ -3514,20 +3525,20 @@ func (srv *TablesDB) GetColumn(DatabaseId string, TableId string, Key string)(*i if strings.HasPrefix(resp.Type, "application/json") { bytes := []byte(resp.Result.(string)) - var parsed interface{} + parsed := models.ColumnBoolean{}.New(bytes) - err = json.Unmarshal(bytes, &parsed) + err = json.Unmarshal(bytes, parsed) if err != nil { return nil, err } - return &parsed, nil + + return parsed, nil } - var parsed interface{} - parsed, ok := resp.Result.(interface{}) + parsed, ok := resp.Result.(models.Model) if !ok { return nil, errors.New("unexpected response type") } - return &parsed, nil + return parsed, nil } diff --git a/tablesdb/tables_db_test.go b/tablesdb/tables_db_test.go index 1cd255f0..e235baf2 100644 --- a/tablesdb/tables_db_test.go +++ b/tablesdb/tables_db_test.go @@ -5,7 +5,8 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" ) func TestTablesDB(t *testing.T) { @@ -1856,13 +1857,14 @@ func TestTablesDB(t *testing.T) { t.Run("Test GetColumn", func(t *testing.T) { mockResponse := ` { - "key": "isEnabled", - "type": "boolean", + "key": "fullName", + "type": "string", "status": "available", "error": "string", "required": true, "$createdAt": "2020-10-15T06:38:00.000+00:00", - "$updatedAt": "2020-10-15T06:38:00.000+00:00" + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "size": 128 } ` @@ -1879,10 +1881,13 @@ func TestTablesDB(t *testing.T) { srv := New(newTestClient(ts)) - _, err := srv.GetColumn("", "", "") + response, err := srv.GetColumn("", "", "") if err != nil { t.Errorf("Method GetColumn failed: %v", err) } + if _, ok := response.(*models.ColumnString); !ok { + t.Errorf("Expected response type *models.ColumnString, got %T", response) + } }) t.Run("Test DeleteColumn", func(t *testing.T) { diff --git a/teams/teams.go b/teams/teams.go index 6c550a59..7fae05a9 100644 --- a/teams/teams.go +++ b/teams/teams.go @@ -3,8 +3,8 @@ package teams import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/teams/teams_test.go b/teams/teams_test.go index d70df847..dc909b78 100644 --- a/teams/teams_test.go +++ b/teams/teams_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestTeams(t *testing.T) { diff --git a/tokens/tokens.go b/tokens/tokens.go index 6c4730c0..978c5e5d 100644 --- a/tokens/tokens.go +++ b/tokens/tokens.go @@ -3,8 +3,8 @@ package tokens import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/tokens/tokens_test.go b/tokens/tokens_test.go index 18694f0e..6adbab3f 100644 --- a/tokens/tokens_test.go +++ b/tokens/tokens_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestTokens(t *testing.T) { diff --git a/users/users.go b/users/users.go index ace8dcfa..70ee38e4 100644 --- a/users/users.go +++ b/users/users.go @@ -3,8 +3,8 @@ package users import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) diff --git a/users/users_test.go b/users/users_test.go index 1c9e7482..8dbd19a9 100644 --- a/users/users_test.go +++ b/users/users_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestUsers(t *testing.T) { @@ -839,6 +839,7 @@ func TestUsers(t *testing.T) { "userEmail": "john@appwrite.io", "userName": "John Doe", "mode": "admin", + "userType": "user", "ip": "127.0.0.1", "time": "2020-10-15T06:38:00.000+00:00", "osCode": "Mac", diff --git a/webhooks/webhooks.go b/webhooks/webhooks.go index 0f3ddc9a..8ad96fb4 100644 --- a/webhooks/webhooks.go +++ b/webhooks/webhooks.go @@ -3,8 +3,8 @@ package webhooks import ( "encoding/json" "errors" - "github.com/appwrite/sdk-for-go/v2/client" - "github.com/appwrite/sdk-for-go/v2/models" + "github.com/appwrite/sdk-for-go/v3/client" + "github.com/appwrite/sdk-for-go/v3/models" "strings" ) @@ -89,17 +89,19 @@ func (srv *Webhooks) List(optionalSetters ...ListOption)(*models.WebhookList, er } type CreateOptions struct { Enabled bool - Security bool - HttpUser string - HttpPass string + Tls bool + AuthUsername string + AuthPassword string + Secret string enabledSetters map[string]bool } func (options CreateOptions) New() *CreateOptions { options.enabledSetters = map[string]bool{ "Enabled": false, - "Security": false, - "HttpUser": false, - "HttpPass": false, + "Tls": false, + "AuthUsername": false, + "AuthPassword": false, + "Secret": false, } return &options } @@ -110,22 +112,28 @@ func (srv *Webhooks) WithCreateEnabled(v bool) CreateOption { o.enabledSetters["Enabled"] = true } } -func (srv *Webhooks) WithCreateSecurity(v bool) CreateOption { +func (srv *Webhooks) WithCreateTls(v bool) CreateOption { return func(o *CreateOptions) { - o.Security = v - o.enabledSetters["Security"] = true + o.Tls = v + o.enabledSetters["Tls"] = true } } -func (srv *Webhooks) WithCreateHttpUser(v string) CreateOption { +func (srv *Webhooks) WithCreateAuthUsername(v string) CreateOption { return func(o *CreateOptions) { - o.HttpUser = v - o.enabledSetters["HttpUser"] = true + o.AuthUsername = v + o.enabledSetters["AuthUsername"] = true } } -func (srv *Webhooks) WithCreateHttpPass(v string) CreateOption { +func (srv *Webhooks) WithCreateAuthPassword(v string) CreateOption { return func(o *CreateOptions) { - o.HttpPass = v - o.enabledSetters["HttpPass"] = true + o.AuthPassword = v + o.enabledSetters["AuthPassword"] = true + } +} +func (srv *Webhooks) WithCreateSecret(v string) CreateOption { + return func(o *CreateOptions) { + o.Secret = v + o.enabledSetters["Secret"] = true } } @@ -145,14 +153,17 @@ func (srv *Webhooks) Create(WebhookId string, Url string, Name string, Events [] if options.enabledSetters["Enabled"] { params["enabled"] = options.Enabled } - if options.enabledSetters["Security"] { - params["security"] = options.Security + if options.enabledSetters["Tls"] { + params["tls"] = options.Tls } - if options.enabledSetters["HttpUser"] { - params["httpUser"] = options.HttpUser + if options.enabledSetters["AuthUsername"] { + params["authUsername"] = options.AuthUsername } - if options.enabledSetters["HttpPass"] { - params["httpPass"] = options.HttpPass + if options.enabledSetters["AuthPassword"] { + params["authPassword"] = options.AuthPassword + } + if options.enabledSetters["Secret"] { + params["secret"] = options.Secret } headers := map[string]interface{}{ "content-type": "application/json", @@ -219,17 +230,17 @@ func (srv *Webhooks) Get(WebhookId string)(*models.Webhook, error) { } type UpdateOptions struct { Enabled bool - Security bool - HttpUser string - HttpPass string + Tls bool + AuthUsername string + AuthPassword string enabledSetters map[string]bool } func (options UpdateOptions) New() *UpdateOptions { options.enabledSetters = map[string]bool{ "Enabled": false, - "Security": false, - "HttpUser": false, - "HttpPass": false, + "Tls": false, + "AuthUsername": false, + "AuthPassword": false, } return &options } @@ -240,22 +251,22 @@ func (srv *Webhooks) WithUpdateEnabled(v bool) UpdateOption { o.enabledSetters["Enabled"] = true } } -func (srv *Webhooks) WithUpdateSecurity(v bool) UpdateOption { +func (srv *Webhooks) WithUpdateTls(v bool) UpdateOption { return func(o *UpdateOptions) { - o.Security = v - o.enabledSetters["Security"] = true + o.Tls = v + o.enabledSetters["Tls"] = true } } -func (srv *Webhooks) WithUpdateHttpUser(v string) UpdateOption { +func (srv *Webhooks) WithUpdateAuthUsername(v string) UpdateOption { return func(o *UpdateOptions) { - o.HttpUser = v - o.enabledSetters["HttpUser"] = true + o.AuthUsername = v + o.enabledSetters["AuthUsername"] = true } } -func (srv *Webhooks) WithUpdateHttpPass(v string) UpdateOption { +func (srv *Webhooks) WithUpdateAuthPassword(v string) UpdateOption { return func(o *UpdateOptions) { - o.HttpPass = v - o.enabledSetters["HttpPass"] = true + o.AuthPassword = v + o.enabledSetters["AuthPassword"] = true } } @@ -276,14 +287,14 @@ func (srv *Webhooks) Update(WebhookId string, Name string, Url string, Events [] if options.enabledSetters["Enabled"] { params["enabled"] = options.Enabled } - if options.enabledSetters["Security"] { - params["security"] = options.Security + if options.enabledSetters["Tls"] { + params["tls"] = options.Tls } - if options.enabledSetters["HttpUser"] { - params["httpUser"] = options.HttpUser + if options.enabledSetters["AuthUsername"] { + params["authUsername"] = options.AuthUsername } - if options.enabledSetters["HttpPass"] { - params["httpPass"] = options.HttpPass + if options.enabledSetters["AuthPassword"] { + params["authPassword"] = options.AuthPassword } headers := map[string]interface{}{ "content-type": "application/json", @@ -348,15 +359,39 @@ func (srv *Webhooks) Delete(WebhookId string)(*interface{}, error) { return &parsed, nil } - -// UpdateSignature update the webhook signature key. This endpoint can be used -// to regenerate the signature key used to sign and validate payload -// deliveries for a specific webhook. -func (srv *Webhooks) UpdateSignature(WebhookId string)(*models.Webhook, error) { +type UpdateSecretOptions struct { + Secret string + enabledSetters map[string]bool +} +func (options UpdateSecretOptions) New() *UpdateSecretOptions { + options.enabledSetters = map[string]bool{ + "Secret": false, + } + return &options +} +type UpdateSecretOption func(*UpdateSecretOptions) +func (srv *Webhooks) WithUpdateSecretSecret(v string) UpdateSecretOption { + return func(o *UpdateSecretOptions) { + o.Secret = v + o.enabledSetters["Secret"] = true + } +} + +// UpdateSecret update the webhook signing key. This endpoint can be used to +// regenerate the signing key used to sign and validate payload deliveries for +// a specific webhook. +func (srv *Webhooks) UpdateSecret(WebhookId string, optionalSetters ...UpdateSecretOption)(*models.Webhook, error) { r := strings.NewReplacer("{webhookId}", WebhookId) - path := r.Replace("/webhooks/{webhookId}/signature") + path := r.Replace("/webhooks/{webhookId}/secret") + options := UpdateSecretOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["webhookId"] = WebhookId + if options.enabledSetters["Secret"] { + params["secret"] = options.Secret + } headers := map[string]interface{}{ "content-type": "application/json", } diff --git a/webhooks/webhooks_test.go b/webhooks/webhooks_test.go index e0a48a98..dc3eb3b4 100644 --- a/webhooks/webhooks_test.go +++ b/webhooks/webhooks_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/appwrite/sdk-for-go/v2/client" + "github.com/appwrite/sdk-for-go/v3/client" ) func TestWebhooks(t *testing.T) { @@ -28,10 +28,10 @@ func TestWebhooks(t *testing.T) { "name": "My Webhook", "url": "https://example.com/webhook", "events": [], - "security": true, - "httpUser": "username", - "httpPass": "password", - "signatureKey": "ad3d581ca230e2b7059c545e5a", + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", "attempts": 10 @@ -68,10 +68,10 @@ func TestWebhooks(t *testing.T) { "name": "My Webhook", "url": "https://example.com/webhook", "events": [], - "security": true, - "httpUser": "username", - "httpPass": "password", - "signatureKey": "ad3d581ca230e2b7059c545e5a", + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", "attempts": 10 @@ -106,10 +106,10 @@ func TestWebhooks(t *testing.T) { "name": "My Webhook", "url": "https://example.com/webhook", "events": [], - "security": true, - "httpUser": "username", - "httpPass": "password", - "signatureKey": "ad3d581ca230e2b7059c545e5a", + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", "attempts": 10 @@ -144,10 +144,10 @@ func TestWebhooks(t *testing.T) { "name": "My Webhook", "url": "https://example.com/webhook", "events": [], - "security": true, - "httpUser": "username", - "httpPass": "password", - "signatureKey": "ad3d581ca230e2b7059c545e5a", + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", "attempts": 10 @@ -199,7 +199,7 @@ func TestWebhooks(t *testing.T) { } }) - t.Run("Test UpdateSignature", func(t *testing.T) { + t.Run("Test UpdateSecret", func(t *testing.T) { mockResponse := ` { "$id": "5e5ea5c16897e", @@ -208,10 +208,10 @@ func TestWebhooks(t *testing.T) { "name": "My Webhook", "url": "https://example.com/webhook", "events": [], - "security": true, - "httpUser": "username", - "httpPass": "password", - "signatureKey": "ad3d581ca230e2b7059c545e5a", + "tls": true, + "authUsername": "username", + "authPassword": "password", + "secret": "ad3d581ca230e2b7059c545e5a", "enabled": true, "logs": "Failed to connect to remote server.", "attempts": 10 @@ -231,9 +231,9 @@ func TestWebhooks(t *testing.T) { srv := New(newTestClient(ts)) - _, err := srv.UpdateSignature("") + _, err := srv.UpdateSecret("") if err != nil { - t.Errorf("Method UpdateSignature failed: %v", err) + t.Errorf("Method UpdateSecret failed: %v", err) } }) } From 7cf424f7a55ab71f7a125845f7a9a33c61914833 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 16 Apr 2026 17:45:56 +0530 Subject: [PATCH 2/2] chore: update Go SDK to v3.0.0 --- CHANGELOG.md | 9 +++-- databases/databases.go | 89 ++++++++++++++++++++++++++++++++++++++--- project/project.go | 49 ++++++++++++++++++++--- project/project_test.go | 2 +- tablesdb/tables_db.go | 89 ++++++++++++++++++++++++++++++++++++++--- 5 files changed, 219 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d21b33e..d83e8b40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,17 @@ * [BREAKING] Renamed Webhook model fields: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword`, `signatureKey` → `secret` * [BREAKING] Renamed Webhook service parameters to match: `security` → `tls`, `httpUser` → `authUsername`, `httpPass` → `authPassword` +* [BREAKING] Renamed `Webhooks.UpdateSignature()` to `Webhooks.UpdateSecret()` with new optional `secret` parameter +* Added `Client.GetHeaders()` method to retrieve request headers * Added `secret` parameter to Webhook create and update methods * Added `x` OAuth provider to `OAuthProvider` enum * Added `userType` field to `Log` model -* Added `purge` parameter to `updateCollection` and `updateTable` for cache invalidation +* Added `purge` parameter to `UpdateCollection` and `UpdateTable` for cache invalidation * Added Project service: platform CRUD, key CRUD, protocol/service status management -* Added new models: `Key`, `KeyList`, `PlatformAndroid`, `PlatformApple`, `PlatformLinux`, `PlatformList`, and others +* Added new models: `Key`, `KeyList`, `Project`, `DevKey`, `MockNumber`, `AuthProvider`, `PlatformAndroid`, `PlatformApple`, `PlatformLinux`, `PlatformList`, `PlatformWeb`, `PlatformWindows`, `BillingLimits`, `Block` * Added new enums: `PlatformType`, `ProtocolId`, `ServiceId` -* Updated `BuildRuntime`, `Runtime`, `Scopes` enums with new values +* Updated `BuildRuntime`, `Runtime` enums with `dart-3.11` and `flutter-3.41` +* Updated `Scopes` enum with `KeysRead`, `KeysWrite`, `PlatformsRead`, `PlatformsWrite` * Updated `X-Appwrite-Response-Format` header to `1.9.1` * Updated TTL description for list caching in Databases and TablesDB diff --git a/databases/databases.go b/databases/databases.go index 5a79ab55..7750df9f 100644 --- a/databases/databases.go +++ b/databases/databases.go @@ -5,6 +5,7 @@ import ( "errors" "github.com/appwrite/sdk-for-go/v3/client" "github.com/appwrite/sdk-for-go/v3/models" + "fmt" "strings" ) @@ -3671,14 +3672,92 @@ func (srv *Databases) GetAttribute(DatabaseId string, CollectionId string, Key s if strings.HasPrefix(resp.Type, "application/json") { bytes := []byte(resp.Result.(string)) - parsed := models.AttributeBoolean{}.New(bytes) - - err = json.Unmarshal(bytes, parsed) - if err != nil { + var response map[string]interface{} + if err := json.Unmarshal(bytes, &response); err != nil { return nil, err } + if fmt.Sprint(response["type"]) == "string" && fmt.Sprint(response["format"]) == "email" { + parsed := models.AttributeEmail{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } - return parsed, nil + return parsed, nil + } + if fmt.Sprint(response["type"]) == "string" && fmt.Sprint(response["format"]) == "enum" { + parsed := models.AttributeEnum{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "string" && fmt.Sprint(response["format"]) == "url" { + parsed := models.AttributeUrl{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "string" && fmt.Sprint(response["format"]) == "ip" { + parsed := models.AttributeIp{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "boolean" { + parsed := models.AttributeBoolean{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "integer" { + parsed := models.AttributeInteger{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "double" { + parsed := models.AttributeFloat{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "datetime" { + parsed := models.AttributeDatetime{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "relationship" { + parsed := models.AttributeRelationship{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "string" { + parsed := models.AttributeString{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + + return nil, errors.New("unable to match response to any expected response model") } parsed, ok := resp.Result.(models.Model) if !ok { diff --git a/project/project.go b/project/project.go index 8894edcf..bf75d61f 100644 --- a/project/project.go +++ b/project/project.go @@ -5,6 +5,7 @@ import ( "errors" "github.com/appwrite/sdk-for-go/v3/client" "github.com/appwrite/sdk-for-go/v3/models" + "fmt" "strings" ) @@ -779,14 +780,52 @@ func (srv *Project) GetPlatform(PlatformId string)(models.Model, error) { if strings.HasPrefix(resp.Type, "application/json") { bytes := []byte(resp.Result.(string)) - parsed := models.PlatformWeb{}.New(bytes) - - err = json.Unmarshal(bytes, parsed) - if err != nil { + var response map[string]interface{} + if err := json.Unmarshal(bytes, &response); err != nil { return nil, err } + if fmt.Sprint(response["type"]) == "web" { + parsed := models.PlatformWeb{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } - return parsed, nil + return parsed, nil + } + if fmt.Sprint(response["type"]) == "apple" { + parsed := models.PlatformApple{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "android" { + parsed := models.PlatformAndroid{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "windows" { + parsed := models.PlatformWindows{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "linux" { + parsed := models.PlatformLinux{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + + return nil, errors.New("unable to match response to any expected response model") } parsed, ok := resp.Result.(models.Model) if !ok { diff --git a/project/project_test.go b/project/project_test.go index 3005d005..bdf9233f 100644 --- a/project/project_test.go +++ b/project/project_test.go @@ -698,7 +698,7 @@ func TestProject(t *testing.T) { "$createdAt": "2020-10-15T06:38:00.000+00:00", "$updatedAt": "2020-10-15T06:38:00.000+00:00", "name": "My Web App", - "type": "web", + "type": "linux", "packageName": "com.company.appname" } ` diff --git a/tablesdb/tables_db.go b/tablesdb/tables_db.go index 3aaebb48..c4c9bb3e 100644 --- a/tablesdb/tables_db.go +++ b/tablesdb/tables_db.go @@ -5,6 +5,7 @@ import ( "errors" "github.com/appwrite/sdk-for-go/v3/client" "github.com/appwrite/sdk-for-go/v3/models" + "fmt" "strings" ) @@ -3525,14 +3526,92 @@ func (srv *TablesDB) GetColumn(DatabaseId string, TableId string, Key string)(mo if strings.HasPrefix(resp.Type, "application/json") { bytes := []byte(resp.Result.(string)) - parsed := models.ColumnBoolean{}.New(bytes) - - err = json.Unmarshal(bytes, parsed) - if err != nil { + var response map[string]interface{} + if err := json.Unmarshal(bytes, &response); err != nil { return nil, err } + if fmt.Sprint(response["type"]) == "string" && fmt.Sprint(response["format"]) == "email" { + parsed := models.ColumnEmail{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } - return parsed, nil + return parsed, nil + } + if fmt.Sprint(response["type"]) == "string" && fmt.Sprint(response["format"]) == "enum" { + parsed := models.ColumnEnum{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "string" && fmt.Sprint(response["format"]) == "url" { + parsed := models.ColumnUrl{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "string" && fmt.Sprint(response["format"]) == "ip" { + parsed := models.ColumnIp{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "boolean" { + parsed := models.ColumnBoolean{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "integer" { + parsed := models.ColumnInteger{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "double" { + parsed := models.ColumnFloat{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "datetime" { + parsed := models.ColumnDatetime{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "relationship" { + parsed := models.ColumnRelationship{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + if fmt.Sprint(response["type"]) == "string" { + parsed := models.ColumnString{}.New(bytes) + if err := json.Unmarshal(bytes, parsed); err != nil { + return nil, err + } + + return parsed, nil + } + + return nil, errors.New("unable to match response to any expected response model") } parsed, ok := resp.Result.(models.Model) if !ok {