Documentation
¶
Index ¶
- type CreateBooleanAttributeOption
- type CreateBooleanAttributeOptions
- type CreateCollectionOption
- type CreateCollectionOptions
- type CreateDatetimeAttributeOption
- type CreateDatetimeAttributeOptions
- type CreateDocumentOption
- type CreateDocumentOptions
- type CreateEmailAttributeOption
- type CreateEmailAttributeOptions
- type CreateEnumAttributeOption
- type CreateEnumAttributeOptions
- type CreateFloatAttributeOption
- type CreateFloatAttributeOptions
- type CreateIndexOption
- type CreateIndexOptions
- type CreateIntegerAttributeOption
- type CreateIntegerAttributeOptions
- type CreateIpAttributeOption
- type CreateIpAttributeOptions
- type CreateOption
- type CreateOptions
- type CreateRelationshipAttributeOption
- func WithCreateRelationshipAttributeKey(v string) CreateRelationshipAttributeOption
- func WithCreateRelationshipAttributeOnDelete(v string) CreateRelationshipAttributeOption
- func WithCreateRelationshipAttributeTwoWay(v bool) CreateRelationshipAttributeOption
- func WithCreateRelationshipAttributeTwoWayKey(v string) CreateRelationshipAttributeOption
- type CreateRelationshipAttributeOptions
- type CreateStringAttributeOption
- type CreateStringAttributeOptions
- type CreateUrlAttributeOption
- type CreateUrlAttributeOptions
- type Databases
- func (srv *Databases) Create(DatabaseId string, Name string, optionalSetters ...CreateOption) (*models.Database, error)
- func (srv *Databases) CreateBooleanAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeBoolean, error)
- func (srv *Databases) CreateCollection(DatabaseId string, CollectionId string, Name string, ...) (*models.Collection, error)
- func (srv *Databases) CreateDatetimeAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeDatetime, error)
- func (srv *Databases) CreateDocument(DatabaseId string, CollectionId string, DocumentId string, Data interface{}, ...) (*models.Document, error)
- func (srv *Databases) CreateEmailAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeEmail, error)
- func (srv *Databases) CreateEnumAttribute(DatabaseId string, CollectionId string, Key string, Elements []interface{}, ...) (*models.AttributeEnum, error)
- func (srv *Databases) CreateFloatAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeFloat, error)
- func (srv *Databases) CreateIndex(DatabaseId string, CollectionId string, Key string, Type string, ...) (*models.Index, error)
- func (srv *Databases) CreateIntegerAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeInteger, error)
- func (srv *Databases) CreateIpAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeIp, error)
- func (srv *Databases) CreateRelationshipAttribute(DatabaseId string, CollectionId string, RelatedCollectionId string, ...) (*models.AttributeRelationship, error)
- func (srv *Databases) CreateStringAttribute(DatabaseId string, CollectionId string, Key string, Size int, Required bool, ...) (*models.AttributeString, error)
- func (srv *Databases) CreateUrlAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeUrl, error)
- func (srv *Databases) Delete(DatabaseId string) (*interface{}, error)
- func (srv *Databases) DeleteAttribute(DatabaseId string, CollectionId string, Key string) (*interface{}, error)
- func (srv *Databases) DeleteCollection(DatabaseId string, CollectionId string) (*interface{}, error)
- func (srv *Databases) DeleteDocument(DatabaseId string, CollectionId string, DocumentId string) (*interface{}, error)
- func (srv *Databases) DeleteIndex(DatabaseId string, CollectionId string, Key string) (*interface{}, error)
- func (srv *Databases) Get(DatabaseId string) (*models.Database, error)
- func (srv *Databases) GetAttribute(DatabaseId string, CollectionId string, Key string) (*interface{}, error)
- func (srv *Databases) GetCollection(DatabaseId string, CollectionId string) (*models.Collection, error)
- func (srv *Databases) GetDocument(DatabaseId string, CollectionId string, DocumentId string, ...) (*models.Document, error)
- func (srv *Databases) GetIndex(DatabaseId string, CollectionId string, Key string) (*models.Index, error)
- func (srv *Databases) List(optionalSetters ...ListOption) (*models.DatabaseList, error)
- func (srv *Databases) ListAttributes(DatabaseId string, CollectionId string, ...) (*models.AttributeList, error)
- func (srv *Databases) ListCollections(DatabaseId string, optionalSetters ...ListCollectionsOption) (*models.CollectionList, error)
- func (srv *Databases) ListDocuments(DatabaseId string, CollectionId string, optionalSetters ...ListDocumentsOption) (*models.DocumentList, error)
- func (srv *Databases) ListIndexes(DatabaseId string, CollectionId string, optionalSetters ...ListIndexesOption) (*models.IndexList, error)
- func (srv *Databases) Update(DatabaseId string, Name string, optionalSetters ...UpdateOption) (*models.Database, error)
- func (srv *Databases) UpdateBooleanAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeBoolean, error)
- func (srv *Databases) UpdateCollection(DatabaseId string, CollectionId string, Name string, ...) (*models.Collection, error)
- func (srv *Databases) UpdateDatetimeAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeDatetime, error)
- func (srv *Databases) UpdateDocument(DatabaseId string, CollectionId string, DocumentId string, ...) (*models.Document, error)
- func (srv *Databases) UpdateEmailAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeEmail, error)
- func (srv *Databases) UpdateEnumAttribute(DatabaseId string, CollectionId string, Key string, Elements []interface{}, ...) (*models.AttributeEnum, error)
- func (srv *Databases) UpdateFloatAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Min float64, ...) (*models.AttributeFloat, error)
- func (srv *Databases) UpdateIntegerAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Min int, ...) (*models.AttributeInteger, error)
- func (srv *Databases) UpdateIpAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeIp, error)
- func (srv *Databases) UpdateRelationshipAttribute(DatabaseId string, CollectionId string, Key string, ...) (*models.AttributeRelationship, error)
- func (srv *Databases) UpdateStringAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeString, error)
- func (srv *Databases) UpdateUrlAttribute(DatabaseId string, CollectionId string, Key string, Required bool, ...) (*models.AttributeUrl, error)
- type GetDocumentOption
- type GetDocumentOptions
- type ListAttributesOption
- type ListAttributesOptions
- type ListCollectionsOption
- type ListCollectionsOptions
- type ListDocumentsOption
- type ListDocumentsOptions
- type ListIndexesOption
- type ListIndexesOptions
- type ListOption
- type ListOptions
- type UpdateCollectionOption
- type UpdateCollectionOptions
- type UpdateDocumentOption
- type UpdateDocumentOptions
- type UpdateOption
- type UpdateOptions
- type UpdateRelationshipAttributeOption
- type UpdateRelationshipAttributeOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateBooleanAttributeOption ¶
type CreateBooleanAttributeOption func(*CreateBooleanAttributeOptions)
func WithCreateBooleanAttributeArray ¶
func WithCreateBooleanAttributeArray(v bool) CreateBooleanAttributeOption
func WithCreateBooleanAttributeDefault ¶
func WithCreateBooleanAttributeDefault(v bool) CreateBooleanAttributeOption
type CreateBooleanAttributeOptions ¶
type CreateBooleanAttributeOptions struct {
Default bool
Array bool
// contains filtered or unexported fields
}
func (CreateBooleanAttributeOptions) New ¶
func (options CreateBooleanAttributeOptions) New() *CreateBooleanAttributeOptions
type CreateCollectionOption ¶
type CreateCollectionOption func(*CreateCollectionOptions)
func WithCreateCollectionDocumentSecurity ¶
func WithCreateCollectionDocumentSecurity(v bool) CreateCollectionOption
func WithCreateCollectionEnabled ¶
func WithCreateCollectionEnabled(v bool) CreateCollectionOption
func WithCreateCollectionPermissions ¶
func WithCreateCollectionPermissions(v []interface{}) CreateCollectionOption
type CreateCollectionOptions ¶
type CreateCollectionOptions struct {
Permissions []interface{}
DocumentSecurity bool
Enabled bool
// contains filtered or unexported fields
}
func (CreateCollectionOptions) New ¶
func (options CreateCollectionOptions) New() *CreateCollectionOptions
type CreateDatetimeAttributeOption ¶
type CreateDatetimeAttributeOption func(*CreateDatetimeAttributeOptions)
func WithCreateDatetimeAttributeArray ¶
func WithCreateDatetimeAttributeArray(v bool) CreateDatetimeAttributeOption
func WithCreateDatetimeAttributeDefault ¶
func WithCreateDatetimeAttributeDefault(v string) CreateDatetimeAttributeOption
type CreateDatetimeAttributeOptions ¶
type CreateDatetimeAttributeOptions struct {
Default string
Array bool
// contains filtered or unexported fields
}
func (CreateDatetimeAttributeOptions) New ¶
func (options CreateDatetimeAttributeOptions) New() *CreateDatetimeAttributeOptions
type CreateDocumentOption ¶
type CreateDocumentOption func(*CreateDocumentOptions)
func WithCreateDocumentPermissions ¶
func WithCreateDocumentPermissions(v []interface{}) CreateDocumentOption
type CreateDocumentOptions ¶
type CreateDocumentOptions struct {
Permissions []interface{}
// contains filtered or unexported fields
}
func (CreateDocumentOptions) New ¶
func (options CreateDocumentOptions) New() *CreateDocumentOptions
type CreateEmailAttributeOption ¶
type CreateEmailAttributeOption func(*CreateEmailAttributeOptions)
func WithCreateEmailAttributeArray ¶
func WithCreateEmailAttributeArray(v bool) CreateEmailAttributeOption
func WithCreateEmailAttributeDefault ¶
func WithCreateEmailAttributeDefault(v string) CreateEmailAttributeOption
type CreateEmailAttributeOptions ¶
type CreateEmailAttributeOptions struct {
Default string
Array bool
// contains filtered or unexported fields
}
func (CreateEmailAttributeOptions) New ¶
func (options CreateEmailAttributeOptions) New() *CreateEmailAttributeOptions
type CreateEnumAttributeOption ¶
type CreateEnumAttributeOption func(*CreateEnumAttributeOptions)
func WithCreateEnumAttributeArray ¶
func WithCreateEnumAttributeArray(v bool) CreateEnumAttributeOption
func WithCreateEnumAttributeDefault ¶
func WithCreateEnumAttributeDefault(v string) CreateEnumAttributeOption
type CreateEnumAttributeOptions ¶
type CreateEnumAttributeOptions struct {
Default string
Array bool
// contains filtered or unexported fields
}
func (CreateEnumAttributeOptions) New ¶
func (options CreateEnumAttributeOptions) New() *CreateEnumAttributeOptions
type CreateFloatAttributeOption ¶
type CreateFloatAttributeOption func(*CreateFloatAttributeOptions)
func WithCreateFloatAttributeArray ¶
func WithCreateFloatAttributeArray(v bool) CreateFloatAttributeOption
func WithCreateFloatAttributeDefault ¶
func WithCreateFloatAttributeDefault(v float64) CreateFloatAttributeOption
func WithCreateFloatAttributeMax ¶
func WithCreateFloatAttributeMax(v float64) CreateFloatAttributeOption
func WithCreateFloatAttributeMin ¶
func WithCreateFloatAttributeMin(v float64) CreateFloatAttributeOption
type CreateFloatAttributeOptions ¶
type CreateFloatAttributeOptions struct {
Min float64
Max float64
Default float64
Array bool
// contains filtered or unexported fields
}
func (CreateFloatAttributeOptions) New ¶
func (options CreateFloatAttributeOptions) New() *CreateFloatAttributeOptions
type CreateIndexOption ¶
type CreateIndexOption func(*CreateIndexOptions)
func WithCreateIndexOrders ¶
func WithCreateIndexOrders(v []interface{}) CreateIndexOption
type CreateIndexOptions ¶
type CreateIndexOptions struct {
Orders []interface{}
// contains filtered or unexported fields
}
func (CreateIndexOptions) New ¶
func (options CreateIndexOptions) New() *CreateIndexOptions
type CreateIntegerAttributeOption ¶
type CreateIntegerAttributeOption func(*CreateIntegerAttributeOptions)
func WithCreateIntegerAttributeArray ¶
func WithCreateIntegerAttributeArray(v bool) CreateIntegerAttributeOption
func WithCreateIntegerAttributeDefault ¶
func WithCreateIntegerAttributeDefault(v int) CreateIntegerAttributeOption
func WithCreateIntegerAttributeMax ¶
func WithCreateIntegerAttributeMax(v int) CreateIntegerAttributeOption
func WithCreateIntegerAttributeMin ¶
func WithCreateIntegerAttributeMin(v int) CreateIntegerAttributeOption
type CreateIntegerAttributeOptions ¶
type CreateIntegerAttributeOptions struct {
Min int
Max int
Default int
Array bool
// contains filtered or unexported fields
}
func (CreateIntegerAttributeOptions) New ¶
func (options CreateIntegerAttributeOptions) New() *CreateIntegerAttributeOptions
type CreateIpAttributeOption ¶
type CreateIpAttributeOption func(*CreateIpAttributeOptions)
func WithCreateIpAttributeArray ¶
func WithCreateIpAttributeArray(v bool) CreateIpAttributeOption
func WithCreateIpAttributeDefault ¶
func WithCreateIpAttributeDefault(v string) CreateIpAttributeOption
type CreateIpAttributeOptions ¶
type CreateIpAttributeOptions struct {
Default string
Array bool
// contains filtered or unexported fields
}
func (CreateIpAttributeOptions) New ¶
func (options CreateIpAttributeOptions) New() *CreateIpAttributeOptions
type CreateOption ¶
type CreateOption func(*CreateOptions)
func WithCreateEnabled ¶
func WithCreateEnabled(v bool) CreateOption
type CreateOptions ¶
type CreateOptions struct {
Enabled bool
// contains filtered or unexported fields
}
func (CreateOptions) New ¶
func (options CreateOptions) New() *CreateOptions
type CreateRelationshipAttributeOption ¶
type CreateRelationshipAttributeOption func(*CreateRelationshipAttributeOptions)
func WithCreateRelationshipAttributeKey ¶
func WithCreateRelationshipAttributeKey(v string) CreateRelationshipAttributeOption
func WithCreateRelationshipAttributeOnDelete ¶
func WithCreateRelationshipAttributeOnDelete(v string) CreateRelationshipAttributeOption
func WithCreateRelationshipAttributeTwoWay ¶
func WithCreateRelationshipAttributeTwoWay(v bool) CreateRelationshipAttributeOption
func WithCreateRelationshipAttributeTwoWayKey ¶
func WithCreateRelationshipAttributeTwoWayKey(v string) CreateRelationshipAttributeOption
type CreateRelationshipAttributeOptions ¶
type CreateRelationshipAttributeOptions struct {
TwoWay bool
Key string
TwoWayKey string
OnDelete string
// contains filtered or unexported fields
}
func (CreateRelationshipAttributeOptions) New ¶
func (options CreateRelationshipAttributeOptions) New() *CreateRelationshipAttributeOptions
type CreateStringAttributeOption ¶
type CreateStringAttributeOption func(*CreateStringAttributeOptions)
func WithCreateStringAttributeArray ¶
func WithCreateStringAttributeArray(v bool) CreateStringAttributeOption
func WithCreateStringAttributeDefault ¶
func WithCreateStringAttributeDefault(v string) CreateStringAttributeOption
func WithCreateStringAttributeEncrypt ¶
func WithCreateStringAttributeEncrypt(v bool) CreateStringAttributeOption
type CreateStringAttributeOptions ¶
type CreateStringAttributeOptions struct {
Default string
Array bool
Encrypt bool
// contains filtered or unexported fields
}
func (CreateStringAttributeOptions) New ¶
func (options CreateStringAttributeOptions) New() *CreateStringAttributeOptions
type CreateUrlAttributeOption ¶
type CreateUrlAttributeOption func(*CreateUrlAttributeOptions)
func WithCreateUrlAttributeArray ¶
func WithCreateUrlAttributeArray(v bool) CreateUrlAttributeOption
func WithCreateUrlAttributeDefault ¶
func WithCreateUrlAttributeDefault(v string) CreateUrlAttributeOption
type CreateUrlAttributeOptions ¶
type CreateUrlAttributeOptions struct {
Default string
Array bool
// contains filtered or unexported fields
}
func (CreateUrlAttributeOptions) New ¶
func (options CreateUrlAttributeOptions) New() *CreateUrlAttributeOptions
type Databases ¶
type Databases struct {
// contains filtered or unexported fields
}
Databases service
func NewDatabases ¶
func (*Databases) Create ¶
func (srv *Databases) Create(DatabaseId string, Name string, optionalSetters ...CreateOption) (*models.Database, error)
Create create a new Database.
func (*Databases) CreateBooleanAttribute ¶
func (srv *Databases) CreateBooleanAttribute(DatabaseId string, CollectionId string, Key string, Required bool, optionalSetters ...CreateBooleanAttributeOption) (*models.AttributeBoolean, error)
CreateBooleanAttribute create a boolean attribute.
func (*Databases) CreateCollection ¶
func (srv *Databases) CreateCollection(DatabaseId string, CollectionId string, Name string, optionalSetters ...CreateCollectionOption) (*models.Collection, error)
CreateCollection create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
func (*Databases) CreateDatetimeAttribute ¶
func (srv *Databases) CreateDatetimeAttribute(DatabaseId string, CollectionId string, Key string, Required bool, optionalSetters ...CreateDatetimeAttributeOption) (*models.AttributeDatetime, error)
CreateDatetimeAttribute create a date time attribute according to the ISO 8601 standard.
func (*Databases) CreateDocument ¶
func (srv *Databases) CreateDocument(DatabaseId string, CollectionId string, DocumentId string, Data interface{}, optionalSetters ...CreateDocumentOption) (*models.Document, error)
CreateDocument create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
func (*Databases) CreateEmailAttribute ¶
func (srv *Databases) CreateEmailAttribute(DatabaseId string, CollectionId string, Key string, Required bool, optionalSetters ...CreateEmailAttributeOption) (*models.AttributeEmail, error)
CreateEmailAttribute create an email attribute.
func (*Databases) CreateEnumAttribute ¶
func (srv *Databases) CreateEnumAttribute(DatabaseId string, CollectionId string, Key string, Elements []interface{}, Required bool, optionalSetters ...CreateEnumAttributeOption) (*models.AttributeEnum, error)
CreateEnumAttribute create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
func (*Databases) CreateFloatAttribute ¶
func (srv *Databases) CreateFloatAttribute(DatabaseId string, CollectionId string, Key string, Required bool, optionalSetters ...CreateFloatAttributeOption) (*models.AttributeFloat, error)
CreateFloatAttribute create a float attribute. Optionally, minimum and maximum values can be provided.
func (*Databases) CreateIndex ¶
func (srv *Databases) CreateIndex(DatabaseId string, CollectionId string, Key string, Type string, Attributes []interface{}, optionalSetters ...CreateIndexOption) (*models.Index, error)
CreateIndex creates an index on the attributes listed. Your index should include all the attributes you will query in a single request. Attributes can be `key`, `fulltext`, and `unique`.
func (*Databases) CreateIntegerAttribute ¶
func (srv *Databases) CreateIntegerAttribute(DatabaseId string, CollectionId string, Key string, Required bool, optionalSetters ...CreateIntegerAttributeOption) (*models.AttributeInteger, error)
CreateIntegerAttribute create an integer attribute. Optionally, minimum and maximum values can be provided.
func (*Databases) CreateIpAttribute ¶
func (srv *Databases) CreateIpAttribute(DatabaseId string, CollectionId string, Key string, Required bool, optionalSetters ...CreateIpAttributeOption) (*models.AttributeIp, error)
CreateIpAttribute create IP address attribute.
func (*Databases) CreateRelationshipAttribute ¶
func (srv *Databases) CreateRelationshipAttribute(DatabaseId string, CollectionId string, RelatedCollectionId string, Type string, optionalSetters ...CreateRelationshipAttributeOption) (*models.AttributeRelationship, error)
CreateRelationshipAttribute create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
func (*Databases) CreateStringAttribute ¶
func (srv *Databases) CreateStringAttribute(DatabaseId string, CollectionId string, Key string, Size int, Required bool, optionalSetters ...CreateStringAttributeOption) (*models.AttributeString, error)
CreateStringAttribute create a string attribute.
func (*Databases) CreateUrlAttribute ¶
func (srv *Databases) CreateUrlAttribute(DatabaseId string, CollectionId string, Key string, Required bool, optionalSetters ...CreateUrlAttributeOption) (*models.AttributeUrl, error)
CreateUrlAttribute create a URL attribute.
func (*Databases) Delete ¶
Delete delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
func (*Databases) DeleteAttribute ¶
func (srv *Databases) DeleteAttribute(DatabaseId string, CollectionId string, Key string) (*interface{}, error)
DeleteAttribute deletes an attribute.
func (*Databases) DeleteCollection ¶
func (srv *Databases) DeleteCollection(DatabaseId string, CollectionId string) (*interface{}, error)
DeleteCollection delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
func (*Databases) DeleteDocument ¶
func (srv *Databases) DeleteDocument(DatabaseId string, CollectionId string, DocumentId string) (*interface{}, error)
DeleteDocument delete a document by its unique ID.
func (*Databases) DeleteIndex ¶
func (srv *Databases) DeleteIndex(DatabaseId string, CollectionId string, Key string) (*interface{}, error)
DeleteIndex delete an index.
func (*Databases) Get ¶
Get get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
func (*Databases) GetAttribute ¶
func (srv *Databases) GetAttribute(DatabaseId string, CollectionId string, Key string) (*interface{}, error)
GetAttribute get attribute by ID.
func (*Databases) GetCollection ¶
func (srv *Databases) GetCollection(DatabaseId string, CollectionId string) (*models.Collection, error)
GetCollection get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
func (*Databases) GetDocument ¶
func (srv *Databases) GetDocument(DatabaseId string, CollectionId string, DocumentId string, optionalSetters ...GetDocumentOption) (*models.Document, error)
GetDocument get a document by its unique ID. This endpoint response returns a JSON object with the document data.
func (*Databases) GetIndex ¶
func (srv *Databases) GetIndex(DatabaseId string, CollectionId string, Key string) (*models.Index, error)
GetIndex get index by ID.
func (*Databases) List ¶
func (srv *Databases) List(optionalSetters ...ListOption) (*models.DatabaseList, error)
List get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
func (*Databases) ListAttributes ¶
func (srv *Databases) ListAttributes(DatabaseId string, CollectionId string, optionalSetters ...ListAttributesOption) (*models.AttributeList, error)
ListAttributes list attributes in the collection.
func (*Databases) ListCollections ¶
func (srv *Databases) ListCollections(DatabaseId string, optionalSetters ...ListCollectionsOption) (*models.CollectionList, error)
ListCollections get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
func (*Databases) ListDocuments ¶
func (srv *Databases) ListDocuments(DatabaseId string, CollectionId string, optionalSetters ...ListDocumentsOption) (*models.DocumentList, error)
ListDocuments get a list of all the user's documents in a given collection. You can use the query params to filter your results.
func (*Databases) ListIndexes ¶
func (srv *Databases) ListIndexes(DatabaseId string, CollectionId string, optionalSetters ...ListIndexesOption) (*models.IndexList, error)
ListIndexes list indexes in the collection.
func (*Databases) Update ¶
func (srv *Databases) Update(DatabaseId string, Name string, optionalSetters ...UpdateOption) (*models.Database, error)
Update update a database by its unique ID.
func (*Databases) UpdateBooleanAttribute ¶
func (srv *Databases) UpdateBooleanAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default bool) (*models.AttributeBoolean, error)
UpdateBooleanAttribute update a boolean attribute. Changing the `default` value will not update already existing documents.
func (*Databases) UpdateCollection ¶
func (srv *Databases) UpdateCollection(DatabaseId string, CollectionId string, Name string, optionalSetters ...UpdateCollectionOption) (*models.Collection, error)
UpdateCollection update a collection by its unique ID.
func (*Databases) UpdateDatetimeAttribute ¶
func (srv *Databases) UpdateDatetimeAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string) (*models.AttributeDatetime, error)
UpdateDatetimeAttribute update a date time attribute. Changing the `default` value will not update already existing documents.
func (*Databases) UpdateDocument ¶
func (srv *Databases) UpdateDocument(DatabaseId string, CollectionId string, DocumentId string, optionalSetters ...UpdateDocumentOption) (*models.Document, error)
UpdateDocument update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
func (*Databases) UpdateEmailAttribute ¶
func (srv *Databases) UpdateEmailAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string) (*models.AttributeEmail, error)
UpdateEmailAttribute update an email attribute. Changing the `default` value will not update already existing documents.
func (*Databases) UpdateEnumAttribute ¶
func (srv *Databases) UpdateEnumAttribute(DatabaseId string, CollectionId string, Key string, Elements []interface{}, Required bool, Default string) (*models.AttributeEnum, error)
UpdateEnumAttribute update an enum attribute. Changing the `default` value will not update already existing documents.
func (*Databases) UpdateFloatAttribute ¶
func (srv *Databases) UpdateFloatAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Min float64, Max float64, Default float64) (*models.AttributeFloat, error)
UpdateFloatAttribute update a float attribute. Changing the `default` value will not update already existing documents.
func (*Databases) UpdateIntegerAttribute ¶
func (srv *Databases) UpdateIntegerAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Min int, Max int, Default int) (*models.AttributeInteger, error)
UpdateIntegerAttribute update an integer attribute. Changing the `default` value will not update already existing documents.
func (*Databases) UpdateIpAttribute ¶
func (srv *Databases) UpdateIpAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string) (*models.AttributeIp, error)
UpdateIpAttribute update an ip attribute. Changing the `default` value will not update already existing documents.
func (*Databases) UpdateRelationshipAttribute ¶
func (srv *Databases) UpdateRelationshipAttribute(DatabaseId string, CollectionId string, Key string, optionalSetters ...UpdateRelationshipAttributeOption) (*models.AttributeRelationship, error)
UpdateRelationshipAttribute update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
func (*Databases) UpdateStringAttribute ¶
func (srv *Databases) UpdateStringAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string) (*models.AttributeString, error)
UpdateStringAttribute update a string attribute. Changing the `default` value will not update already existing documents.
func (*Databases) UpdateUrlAttribute ¶
func (srv *Databases) UpdateUrlAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string) (*models.AttributeUrl, error)
UpdateUrlAttribute update an url attribute. Changing the `default` value will not update already existing documents.
type GetDocumentOption ¶
type GetDocumentOption func(*GetDocumentOptions)
func WithGetDocumentQueries ¶
func WithGetDocumentQueries(v []interface{}) GetDocumentOption
type GetDocumentOptions ¶
type GetDocumentOptions struct {
Queries []interface{}
// contains filtered or unexported fields
}
func (GetDocumentOptions) New ¶
func (options GetDocumentOptions) New() *GetDocumentOptions
type ListAttributesOption ¶
type ListAttributesOption func(*ListAttributesOptions)
func WithListAttributesQueries ¶
func WithListAttributesQueries(v []interface{}) ListAttributesOption
type ListAttributesOptions ¶
type ListAttributesOptions struct {
Queries []interface{}
// contains filtered or unexported fields
}
func (ListAttributesOptions) New ¶
func (options ListAttributesOptions) New() *ListAttributesOptions
type ListCollectionsOption ¶
type ListCollectionsOption func(*ListCollectionsOptions)
func WithListCollectionsQueries ¶
func WithListCollectionsQueries(v []interface{}) ListCollectionsOption
func WithListCollectionsSearch ¶
func WithListCollectionsSearch(v string) ListCollectionsOption
type ListCollectionsOptions ¶
type ListCollectionsOptions struct {
Queries []interface{}
Search string
// contains filtered or unexported fields
}
func (ListCollectionsOptions) New ¶
func (options ListCollectionsOptions) New() *ListCollectionsOptions
type ListDocumentsOption ¶
type ListDocumentsOption func(*ListDocumentsOptions)
func WithListDocumentsQueries ¶
func WithListDocumentsQueries(v []interface{}) ListDocumentsOption
type ListDocumentsOptions ¶
type ListDocumentsOptions struct {
Queries []interface{}
// contains filtered or unexported fields
}
func (ListDocumentsOptions) New ¶
func (options ListDocumentsOptions) New() *ListDocumentsOptions
type ListIndexesOption ¶
type ListIndexesOption func(*ListIndexesOptions)
func WithListIndexesQueries ¶
func WithListIndexesQueries(v []interface{}) ListIndexesOption
type ListIndexesOptions ¶
type ListIndexesOptions struct {
Queries []interface{}
// contains filtered or unexported fields
}
func (ListIndexesOptions) New ¶
func (options ListIndexesOptions) New() *ListIndexesOptions
type ListOption ¶
type ListOption func(*ListOptions)
func WithListQueries ¶
func WithListQueries(v []interface{}) ListOption
func WithListSearch ¶
func WithListSearch(v string) ListOption
type ListOptions ¶
type ListOptions struct {
Queries []interface{}
Search string
// contains filtered or unexported fields
}
func (ListOptions) New ¶
func (options ListOptions) New() *ListOptions
type UpdateCollectionOption ¶
type UpdateCollectionOption func(*UpdateCollectionOptions)
func WithUpdateCollectionDocumentSecurity ¶
func WithUpdateCollectionDocumentSecurity(v bool) UpdateCollectionOption
func WithUpdateCollectionEnabled ¶
func WithUpdateCollectionEnabled(v bool) UpdateCollectionOption
func WithUpdateCollectionPermissions ¶
func WithUpdateCollectionPermissions(v []interface{}) UpdateCollectionOption
type UpdateCollectionOptions ¶
type UpdateCollectionOptions struct {
Permissions []interface{}
DocumentSecurity bool
Enabled bool
// contains filtered or unexported fields
}
func (UpdateCollectionOptions) New ¶
func (options UpdateCollectionOptions) New() *UpdateCollectionOptions
type UpdateDocumentOption ¶
type UpdateDocumentOption func(*UpdateDocumentOptions)
func WithUpdateDocumentData ¶
func WithUpdateDocumentData(v interface{}) UpdateDocumentOption
func WithUpdateDocumentPermissions ¶
func WithUpdateDocumentPermissions(v []interface{}) UpdateDocumentOption
type UpdateDocumentOptions ¶
type UpdateDocumentOptions struct {
Data interface{}
Permissions []interface{}
// contains filtered or unexported fields
}
func (UpdateDocumentOptions) New ¶
func (options UpdateDocumentOptions) New() *UpdateDocumentOptions
type UpdateOption ¶
type UpdateOption func(*UpdateOptions)
func WithUpdateEnabled ¶
func WithUpdateEnabled(v bool) UpdateOption
type UpdateOptions ¶
type UpdateOptions struct {
Enabled bool
// contains filtered or unexported fields
}
func (UpdateOptions) New ¶
func (options UpdateOptions) New() *UpdateOptions
type UpdateRelationshipAttributeOption ¶
type UpdateRelationshipAttributeOption func(*UpdateRelationshipAttributeOptions)
func WithUpdateRelationshipAttributeOnDelete ¶
func WithUpdateRelationshipAttributeOnDelete(v string) UpdateRelationshipAttributeOption
type UpdateRelationshipAttributeOptions ¶
type UpdateRelationshipAttributeOptions struct {
OnDelete string
// contains filtered or unexported fields
}
func (UpdateRelationshipAttributeOptions) New ¶
func (options UpdateRelationshipAttributeOptions) New() *UpdateRelationshipAttributeOptions