sites

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

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

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

type CreateVariableOption

type CreateVariableOption func(*CreateVariableOptions)

type CreateVariableOptions

type CreateVariableOptions struct {
	Secret bool
	// contains filtered or unexported fields
}

func (CreateVariableOptions) New

type CreateVcsDeploymentOption

type CreateVcsDeploymentOption func(*CreateVcsDeploymentOptions)

type CreateVcsDeploymentOptions

type CreateVcsDeploymentOptions struct {
	Activate bool
	// contains filtered or unexported fields
}

func (CreateVcsDeploymentOptions) New

type GetDeploymentDownloadOption

type GetDeploymentDownloadOption func(*GetDeploymentDownloadOptions)

type GetDeploymentDownloadOptions

type GetDeploymentDownloadOptions struct {
	Type string
	// contains filtered or unexported fields
}

func (GetDeploymentDownloadOptions) New

type ListDeploymentsOption

type ListDeploymentsOption func(*ListDeploymentsOptions)

type ListDeploymentsOptions

type ListDeploymentsOptions struct {
	Queries []string
	Search  string
	// contains filtered or unexported fields
}

func (ListDeploymentsOptions) New

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 New

func New(clt client.Client) *Sites

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) Delete

func (srv *Sites) Delete(SiteId string) (*interface{}, error)

Delete delete a site by its unique ID.

func (*Sites) DeleteDeployment

func (srv *Sites) DeleteDeployment(SiteId string, DeploymentId string) (*interface{}, error)

DeleteDeployment delete a site deployment by its unique ID.

func (*Sites) DeleteLog

func (srv *Sites) DeleteLog(SiteId string, LogId string) (*interface{}, error)

DeleteLog delete a site log by its unique ID.

func (*Sites) DeleteVariable

func (srv *Sites) DeleteVariable(SiteId string, VariableId string) (*interface{}, error)

DeleteVariable delete a variable by its unique ID.

func (*Sites) Get

func (srv *Sites) Get(SiteId string) (*models.Site, error)

Get get a site by its unique ID.

func (*Sites) GetDeployment

func (srv *Sites) GetDeployment(SiteId string, DeploymentId string) (*models.Deployment, error)

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) GetLog

func (srv *Sites) GetLog(SiteId string, LogId string) (*models.Execution, error)

GetLog get a site request log by its unique ID.

func (*Sites) GetVariable

func (srv *Sites) GetVariable(SiteId string, VariableId string) (*models.Variable, error)

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

func (srv *Sites) UpdateSiteDeployment(SiteId string, DeploymentId string) (*models.Site, error)

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

Jump to

Keyboard shortcuts

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