appservice

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFinalState

func IsFinalState(state State) bool

Types

type AppServiceCompute

type AppServiceCompute struct {
	// Cpu depicts cpu units (cores).
	Cpu int64 `json:"cpu"`

	// Ram depicts ram units (GB).
	Ram int64 `json:"ram"`
}

AppServiceCompute depicts the couchbase compute, following are the supported compute combinations for CPU and RAM for different cloud providers. To learn more, see: [AWS] https://docs.couchbase.com/cloud/reference/aws.html [GCP] https://docs.couchbase.com/cloud/reference/gcp.html [Azure] https://docs.couchbase.com/cloud/reference/azure.html

type CreateAppServiceRequest

type CreateAppServiceRequest struct {
	// Description is the description for the app service (up to 256 characters).
	Description *string `json:"description,omitempty"`

	// Nodes is the number of nodes configured for the App Service.
	// The number of nodes can range from 2 to 12
	Nodes *int64 `json:"nodes,omitempty"`

	// Version is version of the App Service Server to be installed.
	// The latest Server version will be deployed by default.
	Version *string `json:"version,omitempty"`

	// Name is the name of the app service, the name of the app service should follow this naming criteria:
	// An app service name should have at least 2 characters and up to 256 characters.
	Name string `json:"name"`

	// Compute is the CPU and RAM configuration of the app service.
	Compute AppServiceCompute `json:"compute"`
}

CreateAppServiceRequest is the request payload sent to the Capella V4 Public API in order to create a new app service. An App Service synchronizes data between the Couchbase Capella database and any mobile applications. App Service is a fully managed application backend designed to provide data synchronization for mobile/IoT applications and the Capella Cloud Service.

To learn more about App Services, see https://docs.couchbase.com/cloud/app-services/index.html

In order to access this endpoint, the provided API key must have at least one of the roles referenced below:

Organization Owner Project Owner Project Manager To learn more, see https://docs.couchbase.com/cloud/organizations/organization-projects-overview.html

type CreateAppServiceResponse

type CreateAppServiceResponse struct {
	// ID is the UUID of the app service
	Id uuid.UUID `json:"id"`
}

CreateAppServiceResponse is the response received from the Capella V4 Public API when asked to create a new app service.

type GetAppServiceResponse

type GetAppServiceResponse struct {
	// OrganizationId is the organizationId of the capella tenant.
	OrganizationId string `json:"organizationId"`

	// Name is the name of the app service, the name of the app service should follow this naming criteria:
	// An app service name should have at least 2 characters and up to 256 characters.
	Name string `json:"name"`

	// Description is the description for the app service (up to 256 characters).
	Description string `json:"description"`

	// CloudProvider is the cloud provider where the app service will be hosted.
	// To learn more, see:
	// [AWS] https://docs.couchbase.com/cloud/reference/aws.html
	// [GCP] https://docs.couchbase.com/cloud/reference/gcp.html
	// [Azure] https://docs.couchbase.com/cloud/reference/azure.html
	CloudProvider string `json:"cloudProvider"`

	// ProjectId is the projectId of the cluster.
	ProjectId string `json:"projectId"`

	// ClusterId is the clusterId of the cluster.
	ClusterId string `json:"clusterId"`

	// CurrentState defines the current state of app service.
	CurrentState State `json:"currentState"`

	// Version defines the version of the app service server.
	Version string `json:"version"`

	// Etag represents the version of the document
	Etag string

	// Audit contains all audit-related fields.
	Audit api.CouchbaseAuditData `json:"audit"`

	// Compute is the CPU and RAM configuration of the app service.
	Compute AppServiceCompute `json:"compute"`

	// Nodes is the number of nodes configured for the app service.
	Nodes int `json:"nodes"`

	// Id is the ID of the app service created.
	Id uuid.UUID `json:"id"`
}

GetAppServiceResponse is the response received from the Capella V4 Public API when asked to fetch details of an existing app service.

In order to access this endpoint, the provided API key must have at least one of the roles referenced below: Organization Owner Project Owner Project Manager Project Viewer Database Data Reader/Writer Database Data Reader To learn more, see https://docs.couchbase.com/cloud/organizations/organization-projects-overview.html

type State

type State string
const (
	// Pending communicates that the sync gateway is waiting to be
	// provisioned.
	Pending State = "pending"

	// Deploying communicates that the sync gateway is deploying. This
	// status is driven by control plane activities and is not related to
	// the act of scaling the node count up or down.
	Deploying        State = "deploying"
	DeploymentFailed State = "deploymentFailed"

	// Destroying communicates that the sync gateway is being torn down.
	// This state can only occur if a user has chosen to remove the sync
	// gateway.
	Destroying    State = "destroying"
	DestroyFailed State = "destroyFailed"

	// Healthy communicates that the sync gateway was successfully deployed
	// and is operational.
	Healthy  State = "healthy"
	Degraded State = "degraded"

	Scaling     State = "scaling"
	ScaleFailed State = "scaleFailed"

	Upgrading     State = "upgrading"
	UpgradeFailed State = "upgradeFailed"

	TurnedOff     State = "turnedOff"
	TurningOff    State = "turningOff"
	TurnOffFailed State = "turnOffFailed"
	TurningOn     State = "turningOn"
	TurnOnFailed  State = "turnOnFailed"
)

type UpdateAppServiceRequest

type UpdateAppServiceRequest struct {
	// Nodes is the number of nodes configured for the App Service.
	// The number of nodes can range from 2 to 12
	Nodes int64 `json:"nodes"`

	// Compute is the CPU and RAM configuration of the app service.
	Compute AppServiceCompute `json:"compute"`
}

Jump to

Keyboard shortcuts

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