Documentation
¶
Index ¶
- type CreateDeploymentOption
- type CreateDeploymentOptions
- type CreateOption
- type CreateOptions
- type CreateTemplateDeploymentOption
- type CreateTemplateDeploymentOptions
- type CreateVariableOption
- type CreateVariableOptions
- type CreateVcsDeploymentOption
- type CreateVcsDeploymentOptions
- type GetDeploymentDownloadOption
- type GetDeploymentDownloadOptions
- type ListDeploymentsOption
- type ListDeploymentsOptions
- type ListLogsOption
- type ListLogsOptions
- type ListOption
- type ListOptions
- type Sites
- func (srv *Sites) Create(SiteId string, Name string, Framework string, BuildRuntime string, ...) (*models.Site, error)
- func (srv *Sites) CreateDeployment(SiteId string, Code file.InputFile, Activate bool, ...) (*models.Deployment, error)
- func (srv *Sites) CreateDuplicateDeployment(SiteId string, DeploymentId string) (*models.Deployment, error)
- func (srv *Sites) CreateTemplateDeployment(SiteId string, Repository string, Owner string, RootDirectory string, ...) (*models.Deployment, error)
- func (srv *Sites) CreateVariable(SiteId string, Key string, Value string, ...) (*models.Variable, error)
- func (srv *Sites) CreateVcsDeployment(SiteId string, Type string, Reference string, ...) (*models.Deployment, error)
- func (srv *Sites) Delete(SiteId string) (*interface{}, error)
- func (srv *Sites) DeleteDeployment(SiteId string, DeploymentId string) (*interface{}, error)
- func (srv *Sites) DeleteLog(SiteId string, LogId string) (*interface{}, error)
- func (srv *Sites) DeleteVariable(SiteId string, VariableId string) (*interface{}, error)
- func (srv *Sites) Get(SiteId string) (*models.Site, error)
- func (srv *Sites) GetDeployment(SiteId string, DeploymentId string) (*models.Deployment, error)
- func (srv *Sites) GetDeploymentDownload(SiteId string, DeploymentId string, ...) (*[]byte, error)
- func (srv *Sites) GetLog(SiteId string, LogId string) (*models.Execution, error)
- func (srv *Sites) GetVariable(SiteId string, VariableId string) (*models.Variable, error)
- func (srv *Sites) List(optionalSetters ...ListOption) (*models.SiteList, error)
- func (srv *Sites) ListDeployments(SiteId string, optionalSetters ...ListDeploymentsOption) (*models.DeploymentList, error)
- func (srv *Sites) ListFrameworks() (*models.FrameworkList, error)
- func (srv *Sites) ListLogs(SiteId string, optionalSetters ...ListLogsOption) (*models.ExecutionList, error)
- func (srv *Sites) ListSpecifications() (*models.SpecificationList, error)
- func (srv *Sites) ListVariables(SiteId string) (*models.VariableList, error)
- func (srv *Sites) Update(SiteId string, Name string, Framework string, optionalSetters ...UpdateOption) (*models.Site, error)
- func (srv *Sites) UpdateDeploymentStatus(SiteId string, DeploymentId string) (*models.Deployment, error)
- func (srv *Sites) UpdateSiteDeployment(SiteId string, DeploymentId string) (*models.Site, error)
- func (srv *Sites) UpdateVariable(SiteId string, VariableId string, Key string, ...) (*models.Variable, error)
- func (srv *Sites) WithCreateAdapter(v string) CreateOption
- func (srv *Sites) WithCreateBuildCommand(v string) CreateOption
- func (srv *Sites) WithCreateDeploymentBuildCommand(v string) CreateDeploymentOption
- func (srv *Sites) WithCreateDeploymentInstallCommand(v string) CreateDeploymentOption
- func (srv *Sites) WithCreateDeploymentOutputDirectory(v string) CreateDeploymentOption
- func (srv *Sites) WithCreateEnabled(v bool) CreateOption
- func (srv *Sites) WithCreateFallbackFile(v string) CreateOption
- func (srv *Sites) WithCreateInstallCommand(v string) CreateOption
- func (srv *Sites) WithCreateInstallationId(v string) CreateOption
- func (srv *Sites) WithCreateLogging(v bool) CreateOption
- func (srv *Sites) WithCreateOutputDirectory(v string) CreateOption
- func (srv *Sites) WithCreateProviderBranch(v string) CreateOption
- func (srv *Sites) WithCreateProviderRepositoryId(v string) CreateOption
- func (srv *Sites) WithCreateProviderRootDirectory(v string) CreateOption
- func (srv *Sites) WithCreateProviderSilentMode(v bool) CreateOption
- func (srv *Sites) WithCreateSpecification(v string) CreateOption
- func (srv *Sites) WithCreateTemplateDeploymentActivate(v bool) CreateTemplateDeploymentOption
- func (srv *Sites) WithCreateTimeout(v int) CreateOption
- func (srv *Sites) WithCreateVariableSecret(v bool) CreateVariableOption
- func (srv *Sites) WithCreateVcsDeploymentActivate(v bool) CreateVcsDeploymentOption
- func (srv *Sites) WithGetDeploymentDownloadType(v string) GetDeploymentDownloadOption
- func (srv *Sites) WithListDeploymentsQueries(v []string) ListDeploymentsOption
- func (srv *Sites) WithListDeploymentsSearch(v string) ListDeploymentsOption
- func (srv *Sites) WithListLogsQueries(v []string) ListLogsOption
- func (srv *Sites) WithListQueries(v []string) ListOption
- func (srv *Sites) WithListSearch(v string) ListOption
- func (srv *Sites) WithUpdateAdapter(v string) UpdateOption
- func (srv *Sites) WithUpdateBuildCommand(v string) UpdateOption
- func (srv *Sites) WithUpdateBuildRuntime(v string) UpdateOption
- func (srv *Sites) WithUpdateEnabled(v bool) UpdateOption
- func (srv *Sites) WithUpdateFallbackFile(v string) UpdateOption
- func (srv *Sites) WithUpdateInstallCommand(v string) UpdateOption
- func (srv *Sites) WithUpdateInstallationId(v string) UpdateOption
- func (srv *Sites) WithUpdateLogging(v bool) UpdateOption
- func (srv *Sites) WithUpdateOutputDirectory(v string) UpdateOption
- func (srv *Sites) WithUpdateProviderBranch(v string) UpdateOption
- func (srv *Sites) WithUpdateProviderRepositoryId(v string) UpdateOption
- func (srv *Sites) WithUpdateProviderRootDirectory(v string) UpdateOption
- func (srv *Sites) WithUpdateProviderSilentMode(v bool) UpdateOption
- func (srv *Sites) WithUpdateSpecification(v string) UpdateOption
- func (srv *Sites) WithUpdateTimeout(v int) UpdateOption
- func (srv *Sites) WithUpdateVariableSecret(v bool) UpdateVariableOption
- func (srv *Sites) WithUpdateVariableValue(v string) UpdateVariableOption
- 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 CreateDeploymentOption ¶
type CreateDeploymentOption func(*CreateDeploymentOptions)
type CreateDeploymentOptions ¶
type CreateDeploymentOptions struct { InstallCommand string BuildCommand string OutputDirectory string // contains filtered or unexported fields }
func (CreateDeploymentOptions) New ¶
func (options CreateDeploymentOptions) New() *CreateDeploymentOptions
type CreateOption ¶
type CreateOption func(*CreateOptions)
type CreateOptions ¶
type CreateOptions struct { Enabled bool Logging bool Timeout int InstallCommand string BuildCommand string OutputDirectory string Adapter string InstallationId string FallbackFile string ProviderRepositoryId string ProviderBranch string ProviderSilentMode bool ProviderRootDirectory string Specification string // contains filtered or unexported fields }
func (CreateOptions) New ¶
func (options CreateOptions) New() *CreateOptions
type CreateTemplateDeploymentOption ¶
type CreateTemplateDeploymentOption func(*CreateTemplateDeploymentOptions)
type CreateTemplateDeploymentOptions ¶
type CreateTemplateDeploymentOptions struct { Activate bool // contains filtered or unexported fields }
func (CreateTemplateDeploymentOptions) New ¶
func (options CreateTemplateDeploymentOptions) New() *CreateTemplateDeploymentOptions
type CreateVariableOption ¶
type CreateVariableOption func(*CreateVariableOptions)
type CreateVariableOptions ¶
type CreateVariableOptions struct { Secret bool // contains filtered or unexported fields }
func (CreateVariableOptions) New ¶
func (options CreateVariableOptions) New() *CreateVariableOptions
type CreateVcsDeploymentOption ¶
type CreateVcsDeploymentOption func(*CreateVcsDeploymentOptions)
type CreateVcsDeploymentOptions ¶
type CreateVcsDeploymentOptions struct { Activate bool // contains filtered or unexported fields }
func (CreateVcsDeploymentOptions) New ¶
func (options CreateVcsDeploymentOptions) New() *CreateVcsDeploymentOptions
type GetDeploymentDownloadOption ¶
type GetDeploymentDownloadOption func(*GetDeploymentDownloadOptions)
type GetDeploymentDownloadOptions ¶
type GetDeploymentDownloadOptions struct { Type string // contains filtered or unexported fields }
func (GetDeploymentDownloadOptions) New ¶
func (options GetDeploymentDownloadOptions) New() *GetDeploymentDownloadOptions
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 ListLogsOption ¶
type ListLogsOption func(*ListLogsOptions)
type ListLogsOptions ¶
type ListLogsOptions struct { Queries []string // contains filtered or unexported fields }
func (ListLogsOptions) New ¶
func (options ListLogsOptions) New() *ListLogsOptions
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 Sites ¶
type Sites struct {
// contains filtered or unexported fields
}
Sites service
func (*Sites) Create ¶
func (srv *Sites) Create(SiteId string, Name string, Framework string, BuildRuntime string, optionalSetters ...CreateOption) (*models.Site, error)
Create create a new site.
func (*Sites) CreateDeployment ¶
func (srv *Sites) CreateDeployment(SiteId string, Code file.InputFile, Activate bool, optionalSetters ...CreateDeploymentOption) (*models.Deployment, error)
CreateDeployment create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the function's deployment to use your new deployment ID.
func (*Sites) CreateDuplicateDeployment ¶
func (srv *Sites) CreateDuplicateDeployment(SiteId string, DeploymentId string) (*models.Deployment, error)
CreateDuplicateDeployment create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
func (*Sites) CreateTemplateDeployment ¶
func (srv *Sites) CreateTemplateDeployment(SiteId string, Repository string, Owner string, RootDirectory string, Version string, optionalSetters ...CreateTemplateDeploymentOption) (*models.Deployment, error)
CreateTemplateDeployment create a deployment based on a template.
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details.
func (*Sites) CreateVariable ¶
func (srv *Sites) CreateVariable(SiteId string, Key string, Value string, optionalSetters ...CreateVariableOption) (*models.Variable, error)
CreateVariable create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
func (*Sites) CreateVcsDeployment ¶
func (srv *Sites) CreateVcsDeployment(SiteId string, Type string, Reference string, optionalSetters ...CreateVcsDeploymentOption) (*models.Deployment, error)
CreateVcsDeployment create a deployment when a site is connected to VCS.
This endpoint lets you create deployment from a branch, commit, or a tag.
func (*Sites) DeleteDeployment ¶
DeleteDeployment delete a site deployment by its unique ID.
func (*Sites) DeleteVariable ¶
DeleteVariable delete a variable by its unique ID.
func (*Sites) GetDeployment ¶
GetDeployment get a site deployment by its unique ID.
func (*Sites) GetDeploymentDownload ¶
func (srv *Sites) GetDeploymentDownload(SiteId string, DeploymentId string, optionalSetters ...GetDeploymentDownloadOption) (*[]byte, error)
GetDeploymentDownload get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
func (*Sites) GetVariable ¶
GetVariable get a variable by its unique ID.
func (*Sites) List ¶
func (srv *Sites) List(optionalSetters ...ListOption) (*models.SiteList, error)
List get a list of all the project's sites. You can use the query params to filter your results.
func (*Sites) ListDeployments ¶
func (srv *Sites) ListDeployments(SiteId string, optionalSetters ...ListDeploymentsOption) (*models.DeploymentList, error)
ListDeployments get a list of all the site's code deployments. You can use the query params to filter your results.
func (*Sites) ListFrameworks ¶
func (srv *Sites) ListFrameworks() (*models.FrameworkList, error)
ListFrameworks get a list of all frameworks that are currently available on the server instance.
func (*Sites) ListLogs ¶
func (srv *Sites) ListLogs(SiteId string, optionalSetters ...ListLogsOption) (*models.ExecutionList, error)
ListLogs get a list of all site logs. You can use the query params to filter your results.
func (*Sites) ListSpecifications ¶
func (srv *Sites) ListSpecifications() (*models.SpecificationList, error)
ListSpecifications list allowed site specifications for this instance.
func (*Sites) ListVariables ¶
func (srv *Sites) ListVariables(SiteId string) (*models.VariableList, error)
ListVariables get a list of all variables of a specific site.
func (*Sites) Update ¶
func (srv *Sites) Update(SiteId string, Name string, Framework string, optionalSetters ...UpdateOption) (*models.Site, error)
Update update site by its unique ID.
func (*Sites) UpdateDeploymentStatus ¶
func (srv *Sites) UpdateDeploymentStatus(SiteId string, DeploymentId string) (*models.Deployment, error)
UpdateDeploymentStatus cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
func (*Sites) UpdateSiteDeployment ¶
UpdateSiteDeployment update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
func (*Sites) UpdateVariable ¶
func (srv *Sites) UpdateVariable(SiteId string, VariableId string, Key string, optionalSetters ...UpdateVariableOption) (*models.Variable, error)
UpdateVariable update variable by its unique ID.
func (*Sites) WithCreateAdapter ¶
func (srv *Sites) WithCreateAdapter(v string) CreateOption
func (*Sites) WithCreateBuildCommand ¶
func (srv *Sites) WithCreateBuildCommand(v string) CreateOption
func (*Sites) WithCreateDeploymentBuildCommand ¶
func (srv *Sites) WithCreateDeploymentBuildCommand(v string) CreateDeploymentOption
func (*Sites) WithCreateDeploymentInstallCommand ¶
func (srv *Sites) WithCreateDeploymentInstallCommand(v string) CreateDeploymentOption
func (*Sites) WithCreateDeploymentOutputDirectory ¶
func (srv *Sites) WithCreateDeploymentOutputDirectory(v string) CreateDeploymentOption
func (*Sites) WithCreateEnabled ¶
func (srv *Sites) WithCreateEnabled(v bool) CreateOption
func (*Sites) WithCreateFallbackFile ¶
func (srv *Sites) WithCreateFallbackFile(v string) CreateOption
func (*Sites) WithCreateInstallCommand ¶
func (srv *Sites) WithCreateInstallCommand(v string) CreateOption
func (*Sites) WithCreateInstallationId ¶
func (srv *Sites) WithCreateInstallationId(v string) CreateOption
func (*Sites) WithCreateLogging ¶
func (srv *Sites) WithCreateLogging(v bool) CreateOption
func (*Sites) WithCreateOutputDirectory ¶
func (srv *Sites) WithCreateOutputDirectory(v string) CreateOption
func (*Sites) WithCreateProviderBranch ¶
func (srv *Sites) WithCreateProviderBranch(v string) CreateOption
func (*Sites) WithCreateProviderRepositoryId ¶
func (srv *Sites) WithCreateProviderRepositoryId(v string) CreateOption
func (*Sites) WithCreateProviderRootDirectory ¶
func (srv *Sites) WithCreateProviderRootDirectory(v string) CreateOption
func (*Sites) WithCreateProviderSilentMode ¶
func (srv *Sites) WithCreateProviderSilentMode(v bool) CreateOption
func (*Sites) WithCreateSpecification ¶
func (srv *Sites) WithCreateSpecification(v string) CreateOption
func (*Sites) WithCreateTemplateDeploymentActivate ¶
func (srv *Sites) WithCreateTemplateDeploymentActivate(v bool) CreateTemplateDeploymentOption
func (*Sites) WithCreateTimeout ¶
func (srv *Sites) WithCreateTimeout(v int) CreateOption
func (*Sites) WithCreateVariableSecret ¶
func (srv *Sites) WithCreateVariableSecret(v bool) CreateVariableOption
func (*Sites) WithCreateVcsDeploymentActivate ¶
func (srv *Sites) WithCreateVcsDeploymentActivate(v bool) CreateVcsDeploymentOption
func (*Sites) WithGetDeploymentDownloadType ¶
func (srv *Sites) WithGetDeploymentDownloadType(v string) GetDeploymentDownloadOption
func (*Sites) WithListDeploymentsQueries ¶
func (srv *Sites) WithListDeploymentsQueries(v []string) ListDeploymentsOption
func (*Sites) WithListDeploymentsSearch ¶
func (srv *Sites) WithListDeploymentsSearch(v string) ListDeploymentsOption
func (*Sites) WithListLogsQueries ¶
func (srv *Sites) WithListLogsQueries(v []string) ListLogsOption
func (*Sites) WithListQueries ¶
func (srv *Sites) WithListQueries(v []string) ListOption
func (*Sites) WithListSearch ¶
func (srv *Sites) WithListSearch(v string) ListOption
func (*Sites) WithUpdateAdapter ¶
func (srv *Sites) WithUpdateAdapter(v string) UpdateOption
func (*Sites) WithUpdateBuildCommand ¶
func (srv *Sites) WithUpdateBuildCommand(v string) UpdateOption
func (*Sites) WithUpdateBuildRuntime ¶
func (srv *Sites) WithUpdateBuildRuntime(v string) UpdateOption
func (*Sites) WithUpdateEnabled ¶
func (srv *Sites) WithUpdateEnabled(v bool) UpdateOption
func (*Sites) WithUpdateFallbackFile ¶
func (srv *Sites) WithUpdateFallbackFile(v string) UpdateOption
func (*Sites) WithUpdateInstallCommand ¶
func (srv *Sites) WithUpdateInstallCommand(v string) UpdateOption
func (*Sites) WithUpdateInstallationId ¶
func (srv *Sites) WithUpdateInstallationId(v string) UpdateOption
func (*Sites) WithUpdateLogging ¶
func (srv *Sites) WithUpdateLogging(v bool) UpdateOption
func (*Sites) WithUpdateOutputDirectory ¶
func (srv *Sites) WithUpdateOutputDirectory(v string) UpdateOption
func (*Sites) WithUpdateProviderBranch ¶
func (srv *Sites) WithUpdateProviderBranch(v string) UpdateOption
func (*Sites) WithUpdateProviderRepositoryId ¶
func (srv *Sites) WithUpdateProviderRepositoryId(v string) UpdateOption
func (*Sites) WithUpdateProviderRootDirectory ¶
func (srv *Sites) WithUpdateProviderRootDirectory(v string) UpdateOption
func (*Sites) WithUpdateProviderSilentMode ¶
func (srv *Sites) WithUpdateProviderSilentMode(v bool) UpdateOption
func (*Sites) WithUpdateSpecification ¶
func (srv *Sites) WithUpdateSpecification(v string) UpdateOption
func (*Sites) WithUpdateTimeout ¶
func (srv *Sites) WithUpdateTimeout(v int) UpdateOption
func (*Sites) WithUpdateVariableSecret ¶
func (srv *Sites) WithUpdateVariableSecret(v bool) UpdateVariableOption
func (*Sites) WithUpdateVariableValue ¶
func (srv *Sites) WithUpdateVariableValue(v string) UpdateVariableOption
type UpdateOption ¶
type UpdateOption func(*UpdateOptions)
type UpdateOptions ¶
type UpdateOptions struct { Enabled bool Logging bool Timeout int InstallCommand string BuildCommand string OutputDirectory string BuildRuntime string Adapter string FallbackFile string InstallationId string ProviderRepositoryId string ProviderBranch string ProviderSilentMode bool ProviderRootDirectory string Specification 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 Secret bool // contains filtered or unexported fields }
func (UpdateVariableOptions) New ¶
func (options UpdateVariableOptions) New() *UpdateVariableOptions