Documentation
¶
Index ¶
- type CreateBuildOption
- type CreateBuildOptions
- type CreateDeploymentOption
- type CreateDeploymentOptions
- type CreateExecutionOption
- type CreateExecutionOptions
- type 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)
- func (srv *Functions) WithCreateBuildBuildId(v string) CreateBuildOption
- func (srv *Functions) WithCreateCommands(v string) CreateOption
- func (srv *Functions) WithCreateDeploymentCommands(v string) CreateDeploymentOption
- func (srv *Functions) WithCreateDeploymentEntrypoint(v string) CreateDeploymentOption
- func (srv *Functions) WithCreateEnabled(v bool) CreateOption
- func (srv *Functions) WithCreateEntrypoint(v string) CreateOption
- func (srv *Functions) WithCreateEvents(v []string) CreateOption
- func (srv *Functions) WithCreateExecute(v []string) CreateOption
- func (srv *Functions) WithCreateExecutionAsync(v bool) CreateExecutionOption
- func (srv *Functions) WithCreateExecutionBody(v string) CreateExecutionOption
- func (srv *Functions) WithCreateExecutionHeaders(v interface{}) CreateExecutionOption
- func (srv *Functions) WithCreateExecutionMethod(v string) CreateExecutionOption
- func (srv *Functions) WithCreateExecutionPath(v string) CreateExecutionOption
- func (srv *Functions) WithCreateExecutionScheduledAt(v string) CreateExecutionOption
- func (srv *Functions) WithCreateInstallationId(v string) CreateOption
- func (srv *Functions) WithCreateLogging(v bool) CreateOption
- func (srv *Functions) WithCreateProviderBranch(v string) CreateOption
- func (srv *Functions) WithCreateProviderRepositoryId(v string) CreateOption
- func (srv *Functions) WithCreateProviderRootDirectory(v string) CreateOption
- func (srv *Functions) WithCreateProviderSilentMode(v bool) CreateOption
- func (srv *Functions) WithCreateSchedule(v string) CreateOption
- func (srv *Functions) WithCreateScopes(v []string) CreateOption
- func (srv *Functions) WithCreateTemplateBranch(v string) CreateOption
- func (srv *Functions) WithCreateTemplateOwner(v string) CreateOption
- func (srv *Functions) WithCreateTemplateRepository(v string) CreateOption
- func (srv *Functions) WithCreateTemplateRootDirectory(v string) CreateOption
- func (srv *Functions) WithCreateTimeout(v int) CreateOption
- func (srv *Functions) WithListDeploymentsQueries(v []string) ListDeploymentsOption
- func (srv *Functions) WithListDeploymentsSearch(v string) ListDeploymentsOption
- func (srv *Functions) WithListExecutionsQueries(v []string) ListExecutionsOption
- func (srv *Functions) WithListExecutionsSearch(v string) ListExecutionsOption
- func (srv *Functions) WithListQueries(v []string) ListOption
- func (srv *Functions) WithListSearch(v string) ListOption
- func (srv *Functions) WithUpdateCommands(v string) UpdateOption
- func (srv *Functions) WithUpdateEnabled(v bool) UpdateOption
- func (srv *Functions) WithUpdateEntrypoint(v string) UpdateOption
- func (srv *Functions) WithUpdateEvents(v []string) UpdateOption
- func (srv *Functions) WithUpdateExecute(v []string) UpdateOption
- func (srv *Functions) WithUpdateInstallationId(v string) UpdateOption
- func (srv *Functions) WithUpdateLogging(v bool) UpdateOption
- func (srv *Functions) WithUpdateProviderBranch(v string) UpdateOption
- func (srv *Functions) WithUpdateProviderRepositoryId(v string) UpdateOption
- func (srv *Functions) WithUpdateProviderRootDirectory(v string) UpdateOption
- func (srv *Functions) WithUpdateProviderSilentMode(v bool) UpdateOption
- func (srv *Functions) WithUpdateRuntime(v string) UpdateOption
- func (srv *Functions) WithUpdateSchedule(v string) UpdateOption
- func (srv *Functions) WithUpdateScopes(v []string) UpdateOption
- func (srv *Functions) WithUpdateTimeout(v int) UpdateOption
- func (srv *Functions) WithUpdateVariableValue(v string) UpdateVariableOption
- type ListDeploymentsOption
- type ListDeploymentsOptions
- type ListExecutionsOption
- type ListExecutionsOptions
- type ListOption
- type ListOptions
- type 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)
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)
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)
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)
type CreateOptions ¶
type CreateOptions struct {
Execute []string
Events []string
Schedule string
Timeout int
Enabled bool
Logging bool
Entrypoint string
Commands string
Scopes []string
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 (*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.
func (*Functions) WithCreateBuildBuildId ¶
func (srv *Functions) WithCreateBuildBuildId(v string) CreateBuildOption
func (*Functions) WithCreateCommands ¶
func (srv *Functions) WithCreateCommands(v string) CreateOption
func (*Functions) WithCreateDeploymentCommands ¶
func (srv *Functions) WithCreateDeploymentCommands(v string) CreateDeploymentOption
func (*Functions) WithCreateDeploymentEntrypoint ¶
func (srv *Functions) WithCreateDeploymentEntrypoint(v string) CreateDeploymentOption
func (*Functions) WithCreateEnabled ¶
func (srv *Functions) WithCreateEnabled(v bool) CreateOption
func (*Functions) WithCreateEntrypoint ¶
func (srv *Functions) WithCreateEntrypoint(v string) CreateOption
func (*Functions) WithCreateEvents ¶
func (srv *Functions) WithCreateEvents(v []string) CreateOption
func (*Functions) WithCreateExecute ¶
func (srv *Functions) WithCreateExecute(v []string) CreateOption
func (*Functions) WithCreateExecutionAsync ¶
func (srv *Functions) WithCreateExecutionAsync(v bool) CreateExecutionOption
func (*Functions) WithCreateExecutionBody ¶
func (srv *Functions) WithCreateExecutionBody(v string) CreateExecutionOption
func (*Functions) WithCreateExecutionHeaders ¶
func (srv *Functions) WithCreateExecutionHeaders(v interface{}) CreateExecutionOption
func (*Functions) WithCreateExecutionMethod ¶
func (srv *Functions) WithCreateExecutionMethod(v string) CreateExecutionOption
func (*Functions) WithCreateExecutionPath ¶
func (srv *Functions) WithCreateExecutionPath(v string) CreateExecutionOption
func (*Functions) WithCreateExecutionScheduledAt ¶
func (srv *Functions) WithCreateExecutionScheduledAt(v string) CreateExecutionOption
func (*Functions) WithCreateInstallationId ¶
func (srv *Functions) WithCreateInstallationId(v string) CreateOption
func (*Functions) WithCreateLogging ¶
func (srv *Functions) WithCreateLogging(v bool) CreateOption
func (*Functions) WithCreateProviderBranch ¶
func (srv *Functions) WithCreateProviderBranch(v string) CreateOption
func (*Functions) WithCreateProviderRepositoryId ¶
func (srv *Functions) WithCreateProviderRepositoryId(v string) CreateOption
func (*Functions) WithCreateProviderRootDirectory ¶
func (srv *Functions) WithCreateProviderRootDirectory(v string) CreateOption
func (*Functions) WithCreateProviderSilentMode ¶
func (srv *Functions) WithCreateProviderSilentMode(v bool) CreateOption
func (*Functions) WithCreateSchedule ¶
func (srv *Functions) WithCreateSchedule(v string) CreateOption
func (*Functions) WithCreateScopes ¶
func (srv *Functions) WithCreateScopes(v []string) CreateOption
func (*Functions) WithCreateTemplateBranch ¶
func (srv *Functions) WithCreateTemplateBranch(v string) CreateOption
func (*Functions) WithCreateTemplateOwner ¶
func (srv *Functions) WithCreateTemplateOwner(v string) CreateOption
func (*Functions) WithCreateTemplateRepository ¶
func (srv *Functions) WithCreateTemplateRepository(v string) CreateOption
func (*Functions) WithCreateTemplateRootDirectory ¶
func (srv *Functions) WithCreateTemplateRootDirectory(v string) CreateOption
func (*Functions) WithCreateTimeout ¶
func (srv *Functions) WithCreateTimeout(v int) CreateOption
func (*Functions) WithListDeploymentsQueries ¶
func (srv *Functions) WithListDeploymentsQueries(v []string) ListDeploymentsOption
func (*Functions) WithListDeploymentsSearch ¶
func (srv *Functions) WithListDeploymentsSearch(v string) ListDeploymentsOption
func (*Functions) WithListExecutionsQueries ¶
func (srv *Functions) WithListExecutionsQueries(v []string) ListExecutionsOption
func (*Functions) WithListExecutionsSearch ¶
func (srv *Functions) WithListExecutionsSearch(v string) ListExecutionsOption
func (*Functions) WithListQueries ¶
func (srv *Functions) WithListQueries(v []string) ListOption
func (*Functions) WithListSearch ¶
func (srv *Functions) WithListSearch(v string) ListOption
func (*Functions) WithUpdateCommands ¶
func (srv *Functions) WithUpdateCommands(v string) UpdateOption
func (*Functions) WithUpdateEnabled ¶
func (srv *Functions) WithUpdateEnabled(v bool) UpdateOption
func (*Functions) WithUpdateEntrypoint ¶
func (srv *Functions) WithUpdateEntrypoint(v string) UpdateOption
func (*Functions) WithUpdateEvents ¶
func (srv *Functions) WithUpdateEvents(v []string) UpdateOption
func (*Functions) WithUpdateExecute ¶
func (srv *Functions) WithUpdateExecute(v []string) UpdateOption
func (*Functions) WithUpdateInstallationId ¶
func (srv *Functions) WithUpdateInstallationId(v string) UpdateOption
func (*Functions) WithUpdateLogging ¶
func (srv *Functions) WithUpdateLogging(v bool) UpdateOption
func (*Functions) WithUpdateProviderBranch ¶
func (srv *Functions) WithUpdateProviderBranch(v string) UpdateOption
func (*Functions) WithUpdateProviderRepositoryId ¶
func (srv *Functions) WithUpdateProviderRepositoryId(v string) UpdateOption
func (*Functions) WithUpdateProviderRootDirectory ¶
func (srv *Functions) WithUpdateProviderRootDirectory(v string) UpdateOption
func (*Functions) WithUpdateProviderSilentMode ¶
func (srv *Functions) WithUpdateProviderSilentMode(v bool) UpdateOption
func (*Functions) WithUpdateRuntime ¶
func (srv *Functions) WithUpdateRuntime(v string) UpdateOption
func (*Functions) WithUpdateSchedule ¶
func (srv *Functions) WithUpdateSchedule(v string) UpdateOption
func (*Functions) WithUpdateScopes ¶
func (srv *Functions) WithUpdateScopes(v []string) UpdateOption
func (*Functions) WithUpdateTimeout ¶
func (srv *Functions) WithUpdateTimeout(v int) UpdateOption
func (*Functions) WithUpdateVariableValue ¶
func (srv *Functions) WithUpdateVariableValue(v string) UpdateVariableOption
type ListDeploymentsOption ¶
type ListDeploymentsOption func(*ListDeploymentsOptions)
type ListDeploymentsOptions ¶
type ListDeploymentsOptions struct {
Queries []string
Search string
// contains filtered or unexported fields
}
func (ListDeploymentsOptions) New ¶
func (options ListDeploymentsOptions) New() *ListDeploymentsOptions
type ListExecutionsOption ¶
type ListExecutionsOption func(*ListExecutionsOptions)
type ListExecutionsOptions ¶
type ListExecutionsOptions struct {
Queries []string
Search string
// contains filtered or unexported fields
}
func (ListExecutionsOptions) New ¶
func (options ListExecutionsOptions) New() *ListExecutionsOptions
type ListOption ¶
type ListOption func(*ListOptions)
type ListOptions ¶
type ListOptions struct {
Queries []string
Search string
// contains filtered or unexported fields
}
func (ListOptions) New ¶
func (options ListOptions) New() *ListOptions
type UpdateOption ¶
type UpdateOption func(*UpdateOptions)
type UpdateOptions ¶
type UpdateOptions struct {
Runtime string
Execute []string
Events []string
Schedule string
Timeout int
Enabled bool
Logging bool
Entrypoint string
Commands string
Scopes []string
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)
type UpdateVariableOptions ¶
type UpdateVariableOptions struct {
Value string
// contains filtered or unexported fields
}
func (UpdateVariableOptions) New ¶
func (options UpdateVariableOptions) New() *UpdateVariableOptions