models

package
v0.0.1-rc.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: BSD-3-Clause Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlgoArgon2

type AlgoArgon2 struct {
	// Algo type.
	Type string `json:"xtype"`
	// Memory used to compute hash.
	MemoryCost int `json:"memoryCost"`
	// Amount of time consumed to compute hash
	TimeCost int `json:"timeCost"`
	// Number of threads used to compute hash.
	Threads int `json:"threads"`
	// contains filtered or unexported fields
}

AlgoArgon2 Model

func (*AlgoArgon2) Decode

func (model *AlgoArgon2) Decode(value interface{}) error

func (AlgoArgon2) New

func (model AlgoArgon2) New(data []byte) *AlgoArgon2

type AlgoBcrypt

type AlgoBcrypt struct {
	// Algo type.
	Type string `json:"xtype"`
	// contains filtered or unexported fields
}

AlgoBcrypt Model

func (*AlgoBcrypt) Decode

func (model *AlgoBcrypt) Decode(value interface{}) error

func (AlgoBcrypt) New

func (model AlgoBcrypt) New(data []byte) *AlgoBcrypt

type AlgoMd5

type AlgoMd5 struct {
	// Algo type.
	Type string `json:"xtype"`
	// contains filtered or unexported fields
}

AlgoMD5 Model

func (*AlgoMd5) Decode

func (model *AlgoMd5) Decode(value interface{}) error

func (AlgoMd5) New

func (model AlgoMd5) New(data []byte) *AlgoMd5

type AlgoPhpass

type AlgoPhpass struct {
	// Algo type.
	Type string `json:"xtype"`
	// contains filtered or unexported fields
}

AlgoPHPass Model

func (*AlgoPhpass) Decode

func (model *AlgoPhpass) Decode(value interface{}) error

func (AlgoPhpass) New

func (model AlgoPhpass) New(data []byte) *AlgoPhpass

type AlgoScrypt

type AlgoScrypt struct {
	// Algo type.
	Type string `json:"xtype"`
	// CPU complexity of computed hash.
	CostCpu int `json:"costCpu"`
	// Memory complexity of computed hash.
	CostMemory int `json:"costMemory"`
	// Parallelization of computed hash.
	CostParallel int `json:"costParallel"`
	// Length used to compute hash.
	Length int `json:"length"`
	// contains filtered or unexported fields
}

AlgoScrypt Model

func (*AlgoScrypt) Decode

func (model *AlgoScrypt) Decode(value interface{}) error

func (AlgoScrypt) New

func (model AlgoScrypt) New(data []byte) *AlgoScrypt

type AlgoScryptModified

type AlgoScryptModified struct {
	// Algo type.
	Type string `json:"xtype"`
	// Salt used to compute hash.
	Salt string `json:"salt"`
	// Separator used to compute hash.
	SaltSeparator string `json:"saltSeparator"`
	// Key used to compute hash.
	SignerKey string `json:"signerKey"`
	// contains filtered or unexported fields
}

AlgoScryptModified Model

func (*AlgoScryptModified) Decode

func (model *AlgoScryptModified) Decode(value interface{}) error

func (AlgoScryptModified) New

func (model AlgoScryptModified) New(data []byte) *AlgoScryptModified

type AlgoSha

type AlgoSha struct {
	// Algo type.
	Type string `json:"xtype"`
	// contains filtered or unexported fields
}

AlgoSHA Model

func (*AlgoSha) Decode

func (model *AlgoSha) Decode(value interface{}) error

func (AlgoSha) New

func (model AlgoSha) New(data []byte) *AlgoSha

type AttributeBoolean

type AttributeBoolean struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// Default value for attribute when not provided. Cannot be set when attribute
	// is required.
	Default bool `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeBoolean Model

func (*AttributeBoolean) Decode

func (model *AttributeBoolean) Decode(value interface{}) error

func (AttributeBoolean) New

func (model AttributeBoolean) New(data []byte) *AttributeBoolean

type AttributeDatetime

type AttributeDatetime struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// ISO 8601 format.
	Format string `json:"format"`
	// Default value for attribute when not provided. Only null is optional
	Default string `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeDatetime Model

func (*AttributeDatetime) Decode

func (model *AttributeDatetime) Decode(value interface{}) error

func (AttributeDatetime) New

func (model AttributeDatetime) New(data []byte) *AttributeDatetime

type AttributeEmail

type AttributeEmail struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// String format.
	Format string `json:"format"`
	// Default value for attribute when not provided. Cannot be set when attribute
	// is required.
	Default string `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeEmail Model

func (*AttributeEmail) Decode

func (model *AttributeEmail) Decode(value interface{}) error

func (AttributeEmail) New

func (model AttributeEmail) New(data []byte) *AttributeEmail

type AttributeEnum

type AttributeEnum struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// Array of elements in enumerated type.
	Elements []string `json:"elements"`
	// String format.
	Format string `json:"format"`
	// Default value for attribute when not provided. Cannot be set when attribute
	// is required.
	Default string `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeEnum Model

func (*AttributeEnum) Decode

func (model *AttributeEnum) Decode(value interface{}) error

func (AttributeEnum) New

func (model AttributeEnum) New(data []byte) *AttributeEnum

type AttributeFloat

type AttributeFloat struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// Minimum value to enforce for new documents.
	Min float64 `json:"min"`
	// Maximum value to enforce for new documents.
	Max float64 `json:"max"`
	// Default value for attribute when not provided. Cannot be set when attribute
	// is required.
	Default float64 `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeFloat Model

func (*AttributeFloat) Decode

func (model *AttributeFloat) Decode(value interface{}) error

func (AttributeFloat) New

func (model AttributeFloat) New(data []byte) *AttributeFloat

type AttributeInteger

type AttributeInteger struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// Minimum value to enforce for new documents.
	Min int `json:"min"`
	// Maximum value to enforce for new documents.
	Max int `json:"max"`
	// Default value for attribute when not provided. Cannot be set when attribute
	// is required.
	Default int `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeInteger Model

func (*AttributeInteger) Decode

func (model *AttributeInteger) Decode(value interface{}) error

func (AttributeInteger) New

func (model AttributeInteger) New(data []byte) *AttributeInteger

type AttributeIp

type AttributeIp struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// String format.
	Format string `json:"format"`
	// Default value for attribute when not provided. Cannot be set when attribute
	// is required.
	Default string `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeIP Model

func (*AttributeIp) Decode

func (model *AttributeIp) Decode(value interface{}) error

func (AttributeIp) New

func (model AttributeIp) New(data []byte) *AttributeIp

type AttributeList

type AttributeList struct {
	// Total number of attributes in the given collection.
	Total int `json:"total"`
	// List of attributes.
	Attributes []map[string]any `json:"attributes"`
	// contains filtered or unexported fields
}

AttributesList Model

func (*AttributeList) Decode

func (model *AttributeList) Decode(value interface{}) error

func (AttributeList) New

func (model AttributeList) New(data []byte) *AttributeList

type AttributeRelationship

type AttributeRelationship struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// The ID of the related collection.
	RelatedCollection string `json:"relatedCollection"`
	// The type of the relationship.
	RelationType string `json:"relationType"`
	// Is the relationship two-way?
	TwoWay bool `json:"twoWay"`
	// The key of the two-way relationship.
	TwoWayKey string `json:"twoWayKey"`
	// How deleting the parent document will propagate to child documents.
	OnDelete string `json:"onDelete"`
	// Whether this is the parent or child side of the relationship
	Side string `json:"side"`
	// contains filtered or unexported fields
}

AttributeRelationship Model

func (*AttributeRelationship) Decode

func (model *AttributeRelationship) Decode(value interface{}) error

func (AttributeRelationship) New

type AttributeString

type AttributeString struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// Attribute size.
	Size int `json:"size"`
	// Default value for attribute when not provided. Cannot be set when attribute
	// is required.
	Default string `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeString Model

func (*AttributeString) Decode

func (model *AttributeString) Decode(value interface{}) error

func (AttributeString) New

func (model AttributeString) New(data []byte) *AttributeString

type AttributeUrl

type AttributeUrl struct {
	// Attribute Key.
	Key string `json:"key"`
	// Attribute type.
	Type string `json:"xtype"`
	// Attribute status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an attribute.
	Error string `json:"xerror"`
	// Is attribute required?
	Required bool `json:"required"`
	// Is attribute an array?
	Array bool `json:"array"`
	// String format.
	Format string `json:"format"`
	// Default value for attribute when not provided. Cannot be set when attribute
	// is required.
	Default string `json:"xdefault"`
	// contains filtered or unexported fields
}

AttributeURL Model

func (*AttributeUrl) Decode

func (model *AttributeUrl) Decode(value interface{}) error

func (AttributeUrl) New

func (model AttributeUrl) New(data []byte) *AttributeUrl

type Bucket

type Bucket struct {
	// Bucket ID.
	Id string `json:"$id"`
	// Bucket creation time in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Bucket update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Bucket permissions. [Learn more about
	// permissions](https://appwrite.io/docs/permissions).
	Permissions []string `json:"$permissions"`
	// Whether file-level security is enabled. [Learn more about
	// permissions](https://appwrite.io/docs/permissions).
	FileSecurity bool `json:"fileSecurity"`
	// Bucket name.
	Name string `json:"name"`
	// Bucket enabled.
	Enabled bool `json:"enabled"`
	// Maximum file size supported.
	MaximumFileSize int `json:"maximumFileSize"`
	// Allowed file extensions.
	AllowedFileExtensions []string `json:"allowedFileExtensions"`
	// Compression algorithm choosen for compression. Will be one of none,
	// [gzip](https://en.wikipedia.org/wiki/Gzip), or
	// [zstd](https://en.wikipedia.org/wiki/Zstd).
	Compression string `json:"compression"`
	// Bucket is encrypted.
	Encryption bool `json:"encryption"`
	// Virus scanning is enabled.
	Antivirus bool `json:"antivirus"`
	// contains filtered or unexported fields
}

Bucket Model

func (*Bucket) Decode

func (model *Bucket) Decode(value interface{}) error

func (Bucket) New

func (model Bucket) New(data []byte) *Bucket

type BucketList

type BucketList struct {
	// Total number of buckets documents that matched your query.
	Total int `json:"total"`
	// List of buckets.
	Buckets []Bucket `json:"buckets"`
	// contains filtered or unexported fields
}

BucketsList Model

func (*BucketList) Decode

func (model *BucketList) Decode(value interface{}) error

func (BucketList) New

func (model BucketList) New(data []byte) *BucketList

type Build

type Build struct {
	// Build ID.
	Id string `json:"$id"`
	// The deployment that created this build.
	DeploymentId string `json:"deploymentId"`
	// The build status. There are a few different types and each one means
	// something different. \nFailed - The deployment build has failed. More
	// details can usually be found in buildStderr\nReady - The deployment build
	// was successful and the deployment is ready to be deployed\nProcessing - The
	// deployment is currently waiting to have a build triggered\nBuilding - The
	// deployment is currently being built
	Status string `json:"status"`
	// The stdout of the build.
	Stdout string `json:"stdout"`
	// The stderr of the build.
	Stderr string `json:"stderr"`
	// The deployment creation date in ISO 8601 format.
	StartTime string `json:"startTime"`
	// The time the build was finished in ISO 8601 format.
	EndTime string `json:"endTime"`
	// The build duration in seconds.
	Duration int `json:"duration"`
	// The code size in bytes.
	Size int `json:"size"`
	// contains filtered or unexported fields
}

Build Model

func (*Build) Decode

func (model *Build) Decode(value interface{}) error

func (Build) New

func (model Build) New(data []byte) *Build

type Collection

type Collection struct {
	// Collection ID.
	Id string `json:"$id"`
	// Collection creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Collection update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Collection permissions. [Learn more about
	// permissions](https://appwrite.io/docs/permissions).
	Permissions []string `json:"$permissions"`
	// Database ID.
	DatabaseId string `json:"databaseId"`
	// Collection name.
	Name string `json:"name"`
	// Collection enabled. Can be 'enabled' or 'disabled'. When disabled, the
	// collection is inaccessible to users, but remains accessible to Server SDKs
	// using API keys.
	Enabled bool `json:"enabled"`
	// Whether document-level permissions are enabled. [Learn more about
	// permissions](https://appwrite.io/docs/permissions).
	DocumentSecurity bool `json:"documentSecurity"`
	// Collection attributes.
	Attributes []map[string]any `json:"attributes"`
	// Collection indexes.
	Indexes []Index `json:"indexes"`
	// contains filtered or unexported fields
}

Collection Model

func (*Collection) Decode

func (model *Collection) Decode(value interface{}) error

func (Collection) New

func (model Collection) New(data []byte) *Collection

type CollectionList

type CollectionList struct {
	// Total number of collections documents that matched your query.
	Total int `json:"total"`
	// List of collections.
	Collections []Collection `json:"collections"`
	// contains filtered or unexported fields
}

CollectionsList Model

func (*CollectionList) Decode

func (model *CollectionList) Decode(value interface{}) error

func (CollectionList) New

func (model CollectionList) New(data []byte) *CollectionList

type Continent

type Continent struct {
	// Continent name.
	Name string `json:"name"`
	// Continent two letter code.
	Code string `json:"code"`
	// contains filtered or unexported fields
}

Continent Model

func (*Continent) Decode

func (model *Continent) Decode(value interface{}) error

func (Continent) New

func (model Continent) New(data []byte) *Continent

type ContinentList

type ContinentList struct {
	// Total number of continents documents that matched your query.
	Total int `json:"total"`
	// List of continents.
	Continents []Continent `json:"continents"`
	// contains filtered or unexported fields
}

ContinentsList Model

func (*ContinentList) Decode

func (model *ContinentList) Decode(value interface{}) error

func (ContinentList) New

func (model ContinentList) New(data []byte) *ContinentList

type Country

type Country struct {
	// Country name.
	Name string `json:"name"`
	// Country two-character ISO 3166-1 alpha code.
	Code string `json:"code"`
	// contains filtered or unexported fields
}

Country Model

func (*Country) Decode

func (model *Country) Decode(value interface{}) error

func (Country) New

func (model Country) New(data []byte) *Country

type CountryList

type CountryList struct {
	// Total number of countries documents that matched your query.
	Total int `json:"total"`
	// List of countries.
	Countries []Country `json:"countries"`
	// contains filtered or unexported fields
}

CountriesList Model

func (*CountryList) Decode

func (model *CountryList) Decode(value interface{}) error

func (CountryList) New

func (model CountryList) New(data []byte) *CountryList

type Currency

type Currency struct {
	// Currency symbol.
	Symbol string `json:"symbol"`
	// Currency name.
	Name string `json:"name"`
	// Currency native symbol.
	SymbolNative string `json:"symbolNative"`
	// Number of decimal digits.
	DecimalDigits int `json:"decimalDigits"`
	// Currency digit rounding.
	Rounding float64 `json:"rounding"`
	// Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217)
	// three-character format.
	Code string `json:"code"`
	// Currency plural name
	NamePlural string `json:"namePlural"`
	// contains filtered or unexported fields
}

Currency Model

func (*Currency) Decode

func (model *Currency) Decode(value interface{}) error

func (Currency) New

func (model Currency) New(data []byte) *Currency

type CurrencyList

type CurrencyList struct {
	// Total number of currencies documents that matched your query.
	Total int `json:"total"`
	// List of currencies.
	Currencies []Currency `json:"currencies"`
	// contains filtered or unexported fields
}

CurrenciesList Model

func (*CurrencyList) Decode

func (model *CurrencyList) Decode(value interface{}) error

func (CurrencyList) New

func (model CurrencyList) New(data []byte) *CurrencyList

type Database

type Database struct {
	// Database ID.
	Id string `json:"$id"`
	// Database name.
	Name string `json:"name"`
	// Database creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Database update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// If database is enabled. Can be 'enabled' or 'disabled'. When disabled, the
	// database is inaccessible to users, but remains accessible to Server SDKs
	// using API keys.
	Enabled bool `json:"enabled"`
	// contains filtered or unexported fields
}

Database Model

func (*Database) Decode

func (model *Database) Decode(value interface{}) error

func (Database) New

func (model Database) New(data []byte) *Database

type DatabaseList

type DatabaseList struct {
	// Total number of databases documents that matched your query.
	Total int `json:"total"`
	// List of databases.
	Databases []Database `json:"databases"`
	// contains filtered or unexported fields
}

DatabasesList Model

func (*DatabaseList) Decode

func (model *DatabaseList) Decode(value interface{}) error

func (DatabaseList) New

func (model DatabaseList) New(data []byte) *DatabaseList

type Deployment

type Deployment struct {
	// Deployment ID.
	Id string `json:"$id"`
	// Deployment creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Deployment update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Type of deployment.
	Type string `json:"xtype"`
	// Resource ID.
	ResourceId string `json:"resourceId"`
	// Resource type.
	ResourceType string `json:"resourceType"`
	// The entrypoint file to use to execute the deployment code.
	Entrypoint string `json:"entrypoint"`
	// The code size in bytes.
	Size int `json:"size"`
	// The current build ID.
	BuildId string `json:"buildId"`
	// Whether the deployment should be automatically activated.
	Activate bool `json:"activate"`
	// The deployment status. Possible values are "processing", "building",
	// "waiting", "ready", and "failed".
	Status string `json:"status"`
	// The build logs.
	BuildLogs string `json:"buildLogs"`
	// The current build time in seconds.
	BuildTime int `json:"buildTime"`
	// The name of the vcs provider repository
	ProviderRepositoryName string `json:"providerRepositoryName"`
	// The name of the vcs provider repository owner
	ProviderRepositoryOwner string `json:"providerRepositoryOwner"`
	// The url of the vcs provider repository
	ProviderRepositoryUrl string `json:"providerRepositoryUrl"`
	// The branch of the vcs repository
	ProviderBranch string `json:"providerBranch"`
	// The commit hash of the vcs commit
	ProviderCommitHash string `json:"providerCommitHash"`
	// The url of vcs commit author
	ProviderCommitAuthorUrl string `json:"providerCommitAuthorUrl"`
	// The name of vcs commit author
	ProviderCommitAuthor string `json:"providerCommitAuthor"`
	// The commit message
	ProviderCommitMessage string `json:"providerCommitMessage"`
	// The url of the vcs commit
	ProviderCommitUrl string `json:"providerCommitUrl"`
	// The branch of the vcs repository
	ProviderBranchUrl string `json:"providerBranchUrl"`
	// contains filtered or unexported fields
}

Deployment Model

func (*Deployment) Decode

func (model *Deployment) Decode(value interface{}) error

func (Deployment) New

func (model Deployment) New(data []byte) *Deployment

type DeploymentList

type DeploymentList struct {
	// Total number of deployments documents that matched your query.
	Total int `json:"total"`
	// List of deployments.
	Deployments []Deployment `json:"deployments"`
	// contains filtered or unexported fields
}

DeploymentsList Model

func (*DeploymentList) Decode

func (model *DeploymentList) Decode(value interface{}) error

func (DeploymentList) New

func (model DeploymentList) New(data []byte) *DeploymentList

type Document

type Document struct {
	// Document ID.
	Id string `json:"$id"`
	// Collection ID.
	CollectionId string `json:"$collectionId"`
	// Database ID.
	DatabaseId string `json:"$databaseId"`
	// Document creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Document update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Document permissions. [Learn more about
	// permissions](https://appwrite.io/docs/permissions).
	Permissions []string `json:"$permissions"`
	// contains filtered or unexported fields
}

Document Model

func (*Document) Decode

func (model *Document) Decode(value interface{}) error

Use this method to get response in desired type

func (Document) New

func (model Document) New(data []byte) *Document

type DocumentList

type DocumentList struct {
	// Total number of documents documents that matched your query.
	Total int `json:"total"`
	// List of documents.
	Documents []Document `json:"documents"`
	// contains filtered or unexported fields
}

DocumentsList Model

func (*DocumentList) Decode

func (model *DocumentList) Decode(value interface{}) error

func (DocumentList) New

func (model DocumentList) New(data []byte) *DocumentList

type Execution

type Execution struct {
	// Execution ID.
	Id string `json:"$id"`
	// Execution creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Execution upate date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Execution roles.
	Permissions []string `json:"$permissions"`
	// Function ID.
	FunctionId string `json:"functionId"`
	// The trigger that caused the function to execute. Possible values can be:
	// `http`, `schedule`, or `event`.
	Trigger string `json:"trigger"`
	// The status of the function execution. Possible values can be: `waiting`,
	// `processing`, `completed`, or `failed`.
	Status string `json:"status"`
	// HTTP request method type.
	RequestMethod string `json:"requestMethod"`
	// HTTP request path and query.
	RequestPath string `json:"requestPath"`
	// HTTP response headers as a key-value object. This will return only
	// whitelisted headers. All headers are returned if execution is created as
	// synchronous.
	RequestHeaders []Headers `json:"requestHeaders"`
	// HTTP response status code.
	ResponseStatusCode int `json:"responseStatusCode"`
	// HTTP response body. This will return empty unless execution is created as
	// synchronous.
	ResponseBody string `json:"responseBody"`
	// HTTP response headers as a key-value object. This will return only
	// whitelisted headers. All headers are returned if execution is created as
	// synchronous.
	ResponseHeaders []Headers `json:"responseHeaders"`
	// Function logs. Includes the last 4,000 characters. This will return an
	// empty string unless the response is returned using an API key or as part of
	// a webhook payload.
	Logs string `json:"logs"`
	// Function errors. Includes the last 4,000 characters. This will return an
	// empty string unless the response is returned using an API key or as part of
	// a webhook payload.
	Errors string `json:"errors"`
	// Function execution duration in seconds.
	Duration float64 `json:"duration"`
	// The scheduled time for execution. If left empty, execution will be queued
	// immediately.
	ScheduledAt string `json:"scheduledAt"`
	// contains filtered or unexported fields
}

Execution Model

func (*Execution) Decode

func (model *Execution) Decode(value interface{}) error

func (Execution) New

func (model Execution) New(data []byte) *Execution

type ExecutionList

type ExecutionList struct {
	// Total number of executions documents that matched your query.
	Total int `json:"total"`
	// List of executions.
	Executions []Execution `json:"executions"`
	// contains filtered or unexported fields
}

ExecutionsList Model

func (*ExecutionList) Decode

func (model *ExecutionList) Decode(value interface{}) error

func (ExecutionList) New

func (model ExecutionList) New(data []byte) *ExecutionList

type File

type File struct {
	// File ID.
	Id string `json:"$id"`
	// Bucket ID.
	BucketId string `json:"bucketId"`
	// File creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// File update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// File permissions. [Learn more about
	// permissions](https://appwrite.io/docs/permissions).
	Permissions []string `json:"$permissions"`
	// File name.
	Name string `json:"name"`
	// File MD5 signature.
	Signature string `json:"signature"`
	// File mime type.
	MimeType string `json:"mimeType"`
	// File original size in bytes.
	SizeOriginal int `json:"sizeOriginal"`
	// Total number of chunks available
	ChunksTotal int `json:"chunksTotal"`
	// Total number of chunks uploaded
	ChunksUploaded int `json:"chunksUploaded"`
	// contains filtered or unexported fields
}

File Model

func (*File) Decode

func (model *File) Decode(value interface{}) error

func (File) New

func (model File) New(data []byte) *File

type FileList

type FileList struct {
	// Total number of files documents that matched your query.
	Total int `json:"total"`
	// List of files.
	Files []File `json:"files"`
	// contains filtered or unexported fields
}

FilesList Model

func (*FileList) Decode

func (model *FileList) Decode(value interface{}) error

func (FileList) New

func (model FileList) New(data []byte) *FileList

type Function

type Function struct {
	// Function ID.
	Id string `json:"$id"`
	// Function creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Function update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Execution permissions.
	Execute []string `json:"execute"`
	// Function name.
	Name string `json:"name"`
	// Function enabled.
	Enabled bool `json:"enabled"`
	// Is the function deployed with the latest configuration? This is set to
	// false if you've changed an environment variables, entrypoint, commands, or
	// other settings that needs redeploy to be applied. When the value is false,
	// redeploy the function to update it with the latest configuration.
	Live bool `json:"live"`
	// Whether executions will be logged. When set to false, executions will not
	// be logged, but will reduce resource used by your Appwrite project.
	Logging bool `json:"logging"`
	// Function execution runtime.
	Runtime string `json:"runtime"`
	// Function's active deployment ID.
	Deployment string `json:"deployment"`
	// Allowed permission scopes.
	Scopes []string `json:"scopes"`
	// Function variables.
	Vars []Variable `json:"vars"`
	// Function trigger events.
	Events []string `json:"events"`
	// Function execution schedult in CRON format.
	Schedule string `json:"schedule"`
	// Function execution timeout in seconds.
	Timeout int `json:"timeout"`
	// The entrypoint file used to execute the deployment.
	Entrypoint string `json:"entrypoint"`
	// The build command used to build the deployment.
	Commands string `json:"commands"`
	// Version of Open Runtimes used for the function.
	Version string `json:"version"`
	// Function VCS (Version Control System) installation id.
	InstallationId string `json:"installationId"`
	// VCS (Version Control System) Repository ID
	ProviderRepositoryId string `json:"providerRepositoryId"`
	// VCS (Version Control System) branch name
	ProviderBranch string `json:"providerBranch"`
	// Path to function in VCS (Version Control System) repository
	ProviderRootDirectory string `json:"providerRootDirectory"`
	// Is VCS (Version Control System) connection is in silent mode? When in
	// silence mode, no comments will be posted on the repository pull or merge
	// requests
	ProviderSilentMode bool `json:"providerSilentMode"`
	// Machine specification for builds and executions.
	Specification string `json:"specification"`
	// contains filtered or unexported fields
}

Function Model

func (*Function) Decode

func (model *Function) Decode(value interface{}) error

func (Function) New

func (model Function) New(data []byte) *Function

type FunctionList

type FunctionList struct {
	// Total number of functions documents that matched your query.
	Total int `json:"total"`
	// List of functions.
	Functions []Function `json:"functions"`
	// contains filtered or unexported fields
}

FunctionsList Model

func (*FunctionList) Decode

func (model *FunctionList) Decode(value interface{}) error

func (FunctionList) New

func (model FunctionList) New(data []byte) *FunctionList

type Headers

type Headers struct {
	// Header name.
	Name string `json:"name"`
	// Header value.
	Value string `json:"value"`
	// contains filtered or unexported fields
}

Headers Model

func (*Headers) Decode

func (model *Headers) Decode(value interface{}) error

func (Headers) New

func (model Headers) New(data []byte) *Headers

type HealthAntivirus

type HealthAntivirus struct {
	// Antivirus version.
	Version string `json:"version"`
	// Antivirus status. Possible values can are: `disabled`, `offline`, `online`
	Status string `json:"status"`
	// contains filtered or unexported fields
}

HealthAntivirus Model

func (*HealthAntivirus) Decode

func (model *HealthAntivirus) Decode(value interface{}) error

func (HealthAntivirus) New

func (model HealthAntivirus) New(data []byte) *HealthAntivirus

type HealthCertificate

type HealthCertificate struct {
	// Certificate name
	Name string `json:"name"`
	// Subject SN
	SubjectSN string `json:"subjectSN"`
	// Issuer organisation
	IssuerOrganisation string `json:"issuerOrganisation"`
	// Valid from
	ValidFrom string `json:"validFrom"`
	// Valid to
	ValidTo string `json:"validTo"`
	// Signature type SN
	SignatureTypeSN string `json:"signatureTypeSN"`
	// contains filtered or unexported fields
}

HealthCertificate Model

func (*HealthCertificate) Decode

func (model *HealthCertificate) Decode(value interface{}) error

func (HealthCertificate) New

func (model HealthCertificate) New(data []byte) *HealthCertificate

type HealthQueue

type HealthQueue struct {
	// Amount of actions in the queue.
	Size int `json:"size"`
	// contains filtered or unexported fields
}

HealthQueue Model

func (*HealthQueue) Decode

func (model *HealthQueue) Decode(value interface{}) error

func (HealthQueue) New

func (model HealthQueue) New(data []byte) *HealthQueue

type HealthStatus

type HealthStatus struct {
	// Name of the service.
	Name string `json:"name"`
	// Duration in milliseconds how long the health check took.
	Ping int `json:"ping"`
	// Service status. Possible values can are: `pass`, `fail`
	Status string `json:"status"`
	// contains filtered or unexported fields
}

HealthStatus Model

func (*HealthStatus) Decode

func (model *HealthStatus) Decode(value interface{}) error

func (HealthStatus) New

func (model HealthStatus) New(data []byte) *HealthStatus

type HealthTime

type HealthTime struct {
	// Current unix timestamp on trustful remote server.
	RemoteTime int `json:"remoteTime"`
	// Current unix timestamp of local server where Appwrite runs.
	LocalTime int `json:"localTime"`
	// Difference of unix remote and local timestamps in milliseconds.
	Diff int `json:"diff"`
	// contains filtered or unexported fields
}

HealthTime Model

func (*HealthTime) Decode

func (model *HealthTime) Decode(value interface{}) error

func (HealthTime) New

func (model HealthTime) New(data []byte) *HealthTime

type Identity

type Identity struct {
	// Identity ID.
	Id string `json:"$id"`
	// Identity creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Identity update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// User ID.
	UserId string `json:"userId"`
	// Identity Provider.
	Provider string `json:"provider"`
	// ID of the User in the Identity Provider.
	ProviderUid string `json:"providerUid"`
	// Email of the User in the Identity Provider.
	ProviderEmail string `json:"providerEmail"`
	// Identity Provider Access Token.
	ProviderAccessToken string `json:"providerAccessToken"`
	// The date of when the access token expires in ISO 8601 format.
	ProviderAccessTokenExpiry string `json:"providerAccessTokenExpiry"`
	// Identity Provider Refresh Token.
	ProviderRefreshToken string `json:"providerRefreshToken"`
	// contains filtered or unexported fields
}

Identity Model

func (*Identity) Decode

func (model *Identity) Decode(value interface{}) error

func (Identity) New

func (model Identity) New(data []byte) *Identity

type IdentityList

type IdentityList struct {
	// Total number of identities documents that matched your query.
	Total int `json:"total"`
	// List of identities.
	Identities []Identity `json:"identities"`
	// contains filtered or unexported fields
}

IdentitiesList Model

func (*IdentityList) Decode

func (model *IdentityList) Decode(value interface{}) error

func (IdentityList) New

func (model IdentityList) New(data []byte) *IdentityList

type Index

type Index struct {
	// Index Key.
	Key string `json:"key"`
	// Index type.
	Type string `json:"xtype"`
	// Index status. Possible values: `available`, `processing`, `deleting`,
	// `stuck`, or `failed`
	Status string `json:"status"`
	// Error message. Displays error generated on failure of creating or deleting
	// an index.
	Error string `json:"xerror"`
	// Index attributes.
	Attributes []string `json:"attributes"`
	// Index orders.
	Orders []string `json:"orders"`
	// contains filtered or unexported fields
}

Index Model

func (*Index) Decode

func (model *Index) Decode(value interface{}) error

func (Index) New

func (model Index) New(data []byte) *Index

type IndexList

type IndexList struct {
	// Total number of indexes documents that matched your query.
	Total int `json:"total"`
	// List of indexes.
	Indexes []Index `json:"indexes"`
	// contains filtered or unexported fields
}

IndexesList Model

func (*IndexList) Decode

func (model *IndexList) Decode(value interface{}) error

func (IndexList) New

func (model IndexList) New(data []byte) *IndexList

type Jwt

type Jwt struct {
	// JWT encoded string.
	Jwt string `json:"jwt"`
	// contains filtered or unexported fields
}

JWT Model

func (*Jwt) Decode

func (model *Jwt) Decode(value interface{}) error

func (Jwt) New

func (model Jwt) New(data []byte) *Jwt

type Language

type Language struct {
	// Language name.
	Name string `json:"name"`
	// Language two-character ISO 639-1 codes.
	Code string `json:"code"`
	// Language native name.
	NativeName string `json:"nativeName"`
	// contains filtered or unexported fields
}

Language Model

func (*Language) Decode

func (model *Language) Decode(value interface{}) error

func (Language) New

func (model Language) New(data []byte) *Language

type LanguageList

type LanguageList struct {
	// Total number of languages documents that matched your query.
	Total int `json:"total"`
	// List of languages.
	Languages []Language `json:"languages"`
	// contains filtered or unexported fields
}

LanguagesList Model

func (*LanguageList) Decode

func (model *LanguageList) Decode(value interface{}) error

func (LanguageList) New

func (model LanguageList) New(data []byte) *LanguageList

type Locale

type Locale struct {
	// User IP address.
	Ip string `json:"ip"`
	// Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1)
	// two-character format
	CountryCode string `json:"countryCode"`
	// Country name. This field support localization.
	Country string `json:"country"`
	// Continent code. A two character continent code "AF" for Africa, "AN" for
	// Antarctica, "AS" for Asia, "EU" for Europe, "NA" for North America, "OC"
	// for Oceania, and "SA" for South America.
	ContinentCode string `json:"continentCode"`
	// Continent name. This field support localization.
	Continent string `json:"continent"`
	// True if country is part of the European Union.
	Eu bool `json:"eu"`
	// Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217)
	// three-character format
	Currency string `json:"currency"`
	// contains filtered or unexported fields
}

Locale Model

func (*Locale) Decode

func (model *Locale) Decode(value interface{}) error

func (Locale) New

func (model Locale) New(data []byte) *Locale

type LocaleCode

type LocaleCode struct {
	// Locale codes in [ISO
	// 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
	Code string `json:"code"`
	// Locale name
	Name string `json:"name"`
	// contains filtered or unexported fields
}

LocaleCode Model

func (*LocaleCode) Decode

func (model *LocaleCode) Decode(value interface{}) error

func (LocaleCode) New

func (model LocaleCode) New(data []byte) *LocaleCode

type LocaleCodeList

type LocaleCodeList struct {
	// Total number of localeCodes documents that matched your query.
	Total int `json:"total"`
	// List of localeCodes.
	LocaleCodes []LocaleCode `json:"localeCodes"`
	// contains filtered or unexported fields
}

LocaleCodesList Model

func (*LocaleCodeList) Decode

func (model *LocaleCodeList) Decode(value interface{}) error

func (LocaleCodeList) New

func (model LocaleCodeList) New(data []byte) *LocaleCodeList

type Log

type Log struct {
	// Event name.
	Event string `json:"event"`
	// User ID.
	UserId string `json:"userId"`
	// User Email.
	UserEmail string `json:"userEmail"`
	// User Name.
	UserName string `json:"userName"`
	// API mode when event triggered.
	Mode string `json:"mode"`
	// IP session in use when the session was created.
	Ip string `json:"ip"`
	// Log creation date in ISO 8601 format.
	Time string `json:"time"`
	// Operating system code name. View list of [available
	// options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
	OsCode string `json:"osCode"`
	// Operating system name.
	OsName string `json:"osName"`
	// Operating system version.
	OsVersion string `json:"osVersion"`
	// Client type.
	ClientType string `json:"clientType"`
	// Client code name. View list of [available
	// options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
	ClientCode string `json:"clientCode"`
	// Client name.
	ClientName string `json:"clientName"`
	// Client version.
	ClientVersion string `json:"clientVersion"`
	// Client engine name.
	ClientEngine string `json:"clientEngine"`
	// Client engine name.
	ClientEngineVersion string `json:"clientEngineVersion"`
	// Device name.
	DeviceName string `json:"deviceName"`
	// Device brand name.
	DeviceBrand string `json:"deviceBrand"`
	// Device model name.
	DeviceModel string `json:"deviceModel"`
	// Country two-character ISO 3166-1 alpha code.
	CountryCode string `json:"countryCode"`
	// Country name.
	CountryName string `json:"countryName"`
	// contains filtered or unexported fields
}

Log Model

func (*Log) Decode

func (model *Log) Decode(value interface{}) error

func (Log) New

func (model Log) New(data []byte) *Log

type LogList

type LogList struct {
	// Total number of logs documents that matched your query.
	Total int `json:"total"`
	// List of logs.
	Logs []Log `json:"logs"`
	// contains filtered or unexported fields
}

LogsList Model

func (*LogList) Decode

func (model *LogList) Decode(value interface{}) error

func (LogList) New

func (model LogList) New(data []byte) *LogList

type Membership

type Membership struct {
	// Membership ID.
	Id string `json:"$id"`
	// Membership creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Membership update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// User ID.
	UserId string `json:"userId"`
	// User name.
	UserName string `json:"userName"`
	// User email address.
	UserEmail string `json:"userEmail"`
	// Team ID.
	TeamId string `json:"teamId"`
	// Team name.
	TeamName string `json:"teamName"`
	// Date, the user has been invited to join the team in ISO 8601 format.
	Invited string `json:"invited"`
	// Date, the user has accepted the invitation to join the team in ISO 8601
	// format.
	Joined string `json:"joined"`
	// User confirmation status, true if the user has joined the team or false
	// otherwise.
	Confirm bool `json:"confirm"`
	// Multi factor authentication status, true if the user has MFA enabled or
	// false otherwise.
	Mfa bool `json:"mfa"`
	// User list of roles
	Roles []string `json:"roles"`
	// contains filtered or unexported fields
}

Membership Model

func (*Membership) Decode

func (model *Membership) Decode(value interface{}) error

func (Membership) New

func (model Membership) New(data []byte) *Membership

type MembershipList

type MembershipList struct {
	// Total number of memberships documents that matched your query.
	Total int `json:"total"`
	// List of memberships.
	Memberships []Membership `json:"memberships"`
	// contains filtered or unexported fields
}

MembershipsList Model

func (*MembershipList) Decode

func (model *MembershipList) Decode(value interface{}) error

func (MembershipList) New

func (model MembershipList) New(data []byte) *MembershipList

type Message

type Message struct {
	// Message ID.
	Id string `json:"$id"`
	// Message creation time in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Message update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Message provider type.
	ProviderType string `json:"providerType"`
	// Topic IDs set as recipients.
	Topics []string `json:"topics"`
	// User IDs set as recipients.
	Users []string `json:"users"`
	// Target IDs set as recipients.
	Targets []string `json:"targets"`
	// The scheduled time for message.
	ScheduledAt string `json:"scheduledAt"`
	// The time when the message was delivered.
	DeliveredAt string `json:"deliveredAt"`
	// Delivery errors if any.
	DeliveryErrors []string `json:"deliveryErrors"`
	// Number of recipients the message was delivered to.
	DeliveredTotal int `json:"deliveredTotal"`
	// Data of the message.
	Data interface{} `json:"data"`
	// Status of delivery.
	Status string `json:"status"`
	// contains filtered or unexported fields
}

Message Model

func (*Message) Decode

func (model *Message) Decode(value interface{}) error

func (Message) New

func (model Message) New(data []byte) *Message

type MessageList

type MessageList struct {
	// Total number of messages documents that matched your query.
	Total int `json:"total"`
	// List of messages.
	Messages []Message `json:"messages"`
	// contains filtered or unexported fields
}

MessageList Model

func (*MessageList) Decode

func (model *MessageList) Decode(value interface{}) error

func (MessageList) New

func (model MessageList) New(data []byte) *MessageList

type MfaChallenge

type MfaChallenge struct {
	// Token ID.
	Id string `json:"$id"`
	// Token creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// User ID.
	UserId string `json:"userId"`
	// Token expiration date in ISO 8601 format.
	Expire string `json:"expire"`
	// contains filtered or unexported fields
}

MFAChallenge Model

func (*MfaChallenge) Decode

func (model *MfaChallenge) Decode(value interface{}) error

func (MfaChallenge) New

func (model MfaChallenge) New(data []byte) *MfaChallenge

type MfaFactors

type MfaFactors struct {
	// Can TOTP be used for MFA challenge for this account.
	Totp bool `json:"totp"`
	// Can phone (SMS) be used for MFA challenge for this account.
	Phone bool `json:"phone"`
	// Can email be used for MFA challenge for this account.
	Email bool `json:"email"`
	// Can recovery code be used for MFA challenge for this account.
	RecoveryCode bool `json:"recoveryCode"`
	// contains filtered or unexported fields
}

MFAFactors Model

func (*MfaFactors) Decode

func (model *MfaFactors) Decode(value interface{}) error

func (MfaFactors) New

func (model MfaFactors) New(data []byte) *MfaFactors

type MfaRecoveryCodes

type MfaRecoveryCodes struct {
	// Recovery codes.
	RecoveryCodes []string `json:"recoveryCodes"`
	// contains filtered or unexported fields
}

MFARecoveryCodes Model

func (*MfaRecoveryCodes) Decode

func (model *MfaRecoveryCodes) Decode(value interface{}) error

func (MfaRecoveryCodes) New

func (model MfaRecoveryCodes) New(data []byte) *MfaRecoveryCodes

type MfaType

type MfaType struct {
	// Secret token used for TOTP factor.
	Secret string `json:"secret"`
	// URI for authenticator apps.
	Uri string `json:"uri"`
	// contains filtered or unexported fields
}

MFAType Model

func (*MfaType) Decode

func (model *MfaType) Decode(value interface{}) error

func (MfaType) New

func (model MfaType) New(data []byte) *MfaType

type Phone

type Phone struct {
	// Phone code.
	Code string `json:"code"`
	// Country two-character ISO 3166-1 alpha code.
	CountryCode string `json:"countryCode"`
	// Country name.
	CountryName string `json:"countryName"`
	// contains filtered or unexported fields
}

Phone Model

func (*Phone) Decode

func (model *Phone) Decode(value interface{}) error

func (Phone) New

func (model Phone) New(data []byte) *Phone

type PhoneList

type PhoneList struct {
	// Total number of phones documents that matched your query.
	Total int `json:"total"`
	// List of phones.
	Phones []Phone `json:"phones"`
	// contains filtered or unexported fields
}

PhonesList Model

func (*PhoneList) Decode

func (model *PhoneList) Decode(value interface{}) error

func (PhoneList) New

func (model PhoneList) New(data []byte) *PhoneList

type Preferences

type Preferences struct {
	// contains filtered or unexported fields
}

Preferences Model

func (*Preferences) Decode

func (model *Preferences) Decode(value interface{}) error

Use this method to get response in desired type

func (Preferences) New

func (model Preferences) New(data []byte) *Preferences

type Provider

type Provider struct {
	// Provider ID.
	Id string `json:"$id"`
	// Provider creation time in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Provider update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// The name for the provider instance.
	Name string `json:"name"`
	// The name of the provider service.
	Provider string `json:"provider"`
	// Is provider enabled?
	Enabled bool `json:"enabled"`
	// Type of provider.
	Type string `json:"xtype"`
	// Provider credentials.
	Credentials interface{} `json:"credentials"`
	// Provider options.
	Options interface{} `json:"options"`
	// contains filtered or unexported fields
}

Provider Model

func (*Provider) Decode

func (model *Provider) Decode(value interface{}) error

func (Provider) New

func (model Provider) New(data []byte) *Provider

type ProviderList

type ProviderList struct {
	// Total number of providers documents that matched your query.
	Total int `json:"total"`
	// List of providers.
	Providers []Provider `json:"providers"`
	// contains filtered or unexported fields
}

ProviderList Model

func (*ProviderList) Decode

func (model *ProviderList) Decode(value interface{}) error

func (ProviderList) New

func (model ProviderList) New(data []byte) *ProviderList

type Runtime

type Runtime struct {
	// Runtime ID.
	Id string `json:"$id"`
	// Parent runtime key.
	Key string `json:"key"`
	// Runtime Name.
	Name string `json:"name"`
	// Runtime version.
	Version string `json:"version"`
	// Base Docker image used to build the runtime.
	Base string `json:"base"`
	// Image name of Docker Hub.
	Image string `json:"image"`
	Logo string `json:"logo"`
	// List of supported architectures.
	Supports []string `json:"supports"`
	// contains filtered or unexported fields
}

Runtime Model

func (*Runtime) Decode

func (model *Runtime) Decode(value interface{}) error

func (Runtime) New

func (model Runtime) New(data []byte) *Runtime

type RuntimeList

type RuntimeList struct {
	// Total number of runtimes documents that matched your query.
	Total int `json:"total"`
	// List of runtimes.
	Runtimes []Runtime `json:"runtimes"`
	// contains filtered or unexported fields
}

RuntimesList Model

func (*RuntimeList) Decode

func (model *RuntimeList) Decode(value interface{}) error

func (RuntimeList) New

func (model RuntimeList) New(data []byte) *RuntimeList

type Session

type Session struct {
	// Session ID.
	Id string `json:"$id"`
	// Session creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Session update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// User ID.
	UserId string `json:"userId"`
	// Session expiration date in ISO 8601 format.
	Expire string `json:"expire"`
	// Session Provider.
	Provider string `json:"provider"`
	// Session Provider User ID.
	ProviderUid string `json:"providerUid"`
	// Session Provider Access Token.
	ProviderAccessToken string `json:"providerAccessToken"`
	// The date of when the access token expires in ISO 8601 format.
	ProviderAccessTokenExpiry string `json:"providerAccessTokenExpiry"`
	// Session Provider Refresh Token.
	ProviderRefreshToken string `json:"providerRefreshToken"`
	// IP in use when the session was created.
	Ip string `json:"ip"`
	// Operating system code name. View list of [available
	// options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
	OsCode string `json:"osCode"`
	// Operating system name.
	OsName string `json:"osName"`
	// Operating system version.
	OsVersion string `json:"osVersion"`
	// Client type.
	ClientType string `json:"clientType"`
	// Client code name. View list of [available
	// options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
	ClientCode string `json:"clientCode"`
	// Client name.
	ClientName string `json:"clientName"`
	// Client version.
	ClientVersion string `json:"clientVersion"`
	// Client engine name.
	ClientEngine string `json:"clientEngine"`
	// Client engine name.
	ClientEngineVersion string `json:"clientEngineVersion"`
	// Device name.
	DeviceName string `json:"deviceName"`
	// Device brand name.
	DeviceBrand string `json:"deviceBrand"`
	// Device model name.
	DeviceModel string `json:"deviceModel"`
	// Country two-character ISO 3166-1 alpha code.
	CountryCode string `json:"countryCode"`
	// Country name.
	CountryName string `json:"countryName"`
	// Returns true if this the current user session.
	Current bool `json:"current"`
	// Returns a list of active session factors.
	Factors []string `json:"factors"`
	// Secret used to authenticate the user. Only included if the request was made
	// with an API key
	Secret string `json:"secret"`
	// Most recent date in ISO 8601 format when the session successfully passed
	// MFA challenge.
	MfaUpdatedAt string `json:"mfaUpdatedAt"`
	// contains filtered or unexported fields
}

Session Model

func (*Session) Decode

func (model *Session) Decode(value interface{}) error

func (Session) New

func (model Session) New(data []byte) *Session

type SessionList

type SessionList struct {
	// Total number of sessions documents that matched your query.
	Total int `json:"total"`
	// List of sessions.
	Sessions []Session `json:"sessions"`
	// contains filtered or unexported fields
}

SessionsList Model

func (*SessionList) Decode

func (model *SessionList) Decode(value interface{}) error

func (SessionList) New

func (model SessionList) New(data []byte) *SessionList

type Specification

type Specification struct {
	// Memory size in MB.
	Memory int `json:"memory"`
	// Number of CPUs.
	Cpus float64 `json:"cpus"`
	// Is size enabled.
	Enabled bool `json:"enabled"`
	// Size slug.
	Slug string `json:"slug"`
	// contains filtered or unexported fields
}

Specification Model

func (*Specification) Decode

func (model *Specification) Decode(value interface{}) error

func (Specification) New

func (model Specification) New(data []byte) *Specification

type SpecificationList

type SpecificationList struct {
	// Total number of specifications documents that matched your query.
	Total int `json:"total"`
	// List of specifications.
	Specifications []Specification `json:"specifications"`
	// contains filtered or unexported fields
}

SpecificationsList Model

func (*SpecificationList) Decode

func (model *SpecificationList) Decode(value interface{}) error

func (SpecificationList) New

func (model SpecificationList) New(data []byte) *SpecificationList

type Subscriber

type Subscriber struct {
	// Subscriber ID.
	Id string `json:"$id"`
	// Subscriber creation time in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Subscriber update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Target ID.
	TargetId string `json:"targetId"`
	// Target.
	Target Target `json:"target"`
	// Topic ID.
	UserId string `json:"userId"`
	// User Name.
	UserName string `json:"userName"`
	// Topic ID.
	TopicId string `json:"topicId"`
	// The target provider type. Can be one of the following: `email`, `sms` or
	// `push`.
	ProviderType string `json:"providerType"`
	// contains filtered or unexported fields
}

Subscriber Model

func (*Subscriber) Decode

func (model *Subscriber) Decode(value interface{}) error

func (Subscriber) New

func (model Subscriber) New(data []byte) *Subscriber

type SubscriberList

type SubscriberList struct {
	// Total number of subscribers documents that matched your query.
	Total int `json:"total"`
	// List of subscribers.
	Subscribers []Subscriber `json:"subscribers"`
	// contains filtered or unexported fields
}

SubscriberList Model

func (*SubscriberList) Decode

func (model *SubscriberList) Decode(value interface{}) error

func (SubscriberList) New

func (model SubscriberList) New(data []byte) *SubscriberList

type Target

type Target struct {
	// Target ID.
	Id string `json:"$id"`
	// Target creation time in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Target update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Target Name.
	Name string `json:"name"`
	// User ID.
	UserId string `json:"userId"`
	// Provider ID.
	ProviderId string `json:"providerId"`
	// The target provider type. Can be one of the following: `email`, `sms` or
	// `push`.
	ProviderType string `json:"providerType"`
	// The target identifier.
	Identifier string `json:"identifier"`
	// contains filtered or unexported fields
}

Target Model

func (*Target) Decode

func (model *Target) Decode(value interface{}) error

func (Target) New

func (model Target) New(data []byte) *Target

type TargetList

type TargetList struct {
	// Total number of targets documents that matched your query.
	Total int `json:"total"`
	// List of targets.
	Targets []Target `json:"targets"`
	// contains filtered or unexported fields
}

TargetList Model

func (*TargetList) Decode

func (model *TargetList) Decode(value interface{}) error

func (TargetList) New

func (model TargetList) New(data []byte) *TargetList

type Team

type Team struct {
	// Team ID.
	Id string `json:"$id"`
	// Team creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Team update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Team name.
	Name string `json:"name"`
	// Total number of team members.
	Total int `json:"total"`
	// Team preferences as a key-value object
	Prefs Preferences `json:"prefs"`
	// contains filtered or unexported fields
}

Team Model

func (*Team) Decode

func (model *Team) Decode(value interface{}) error

func (Team) New

func (model Team) New(data []byte) *Team

type TeamList

type TeamList struct {
	// Total number of teams documents that matched your query.
	Total int `json:"total"`
	// List of teams.
	Teams []Team `json:"teams"`
	// contains filtered or unexported fields
}

TeamsList Model

func (*TeamList) Decode

func (model *TeamList) Decode(value interface{}) error

func (TeamList) New

func (model TeamList) New(data []byte) *TeamList

type TemplateFunction

type TemplateFunction struct {
	// Function Template Icon.
	Icon string `json:"icon"`
	// Function Template ID.
	Id string `json:"id"`
	// Function Template Name.
	Name string `json:"name"`
	// Function Template Tagline.
	Tagline string `json:"tagline"`
	// Execution permissions.
	Permissions []string `json:"permissions"`
	// Function trigger events.
	Events []string `json:"events"`
	// Function execution schedult in CRON format.
	Cron string `json:"cron"`
	// Function execution timeout in seconds.
	Timeout int `json:"timeout"`
	// Function use cases.
	UseCases []string `json:"useCases"`
	// List of runtimes that can be used with this template.
	Runtimes []TemplateRuntime `json:"runtimes"`
	// Function Template Instructions.
	Instructions string `json:"instructions"`
	// VCS (Version Control System) Provider.
	VcsProvider string `json:"vcsProvider"`
	// VCS (Version Control System) Repository ID
	ProviderRepositoryId string `json:"providerRepositoryId"`
	// VCS (Version Control System) Owner.
	ProviderOwner string `json:"providerOwner"`
	// VCS (Version Control System) branch version (tag).
	ProviderVersion string `json:"providerVersion"`
	// Function variables.
	Variables []TemplateVariable `json:"variables"`
	// Function scopes.
	Scopes []string `json:"scopes"`
	// contains filtered or unexported fields
}

TemplateFunction Model

func (*TemplateFunction) Decode

func (model *TemplateFunction) Decode(value interface{}) error

func (TemplateFunction) New

func (model TemplateFunction) New(data []byte) *TemplateFunction

type TemplateFunctionList

type TemplateFunctionList struct {
	// Total number of templates documents that matched your query.
	Total int `json:"total"`
	// List of templates.
	Templates []TemplateFunction `json:"templates"`
	// contains filtered or unexported fields
}

FunctionTemplatesList Model

func (*TemplateFunctionList) Decode

func (model *TemplateFunctionList) Decode(value interface{}) error

func (TemplateFunctionList) New

func (model TemplateFunctionList) New(data []byte) *TemplateFunctionList

type TemplateRuntime

type TemplateRuntime struct {
	// Runtime Name.
	Name string `json:"name"`
	// The build command used to build the deployment.
	Commands string `json:"commands"`
	// The entrypoint file used to execute the deployment.
	Entrypoint string `json:"entrypoint"`
	// Path to function in VCS (Version Control System) repository
	ProviderRootDirectory string `json:"providerRootDirectory"`
	// contains filtered or unexported fields
}

TemplateRuntime Model

func (*TemplateRuntime) Decode

func (model *TemplateRuntime) Decode(value interface{}) error

func (TemplateRuntime) New

func (model TemplateRuntime) New(data []byte) *TemplateRuntime

type TemplateVariable

type TemplateVariable struct {
	// Variable Name.
	Name string `json:"name"`
	// Variable Description.
	Description string `json:"description"`
	// Variable Value.
	Value string `json:"value"`
	// Variable Placeholder.
	Placeholder string `json:"placeholder"`
	// Is the variable required?
	Required bool `json:"required"`
	// Variable Type.
	Type string `json:"xtype"`
	// contains filtered or unexported fields
}

TemplateVariable Model

func (*TemplateVariable) Decode

func (model *TemplateVariable) Decode(value interface{}) error

func (TemplateVariable) New

func (model TemplateVariable) New(data []byte) *TemplateVariable

type Token

type Token struct {
	// Token ID.
	Id string `json:"$id"`
	// Token creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// User ID.
	UserId string `json:"userId"`
	// Token secret key. This will return an empty string unless the response is
	// returned using an API key or as part of a webhook payload.
	Secret string `json:"secret"`
	// Token expiration date in ISO 8601 format.
	Expire string `json:"expire"`
	// Security phrase of a token. Empty if security phrase was not requested when
	// creating a token. It includes randomly generated phrase which is also sent
	// in the external resource such as email.
	Phrase string `json:"phrase"`
	// contains filtered or unexported fields
}

Token Model

func (*Token) Decode

func (model *Token) Decode(value interface{}) error

func (Token) New

func (model Token) New(data []byte) *Token

type Topic

type Topic struct {
	// Topic ID.
	Id string `json:"$id"`
	// Topic creation time in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Topic update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// The name of the topic.
	Name string `json:"name"`
	// Total count of email subscribers subscribed to the topic.
	EmailTotal int `json:"emailTotal"`
	// Total count of SMS subscribers subscribed to the topic.
	SmsTotal int `json:"smsTotal"`
	// Total count of push subscribers subscribed to the topic.
	PushTotal int `json:"pushTotal"`
	// Subscribe permissions.
	Subscribe []string `json:"subscribe"`
	// contains filtered or unexported fields
}

Topic Model

func (*Topic) Decode

func (model *Topic) Decode(value interface{}) error

func (Topic) New

func (model Topic) New(data []byte) *Topic

type TopicList

type TopicList struct {
	// Total number of topics documents that matched your query.
	Total int `json:"total"`
	// List of topics.
	Topics []Topic `json:"topics"`
	// contains filtered or unexported fields
}

TopicList Model

func (*TopicList) Decode

func (model *TopicList) Decode(value interface{}) error

func (TopicList) New

func (model TopicList) New(data []byte) *TopicList

type User

type User struct {
	// User ID.
	Id string `json:"$id"`
	// User creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// User update date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// User name.
	Name string `json:"name"`
	// Hashed user password.
	Password string `json:"password"`
	// Password hashing algorithm.
	Hash string `json:"hash"`
	// Password hashing algorithm configuration.
	HashOptions interface{} `json:"hashOptions"`
	// User registration date in ISO 8601 format.
	Registration string `json:"registration"`
	// User status. Pass `true` for enabled and `false` for disabled.
	Status bool `json:"status"`
	// Labels for the user.
	Labels []string `json:"labels"`
	// Password update time in ISO 8601 format.
	PasswordUpdate string `json:"passwordUpdate"`
	// User email address.
	Email string `json:"email"`
	// User phone number in E.164 format.
	Phone string `json:"phone"`
	// Email verification status.
	EmailVerification bool `json:"emailVerification"`
	// Phone verification status.
	PhoneVerification bool `json:"phoneVerification"`
	// Multi factor authentication status.
	Mfa bool `json:"mfa"`
	// User preferences as a key-value object
	Prefs Preferences `json:"prefs"`
	// A user-owned message receiver. A single user may have multiple e.g. emails,
	// phones, and a browser. Each target is registered with a single provider.
	Targets []Target `json:"targets"`
	// Most recent access date in ISO 8601 format. This attribute is only updated
	// again after 24 hours.
	AccessedAt string `json:"accessedAt"`
	// contains filtered or unexported fields
}

User Model

func (*User) Decode

func (model *User) Decode(value interface{}) error

func (User) New

func (model User) New(data []byte) *User

type UserList

type UserList struct {
	// Total number of users documents that matched your query.
	Total int `json:"total"`
	// List of users.
	Users []User `json:"users"`
	// contains filtered or unexported fields
}

UsersList Model

func (*UserList) Decode

func (model *UserList) Decode(value interface{}) error

func (UserList) New

func (model UserList) New(data []byte) *UserList

type Variable

type Variable struct {
	// Variable ID.
	Id string `json:"$id"`
	// Variable creation date in ISO 8601 format.
	CreatedAt string `json:"$createdAt"`
	// Variable creation date in ISO 8601 format.
	UpdatedAt string `json:"$updatedAt"`
	// Variable key.
	Key string `json:"key"`
	// Variable value.
	Value string `json:"value"`
	// Service to which the variable belongs. Possible values are "project",
	// "function"
	ResourceType string `json:"resourceType"`
	// ID of resource to which the variable belongs. If resourceType is "project",
	// it is empty. If resourceType is "function", it is ID of the function.
	ResourceId string `json:"resourceId"`
	// contains filtered or unexported fields
}

Variable Model

func (*Variable) Decode

func (model *Variable) Decode(value interface{}) error

func (Variable) New

func (model Variable) New(data []byte) *Variable

type VariableList

type VariableList struct {
	// Total number of variables documents that matched your query.
	Total int `json:"total"`
	// List of variables.
	Variables []Variable `json:"variables"`
	// contains filtered or unexported fields
}

VariablesList Model

func (*VariableList) Decode

func (model *VariableList) Decode(value interface{}) error

func (VariableList) New

func (model VariableList) New(data []byte) *VariableList

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL