Documentation
¶
Index ¶
- type CreateBuildOption
- type CreateBuildOptions
- type CreateDeploymentOption
- type CreateDeploymentOptions
- type CreateExecutionOption
- func WithCreateExecutionAsync(v bool) CreateExecutionOption
- func WithCreateExecutionBody(v string) CreateExecutionOption
- func WithCreateExecutionHeaders(v interface{}) CreateExecutionOption
- func WithCreateExecutionMethod(v string) CreateExecutionOption
- func WithCreateExecutionPath(v string) CreateExecutionOption
- func WithCreateExecutionScheduledAt(v string) CreateExecutionOption
- type CreateExecutionOptions
- type CreateOption
- func WithCreateCommands(v string) CreateOption
- func WithCreateEnabled(v bool) CreateOption
- func WithCreateEntrypoint(v string) CreateOption
- func WithCreateEvents(v []interface{}) CreateOption
- func WithCreateExecute(v []interface{}) CreateOption
- func WithCreateInstallationId(v string) CreateOption
- func WithCreateLogging(v bool) CreateOption
- func WithCreateProviderBranch(v string) CreateOption
- func WithCreateProviderRepositoryId(v string) CreateOption
- func WithCreateProviderRootDirectory(v string) CreateOption
- func WithCreateProviderSilentMode(v bool) CreateOption
- func WithCreateSchedule(v string) CreateOption
- func WithCreateScopes(v []interface{}) CreateOption
- func WithCreateTemplateBranch(v string) CreateOption
- func WithCreateTemplateOwner(v string) CreateOption
- func WithCreateTemplateRepository(v string) CreateOption
- func WithCreateTemplateRootDirectory(v string) CreateOption
- func WithCreateTimeout(v int) CreateOption
- type CreateOptions
- type Functions
- func (srv *Functions) Create(FunctionId string, Name string, Runtime string, ...) (*models.Function, error)
- func (srv *Functions) CreateBuild(FunctionId string, DeploymentId string, optionalSetters ...CreateBuildOption) (*interface{}, error)
- func (srv *Functions) CreateDeployment(FunctionId string, Code file.InputFile, Activate bool, ...) (*models.Deployment, error)
- func (srv *Functions) CreateExecution(FunctionId string, optionalSetters ...CreateExecutionOption) (*models.Execution, error)
- func (srv *Functions) CreateVariable(FunctionId string, Key string, Value string) (*models.Variable, error)
- func (srv *Functions) Delete(FunctionId string) (*interface{}, error)
- func (srv *Functions) DeleteDeployment(FunctionId string, DeploymentId string) (*interface{}, error)
- func (srv *Functions) DeleteExecution(FunctionId string, ExecutionId string) (*interface{}, error)
- func (srv *Functions) DeleteVariable(FunctionId string, VariableId string) (*interface{}, error)
- func (srv *Functions) DownloadDeployment(FunctionId string, DeploymentId string) (*[]byte, error)
- func (srv *Functions) Get(FunctionId string) (*models.Function, error)
- func (srv *Functions) GetDeployment(FunctionId string, DeploymentId string) (*models.Deployment, error)
- func (srv *Functions) GetExecution(FunctionId string, ExecutionId string) (*models.Execution, error)
- func (srv *Functions) GetVariable(FunctionId string, VariableId string) (*models.Variable, error)
- func (srv *Functions) List(optionalSetters ...ListOption) (*models.FunctionList, error)
- func (srv *Functions) ListDeployments(FunctionId string, optionalSetters ...ListDeploymentsOption) (*models.DeploymentList, error)
- func (srv *Functions) ListExecutions(FunctionId string, optionalSetters ...ListExecutionsOption) (*models.ExecutionList, error)
- func (srv *Functions) ListRuntimes() (*models.RuntimeList, error)
- func (srv *Functions) ListVariables(FunctionId string) (*models.VariableList, error)
- func (srv *Functions) Update(FunctionId string, Name string, optionalSetters ...UpdateOption) (*models.Function, error)
- func (srv *Functions) UpdateDeployment(FunctionId string, DeploymentId string) (*models.Function, error)
- func (srv *Functions) UpdateDeploymentBuild(FunctionId string, DeploymentId string) (*models.Build, error)
- func (srv *Functions) UpdateVariable(FunctionId string, VariableId string, Key string, ...) (*models.Variable, error)
- type ListDeploymentsOption
- type ListDeploymentsOptions
- type ListExecutionsOption
- type ListExecutionsOptions
- type ListOption
- type ListOptions
- type UpdateOption
- func WithUpdateCommands(v string) UpdateOption
- func WithUpdateEnabled(v bool) UpdateOption
- func WithUpdateEntrypoint(v string) UpdateOption
- func WithUpdateEvents(v []interface{}) UpdateOption
- func WithUpdateExecute(v []interface{}) UpdateOption
- func WithUpdateInstallationId(v string) UpdateOption
- func WithUpdateLogging(v bool) UpdateOption
- func WithUpdateProviderBranch(v string) UpdateOption
- func WithUpdateProviderRepositoryId(v string) UpdateOption
- func WithUpdateProviderRootDirectory(v string) UpdateOption
- func WithUpdateProviderSilentMode(v bool) UpdateOption
- func WithUpdateRuntime(v string) UpdateOption
- func WithUpdateSchedule(v string) UpdateOption
- func WithUpdateScopes(v []interface{}) UpdateOption
- func WithUpdateTimeout(v int) UpdateOption
- type UpdateOptions
- type UpdateVariableOption
- type UpdateVariableOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateBuildOption ¶
type CreateBuildOption func(*CreateBuildOptions)
func WithCreateBuildBuildId ¶
func WithCreateBuildBuildId(v string) CreateBuildOption
type CreateBuildOptions ¶
type CreateBuildOptions struct {
BuildId string
// contains filtered or unexported fields
}
func (CreateBuildOptions) New ¶
func (options CreateBuildOptions) New() *CreateBuildOptions
type CreateDeploymentOption ¶
type CreateDeploymentOption func(*CreateDeploymentOptions)
func WithCreateDeploymentCommands ¶
func WithCreateDeploymentCommands(v string) CreateDeploymentOption
func WithCreateDeploymentEntrypoint ¶
func WithCreateDeploymentEntrypoint(v string) CreateDeploymentOption
type CreateDeploymentOptions ¶
type CreateDeploymentOptions struct {
Entrypoint string
Commands string
// contains filtered or unexported fields
}
func (CreateDeploymentOptions) New ¶
func (options CreateDeploymentOptions) New() *CreateDeploymentOptions
type CreateExecutionOption ¶
type CreateExecutionOption func(*CreateExecutionOptions)
func WithCreateExecutionAsync ¶
func WithCreateExecutionAsync(v bool) CreateExecutionOption
func WithCreateExecutionBody ¶
func WithCreateExecutionBody(v string) CreateExecutionOption
func WithCreateExecutionHeaders ¶
func WithCreateExecutionHeaders(v interface{}) CreateExecutionOption
func WithCreateExecutionMethod ¶
func WithCreateExecutionMethod(v string) CreateExecutionOption
func WithCreateExecutionPath ¶
func WithCreateExecutionPath(v string) CreateExecutionOption
func WithCreateExecutionScheduledAt ¶
func WithCreateExecutionScheduledAt(v string) CreateExecutionOption
type CreateExecutionOptions ¶
type CreateExecutionOptions struct {
Body string
Async bool
Path string
Method string
Headers interface{}
ScheduledAt string
// contains filtered or unexported fields
}
func (CreateExecutionOptions) New ¶
func (options CreateExecutionOptions) New() *CreateExecutionOptions
type CreateOption ¶
type CreateOption func(*CreateOptions)
func WithCreateCommands ¶
func WithCreateCommands(v string) CreateOption
func WithCreateEnabled ¶
func WithCreateEnabled(v bool) CreateOption
func WithCreateEntrypoint ¶
func WithCreateEntrypoint(v string) CreateOption
func WithCreateEvents ¶
func WithCreateEvents(v []interface{}) CreateOption
func WithCreateExecute ¶
func WithCreateExecute(v []interface{}) CreateOption
func WithCreateInstallationId ¶
func WithCreateInstallationId(v string) CreateOption
func WithCreateLogging ¶
func WithCreateLogging(v bool) CreateOption
func WithCreateProviderBranch ¶
func WithCreateProviderBranch(v string) CreateOption
func WithCreateProviderRepositoryId ¶
func WithCreateProviderRepositoryId(v string) CreateOption
func WithCreateProviderRootDirectory ¶
func WithCreateProviderRootDirectory(v string) CreateOption
func WithCreateProviderSilentMode ¶
func WithCreateProviderSilentMode(v bool) CreateOption
func WithCreateSchedule ¶
func WithCreateSchedule(v string) CreateOption
func WithCreateScopes ¶
func WithCreateScopes(v []interface{}) CreateOption
func WithCreateTemplateBranch ¶
func WithCreateTemplateBranch(v string) CreateOption
func WithCreateTemplateOwner ¶
func WithCreateTemplateOwner(v string) CreateOption
func WithCreateTemplateRepository ¶
func WithCreateTemplateRepository(v string) CreateOption
func WithCreateTemplateRootDirectory ¶
func WithCreateTemplateRootDirectory(v string) CreateOption
func WithCreateTimeout ¶
func WithCreateTimeout(v int) CreateOption
type CreateOptions ¶
type CreateOptions struct {
Execute []interface{}
Events []interface{}
Schedule string
Timeout int
Enabled bool
Logging bool
Entrypoint string
Commands string
Scopes []interface{}
InstallationId string
ProviderRepositoryId string
ProviderBranch string
ProviderSilentMode bool
ProviderRootDirectory string
TemplateRepository string
TemplateOwner string
TemplateRootDirectory string
TemplateBranch string
// contains filtered or unexported fields
}
func (CreateOptions) New ¶
func (options CreateOptions) New() *CreateOptions
type Functions ¶
type Functions struct {
// contains filtered or unexported fields
}
Functions service
func NewFunctions ¶
func (*Functions) Create ¶
func (srv *Functions) Create(FunctionId string, Name string, Runtime string, optionalSetters ...CreateOption) (*models.Function, error)
Create create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
func (*Functions) CreateBuild ¶
func (srv *Functions) CreateBuild(FunctionId string, DeploymentId string, optionalSetters ...CreateBuildOption) (*interface{}, error)
CreateBuild
func (*Functions) CreateDeployment ¶
func (srv *Functions) CreateDeployment(FunctionId string, Code file.InputFile, Activate bool, optionalSetters ...CreateDeploymentOption) (*models.Deployment, error)
CreateDeployment create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
Use the "command" param to set the entrypoint used to execute your code.
func (*Functions) CreateExecution ¶
func (srv *Functions) CreateExecution(FunctionId string, optionalSetters ...CreateExecutionOption) (*models.Execution, error)
CreateExecution trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
func (*Functions) CreateVariable ¶
func (srv *Functions) CreateVariable(FunctionId string, Key string, Value string) (*models.Variable, error)
CreateVariable create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
func (*Functions) DeleteDeployment ¶
func (srv *Functions) DeleteDeployment(FunctionId string, DeploymentId string) (*interface{}, error)
DeleteDeployment delete a code deployment by its unique ID.
func (*Functions) DeleteExecution ¶
DeleteExecution delete a function execution by its unique ID.
func (*Functions) DeleteVariable ¶
DeleteVariable delete a variable by its unique ID.
func (*Functions) DownloadDeployment ¶
DownloadDeployment get a Deployment's contents by its unique ID. This endpoint supports range requests for partial or streaming file download.
func (*Functions) GetDeployment ¶
func (srv *Functions) GetDeployment(FunctionId string, DeploymentId string) (*models.Deployment, error)
GetDeployment get a code deployment by its unique ID.
func (*Functions) GetExecution ¶
func (srv *Functions) GetExecution(FunctionId string, ExecutionId string) (*models.Execution, error)
GetExecution get a function execution log by its unique ID.
func (*Functions) GetVariable ¶
GetVariable get a variable by its unique ID.
func (*Functions) List ¶
func (srv *Functions) List(optionalSetters ...ListOption) (*models.FunctionList, error)
List get a list of all the project's functions. You can use the query params to filter your results.
func (*Functions) ListDeployments ¶
func (srv *Functions) ListDeployments(FunctionId string, optionalSetters ...ListDeploymentsOption) (*models.DeploymentList, error)
ListDeployments get a list of all the project's code deployments. You can use the query params to filter your results.
func (*Functions) ListExecutions ¶
func (srv *Functions) ListExecutions(FunctionId string, optionalSetters ...ListExecutionsOption) (*models.ExecutionList, error)
ListExecutions get a list of all the current user function execution logs. You can use the query params to filter your results.
func (*Functions) ListRuntimes ¶
func (srv *Functions) ListRuntimes() (*models.RuntimeList, error)
ListRuntimes get a list of all runtimes that are currently active on your instance.
func (*Functions) ListVariables ¶
func (srv *Functions) ListVariables(FunctionId string) (*models.VariableList, error)
ListVariables get a list of all variables of a specific function.
func (*Functions) Update ¶
func (srv *Functions) Update(FunctionId string, Name string, optionalSetters ...UpdateOption) (*models.Function, error)
Update update function by its unique ID.
func (*Functions) UpdateDeployment ¶
func (srv *Functions) UpdateDeployment(FunctionId string, DeploymentId string) (*models.Function, error)
UpdateDeployment update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.
func (*Functions) UpdateDeploymentBuild ¶
func (srv *Functions) UpdateDeploymentBuild(FunctionId string, DeploymentId string) (*models.Build, error)
UpdateDeploymentBuild
func (*Functions) UpdateVariable ¶
func (srv *Functions) UpdateVariable(FunctionId string, VariableId string, Key string, optionalSetters ...UpdateVariableOption) (*models.Variable, error)
UpdateVariable update variable by its unique ID.
type ListDeploymentsOption ¶
type ListDeploymentsOption func(*ListDeploymentsOptions)
func WithListDeploymentsQueries ¶
func WithListDeploymentsQueries(v []interface{}) ListDeploymentsOption
func WithListDeploymentsSearch ¶
func WithListDeploymentsSearch(v string) ListDeploymentsOption
type ListDeploymentsOptions ¶
type ListDeploymentsOptions struct {
Queries []interface{}
Search string
// contains filtered or unexported fields
}
func (ListDeploymentsOptions) New ¶
func (options ListDeploymentsOptions) New() *ListDeploymentsOptions
type ListExecutionsOption ¶
type ListExecutionsOption func(*ListExecutionsOptions)
func WithListExecutionsQueries ¶
func WithListExecutionsQueries(v []interface{}) ListExecutionsOption
func WithListExecutionsSearch ¶
func WithListExecutionsSearch(v string) ListExecutionsOption
type ListExecutionsOptions ¶
type ListExecutionsOptions struct {
Queries []interface{}
Search string
// contains filtered or unexported fields
}
func (ListExecutionsOptions) New ¶
func (options ListExecutionsOptions) New() *ListExecutionsOptions
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 UpdateOption ¶
type UpdateOption func(*UpdateOptions)
func WithUpdateCommands ¶
func WithUpdateCommands(v string) UpdateOption
func WithUpdateEnabled ¶
func WithUpdateEnabled(v bool) UpdateOption
func WithUpdateEntrypoint ¶
func WithUpdateEntrypoint(v string) UpdateOption
func WithUpdateEvents ¶
func WithUpdateEvents(v []interface{}) UpdateOption
func WithUpdateExecute ¶
func WithUpdateExecute(v []interface{}) UpdateOption
func WithUpdateInstallationId ¶
func WithUpdateInstallationId(v string) UpdateOption
func WithUpdateLogging ¶
func WithUpdateLogging(v bool) UpdateOption
func WithUpdateProviderBranch ¶
func WithUpdateProviderBranch(v string) UpdateOption
func WithUpdateProviderRepositoryId ¶
func WithUpdateProviderRepositoryId(v string) UpdateOption
func WithUpdateProviderRootDirectory ¶
func WithUpdateProviderRootDirectory(v string) UpdateOption
func WithUpdateProviderSilentMode ¶
func WithUpdateProviderSilentMode(v bool) UpdateOption
func WithUpdateRuntime ¶
func WithUpdateRuntime(v string) UpdateOption
func WithUpdateSchedule ¶
func WithUpdateSchedule(v string) UpdateOption
func WithUpdateScopes ¶
func WithUpdateScopes(v []interface{}) UpdateOption
func WithUpdateTimeout ¶
func WithUpdateTimeout(v int) UpdateOption
type UpdateOptions ¶
type UpdateOptions struct {
Runtime string
Execute []interface{}
Events []interface{}
Schedule string
Timeout int
Enabled bool
Logging bool
Entrypoint string
Commands string
Scopes []interface{}
InstallationId string
ProviderRepositoryId string
ProviderBranch string
ProviderSilentMode bool
ProviderRootDirectory string
// contains filtered or unexported fields
}
func (UpdateOptions) New ¶
func (options UpdateOptions) New() *UpdateOptions
type UpdateVariableOption ¶
type UpdateVariableOption func(*UpdateVariableOptions)
func WithUpdateVariableValue ¶
func WithUpdateVariableValue(v string) UpdateVariableOption
type UpdateVariableOptions ¶
type UpdateVariableOptions struct {
Value string
// contains filtered or unexported fields
}
func (UpdateVariableOptions) New ¶
func (options UpdateVariableOptions) New() *UpdateVariableOptions