api

package
v0.5.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: PostgreSQL Imports: 11 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.

Package api is the generated Control Plane HTTP client. Do not edit client.gen.go by hand; regenerate with `make generate`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApplyUpgradeRequest

func NewApplyUpgradeRequest(server string, databaseId string, body ApplyUpgradeJSONRequestBody) (*http.Request, error)

NewApplyUpgradeRequest calls the generic ApplyUpgrade builder with application/json body

func NewApplyUpgradeRequestWithBody

func NewApplyUpgradeRequestWithBody(server string, databaseId string, contentType string, body io.Reader) (*http.Request, error)

NewApplyUpgradeRequestWithBody generates requests for ApplyUpgrade with any type of body

func NewBackupDatabaseNodeRequest

func NewBackupDatabaseNodeRequest(server string, databaseId string, nodeName string, params *BackupDatabaseNodeParams, body BackupDatabaseNodeJSONRequestBody) (*http.Request, error)

NewBackupDatabaseNodeRequest calls the generic BackupDatabaseNode builder with application/json body

func NewBackupDatabaseNodeRequestWithBody

func NewBackupDatabaseNodeRequestWithBody(server string, databaseId string, nodeName string, params *BackupDatabaseNodeParams, contentType string, body io.Reader) (*http.Request, error)

NewBackupDatabaseNodeRequestWithBody generates requests for BackupDatabaseNode with any type of body

func NewCancelDatabaseTaskRequest

func NewCancelDatabaseTaskRequest(server string, databaseId string, taskId string) (*http.Request, error)

NewCancelDatabaseTaskRequest generates requests for CancelDatabaseTask

func NewCreateDatabaseRequest

func NewCreateDatabaseRequest(server string, body CreateDatabaseJSONRequestBody) (*http.Request, error)

NewCreateDatabaseRequest calls the generic CreateDatabase builder with application/json body

func NewCreateDatabaseRequestWithBody

func NewCreateDatabaseRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateDatabaseRequestWithBody generates requests for CreateDatabase with any type of body

func NewDeleteDatabaseRequest

func NewDeleteDatabaseRequest(server string, databaseId string, params *DeleteDatabaseParams) (*http.Request, error)

NewDeleteDatabaseRequest generates requests for DeleteDatabase

func NewFailoverDatabaseNodeRequest

func NewFailoverDatabaseNodeRequest(server string, databaseId string, nodeName string, body FailoverDatabaseNodeJSONRequestBody) (*http.Request, error)

NewFailoverDatabaseNodeRequest calls the generic FailoverDatabaseNode builder with application/json body

func NewFailoverDatabaseNodeRequestWithBody

func NewFailoverDatabaseNodeRequestWithBody(server string, databaseId string, nodeName string, contentType string, body io.Reader) (*http.Request, error)

NewFailoverDatabaseNodeRequestWithBody generates requests for FailoverDatabaseNode with any type of body

func NewGetClusterRequest

func NewGetClusterRequest(server string) (*http.Request, error)

NewGetClusterRequest generates requests for GetCluster

func NewGetDatabaseRequest

func NewGetDatabaseRequest(server string, databaseId string, params *GetDatabaseParams) (*http.Request, error)

NewGetDatabaseRequest generates requests for GetDatabase

func NewGetDatabaseTaskLogRequest

func NewGetDatabaseTaskLogRequest(server string, databaseId string, taskId openapi_types.UUID, params *GetDatabaseTaskLogParams) (*http.Request, error)

NewGetDatabaseTaskLogRequest generates requests for GetDatabaseTaskLog

func NewGetDatabaseTaskRequest

func NewGetDatabaseTaskRequest(server string, databaseId string, taskId openapi_types.UUID) (*http.Request, error)

NewGetDatabaseTaskRequest generates requests for GetDatabaseTask

func NewGetHostRequest

func NewGetHostRequest(server string, hostId string) (*http.Request, error)

NewGetHostRequest generates requests for GetHost

func NewGetHostTaskLogRequest

func NewGetHostTaskLogRequest(server string, hostId string, taskId openapi_types.UUID, params *GetHostTaskLogParams) (*http.Request, error)

NewGetHostTaskLogRequest generates requests for GetHostTaskLog

func NewGetHostTaskRequest

func NewGetHostTaskRequest(server string, hostId string, taskId openapi_types.UUID) (*http.Request, error)

NewGetHostTaskRequest generates requests for GetHostTask

func NewGetJoinTokenRequest

func NewGetJoinTokenRequest(server string) (*http.Request, error)

NewGetJoinTokenRequest generates requests for GetJoinToken

func NewGetVersionRequest

func NewGetVersionRequest(server string) (*http.Request, error)

NewGetVersionRequest generates requests for GetVersion

func NewInitClusterRequest

func NewInitClusterRequest(server string, params *InitClusterParams) (*http.Request, error)

NewInitClusterRequest generates requests for InitCluster

func NewJoinClusterRequest

func NewJoinClusterRequest(server string, body JoinClusterJSONRequestBody) (*http.Request, error)

NewJoinClusterRequest calls the generic JoinCluster builder with application/json body

func NewJoinClusterRequestWithBody

func NewJoinClusterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewJoinClusterRequestWithBody generates requests for JoinCluster with any type of body

func NewListDatabaseTasksRequest

func NewListDatabaseTasksRequest(server string, databaseId string, params *ListDatabaseTasksParams) (*http.Request, error)

NewListDatabaseTasksRequest generates requests for ListDatabaseTasks

func NewListDatabasesRequest

func NewListDatabasesRequest(server string, params *ListDatabasesParams) (*http.Request, error)

NewListDatabasesRequest generates requests for ListDatabases

func NewListHostTasksRequest

func NewListHostTasksRequest(server string, hostId string, params *ListHostTasksParams) (*http.Request, error)

NewListHostTasksRequest generates requests for ListHostTasks

func NewListHostsRequest

func NewListHostsRequest(server string) (*http.Request, error)

NewListHostsRequest generates requests for ListHosts

func NewListTasksRequest

func NewListTasksRequest(server string, params *ListTasksParams) (*http.Request, error)

NewListTasksRequest generates requests for ListTasks

func NewRemoveHostRequest

func NewRemoveHostRequest(server string, hostId string, params *RemoveHostParams) (*http.Request, error)

NewRemoveHostRequest generates requests for RemoveHost

func NewRestartInstanceRequest

func NewRestartInstanceRequest(server string, databaseId string, instanceId string, body RestartInstanceJSONRequestBody) (*http.Request, error)

NewRestartInstanceRequest calls the generic RestartInstance builder with application/json body

func NewRestartInstanceRequestWithBody

func NewRestartInstanceRequestWithBody(server string, databaseId string, instanceId string, contentType string, body io.Reader) (*http.Request, error)

NewRestartInstanceRequestWithBody generates requests for RestartInstance with any type of body

func NewRestoreDatabaseRequest

func NewRestoreDatabaseRequest(server string, databaseId string, params *RestoreDatabaseParams, body RestoreDatabaseJSONRequestBody) (*http.Request, error)

NewRestoreDatabaseRequest calls the generic RestoreDatabase builder with application/json body

func NewRestoreDatabaseRequestWithBody

func NewRestoreDatabaseRequestWithBody(server string, databaseId string, params *RestoreDatabaseParams, contentType string, body io.Reader) (*http.Request, error)

NewRestoreDatabaseRequestWithBody generates requests for RestoreDatabase with any type of body

func NewStartInstanceRequest

func NewStartInstanceRequest(server string, databaseId string, instanceId string, params *StartInstanceParams) (*http.Request, error)

NewStartInstanceRequest generates requests for StartInstance

func NewStopInstanceRequest

func NewStopInstanceRequest(server string, databaseId string, instanceId string, params *StopInstanceParams) (*http.Request, error)

NewStopInstanceRequest generates requests for StopInstance

func NewSwitchoverDatabaseNodeRequest

func NewSwitchoverDatabaseNodeRequest(server string, databaseId string, nodeName string, body SwitchoverDatabaseNodeJSONRequestBody) (*http.Request, error)

NewSwitchoverDatabaseNodeRequest calls the generic SwitchoverDatabaseNode builder with application/json body

func NewSwitchoverDatabaseNodeRequestWithBody

func NewSwitchoverDatabaseNodeRequestWithBody(server string, databaseId string, nodeName string, contentType string, body io.Reader) (*http.Request, error)

NewSwitchoverDatabaseNodeRequestWithBody generates requests for SwitchoverDatabaseNode with any type of body

func NewUpdateDatabaseRequest

func NewUpdateDatabaseRequest(server string, databaseId string, params *UpdateDatabaseParams, body UpdateDatabaseJSONRequestBody) (*http.Request, error)

NewUpdateDatabaseRequest calls the generic UpdateDatabase builder with application/json body

func NewUpdateDatabaseRequestWithBody

func NewUpdateDatabaseRequestWithBody(server string, databaseId string, params *UpdateDatabaseParams, contentType string, body io.Reader) (*http.Request, error)

NewUpdateDatabaseRequestWithBody generates requests for UpdateDatabase with any type of body

Types

type APIError

type APIError struct {
	// Message The error message.
	Message string `json:"message"`

	// Name The name of the error.
	Name string `json:"name"`
}

APIError A Control Plane API error.

type ApplyUpgradeJSONRequestBody

type ApplyUpgradeJSONRequestBody = ApplyUpgradeRequest

ApplyUpgradeJSONRequestBody defines body for ApplyUpgrade for application/json ContentType.

type ApplyUpgradeRequest

type ApplyUpgradeRequest struct {
	// Image Full container image reference of the upgrade target. Must match the image field of a stable manifest entry in the same Postgres major / Spock major bucket as the current version and be strictly newer.
	Image string `json:"image"`
}

ApplyUpgradeRequest defines model for ApplyUpgradeRequest.

type ApplyUpgradeResp

type ApplyUpgradeResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ApplyUpgradeResponse2
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseApplyUpgradeResp

func ParseApplyUpgradeResp(rsp *http.Response) (*ApplyUpgradeResp, error)

ParseApplyUpgradeResp parses an HTTP response from a ApplyUpgradeWithResponse call

func (ApplyUpgradeResp) ContentType

func (r ApplyUpgradeResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ApplyUpgradeResp) Status

func (r ApplyUpgradeResp) Status() string

Status returns HTTPResponse.Status

func (ApplyUpgradeResp) StatusCode

func (r ApplyUpgradeResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ApplyUpgradeResponse2

type ApplyUpgradeResponse2 struct {
	Database Database5 `json:"database"`
	Task     Task      `json:"task"`
}

ApplyUpgradeResponse2 defines model for ApplyUpgradeResponse2.

type AvailableUpgrade

type AvailableUpgrade struct {
	// Image Full container image reference for the upgrade candidate.
	Image string `json:"image"`

	// PostgresVersion Postgres version of the upgrade candidate.
	PostgresVersion string `json:"postgres_version"`

	// SpockVersion Spock major version of the upgrade candidate.
	SpockVersion string `json:"spock_version"`
}

AvailableUpgrade A newer stable image available for the database in the same Postgres major / Spock major bucket.

type BackupConfigSpec

type BackupConfigSpec struct {
	// Repositories The repositories for this backup configuration.
	Repositories []BackupRepositorySpec `json:"repositories"`

	// Schedules The schedules for this backup configuration.
	Schedules *[]BackupScheduleSpec `json:"schedules,omitempty"`
}

BackupConfigSpec defines model for BackupConfigSpec.

type BackupDatabaseNodeJSONRequestBody

type BackupDatabaseNodeJSONRequestBody = BackupOptions

BackupDatabaseNodeJSONRequestBody defines body for BackupDatabaseNode for application/json ContentType.

type BackupDatabaseNodeParams

type BackupDatabaseNodeParams struct {
	// Force Forcibly attempt backup even in unmodifiable state
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

BackupDatabaseNodeParams defines parameters for BackupDatabaseNode.

type BackupDatabaseNodeResp

type BackupDatabaseNodeResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BackupDatabaseNodeResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseBackupDatabaseNodeResp

func ParseBackupDatabaseNodeResp(rsp *http.Response) (*BackupDatabaseNodeResp, error)

ParseBackupDatabaseNodeResp parses an HTTP response from a BackupDatabaseNodeWithResponse call

func (BackupDatabaseNodeResp) ContentType

func (r BackupDatabaseNodeResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (BackupDatabaseNodeResp) Status

func (r BackupDatabaseNodeResp) Status() string

Status returns HTTPResponse.Status

func (BackupDatabaseNodeResp) StatusCode

func (r BackupDatabaseNodeResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type BackupDatabaseNodeResponse

type BackupDatabaseNodeResponse struct {
	Task Task `json:"task"`
}

BackupDatabaseNodeResponse defines model for BackupDatabaseNodeResponse.

type BackupOptions

type BackupOptions struct {
	// Annotations Annotations for the backup.
	Annotations *map[string]string `json:"annotations,omitempty"`

	// BackupOptions Options for the backup.
	BackupOptions *map[string]string `json:"backup_options,omitempty"`

	// Type The type of backup.
	Type BackupOptionsType `json:"type"`
}

BackupOptions defines model for BackupOptions.

type BackupOptionsType

type BackupOptionsType string

BackupOptionsType The type of backup.

const (
	BackupOptionsTypeDiff BackupOptionsType = "diff"
	BackupOptionsTypeFull BackupOptionsType = "full"
	BackupOptionsTypeIncr BackupOptionsType = "incr"
)

Defines values for BackupOptionsType.

func (BackupOptionsType) Valid

func (e BackupOptionsType) Valid() bool

Valid indicates whether the value is a known member of the BackupOptionsType enum.

type BackupRepositorySpec

type BackupRepositorySpec struct {
	// AzureAccount The Azure account name for this repository. Only applies when type = 'azure'.
	AzureAccount *string `json:"azure_account,omitempty"`

	// AzureContainer The Azure container name for this repository. Only applies when type = 'azure'.
	AzureContainer *string `json:"azure_container,omitempty"`

	// AzureEndpoint The optional Azure endpoint for this repository. Only applies when type = 'azure'.
	AzureEndpoint *string `json:"azure_endpoint,omitempty"`

	// AzureKey The Azure storage account access key to use for this repository. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.
	AzureKey *string `json:"azure_key,omitempty"`

	// BasePath The base path within the repository to store backups. Required for type = 'posix' and 'cifs'.
	BasePath *string `json:"base_path,omitempty"`

	// CustomOptions Additional options to apply to this repository.
	CustomOptions *map[string]string `json:"custom_options,omitempty"`

	// GcsBucket The GCS bucket name for this repository. Only applies when type = 'gcs'.
	GcsBucket *string `json:"gcs_bucket,omitempty"`

	// GcsEndpoint The optional GCS endpoint for this repository. Only applies when type = 'gcs'.
	GcsEndpoint *string `json:"gcs_endpoint,omitempty"`

	// GcsKey Optional base64-encoded private key data. If omitted, pgbackrest will use the service account attached to the instance profile. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.
	GcsKey *string `json:"gcs_key,omitempty"`

	// Id A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
	Id *string `json:"id,omitempty"`

	// RetentionFull The count of full backups to retain or the time to retain full backups.
	RetentionFull *int64 `json:"retention_full,omitempty"`

	// RetentionFullType The type of measure used for retention_full.
	RetentionFullType *BackupRepositorySpecRetentionFullType `json:"retention_full_type,omitempty"`

	// S3Bucket The S3 bucket name for this repository. Only applies when type = 's3'.
	S3Bucket *string `json:"s3_bucket,omitempty"`

	// S3Endpoint The optional S3 endpoint for this repository. Only applies when type = 's3'.
	S3Endpoint *string `json:"s3_endpoint,omitempty"`

	// S3Key An optional AWS access key ID to use for this repository. If not provided, pgbackrest will use the default credential provider chain. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.
	S3Key *string `json:"s3_key,omitempty"`

	// S3KeySecret The corresponding secret for the AWS access key ID in s3_key. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.
	S3KeySecret *string `json:"s3_key_secret,omitempty"`

	// S3Region The region of the S3 bucket for this repository. Only applies when type = 's3'.
	S3Region *string `json:"s3_region,omitempty"`

	// Type The type of this repository.
	Type BackupRepositorySpecType `json:"type"`
}

BackupRepositorySpec defines model for BackupRepositorySpec.

type BackupRepositorySpecRetentionFullType

type BackupRepositorySpecRetentionFullType string

BackupRepositorySpecRetentionFullType The type of measure used for retention_full.

const (
	BackupRepositorySpecRetentionFullTypeCount BackupRepositorySpecRetentionFullType = "count"
	BackupRepositorySpecRetentionFullTypeTime  BackupRepositorySpecRetentionFullType = "time"
)

Defines values for BackupRepositorySpecRetentionFullType.

func (BackupRepositorySpecRetentionFullType) Valid

Valid indicates whether the value is a known member of the BackupRepositorySpecRetentionFullType enum.

type BackupRepositorySpecType

type BackupRepositorySpecType string

BackupRepositorySpecType The type of this repository.

const (
	BackupRepositorySpecTypeAzure BackupRepositorySpecType = "azure"
	BackupRepositorySpecTypeCifs  BackupRepositorySpecType = "cifs"
	BackupRepositorySpecTypeGcs   BackupRepositorySpecType = "gcs"
	BackupRepositorySpecTypePosix BackupRepositorySpecType = "posix"
	BackupRepositorySpecTypeS3    BackupRepositorySpecType = "s3"
)

Defines values for BackupRepositorySpecType.

func (BackupRepositorySpecType) Valid

func (e BackupRepositorySpecType) Valid() bool

Valid indicates whether the value is a known member of the BackupRepositorySpecType enum.

type BackupScheduleSpec

type BackupScheduleSpec struct {
	// CronExpression The cron expression for this schedule.
	CronExpression string `json:"cron_expression"`

	// Id The unique identifier for this backup schedule.
	Id string `json:"id"`

	// Type The type of backup to take on this schedule.
	Type BackupScheduleSpecType `json:"type"`
}

BackupScheduleSpec defines model for BackupScheduleSpec.

type BackupScheduleSpecType

type BackupScheduleSpecType string

BackupScheduleSpecType The type of backup to take on this schedule.

const (
	BackupScheduleSpecTypeFull BackupScheduleSpecType = "full"
	BackupScheduleSpecTypeIncr BackupScheduleSpecType = "incr"
)

Defines values for BackupScheduleSpecType.

func (BackupScheduleSpecType) Valid

func (e BackupScheduleSpecType) Valid() bool

Valid indicates whether the value is a known member of the BackupScheduleSpecType enum.

type CancelDatabaseTaskResp

type CancelDatabaseTaskResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Task
	JSON400      *APIError
	JSON404      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseCancelDatabaseTaskResp

func ParseCancelDatabaseTaskResp(rsp *http.Response) (*CancelDatabaseTaskResp, error)

ParseCancelDatabaseTaskResp parses an HTTP response from a CancelDatabaseTaskWithResponse call

func (CancelDatabaseTaskResp) ContentType

func (r CancelDatabaseTaskResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CancelDatabaseTaskResp) Status

func (r CancelDatabaseTaskResp) Status() string

Status returns HTTPResponse.Status

func (CancelDatabaseTaskResp) StatusCode

func (r CancelDatabaseTaskResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) ApplyUpgrade

func (c *Client) ApplyUpgrade(ctx context.Context, databaseId string, body ApplyUpgradeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ApplyUpgradeWithBody

func (c *Client) ApplyUpgradeWithBody(ctx context.Context, databaseId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) BackupDatabaseNode

func (c *Client) BackupDatabaseNode(ctx context.Context, databaseId string, nodeName string, params *BackupDatabaseNodeParams, body BackupDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) BackupDatabaseNodeWithBody

func (c *Client) BackupDatabaseNodeWithBody(ctx context.Context, databaseId string, nodeName string, params *BackupDatabaseNodeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CancelDatabaseTask

func (c *Client) CancelDatabaseTask(ctx context.Context, databaseId string, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDatabase

func (c *Client) CreateDatabase(ctx context.Context, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateDatabaseWithBody

func (c *Client) CreateDatabaseWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteDatabase

func (c *Client) DeleteDatabase(ctx context.Context, databaseId string, params *DeleteDatabaseParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) FailoverDatabaseNode

func (c *Client) FailoverDatabaseNode(ctx context.Context, databaseId string, nodeName string, body FailoverDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) FailoverDatabaseNodeWithBody

func (c *Client) FailoverDatabaseNodeWithBody(ctx context.Context, databaseId string, nodeName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCluster

func (c *Client) GetCluster(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetDatabase

func (c *Client) GetDatabase(ctx context.Context, databaseId string, params *GetDatabaseParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetDatabaseTask

func (c *Client) GetDatabaseTask(ctx context.Context, databaseId string, taskId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetDatabaseTaskLog

func (c *Client) GetDatabaseTaskLog(ctx context.Context, databaseId string, taskId openapi_types.UUID, params *GetDatabaseTaskLogParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetHost

func (c *Client) GetHost(ctx context.Context, hostId string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetHostTask

func (c *Client) GetHostTask(ctx context.Context, hostId string, taskId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetHostTaskLog

func (c *Client) GetHostTaskLog(ctx context.Context, hostId string, taskId openapi_types.UUID, params *GetHostTaskLogParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetJoinToken

func (c *Client) GetJoinToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetVersion

func (c *Client) GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) InitCluster

func (c *Client) InitCluster(ctx context.Context, params *InitClusterParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) JoinCluster

func (c *Client) JoinCluster(ctx context.Context, body JoinClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) JoinClusterWithBody

func (c *Client) JoinClusterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListDatabaseTasks

func (c *Client) ListDatabaseTasks(ctx context.Context, databaseId string, params *ListDatabaseTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListDatabases

func (c *Client) ListDatabases(ctx context.Context, params *ListDatabasesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListHostTasks

func (c *Client) ListHostTasks(ctx context.Context, hostId string, params *ListHostTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListHosts

func (c *Client) ListHosts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListTasks

func (c *Client) ListTasks(ctx context.Context, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RemoveHost

func (c *Client) RemoveHost(ctx context.Context, hostId string, params *RemoveHostParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RestartInstance

func (c *Client) RestartInstance(ctx context.Context, databaseId string, instanceId string, body RestartInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RestartInstanceWithBody

func (c *Client) RestartInstanceWithBody(ctx context.Context, databaseId string, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RestoreDatabase

func (c *Client) RestoreDatabase(ctx context.Context, databaseId string, params *RestoreDatabaseParams, body RestoreDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RestoreDatabaseWithBody

func (c *Client) RestoreDatabaseWithBody(ctx context.Context, databaseId string, params *RestoreDatabaseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) StartInstance

func (c *Client) StartInstance(ctx context.Context, databaseId string, instanceId string, params *StartInstanceParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) StopInstance

func (c *Client) StopInstance(ctx context.Context, databaseId string, instanceId string, params *StopInstanceParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SwitchoverDatabaseNode

func (c *Client) SwitchoverDatabaseNode(ctx context.Context, databaseId string, nodeName string, body SwitchoverDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SwitchoverDatabaseNodeWithBody

func (c *Client) SwitchoverDatabaseNodeWithBody(ctx context.Context, databaseId string, nodeName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateDatabase

func (c *Client) UpdateDatabase(ctx context.Context, databaseId string, params *UpdateDatabaseParams, body UpdateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateDatabaseWithBody

func (c *Client) UpdateDatabaseWithBody(ctx context.Context, databaseId string, params *UpdateDatabaseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetCluster request
	GetCluster(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// InitCluster request
	InitCluster(ctx context.Context, params *InitClusterParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// JoinClusterWithBody request with any body
	JoinClusterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	JoinCluster(ctx context.Context, body JoinClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetJoinToken request
	GetJoinToken(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListDatabases request
	ListDatabases(ctx context.Context, params *ListDatabasesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateDatabaseWithBody request with any body
	CreateDatabaseWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateDatabase(ctx context.Context, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteDatabase request
	DeleteDatabase(ctx context.Context, databaseId string, params *DeleteDatabaseParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetDatabase request
	GetDatabase(ctx context.Context, databaseId string, params *GetDatabaseParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateDatabaseWithBody request with any body
	UpdateDatabaseWithBody(ctx context.Context, databaseId string, params *UpdateDatabaseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateDatabase(ctx context.Context, databaseId string, params *UpdateDatabaseParams, body UpdateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RestartInstanceWithBody request with any body
	RestartInstanceWithBody(ctx context.Context, databaseId string, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RestartInstance(ctx context.Context, databaseId string, instanceId string, body RestartInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StartInstance request
	StartInstance(ctx context.Context, databaseId string, instanceId string, params *StartInstanceParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StopInstance request
	StopInstance(ctx context.Context, databaseId string, instanceId string, params *StopInstanceParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// BackupDatabaseNodeWithBody request with any body
	BackupDatabaseNodeWithBody(ctx context.Context, databaseId string, nodeName string, params *BackupDatabaseNodeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	BackupDatabaseNode(ctx context.Context, databaseId string, nodeName string, params *BackupDatabaseNodeParams, body BackupDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// FailoverDatabaseNodeWithBody request with any body
	FailoverDatabaseNodeWithBody(ctx context.Context, databaseId string, nodeName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	FailoverDatabaseNode(ctx context.Context, databaseId string, nodeName string, body FailoverDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SwitchoverDatabaseNodeWithBody request with any body
	SwitchoverDatabaseNodeWithBody(ctx context.Context, databaseId string, nodeName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SwitchoverDatabaseNode(ctx context.Context, databaseId string, nodeName string, body SwitchoverDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RestoreDatabaseWithBody request with any body
	RestoreDatabaseWithBody(ctx context.Context, databaseId string, params *RestoreDatabaseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RestoreDatabase(ctx context.Context, databaseId string, params *RestoreDatabaseParams, body RestoreDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListDatabaseTasks request
	ListDatabaseTasks(ctx context.Context, databaseId string, params *ListDatabaseTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetDatabaseTask request
	GetDatabaseTask(ctx context.Context, databaseId string, taskId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CancelDatabaseTask request
	CancelDatabaseTask(ctx context.Context, databaseId string, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetDatabaseTaskLog request
	GetDatabaseTaskLog(ctx context.Context, databaseId string, taskId openapi_types.UUID, params *GetDatabaseTaskLogParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ApplyUpgradeWithBody request with any body
	ApplyUpgradeWithBody(ctx context.Context, databaseId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ApplyUpgrade(ctx context.Context, databaseId string, body ApplyUpgradeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListHosts request
	ListHosts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RemoveHost request
	RemoveHost(ctx context.Context, hostId string, params *RemoveHostParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHost request
	GetHost(ctx context.Context, hostId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListHostTasks request
	ListHostTasks(ctx context.Context, hostId string, params *ListHostTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHostTask request
	GetHostTask(ctx context.Context, hostId string, taskId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHostTaskLog request
	GetHostTaskLog(ctx context.Context, hostId string, taskId openapi_types.UUID, params *GetHostTaskLogParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListTasks request
	ListTasks(ctx context.Context, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVersion request
	GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) ApplyUpgradeWithBodyWithResponse

func (c *ClientWithResponses) ApplyUpgradeWithBodyWithResponse(ctx context.Context, databaseId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyUpgradeResp, error)

ApplyUpgradeWithBodyWithResponse request with arbitrary body returning *ApplyUpgradeResp

func (*ClientWithResponses) ApplyUpgradeWithResponse

func (c *ClientWithResponses) ApplyUpgradeWithResponse(ctx context.Context, databaseId string, body ApplyUpgradeJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyUpgradeResp, error)

func (*ClientWithResponses) BackupDatabaseNodeWithBodyWithResponse

func (c *ClientWithResponses) BackupDatabaseNodeWithBodyWithResponse(ctx context.Context, databaseId string, nodeName string, params *BackupDatabaseNodeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BackupDatabaseNodeResp, error)

BackupDatabaseNodeWithBodyWithResponse request with arbitrary body returning *BackupDatabaseNodeResp

func (*ClientWithResponses) BackupDatabaseNodeWithResponse

func (c *ClientWithResponses) BackupDatabaseNodeWithResponse(ctx context.Context, databaseId string, nodeName string, params *BackupDatabaseNodeParams, body BackupDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*BackupDatabaseNodeResp, error)

func (*ClientWithResponses) CancelDatabaseTaskWithResponse

func (c *ClientWithResponses) CancelDatabaseTaskWithResponse(ctx context.Context, databaseId string, taskId string, reqEditors ...RequestEditorFn) (*CancelDatabaseTaskResp, error)

CancelDatabaseTaskWithResponse request returning *CancelDatabaseTaskResp

func (*ClientWithResponses) CreateDatabaseWithBodyWithResponse

func (c *ClientWithResponses) CreateDatabaseWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseResp, error)

CreateDatabaseWithBodyWithResponse request with arbitrary body returning *CreateDatabaseResp

func (*ClientWithResponses) CreateDatabaseWithResponse

func (c *ClientWithResponses) CreateDatabaseWithResponse(ctx context.Context, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseResp, error)

func (*ClientWithResponses) DeleteDatabaseWithResponse

func (c *ClientWithResponses) DeleteDatabaseWithResponse(ctx context.Context, databaseId string, params *DeleteDatabaseParams, reqEditors ...RequestEditorFn) (*DeleteDatabaseResp, error)

DeleteDatabaseWithResponse request returning *DeleteDatabaseResp

func (*ClientWithResponses) FailoverDatabaseNodeWithBodyWithResponse

func (c *ClientWithResponses) FailoverDatabaseNodeWithBodyWithResponse(ctx context.Context, databaseId string, nodeName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FailoverDatabaseNodeResp, error)

FailoverDatabaseNodeWithBodyWithResponse request with arbitrary body returning *FailoverDatabaseNodeResp

func (*ClientWithResponses) FailoverDatabaseNodeWithResponse

func (c *ClientWithResponses) FailoverDatabaseNodeWithResponse(ctx context.Context, databaseId string, nodeName string, body FailoverDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*FailoverDatabaseNodeResp, error)

func (*ClientWithResponses) GetClusterWithResponse

func (c *ClientWithResponses) GetClusterWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClusterResp, error)

GetClusterWithResponse request returning *GetClusterResp

func (*ClientWithResponses) GetDatabaseTaskLogWithResponse

func (c *ClientWithResponses) GetDatabaseTaskLogWithResponse(ctx context.Context, databaseId string, taskId openapi_types.UUID, params *GetDatabaseTaskLogParams, reqEditors ...RequestEditorFn) (*GetDatabaseTaskLogResp, error)

GetDatabaseTaskLogWithResponse request returning *GetDatabaseTaskLogResp

func (*ClientWithResponses) GetDatabaseTaskWithResponse

func (c *ClientWithResponses) GetDatabaseTaskWithResponse(ctx context.Context, databaseId string, taskId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetDatabaseTaskResp, error)

GetDatabaseTaskWithResponse request returning *GetDatabaseTaskResp

func (*ClientWithResponses) GetDatabaseWithResponse

func (c *ClientWithResponses) GetDatabaseWithResponse(ctx context.Context, databaseId string, params *GetDatabaseParams, reqEditors ...RequestEditorFn) (*GetDatabaseResp, error)

GetDatabaseWithResponse request returning *GetDatabaseResp

func (*ClientWithResponses) GetHostTaskLogWithResponse

func (c *ClientWithResponses) GetHostTaskLogWithResponse(ctx context.Context, hostId string, taskId openapi_types.UUID, params *GetHostTaskLogParams, reqEditors ...RequestEditorFn) (*GetHostTaskLogResp, error)

GetHostTaskLogWithResponse request returning *GetHostTaskLogResp

func (*ClientWithResponses) GetHostTaskWithResponse

func (c *ClientWithResponses) GetHostTaskWithResponse(ctx context.Context, hostId string, taskId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetHostTaskResp, error)

GetHostTaskWithResponse request returning *GetHostTaskResp

func (*ClientWithResponses) GetHostWithResponse

func (c *ClientWithResponses) GetHostWithResponse(ctx context.Context, hostId string, reqEditors ...RequestEditorFn) (*GetHostResp, error)

GetHostWithResponse request returning *GetHostResp

func (*ClientWithResponses) GetJoinTokenWithResponse

func (c *ClientWithResponses) GetJoinTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJoinTokenResp, error)

GetJoinTokenWithResponse request returning *GetJoinTokenResp

func (*ClientWithResponses) GetVersionWithResponse

func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResp, error)

GetVersionWithResponse request returning *GetVersionResp

func (*ClientWithResponses) InitClusterWithResponse

func (c *ClientWithResponses) InitClusterWithResponse(ctx context.Context, params *InitClusterParams, reqEditors ...RequestEditorFn) (*InitClusterResp, error)

InitClusterWithResponse request returning *InitClusterResp

func (*ClientWithResponses) JoinClusterWithBodyWithResponse

func (c *ClientWithResponses) JoinClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JoinClusterResp, error)

JoinClusterWithBodyWithResponse request with arbitrary body returning *JoinClusterResp

func (*ClientWithResponses) JoinClusterWithResponse

func (c *ClientWithResponses) JoinClusterWithResponse(ctx context.Context, body JoinClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*JoinClusterResp, error)

func (*ClientWithResponses) ListDatabaseTasksWithResponse

func (c *ClientWithResponses) ListDatabaseTasksWithResponse(ctx context.Context, databaseId string, params *ListDatabaseTasksParams, reqEditors ...RequestEditorFn) (*ListDatabaseTasksResp, error)

ListDatabaseTasksWithResponse request returning *ListDatabaseTasksResp

func (*ClientWithResponses) ListDatabasesWithResponse

func (c *ClientWithResponses) ListDatabasesWithResponse(ctx context.Context, params *ListDatabasesParams, reqEditors ...RequestEditorFn) (*ListDatabasesResp, error)

ListDatabasesWithResponse request returning *ListDatabasesResp

func (*ClientWithResponses) ListHostTasksWithResponse

func (c *ClientWithResponses) ListHostTasksWithResponse(ctx context.Context, hostId string, params *ListHostTasksParams, reqEditors ...RequestEditorFn) (*ListHostTasksResp, error)

ListHostTasksWithResponse request returning *ListHostTasksResp

func (*ClientWithResponses) ListHostsWithResponse

func (c *ClientWithResponses) ListHostsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListHostsResp, error)

ListHostsWithResponse request returning *ListHostsResp

func (*ClientWithResponses) ListTasksWithResponse

func (c *ClientWithResponses) ListTasksWithResponse(ctx context.Context, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResp, error)

ListTasksWithResponse request returning *ListTasksResp

func (*ClientWithResponses) RemoveHostWithResponse

func (c *ClientWithResponses) RemoveHostWithResponse(ctx context.Context, hostId string, params *RemoveHostParams, reqEditors ...RequestEditorFn) (*RemoveHostResp, error)

RemoveHostWithResponse request returning *RemoveHostResp

func (*ClientWithResponses) RestartInstanceWithBodyWithResponse

func (c *ClientWithResponses) RestartInstanceWithBodyWithResponse(ctx context.Context, databaseId string, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestartInstanceResp, error)

RestartInstanceWithBodyWithResponse request with arbitrary body returning *RestartInstanceResp

func (*ClientWithResponses) RestartInstanceWithResponse

func (c *ClientWithResponses) RestartInstanceWithResponse(ctx context.Context, databaseId string, instanceId string, body RestartInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*RestartInstanceResp, error)

func (*ClientWithResponses) RestoreDatabaseWithBodyWithResponse

func (c *ClientWithResponses) RestoreDatabaseWithBodyWithResponse(ctx context.Context, databaseId string, params *RestoreDatabaseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestoreDatabaseResp, error)

RestoreDatabaseWithBodyWithResponse request with arbitrary body returning *RestoreDatabaseResp

func (*ClientWithResponses) RestoreDatabaseWithResponse

func (c *ClientWithResponses) RestoreDatabaseWithResponse(ctx context.Context, databaseId string, params *RestoreDatabaseParams, body RestoreDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*RestoreDatabaseResp, error)

func (*ClientWithResponses) StartInstanceWithResponse

func (c *ClientWithResponses) StartInstanceWithResponse(ctx context.Context, databaseId string, instanceId string, params *StartInstanceParams, reqEditors ...RequestEditorFn) (*StartInstanceResp, error)

StartInstanceWithResponse request returning *StartInstanceResp

func (*ClientWithResponses) StopInstanceWithResponse

func (c *ClientWithResponses) StopInstanceWithResponse(ctx context.Context, databaseId string, instanceId string, params *StopInstanceParams, reqEditors ...RequestEditorFn) (*StopInstanceResp, error)

StopInstanceWithResponse request returning *StopInstanceResp

func (*ClientWithResponses) SwitchoverDatabaseNodeWithBodyWithResponse

func (c *ClientWithResponses) SwitchoverDatabaseNodeWithBodyWithResponse(ctx context.Context, databaseId string, nodeName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SwitchoverDatabaseNodeResp, error)

SwitchoverDatabaseNodeWithBodyWithResponse request with arbitrary body returning *SwitchoverDatabaseNodeResp

func (*ClientWithResponses) SwitchoverDatabaseNodeWithResponse

func (c *ClientWithResponses) SwitchoverDatabaseNodeWithResponse(ctx context.Context, databaseId string, nodeName string, body SwitchoverDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*SwitchoverDatabaseNodeResp, error)

func (*ClientWithResponses) UpdateDatabaseWithBodyWithResponse

func (c *ClientWithResponses) UpdateDatabaseWithBodyWithResponse(ctx context.Context, databaseId string, params *UpdateDatabaseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseResp, error)

UpdateDatabaseWithBodyWithResponse request with arbitrary body returning *UpdateDatabaseResp

func (*ClientWithResponses) UpdateDatabaseWithResponse

func (c *ClientWithResponses) UpdateDatabaseWithResponse(ctx context.Context, databaseId string, params *UpdateDatabaseParams, body UpdateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseResp, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetClusterWithResponse request
	GetClusterWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClusterResp, error)

	// InitClusterWithResponse request
	InitClusterWithResponse(ctx context.Context, params *InitClusterParams, reqEditors ...RequestEditorFn) (*InitClusterResp, error)

	// JoinClusterWithBodyWithResponse request with any body
	JoinClusterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*JoinClusterResp, error)

	JoinClusterWithResponse(ctx context.Context, body JoinClusterJSONRequestBody, reqEditors ...RequestEditorFn) (*JoinClusterResp, error)

	// GetJoinTokenWithResponse request
	GetJoinTokenWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetJoinTokenResp, error)

	// ListDatabasesWithResponse request
	ListDatabasesWithResponse(ctx context.Context, params *ListDatabasesParams, reqEditors ...RequestEditorFn) (*ListDatabasesResp, error)

	// CreateDatabaseWithBodyWithResponse request with any body
	CreateDatabaseWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDatabaseResp, error)

	CreateDatabaseWithResponse(ctx context.Context, body CreateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDatabaseResp, error)

	// DeleteDatabaseWithResponse request
	DeleteDatabaseWithResponse(ctx context.Context, databaseId string, params *DeleteDatabaseParams, reqEditors ...RequestEditorFn) (*DeleteDatabaseResp, error)

	// GetDatabaseWithResponse request
	GetDatabaseWithResponse(ctx context.Context, databaseId string, params *GetDatabaseParams, reqEditors ...RequestEditorFn) (*GetDatabaseResp, error)

	// UpdateDatabaseWithBodyWithResponse request with any body
	UpdateDatabaseWithBodyWithResponse(ctx context.Context, databaseId string, params *UpdateDatabaseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDatabaseResp, error)

	UpdateDatabaseWithResponse(ctx context.Context, databaseId string, params *UpdateDatabaseParams, body UpdateDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDatabaseResp, error)

	// RestartInstanceWithBodyWithResponse request with any body
	RestartInstanceWithBodyWithResponse(ctx context.Context, databaseId string, instanceId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestartInstanceResp, error)

	RestartInstanceWithResponse(ctx context.Context, databaseId string, instanceId string, body RestartInstanceJSONRequestBody, reqEditors ...RequestEditorFn) (*RestartInstanceResp, error)

	// StartInstanceWithResponse request
	StartInstanceWithResponse(ctx context.Context, databaseId string, instanceId string, params *StartInstanceParams, reqEditors ...RequestEditorFn) (*StartInstanceResp, error)

	// StopInstanceWithResponse request
	StopInstanceWithResponse(ctx context.Context, databaseId string, instanceId string, params *StopInstanceParams, reqEditors ...RequestEditorFn) (*StopInstanceResp, error)

	// BackupDatabaseNodeWithBodyWithResponse request with any body
	BackupDatabaseNodeWithBodyWithResponse(ctx context.Context, databaseId string, nodeName string, params *BackupDatabaseNodeParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BackupDatabaseNodeResp, error)

	BackupDatabaseNodeWithResponse(ctx context.Context, databaseId string, nodeName string, params *BackupDatabaseNodeParams, body BackupDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*BackupDatabaseNodeResp, error)

	// FailoverDatabaseNodeWithBodyWithResponse request with any body
	FailoverDatabaseNodeWithBodyWithResponse(ctx context.Context, databaseId string, nodeName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*FailoverDatabaseNodeResp, error)

	FailoverDatabaseNodeWithResponse(ctx context.Context, databaseId string, nodeName string, body FailoverDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*FailoverDatabaseNodeResp, error)

	// SwitchoverDatabaseNodeWithBodyWithResponse request with any body
	SwitchoverDatabaseNodeWithBodyWithResponse(ctx context.Context, databaseId string, nodeName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SwitchoverDatabaseNodeResp, error)

	SwitchoverDatabaseNodeWithResponse(ctx context.Context, databaseId string, nodeName string, body SwitchoverDatabaseNodeJSONRequestBody, reqEditors ...RequestEditorFn) (*SwitchoverDatabaseNodeResp, error)

	// RestoreDatabaseWithBodyWithResponse request with any body
	RestoreDatabaseWithBodyWithResponse(ctx context.Context, databaseId string, params *RestoreDatabaseParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RestoreDatabaseResp, error)

	RestoreDatabaseWithResponse(ctx context.Context, databaseId string, params *RestoreDatabaseParams, body RestoreDatabaseJSONRequestBody, reqEditors ...RequestEditorFn) (*RestoreDatabaseResp, error)

	// ListDatabaseTasksWithResponse request
	ListDatabaseTasksWithResponse(ctx context.Context, databaseId string, params *ListDatabaseTasksParams, reqEditors ...RequestEditorFn) (*ListDatabaseTasksResp, error)

	// GetDatabaseTaskWithResponse request
	GetDatabaseTaskWithResponse(ctx context.Context, databaseId string, taskId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetDatabaseTaskResp, error)

	// CancelDatabaseTaskWithResponse request
	CancelDatabaseTaskWithResponse(ctx context.Context, databaseId string, taskId string, reqEditors ...RequestEditorFn) (*CancelDatabaseTaskResp, error)

	// GetDatabaseTaskLogWithResponse request
	GetDatabaseTaskLogWithResponse(ctx context.Context, databaseId string, taskId openapi_types.UUID, params *GetDatabaseTaskLogParams, reqEditors ...RequestEditorFn) (*GetDatabaseTaskLogResp, error)

	// ApplyUpgradeWithBodyWithResponse request with any body
	ApplyUpgradeWithBodyWithResponse(ctx context.Context, databaseId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ApplyUpgradeResp, error)

	ApplyUpgradeWithResponse(ctx context.Context, databaseId string, body ApplyUpgradeJSONRequestBody, reqEditors ...RequestEditorFn) (*ApplyUpgradeResp, error)

	// ListHostsWithResponse request
	ListHostsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListHostsResp, error)

	// RemoveHostWithResponse request
	RemoveHostWithResponse(ctx context.Context, hostId string, params *RemoveHostParams, reqEditors ...RequestEditorFn) (*RemoveHostResp, error)

	// GetHostWithResponse request
	GetHostWithResponse(ctx context.Context, hostId string, reqEditors ...RequestEditorFn) (*GetHostResp, error)

	// ListHostTasksWithResponse request
	ListHostTasksWithResponse(ctx context.Context, hostId string, params *ListHostTasksParams, reqEditors ...RequestEditorFn) (*ListHostTasksResp, error)

	// GetHostTaskWithResponse request
	GetHostTaskWithResponse(ctx context.Context, hostId string, taskId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetHostTaskResp, error)

	// GetHostTaskLogWithResponse request
	GetHostTaskLogWithResponse(ctx context.Context, hostId string, taskId openapi_types.UUID, params *GetHostTaskLogParams, reqEditors ...RequestEditorFn) (*GetHostTaskLogResp, error)

	// ListTasksWithResponse request
	ListTasksWithResponse(ctx context.Context, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResp, error)

	// GetVersionWithResponse request
	GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResp, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Cluster

type Cluster struct {
	// Hosts All of the hosts in the cluster.
	Hosts []Host `json:"hosts"`

	// Id A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
	Id     string        `json:"id"`
	Status ClusterStatus `json:"status"`
}

Cluster defines model for Cluster.

type ClusterJoinToken

type ClusterJoinToken struct {
	// ServerUrls Existing server to join
	ServerUrls []string `json:"server_urls"`

	// Token Token to join an existing cluster.
	Token string `json:"token"`
}

ClusterJoinToken defines model for ClusterJoinToken.

type ClusterStatus

type ClusterStatus struct {
	// State The current state of the cluster.
	State ClusterStatusState `json:"state"`
}

ClusterStatus defines model for ClusterStatus.

type ClusterStatusState

type ClusterStatusState string

ClusterStatusState The current state of the cluster.

const (
	ClusterStatusStateAvailable ClusterStatusState = "available"
	ClusterStatusStateError     ClusterStatusState = "error"
)

Defines values for ClusterStatusState.

func (ClusterStatusState) Valid

func (e ClusterStatusState) Valid() bool

Valid indicates whether the value is a known member of the ClusterStatusState enum.

type ComponentStatus

type ComponentStatus struct {
	// Details Additional details about the component.
	Details *map[string]interface{} `json:"details,omitempty"`

	// Error Error message from any errors that occurred during the health check.
	Error *string `json:"error,omitempty"`

	// Healthy Indicates if the component is healthy.
	Healthy bool `json:"healthy"`
}

ComponentStatus defines model for ComponentStatus.

type CreateDatabaseJSONRequestBody

type CreateDatabaseJSONRequestBody = CreateDatabaseRequest2

CreateDatabaseJSONRequestBody defines body for CreateDatabase for application/json ContentType.

type CreateDatabaseRequest2

type CreateDatabaseRequest2 struct {
	// Id Unique identifier for the database.
	Id   *string       `json:"id,omitempty"`
	Spec DatabaseSpec2 `json:"spec"`

	// TenantId Unique identifier for the database's owner.
	TenantId *string `json:"tenant_id,omitempty"`
}

CreateDatabaseRequest2 defines model for CreateDatabaseRequest2.

type CreateDatabaseResp

type CreateDatabaseResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CreateDatabaseResponse2
	JSON400      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseCreateDatabaseResp

func ParseCreateDatabaseResp(rsp *http.Response) (*CreateDatabaseResp, error)

ParseCreateDatabaseResp parses an HTTP response from a CreateDatabaseWithResponse call

func (CreateDatabaseResp) ContentType

func (r CreateDatabaseResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateDatabaseResp) Status

func (r CreateDatabaseResp) Status() string

Status returns HTTPResponse.Status

func (CreateDatabaseResp) StatusCode

func (r CreateDatabaseResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateDatabaseResponse2

type CreateDatabaseResponse2 struct {
	Database Database2 `json:"database"`
	Task     Task      `json:"task"`
}

CreateDatabaseResponse2 defines model for CreateDatabaseResponse2.

type Database2

type Database2 struct {
	// AvailableUpgrades Newer stable image versions available in the same Postgres major / Spock major bucket. Present only when ?include=available_upgrades is set.
	AvailableUpgrades *[]AvailableUpgrade `json:"available_upgrades,omitempty"`

	// CreatedAt The time that the database was created.
	CreatedAt time.Time `json:"created_at"`

	// Id Unique identifier for the database.
	Id string `json:"id"`

	// Instances All of the instances in the database.
	Instances *[]Instance `json:"instances,omitempty"`

	// ServiceInstances Service instances running alongside this database.
	ServiceInstances *[]ServiceInstance `json:"service_instances,omitempty"`
	Spec             *DatabaseSpec3     `json:"spec,omitempty"`

	// State Current state of the database.
	State Database2State `json:"state"`

	// TenantId Unique identifier for the database's owner.
	TenantId *string `json:"tenant_id,omitempty"`

	// UpdatedAt The time that the database was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

Database2 defines model for Database2.

type Database2State

type Database2State string

Database2State Current state of the database.

const (
	Database2StateAvailable Database2State = "available"
	Database2StateCreating  Database2State = "creating"
	Database2StateDegraded  Database2State = "degraded"
	Database2StateDeleting  Database2State = "deleting"
	Database2StateFailed    Database2State = "failed"
	Database2StateModifying Database2State = "modifying"
	Database2StateRestoring Database2State = "restoring"
	Database2StateUnknown   Database2State = "unknown"
)

Defines values for Database2State.

func (Database2State) Valid

func (e Database2State) Valid() bool

Valid indicates whether the value is a known member of the Database2State enum.

type Database3

type Database3 struct {
	// AvailableUpgrades Newer stable image versions available in the same Postgres major / Spock major bucket. Present only when ?include=available_upgrades is set.
	AvailableUpgrades *[]AvailableUpgrade `json:"available_upgrades,omitempty"`

	// CreatedAt The time that the database was created.
	CreatedAt time.Time `json:"created_at"`

	// Id Unique identifier for the database.
	Id string `json:"id"`

	// Instances All of the instances in the database.
	Instances *[]Instance `json:"instances,omitempty"`

	// ServiceInstances Service instances running alongside this database.
	ServiceInstances *[]ServiceInstance `json:"service_instances,omitempty"`
	Spec             *DatabaseSpec4     `json:"spec,omitempty"`

	// State Current state of the database.
	State Database3State `json:"state"`

	// TenantId Unique identifier for the database's owner.
	TenantId *string `json:"tenant_id,omitempty"`

	// UpdatedAt The time that the database was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

Database3 defines model for Database3.

type Database3State

type Database3State string

Database3State Current state of the database.

const (
	Database3StateAvailable Database3State = "available"
	Database3StateCreating  Database3State = "creating"
	Database3StateDegraded  Database3State = "degraded"
	Database3StateDeleting  Database3State = "deleting"
	Database3StateFailed    Database3State = "failed"
	Database3StateModifying Database3State = "modifying"
	Database3StateRestoring Database3State = "restoring"
	Database3StateUnknown   Database3State = "unknown"
)

Defines values for Database3State.

func (Database3State) Valid

func (e Database3State) Valid() bool

Valid indicates whether the value is a known member of the Database3State enum.

type Database4

type Database4 struct {
	// AvailableUpgrades Newer stable image versions available in the same Postgres major / Spock major bucket. Present only when ?include=available_upgrades is set.
	AvailableUpgrades *[]AvailableUpgrade `json:"available_upgrades,omitempty"`

	// CreatedAt The time that the database was created.
	CreatedAt time.Time `json:"created_at"`

	// Id Unique identifier for the database.
	Id string `json:"id"`

	// Instances All of the instances in the database.
	Instances *[]Instance `json:"instances,omitempty"`

	// ServiceInstances Service instances running alongside this database.
	ServiceInstances *[]ServiceInstance `json:"service_instances,omitempty"`
	Spec             *DatabaseSpec6     `json:"spec,omitempty"`

	// State Current state of the database.
	State Database4State `json:"state"`

	// TenantId Unique identifier for the database's owner.
	TenantId *string `json:"tenant_id,omitempty"`

	// UpdatedAt The time that the database was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

Database4 defines model for Database4.

type Database4State

type Database4State string

Database4State Current state of the database.

const (
	Database4StateAvailable Database4State = "available"
	Database4StateCreating  Database4State = "creating"
	Database4StateDegraded  Database4State = "degraded"
	Database4StateDeleting  Database4State = "deleting"
	Database4StateFailed    Database4State = "failed"
	Database4StateModifying Database4State = "modifying"
	Database4StateRestoring Database4State = "restoring"
	Database4StateUnknown   Database4State = "unknown"
)

Defines values for Database4State.

func (Database4State) Valid

func (e Database4State) Valid() bool

Valid indicates whether the value is a known member of the Database4State enum.

type Database5

type Database5 struct {
	// AvailableUpgrades Newer stable image versions available in the same Postgres major / Spock major bucket. Present only when ?include=available_upgrades is set.
	AvailableUpgrades *[]AvailableUpgrade `json:"available_upgrades,omitempty"`

	// CreatedAt The time that the database was created.
	CreatedAt time.Time `json:"created_at"`

	// Id Unique identifier for the database.
	Id string `json:"id"`

	// Instances All of the instances in the database.
	Instances *[]Instance `json:"instances,omitempty"`

	// ServiceInstances Service instances running alongside this database.
	ServiceInstances *[]ServiceInstance `json:"service_instances,omitempty"`
	Spec             *DatabaseSpec7     `json:"spec,omitempty"`

	// State Current state of the database.
	State Database5State `json:"state"`

	// TenantId Unique identifier for the database's owner.
	TenantId *string `json:"tenant_id,omitempty"`

	// UpdatedAt The time that the database was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

Database5 defines model for Database5.

type Database5State

type Database5State string

Database5State Current state of the database.

const (
	Database5StateAvailable Database5State = "available"
	Database5StateCreating  Database5State = "creating"
	Database5StateDegraded  Database5State = "degraded"
	Database5StateDeleting  Database5State = "deleting"
	Database5StateFailed    Database5State = "failed"
	Database5StateModifying Database5State = "modifying"
	Database5StateRestoring Database5State = "restoring"
	Database5StateUnknown   Database5State = "unknown"
)

Defines values for Database5State.

func (Database5State) Valid

func (e Database5State) Valid() bool

Valid indicates whether the value is a known member of the Database5State enum.

type Database6

type Database6 struct {
	// AvailableUpgrades Newer stable image versions available in the same Postgres major / Spock major bucket. Present only when ?include=available_upgrades is set.
	AvailableUpgrades *[]AvailableUpgrade `json:"available_upgrades,omitempty"`

	// CreatedAt The time that the database was created.
	CreatedAt time.Time `json:"created_at"`

	// Id Unique identifier for the database.
	Id string `json:"id"`

	// Instances All of the instances in the database.
	Instances *[]Instance `json:"instances,omitempty"`

	// ServiceInstances Service instances running alongside this database.
	ServiceInstances *[]ServiceInstance `json:"service_instances,omitempty"`
	Spec             *DatabaseSpec8     `json:"spec,omitempty"`

	// State Current state of the database.
	State Database6State `json:"state"`

	// TenantId Unique identifier for the database's owner.
	TenantId *string `json:"tenant_id,omitempty"`

	// UpdatedAt The time that the database was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

Database6 defines model for Database6.

type Database6State

type Database6State string

Database6State Current state of the database.

const (
	Database6StateAvailable Database6State = "available"
	Database6StateCreating  Database6State = "creating"
	Database6StateDegraded  Database6State = "degraded"
	Database6StateDeleting  Database6State = "deleting"
	Database6StateFailed    Database6State = "failed"
	Database6StateModifying Database6State = "modifying"
	Database6StateRestoring Database6State = "restoring"
	Database6StateUnknown   Database6State = "unknown"
)

Defines values for Database6State.

func (Database6State) Valid

func (e Database6State) Valid() bool

Valid indicates whether the value is a known member of the Database6State enum.

type DatabaseConnection

type DatabaseConnection struct {
	// TargetNodes Optional ordered list of database node names. When set, the service's database connection includes only the listed nodes in the specified order.
	TargetNodes *[]string `json:"target_nodes,omitempty"`

	// TargetSessionAttrs Optional libpq target_session_attrs value. When set, overrides the default derived from the service config. Valid values: primary, prefer-standby, standby, read-write, any.
	TargetSessionAttrs *DatabaseConnectionTargetSessionAttrs `json:"target_session_attrs,omitempty"`
}

DatabaseConnection Controls how the service connects to the database. When omitted, all nodes are included with the local node first and target_session_attrs is derived from the service config.

type DatabaseConnectionTargetSessionAttrs

type DatabaseConnectionTargetSessionAttrs string

DatabaseConnectionTargetSessionAttrs Optional libpq target_session_attrs value. When set, overrides the default derived from the service config. Valid values: primary, prefer-standby, standby, read-write, any.

const (
	DatabaseConnectionTargetSessionAttrsAny           DatabaseConnectionTargetSessionAttrs = "any"
	DatabaseConnectionTargetSessionAttrsPreferStandby DatabaseConnectionTargetSessionAttrs = "prefer-standby"
	DatabaseConnectionTargetSessionAttrsPrimary       DatabaseConnectionTargetSessionAttrs = "primary"
	DatabaseConnectionTargetSessionAttrsReadWrite     DatabaseConnectionTargetSessionAttrs = "read-write"
	DatabaseConnectionTargetSessionAttrsStandby       DatabaseConnectionTargetSessionAttrs = "standby"
)

Defines values for DatabaseConnectionTargetSessionAttrs.

func (DatabaseConnectionTargetSessionAttrs) Valid

Valid indicates whether the value is a known member of the DatabaseConnectionTargetSessionAttrs enum.

type DatabaseNodeSpec2

type DatabaseNodeSpec2 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// HostIds The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Name The name of the database node.
	Name string `json:"name"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this node. Overrides the Patroni port set in the DatabaseSpec. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries for this particular node, one rule per array element. Prepended to the database-level pg_hba_conf entries, so node entries take first-match priority. Entries are inserted between control-plane's system-user rules and its catch-all, and cannot affect control-plane-internal connectivity.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries for this particular node, one mapping per array element. Prepended to the database-level pg_ident_conf entries.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`

	// SourceNode The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.
	SourceNode *string `json:"source_node,omitempty"`
}

DatabaseNodeSpec2 defines model for DatabaseNodeSpec2.

type DatabaseNodeSpec3

type DatabaseNodeSpec3 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// HostIds The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Name The name of the database node.
	Name string `json:"name"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this node. Overrides the Patroni port set in the DatabaseSpec. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries for this particular node, one rule per array element. Prepended to the database-level pg_hba_conf entries, so node entries take first-match priority. Entries are inserted between control-plane's system-user rules and its catch-all, and cannot affect control-plane-internal connectivity.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries for this particular node, one mapping per array element. Prepended to the database-level pg_ident_conf entries.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`

	// SourceNode The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.
	SourceNode *string `json:"source_node,omitempty"`
}

DatabaseNodeSpec3 defines model for DatabaseNodeSpec3.

type DatabaseNodeSpec4

type DatabaseNodeSpec4 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// HostIds The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Name The name of the database node.
	Name string `json:"name"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this node. Overrides the Patroni port set in the DatabaseSpec. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries for this particular node, one rule per array element. Prepended to the database-level pg_hba_conf entries, so node entries take first-match priority. Entries are inserted between control-plane's system-user rules and its catch-all, and cannot affect control-plane-internal connectivity.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries for this particular node, one mapping per array element. Prepended to the database-level pg_ident_conf entries.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`

	// SourceNode The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.
	SourceNode *string `json:"source_node,omitempty"`
}

DatabaseNodeSpec4 defines model for DatabaseNodeSpec4.

type DatabaseNodeSpec5

type DatabaseNodeSpec5 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// HostIds The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Name The name of the database node.
	Name string `json:"name"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this node. Overrides the Patroni port set in the DatabaseSpec. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries for this particular node, one rule per array element. Prepended to the database-level pg_hba_conf entries, so node entries take first-match priority. Entries are inserted between control-plane's system-user rules and its catch-all, and cannot affect control-plane-internal connectivity.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries for this particular node, one mapping per array element. Prepended to the database-level pg_ident_conf entries.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`

	// SourceNode The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.
	SourceNode *string `json:"source_node,omitempty"`
}

DatabaseNodeSpec5 defines model for DatabaseNodeSpec5.

type DatabaseNodeSpec6

type DatabaseNodeSpec6 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// HostIds The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Name The name of the database node.
	Name string `json:"name"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this node. Overrides the Patroni port set in the DatabaseSpec. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries for this particular node, one rule per array element. Prepended to the database-level pg_hba_conf entries, so node entries take first-match priority. Entries are inserted between control-plane's system-user rules and its catch-all, and cannot affect control-plane-internal connectivity.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries for this particular node, one mapping per array element. Prepended to the database-level pg_ident_conf entries.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`

	// SourceNode The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.
	SourceNode *string `json:"source_node,omitempty"`
}

DatabaseNodeSpec6 defines model for DatabaseNodeSpec6.

type DatabaseNodeSpec7

type DatabaseNodeSpec7 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// HostIds The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Name The name of the database node.
	Name string `json:"name"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this node. Overrides the Patroni port set in the DatabaseSpec. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries for this particular node, one rule per array element. Prepended to the database-level pg_hba_conf entries, so node entries take first-match priority. Entries are inserted between control-plane's system-user rules and its catch-all, and cannot affect control-plane-internal connectivity.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries for this particular node, one mapping per array element. Prepended to the database-level pg_ident_conf entries.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`

	// SourceNode The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.
	SourceNode *string `json:"source_node,omitempty"`
}

DatabaseNodeSpec7 defines model for DatabaseNodeSpec7.

type DatabaseNodeSpec8

type DatabaseNodeSpec8 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// HostIds The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Name The name of the database node.
	Name string `json:"name"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this node. Overrides the Patroni port set in the DatabaseSpec. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries for this particular node, one rule per array element. Prepended to the database-level pg_hba_conf entries, so node entries take first-match priority. Entries are inserted between control-plane's system-user rules and its catch-all, and cannot affect control-plane-internal connectivity.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries for this particular node, one mapping per array element. Prepended to the database-level pg_ident_conf entries.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`

	// SourceNode The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.
	SourceNode *string `json:"source_node,omitempty"`
}

DatabaseNodeSpec8 defines model for DatabaseNodeSpec8.

type DatabaseScripts

type DatabaseScripts struct {
	// PostDatabaseCreate Each element of this array is an individual SQL statement.
	PostDatabaseCreate *SQLScript `json:"post_database_create,omitempty"`

	// PostInit Each element of this array is an individual SQL statement.
	PostInit *SQLScript `json:"post_init,omitempty"`
}

DatabaseScripts defines model for DatabaseScripts.

type DatabaseSpec2

type DatabaseSpec2 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseName The name of the Postgres database.
	DatabaseName string `json:"database_name"`

	// DatabaseUsers The users to create for this database.
	DatabaseUsers *[]DatabaseUserSpec `json:"database_users,omitempty"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Nodes The Spock nodes for this database.
	Nodes []DatabaseNodeSpec2 `json:"nodes"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this database. If the port is 0, each instance will be assigned a random port. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries, one rule per array element. Inserted between control-plane's system-user rules and its catch-all, so they cannot affect control-plane-internal connectivity (Patroni, replication, health checks). Node-level pg_hba_conf entries are prepended to these.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries, one mapping per array element. Purely additive; control-plane writes no pg_ident entries of its own. The primary use case is cert auth with map= translating certificate CNs to PostgreSQL usernames.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version in 'major.minor' format.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`
	Scripts        *DatabaseScripts        `json:"scripts,omitempty"`

	// Services Service instances to run alongside the database (e.g., MCP servers).
	Services *[]ServiceSpec2 `json:"services,omitempty"`

	// SpockVersion The major version of the Spock extension.
	SpockVersion *string `json:"spock_version,omitempty"`
}

DatabaseSpec2 defines model for DatabaseSpec2.

type DatabaseSpec3

type DatabaseSpec3 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseName The name of the Postgres database.
	DatabaseName string `json:"database_name"`

	// DatabaseUsers The users to create for this database.
	DatabaseUsers *[]DatabaseUserSpec `json:"database_users,omitempty"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Nodes The Spock nodes for this database.
	Nodes []DatabaseNodeSpec3 `json:"nodes"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this database. If the port is 0, each instance will be assigned a random port. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries, one rule per array element. Inserted between control-plane's system-user rules and its catch-all, so they cannot affect control-plane-internal connectivity (Patroni, replication, health checks). Node-level pg_hba_conf entries are prepended to these.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries, one mapping per array element. Purely additive; control-plane writes no pg_ident entries of its own. The primary use case is cert auth with map= translating certificate CNs to PostgreSQL usernames.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version in 'major.minor' format.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`
	Scripts        *DatabaseScripts        `json:"scripts,omitempty"`

	// Services Service instances to run alongside the database (e.g., MCP servers).
	Services *[]ServiceSpec3 `json:"services,omitempty"`

	// SpockVersion The major version of the Spock extension.
	SpockVersion *string `json:"spock_version,omitempty"`
}

DatabaseSpec3 defines model for DatabaseSpec3.

type DatabaseSpec4

type DatabaseSpec4 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseName The name of the Postgres database.
	DatabaseName string `json:"database_name"`

	// DatabaseUsers The users to create for this database.
	DatabaseUsers *[]DatabaseUserSpec `json:"database_users,omitempty"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Nodes The Spock nodes for this database.
	Nodes []DatabaseNodeSpec4 `json:"nodes"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this database. If the port is 0, each instance will be assigned a random port. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries, one rule per array element. Inserted between control-plane's system-user rules and its catch-all, so they cannot affect control-plane-internal connectivity (Patroni, replication, health checks). Node-level pg_hba_conf entries are prepended to these.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries, one mapping per array element. Purely additive; control-plane writes no pg_ident entries of its own. The primary use case is cert auth with map= translating certificate CNs to PostgreSQL usernames.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version in 'major.minor' format.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`
	Scripts        *DatabaseScripts        `json:"scripts,omitempty"`

	// Services Service instances to run alongside the database (e.g., MCP servers).
	Services *[]ServiceSpec4 `json:"services,omitempty"`

	// SpockVersion The major version of the Spock extension.
	SpockVersion *string `json:"spock_version,omitempty"`
}

DatabaseSpec4 defines model for DatabaseSpec4.

type DatabaseSpec5

type DatabaseSpec5 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseName The name of the Postgres database.
	DatabaseName string `json:"database_name"`

	// DatabaseUsers The users to create for this database.
	DatabaseUsers *[]DatabaseUserSpec `json:"database_users,omitempty"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Nodes The Spock nodes for this database.
	Nodes []DatabaseNodeSpec5 `json:"nodes"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this database. If the port is 0, each instance will be assigned a random port. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries, one rule per array element. Inserted between control-plane's system-user rules and its catch-all, so they cannot affect control-plane-internal connectivity (Patroni, replication, health checks). Node-level pg_hba_conf entries are prepended to these.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries, one mapping per array element. Purely additive; control-plane writes no pg_ident entries of its own. The primary use case is cert auth with map= translating certificate CNs to PostgreSQL usernames.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version in 'major.minor' format.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`
	Scripts        *DatabaseScripts        `json:"scripts,omitempty"`

	// Services Service instances to run alongside the database (e.g., MCP servers).
	Services *[]ServiceSpec5 `json:"services,omitempty"`

	// SpockVersion The major version of the Spock extension.
	SpockVersion *string `json:"spock_version,omitempty"`
}

DatabaseSpec5 defines model for DatabaseSpec5.

type DatabaseSpec6

type DatabaseSpec6 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseName The name of the Postgres database.
	DatabaseName string `json:"database_name"`

	// DatabaseUsers The users to create for this database.
	DatabaseUsers *[]DatabaseUserSpec `json:"database_users,omitempty"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Nodes The Spock nodes for this database.
	Nodes []DatabaseNodeSpec6 `json:"nodes"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this database. If the port is 0, each instance will be assigned a random port. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries, one rule per array element. Inserted between control-plane's system-user rules and its catch-all, so they cannot affect control-plane-internal connectivity (Patroni, replication, health checks). Node-level pg_hba_conf entries are prepended to these.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries, one mapping per array element. Purely additive; control-plane writes no pg_ident entries of its own. The primary use case is cert auth with map= translating certificate CNs to PostgreSQL usernames.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version in 'major.minor' format.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`
	Scripts        *DatabaseScripts        `json:"scripts,omitempty"`

	// Services Service instances to run alongside the database (e.g., MCP servers).
	Services *[]ServiceSpec6 `json:"services,omitempty"`

	// SpockVersion The major version of the Spock extension.
	SpockVersion *string `json:"spock_version,omitempty"`
}

DatabaseSpec6 defines model for DatabaseSpec6.

type DatabaseSpec7

type DatabaseSpec7 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseName The name of the Postgres database.
	DatabaseName string `json:"database_name"`

	// DatabaseUsers The users to create for this database.
	DatabaseUsers *[]DatabaseUserSpec `json:"database_users,omitempty"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Nodes The Spock nodes for this database.
	Nodes []DatabaseNodeSpec7 `json:"nodes"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this database. If the port is 0, each instance will be assigned a random port. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries, one rule per array element. Inserted between control-plane's system-user rules and its catch-all, so they cannot affect control-plane-internal connectivity (Patroni, replication, health checks). Node-level pg_hba_conf entries are prepended to these.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries, one mapping per array element. Purely additive; control-plane writes no pg_ident entries of its own. The primary use case is cert auth with map= translating certificate CNs to PostgreSQL usernames.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version in 'major.minor' format.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`
	Scripts        *DatabaseScripts        `json:"scripts,omitempty"`

	// Services Service instances to run alongside the database (e.g., MCP servers).
	Services *[]ServiceSpec7 `json:"services,omitempty"`

	// SpockVersion The major version of the Spock extension.
	SpockVersion *string `json:"spock_version,omitempty"`
}

DatabaseSpec7 defines model for DatabaseSpec7.

type DatabaseSpec8

type DatabaseSpec8 struct {
	BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"`

	// Cpus The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseName The name of the Postgres database.
	DatabaseName string `json:"database_name"`

	// DatabaseUsers The users to create for this database.
	DatabaseUsers *[]DatabaseUserSpec `json:"database_users,omitempty"`

	// Memory The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.
	Memory *string `json:"memory,omitempty"`

	// Nodes The Spock nodes for this database.
	Nodes []DatabaseNodeSpec8 `json:"nodes"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// PatroniPort The port used by Patroni for this database. If the port is 0, each instance will be assigned a random port. NOTE: This field is not currently supported for Docker Swarm.
	PatroniPort *int64 `json:"patroni_port,omitempty"`

	// PgHbaConf Additional pg_hba.conf entries, one rule per array element. Inserted between control-plane's system-user rules and its catch-all, so they cannot affect control-plane-internal connectivity (Patroni, replication, health checks). Node-level pg_hba_conf entries are prepended to these.
	PgHbaConf *[]string `json:"pg_hba_conf,omitempty"`

	// PgIdentConf Additional pg_ident.conf entries, one mapping per array element. Purely additive; control-plane writes no pg_ident entries of its own. The primary use case is cert auth with map= translating certificate CNs to PostgreSQL usernames.
	PgIdentConf *[]string `json:"pg_ident_conf,omitempty"`

	// Port The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.
	Port *int64 `json:"port,omitempty"`

	// PostgresVersion The Postgres version in 'major.minor' format.
	PostgresVersion *string `json:"postgres_version,omitempty"`

	// PostgresqlConf Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.
	PostgresqlConf *map[string]interface{} `json:"postgresql_conf,omitempty"`
	RestoreConfig  *RestoreConfigSpec      `json:"restore_config,omitempty"`
	Scripts        *DatabaseScripts        `json:"scripts,omitempty"`

	// Services Service instances to run alongside the database (e.g., MCP servers).
	Services *[]ServiceSpec8 `json:"services,omitempty"`

	// SpockVersion The major version of the Spock extension.
	SpockVersion *string `json:"spock_version,omitempty"`
}

DatabaseSpec8 defines model for DatabaseSpec8.

type DatabaseSummary

type DatabaseSummary struct {
	// AvailableUpgrades Newer stable image versions available in the same Postgres major / Spock major bucket. Present only when ?include=available_upgrades is set.
	AvailableUpgrades *[]AvailableUpgrade `json:"available_upgrades,omitempty"`

	// CreatedAt The time that the database was created.
	CreatedAt time.Time `json:"created_at"`

	// Id A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
	Id string `json:"id"`

	// Instances All of the instances in the database.
	Instances *[]Instance `json:"instances,omitempty"`

	// State Current state of the database.
	State DatabaseSummaryState `json:"state"`

	// TenantId A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
	TenantId *string `json:"tenant_id,omitempty"`

	// UpdatedAt The time that the database was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

DatabaseSummary defines model for DatabaseSummary.

type DatabaseSummaryState

type DatabaseSummaryState string

DatabaseSummaryState Current state of the database.

const (
	DatabaseSummaryStateAvailable DatabaseSummaryState = "available"
	DatabaseSummaryStateBackingUp DatabaseSummaryState = "backing_up"
	DatabaseSummaryStateCreating  DatabaseSummaryState = "creating"
	DatabaseSummaryStateDegraded  DatabaseSummaryState = "degraded"
	DatabaseSummaryStateDeleting  DatabaseSummaryState = "deleting"
	DatabaseSummaryStateFailed    DatabaseSummaryState = "failed"
	DatabaseSummaryStateModifying DatabaseSummaryState = "modifying"
	DatabaseSummaryStateRestoring DatabaseSummaryState = "restoring"
	DatabaseSummaryStateUnknown   DatabaseSummaryState = "unknown"
)

Defines values for DatabaseSummaryState.

func (DatabaseSummaryState) Valid

func (e DatabaseSummaryState) Valid() bool

Valid indicates whether the value is a known member of the DatabaseSummaryState enum.

type DatabaseUserSpec

type DatabaseUserSpec struct {
	// Attributes The attributes to assign to this database user.
	Attributes *[]string `json:"attributes,omitempty"`

	// DbOwner If true, this user will be granted database ownership.
	DbOwner *bool `json:"db_owner,omitempty"`

	// Password The password for this database user. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.
	Password *string `json:"password,omitempty"`

	// Roles The roles to assign to this database user.
	Roles *[]string `json:"roles,omitempty"`

	// Username The username for this database user.
	Username string `json:"username"`
}

DatabaseUserSpec defines model for DatabaseUserSpec.

type DeleteDatabaseParams

type DeleteDatabaseParams struct {
	// Force Force deletion of a database even in an unmodifiable state
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

DeleteDatabaseParams defines parameters for DeleteDatabase.

type DeleteDatabaseResp

type DeleteDatabaseResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *DeleteDatabaseResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseDeleteDatabaseResp

func ParseDeleteDatabaseResp(rsp *http.Response) (*DeleteDatabaseResp, error)

ParseDeleteDatabaseResp parses an HTTP response from a DeleteDatabaseWithResponse call

func (DeleteDatabaseResp) ContentType

func (r DeleteDatabaseResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteDatabaseResp) Status

func (r DeleteDatabaseResp) Status() string

Status returns HTTPResponse.Status

func (DeleteDatabaseResp) StatusCode

func (r DeleteDatabaseResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteDatabaseResponse

type DeleteDatabaseResponse struct {
	Task Task `json:"task"`
}

DeleteDatabaseResponse defines model for DeleteDatabaseResponse.

type ExtraNetworkSpec

type ExtraNetworkSpec struct {
	// Aliases Optional network-scoped aliases for the container.
	Aliases *[]string `json:"aliases,omitempty"`

	// DriverOpts Optional driver options for the network connection.
	DriverOpts *map[string]string `json:"driver_opts,omitempty"`

	// Id The name or ID of the network to connect to.
	Id string `json:"id"`
}

ExtraNetworkSpec Describes an additional Docker network to attach the container to.

type ExtraVolumesSpec

type ExtraVolumesSpec struct {
	// DestinationPath The path inside the container where the volume will be mounted.
	DestinationPath string `json:"destination_path"`

	// HostPath The host path for the volume.
	HostPath string `json:"host_path"`
}

ExtraVolumesSpec Extra volumes to mount from the host to the database container.

type FailoverDatabaseNodeJSONRequestBody

type FailoverDatabaseNodeJSONRequestBody = FailoverDatabaseNodeRequest2

FailoverDatabaseNodeJSONRequestBody defines body for FailoverDatabaseNode for application/json ContentType.

type FailoverDatabaseNodeRequest2

type FailoverDatabaseNodeRequest2 struct {
	// CandidateInstanceId Optional instance_id of the replica to promote. If omitted, a candidate will be selected.
	CandidateInstanceId *string `json:"candidate_instance_id,omitempty"`

	// SkipValidation If true, skip the health validations that prevent running failover on a healthy cluster.
	SkipValidation *bool `json:"skip_validation,omitempty"`
}

FailoverDatabaseNodeRequest2 defines model for FailoverDatabaseNodeRequest2.

type FailoverDatabaseNodeResp

type FailoverDatabaseNodeResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *FailoverDatabaseNodeResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseFailoverDatabaseNodeResp

func ParseFailoverDatabaseNodeResp(rsp *http.Response) (*FailoverDatabaseNodeResp, error)

ParseFailoverDatabaseNodeResp parses an HTTP response from a FailoverDatabaseNodeWithResponse call

func (FailoverDatabaseNodeResp) ContentType

func (r FailoverDatabaseNodeResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (FailoverDatabaseNodeResp) Status

func (r FailoverDatabaseNodeResp) Status() string

Status returns HTTPResponse.Status

func (FailoverDatabaseNodeResp) StatusCode

func (r FailoverDatabaseNodeResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type FailoverDatabaseNodeResponse

type FailoverDatabaseNodeResponse struct {
	Task Task `json:"task"`
}

FailoverDatabaseNodeResponse defines model for FailoverDatabaseNodeResponse.

type GetClusterResp

type GetClusterResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Cluster
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetClusterResp

func ParseGetClusterResp(rsp *http.Response) (*GetClusterResp, error)

ParseGetClusterResp parses an HTTP response from a GetClusterWithResponse call

func (GetClusterResp) ContentType

func (r GetClusterResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetClusterResp) Status

func (r GetClusterResp) Status() string

Status returns HTTPResponse.Status

func (GetClusterResp) StatusCode

func (r GetClusterResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDatabaseParams

type GetDatabaseParams struct {
	// Include Optional fields to include in the response. Supported values: available_upgrades.
	Include *[]string `form:"include,omitempty" json:"include,omitempty"`
}

GetDatabaseParams defines parameters for GetDatabase.

type GetDatabaseResp

type GetDatabaseResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Database3
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetDatabaseResp

func ParseGetDatabaseResp(rsp *http.Response) (*GetDatabaseResp, error)

ParseGetDatabaseResp parses an HTTP response from a GetDatabaseWithResponse call

func (GetDatabaseResp) ContentType

func (r GetDatabaseResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetDatabaseResp) Status

func (r GetDatabaseResp) Status() string

Status returns HTTPResponse.Status

func (GetDatabaseResp) StatusCode

func (r GetDatabaseResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDatabaseTaskLogParams

type GetDatabaseTaskLogParams struct {
	// AfterEntryId ID of the entry to start from.
	AfterEntryId *openapi_types.UUID `form:"after_entry_id,omitempty" json:"after_entry_id,omitempty"`

	// Limit Maximum number of entries to return.
	Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"`
}

GetDatabaseTaskLogParams defines parameters for GetDatabaseTaskLog.

type GetDatabaseTaskLogResp

type GetDatabaseTaskLogResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TaskLog
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetDatabaseTaskLogResp

func ParseGetDatabaseTaskLogResp(rsp *http.Response) (*GetDatabaseTaskLogResp, error)

ParseGetDatabaseTaskLogResp parses an HTTP response from a GetDatabaseTaskLogWithResponse call

func (GetDatabaseTaskLogResp) ContentType

func (r GetDatabaseTaskLogResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetDatabaseTaskLogResp) Status

func (r GetDatabaseTaskLogResp) Status() string

Status returns HTTPResponse.Status

func (GetDatabaseTaskLogResp) StatusCode

func (r GetDatabaseTaskLogResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetDatabaseTaskResp

type GetDatabaseTaskResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Task
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetDatabaseTaskResp

func ParseGetDatabaseTaskResp(rsp *http.Response) (*GetDatabaseTaskResp, error)

ParseGetDatabaseTaskResp parses an HTTP response from a GetDatabaseTaskWithResponse call

func (GetDatabaseTaskResp) ContentType

func (r GetDatabaseTaskResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetDatabaseTaskResp) Status

func (r GetDatabaseTaskResp) Status() string

Status returns HTTPResponse.Status

func (GetDatabaseTaskResp) StatusCode

func (r GetDatabaseTaskResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHostResp

type GetHostResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Host
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetHostResp

func ParseGetHostResp(rsp *http.Response) (*GetHostResp, error)

ParseGetHostResp parses an HTTP response from a GetHostWithResponse call

func (GetHostResp) ContentType

func (r GetHostResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHostResp) Status

func (r GetHostResp) Status() string

Status returns HTTPResponse.Status

func (GetHostResp) StatusCode

func (r GetHostResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHostTaskLogParams

type GetHostTaskLogParams struct {
	// AfterEntryId ID of the entry to start from.
	AfterEntryId *openapi_types.UUID `form:"after_entry_id,omitempty" json:"after_entry_id,omitempty"`

	// Limit Maximum number of entries to return.
	Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"`
}

GetHostTaskLogParams defines parameters for GetHostTaskLog.

type GetHostTaskLogResp

type GetHostTaskLogResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TaskLog
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetHostTaskLogResp

func ParseGetHostTaskLogResp(rsp *http.Response) (*GetHostTaskLogResp, error)

ParseGetHostTaskLogResp parses an HTTP response from a GetHostTaskLogWithResponse call

func (GetHostTaskLogResp) ContentType

func (r GetHostTaskLogResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHostTaskLogResp) Status

func (r GetHostTaskLogResp) Status() string

Status returns HTTPResponse.Status

func (GetHostTaskLogResp) StatusCode

func (r GetHostTaskLogResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetHostTaskResp

type GetHostTaskResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Task
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetHostTaskResp

func ParseGetHostTaskResp(rsp *http.Response) (*GetHostTaskResp, error)

ParseGetHostTaskResp parses an HTTP response from a GetHostTaskWithResponse call

func (GetHostTaskResp) ContentType

func (r GetHostTaskResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetHostTaskResp) Status

func (r GetHostTaskResp) Status() string

Status returns HTTPResponse.Status

func (GetHostTaskResp) StatusCode

func (r GetHostTaskResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetJoinTokenResp

type GetJoinTokenResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ClusterJoinToken
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetJoinTokenResp

func ParseGetJoinTokenResp(rsp *http.Response) (*GetJoinTokenResp, error)

ParseGetJoinTokenResp parses an HTTP response from a GetJoinTokenWithResponse call

func (GetJoinTokenResp) ContentType

func (r GetJoinTokenResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetJoinTokenResp) Status

func (r GetJoinTokenResp) Status() string

Status returns HTTPResponse.Status

func (GetJoinTokenResp) StatusCode

func (r GetJoinTokenResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVersionResp

type GetVersionResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *VersionInfo
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseGetVersionResp

func ParseGetVersionResp(rsp *http.Response) (*GetVersionResp, error)

ParseGetVersionResp parses an HTTP response from a GetVersionWithResponse call

func (GetVersionResp) ContentType

func (r GetVersionResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetVersionResp) Status

func (r GetVersionResp) Status() string

Status returns HTTPResponse.Status

func (GetVersionResp) StatusCode

func (r GetVersionResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HealthCheckResult

type HealthCheckResult struct {
	// CheckedAt The time this health check was performed.
	CheckedAt time.Time `json:"checked_at"`

	// Message Optional message about the health status.
	Message *string `json:"message,omitempty"`

	// Status The health status.
	Status HealthCheckResultStatus `json:"status"`
}

HealthCheckResult Health check result for a service instance.

type HealthCheckResultStatus

type HealthCheckResultStatus string

HealthCheckResultStatus The health status.

const (
	HealthCheckResultStatusHealthy   HealthCheckResultStatus = "healthy"
	HealthCheckResultStatusUnhealthy HealthCheckResultStatus = "unhealthy"
	HealthCheckResultStatusUnknown   HealthCheckResultStatus = "unknown"
)

Defines values for HealthCheckResultStatus.

func (HealthCheckResultStatus) Valid

func (e HealthCheckResultStatus) Valid() bool

Valid indicates whether the value is a known member of the HealthCheckResultStatus enum.

type Host

type Host struct {
	// ClientAddresses The addresses that this host advertises to client applications.
	ClientAddresses []string    `json:"client_addresses"`
	Cohort          *HostCohort `json:"cohort,omitempty"`

	// Cpus The number of CPUs on this host.
	Cpus *int64 `json:"cpus,omitempty"`

	// DataDir The data directory for the host.
	DataDir              string         `json:"data_dir"`
	DefaultPgedgeVersion *PgEdgeVersion `json:"default_pgedge_version,omitempty"`

	// EtcdMode The etcd mode for this host.
	EtcdMode *HostEtcdMode `json:"etcd_mode,omitempty"`

	// Id A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
	Id string `json:"id"`

	// Memory The amount of memory available on this host.
	Memory *string `json:"memory,omitempty"`

	// Orchestrator The orchestrator used by this host.
	Orchestrator string `json:"orchestrator"`

	// PeerAddresses The addresses that this host advertises to other hosts.
	PeerAddresses []string   `json:"peer_addresses"`
	Status        HostStatus `json:"status"`

	// SupportedPgedgeVersions The PgEdge versions supported by this host.
	SupportedPgedgeVersions *[]PgEdgeVersion `json:"supported_pgedge_versions,omitempty"`
}

Host defines model for Host.

type HostCohort

type HostCohort struct {
	// ControlAvailable Indicates if the host is a control node in the cohort.
	ControlAvailable bool `json:"control_available"`

	// MemberId The member ID of the host within the cohort.
	MemberId string `json:"member_id"`

	// Type The type of cohort that the host belongs to.
	Type string `json:"type"`
}

HostCohort defines model for HostCohort.

type HostEtcdMode

type HostEtcdMode string

HostEtcdMode The etcd mode for this host.

const (
	HostEtcdModeClient HostEtcdMode = "client"
	HostEtcdModeServer HostEtcdMode = "server"
)

Defines values for HostEtcdMode.

func (HostEtcdMode) Valid

func (e HostEtcdMode) Valid() bool

Valid indicates whether the value is a known member of the HostEtcdMode enum.

type HostStatus

type HostStatus struct {
	// Components The status of each component of the host.
	Components map[string]ComponentStatus `json:"components"`
	State      HostStatusState            `json:"state"`

	// UpdatedAt The last time the host status was updated.
	UpdatedAt time.Time `json:"updated_at"`
}

HostStatus defines model for HostStatus.

type HostStatusState

type HostStatusState string

HostStatusState defines model for HostStatus.State.

const (
	HostStatusStateDegraded    HostStatusState = "degraded"
	HostStatusStateHealthy     HostStatusState = "healthy"
	HostStatusStateUnknown     HostStatusState = "unknown"
	HostStatusStateUnreachable HostStatusState = "unreachable"
)

Defines values for HostStatusState.

func (HostStatusState) Valid

func (e HostStatusState) Valid() bool

Valid indicates whether the value is a known member of the HostStatusState enum.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InitClusterParams

type InitClusterParams struct {
	// ClusterId Optional id for the cluster, omit for default generated id
	ClusterId *string `form:"cluster_id,omitempty" json:"cluster_id,omitempty"`
}

InitClusterParams defines parameters for InitCluster.

type InitClusterResp

type InitClusterResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ClusterJoinToken
	JSON400      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseInitClusterResp

func ParseInitClusterResp(rsp *http.Response) (*InitClusterResp, error)

ParseInitClusterResp parses an HTTP response from a InitClusterWithResponse call

func (InitClusterResp) ContentType

func (r InitClusterResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (InitClusterResp) Status

func (r InitClusterResp) Status() string

Status returns HTTPResponse.Status

func (InitClusterResp) StatusCode

func (r InitClusterResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Instance

type Instance struct {
	// ConnectionInfo Connection information for a pgEdge instance.
	ConnectionInfo *InstanceConnectionInfo `json:"connection_info,omitempty"`

	// CreatedAt The time that the instance was created.
	CreatedAt time.Time `json:"created_at"`

	// Error An error message if the instance is in an error state.
	Error *string `json:"error,omitempty"`

	// HostId The ID of the host this instance is running on.
	HostId string `json:"host_id"`

	// Id Unique identifier for the instance.
	Id string `json:"id"`

	// NodeName The Spock node name for this instance.
	NodeName string `json:"node_name"`

	// Postgres Postgres status information for a pgEdge instance.
	Postgres *InstancePostgresStatus `json:"postgres,omitempty"`

	// Spock Spock status information for a pgEdge instance.
	Spock *InstanceSpockStatus `json:"spock,omitempty"`
	State InstanceState        `json:"state"`

	// StatusUpdatedAt The time that the instance status information was last updated.
	StatusUpdatedAt *time.Time `json:"status_updated_at,omitempty"`

	// UpdatedAt The time that the instance was last modified.
	UpdatedAt time.Time `json:"updated_at"`
}

Instance An instance of pgEdge Postgres running on a host.

type InstanceConnectionInfo

type InstanceConnectionInfo struct {
	// Addresses The addresses of the host that's running this instance.
	Addresses *[]string `json:"addresses,omitempty"`

	// Port The host port that Postgres is listening on for this instance.
	Port *int64 `json:"port,omitempty"`
}

InstanceConnectionInfo Connection information for a pgEdge instance.

type InstancePostgresStatus

type InstancePostgresStatus struct {
	// PatroniPaused True if Patroni is paused for this instance.
	PatroniPaused *bool   `json:"patroni_paused,omitempty"`
	PatroniState  *string `json:"patroni_state,omitempty"`

	// PendingRestart True if this instance has a pending restart from a configuration change.
	PendingRestart *bool   `json:"pending_restart,omitempty"`
	Role           *string `json:"role,omitempty"`

	// Version The version of Postgres for this instance.
	Version *string `json:"version,omitempty"`
}

InstancePostgresStatus Postgres status information for a pgEdge instance.

type InstanceSpockStatus

type InstanceSpockStatus struct {
	// ReadOnly The current spock.readonly setting.
	ReadOnly *string `json:"read_only,omitempty"`

	// Subscriptions Status information for this instance's Spock subscriptions.
	Subscriptions *[]InstanceSubscription `json:"subscriptions,omitempty"`

	// Version The version of Spock for this instance.
	Version *string `json:"version,omitempty"`
}

InstanceSpockStatus Spock status information for a pgEdge instance.

type InstanceState

type InstanceState string

InstanceState defines model for Instance.State.

const (
	InstanceStateAvailable InstanceState = "available"
	InstanceStateBackingUp InstanceState = "backing_up"
	InstanceStateCreating  InstanceState = "creating"
	InstanceStateDegraded  InstanceState = "degraded"
	InstanceStateDeleting  InstanceState = "deleting"
	InstanceStateFailed    InstanceState = "failed"
	InstanceStateModifying InstanceState = "modifying"
	InstanceStateStopped   InstanceState = "stopped"
	InstanceStateUnknown   InstanceState = "unknown"
)

Defines values for InstanceState.

func (InstanceState) Valid

func (e InstanceState) Valid() bool

Valid indicates whether the value is a known member of the InstanceState enum.

type InstanceSubscription

type InstanceSubscription struct {
	// Name The name of the subscription.
	Name string `json:"name"`

	// ProviderNode The Spock node name of the provider for this subscription.
	ProviderNode string `json:"provider_node"`

	// Status The current status of the subscription.
	Status string `json:"status"`
}

InstanceSubscription Status information for a Spock subscription.

type JoinClusterJSONRequestBody

type JoinClusterJSONRequestBody = ClusterJoinToken

JoinClusterJSONRequestBody defines body for JoinCluster for application/json ContentType.

type JoinClusterResp

type JoinClusterResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *APIError
	JSON401      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseJoinClusterResp

func ParseJoinClusterResp(rsp *http.Response) (*JoinClusterResp, error)

ParseJoinClusterResp parses an HTTP response from a JoinClusterWithResponse call

func (JoinClusterResp) ContentType

func (r JoinClusterResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (JoinClusterResp) Status

func (r JoinClusterResp) Status() string

Status returns HTTPResponse.Status

func (JoinClusterResp) StatusCode

func (r JoinClusterResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListDatabaseTasksParams

type ListDatabaseTasksParams struct {
	// AfterTaskId ID of the task to start from.
	AfterTaskId *openapi_types.UUID `form:"after_task_id,omitempty" json:"after_task_id,omitempty"`

	// Limit Maximum number of tasks to return.
	Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"`

	// SortOrder Sort order for the tasks.
	SortOrder *ListDatabaseTasksParamsSortOrder `form:"sort_order,omitempty" json:"sort_order,omitempty"`
}

ListDatabaseTasksParams defines parameters for ListDatabaseTasks.

type ListDatabaseTasksParamsSortOrder

type ListDatabaseTasksParamsSortOrder string

ListDatabaseTasksParamsSortOrder defines parameters for ListDatabaseTasks.

const (
	ListDatabaseTasksParamsSortOrderAsc        ListDatabaseTasksParamsSortOrder = "asc"
	ListDatabaseTasksParamsSortOrderAscend     ListDatabaseTasksParamsSortOrder = "ascend"
	ListDatabaseTasksParamsSortOrderAscending  ListDatabaseTasksParamsSortOrder = "ascending"
	ListDatabaseTasksParamsSortOrderDesc       ListDatabaseTasksParamsSortOrder = "desc"
	ListDatabaseTasksParamsSortOrderDescend    ListDatabaseTasksParamsSortOrder = "descend"
	ListDatabaseTasksParamsSortOrderDescending ListDatabaseTasksParamsSortOrder = "descending"
)

Defines values for ListDatabaseTasksParamsSortOrder.

func (ListDatabaseTasksParamsSortOrder) Valid

Valid indicates whether the value is a known member of the ListDatabaseTasksParamsSortOrder enum.

type ListDatabaseTasksResp

type ListDatabaseTasksResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListDatabaseTasksResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseListDatabaseTasksResp

func ParseListDatabaseTasksResp(rsp *http.Response) (*ListDatabaseTasksResp, error)

ParseListDatabaseTasksResp parses an HTTP response from a ListDatabaseTasksWithResponse call

func (ListDatabaseTasksResp) ContentType

func (r ListDatabaseTasksResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListDatabaseTasksResp) Status

func (r ListDatabaseTasksResp) Status() string

Status returns HTTPResponse.Status

func (ListDatabaseTasksResp) StatusCode

func (r ListDatabaseTasksResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListDatabaseTasksResponse

type ListDatabaseTasksResponse struct {
	// Tasks The tasks for the given database.
	Tasks []Task `json:"tasks"`
}

ListDatabaseTasksResponse defines model for ListDatabaseTasksResponse.

type ListDatabasesParams

type ListDatabasesParams struct {
	// Include Optional fields to include in each database response. Supported values: available_upgrades.
	Include *[]string `form:"include,omitempty" json:"include,omitempty"`
}

ListDatabasesParams defines parameters for ListDatabases.

type ListDatabasesResp

type ListDatabasesResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListDatabasesResponse
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseListDatabasesResp

func ParseListDatabasesResp(rsp *http.Response) (*ListDatabasesResp, error)

ParseListDatabasesResp parses an HTTP response from a ListDatabasesWithResponse call

func (ListDatabasesResp) ContentType

func (r ListDatabasesResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListDatabasesResp) Status

func (r ListDatabasesResp) Status() string

Status returns HTTPResponse.Status

func (ListDatabasesResp) StatusCode

func (r ListDatabasesResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListDatabasesResponse

type ListDatabasesResponse struct {
	// Databases The databases managed by this cluster.
	Databases []DatabaseSummary `json:"databases"`
}

ListDatabasesResponse defines model for ListDatabasesResponse.

type ListHostTasksParams

type ListHostTasksParams struct {
	// AfterTaskId ID of the task to start from.
	AfterTaskId *openapi_types.UUID `form:"after_task_id,omitempty" json:"after_task_id,omitempty"`

	// Limit Maximum number of tasks to return.
	Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"`

	// SortOrder Sort order for the tasks.
	SortOrder *ListHostTasksParamsSortOrder `form:"sort_order,omitempty" json:"sort_order,omitempty"`
}

ListHostTasksParams defines parameters for ListHostTasks.

type ListHostTasksParamsSortOrder

type ListHostTasksParamsSortOrder string

ListHostTasksParamsSortOrder defines parameters for ListHostTasks.

const (
	ListHostTasksParamsSortOrderAsc        ListHostTasksParamsSortOrder = "asc"
	ListHostTasksParamsSortOrderAscend     ListHostTasksParamsSortOrder = "ascend"
	ListHostTasksParamsSortOrderAscending  ListHostTasksParamsSortOrder = "ascending"
	ListHostTasksParamsSortOrderDesc       ListHostTasksParamsSortOrder = "desc"
	ListHostTasksParamsSortOrderDescend    ListHostTasksParamsSortOrder = "descend"
	ListHostTasksParamsSortOrderDescending ListHostTasksParamsSortOrder = "descending"
)

Defines values for ListHostTasksParamsSortOrder.

func (ListHostTasksParamsSortOrder) Valid

Valid indicates whether the value is a known member of the ListHostTasksParamsSortOrder enum.

type ListHostTasksResp

type ListHostTasksResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListHostTasksResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseListHostTasksResp

func ParseListHostTasksResp(rsp *http.Response) (*ListHostTasksResp, error)

ParseListHostTasksResp parses an HTTP response from a ListHostTasksWithResponse call

func (ListHostTasksResp) ContentType

func (r ListHostTasksResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListHostTasksResp) Status

func (r ListHostTasksResp) Status() string

Status returns HTTPResponse.Status

func (ListHostTasksResp) StatusCode

func (r ListHostTasksResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListHostTasksResponse

type ListHostTasksResponse struct {
	// Tasks The tasks for the given host.
	Tasks []Task `json:"tasks"`
}

ListHostTasksResponse defines model for ListHostTasksResponse.

type ListHostsResp

type ListHostsResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListHostsResponse
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseListHostsResp

func ParseListHostsResp(rsp *http.Response) (*ListHostsResp, error)

ParseListHostsResp parses an HTTP response from a ListHostsWithResponse call

func (ListHostsResp) ContentType

func (r ListHostsResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListHostsResp) Status

func (r ListHostsResp) Status() string

Status returns HTTPResponse.Status

func (ListHostsResp) StatusCode

func (r ListHostsResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListHostsResponse

type ListHostsResponse struct {
	// Hosts List of hosts in the cluster
	Hosts []Host `json:"hosts"`
}

ListHostsResponse Response containing the list of hosts

type ListTasksParams

type ListTasksParams struct {
	// Scope Optional scope to filter tasks (database or host).
	Scope *ListTasksParamsScope `form:"scope,omitempty" json:"scope,omitempty"`

	// EntityId Optional entity ID to filter tasks. Requires scope to be set.
	EntityId *string `form:"entity_id,omitempty" json:"entity_id,omitempty"`

	// AfterTaskId ID of the task to start from.
	AfterTaskId *openapi_types.UUID `form:"after_task_id,omitempty" json:"after_task_id,omitempty"`

	// Limit Maximum number of tasks to return.
	Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"`

	// SortOrder Sort order for the tasks.
	SortOrder *ListTasksParamsSortOrder `form:"sort_order,omitempty" json:"sort_order,omitempty"`
}

ListTasksParams defines parameters for ListTasks.

type ListTasksParamsScope

type ListTasksParamsScope string

ListTasksParamsScope defines parameters for ListTasks.

const (
	ListTasksParamsScopeDatabase ListTasksParamsScope = "database"
	ListTasksParamsScopeHost     ListTasksParamsScope = "host"
)

Defines values for ListTasksParamsScope.

func (ListTasksParamsScope) Valid

func (e ListTasksParamsScope) Valid() bool

Valid indicates whether the value is a known member of the ListTasksParamsScope enum.

type ListTasksParamsSortOrder

type ListTasksParamsSortOrder string

ListTasksParamsSortOrder defines parameters for ListTasks.

const (
	ListTasksParamsSortOrderAsc        ListTasksParamsSortOrder = "asc"
	ListTasksParamsSortOrderAscend     ListTasksParamsSortOrder = "ascend"
	ListTasksParamsSortOrderAscending  ListTasksParamsSortOrder = "ascending"
	ListTasksParamsSortOrderDesc       ListTasksParamsSortOrder = "desc"
	ListTasksParamsSortOrderDescend    ListTasksParamsSortOrder = "descend"
	ListTasksParamsSortOrderDescending ListTasksParamsSortOrder = "descending"
)

Defines values for ListTasksParamsSortOrder.

func (ListTasksParamsSortOrder) Valid

func (e ListTasksParamsSortOrder) Valid() bool

Valid indicates whether the value is a known member of the ListTasksParamsSortOrder enum.

type ListTasksResp

type ListTasksResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ListTasksResponse
	JSON400      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseListTasksResp

func ParseListTasksResp(rsp *http.Response) (*ListTasksResp, error)

ParseListTasksResp parses an HTTP response from a ListTasksWithResponse call

func (ListTasksResp) ContentType

func (r ListTasksResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListTasksResp) Status

func (r ListTasksResp) Status() string

Status returns HTTPResponse.Status

func (ListTasksResp) StatusCode

func (r ListTasksResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListTasksResponse

type ListTasksResponse struct {
	// Tasks The tasks for the given entity.
	Tasks []Task `json:"tasks"`
}

ListTasksResponse defines model for ListTasksResponse.

type OrchestratorOpts

type OrchestratorOpts struct {
	// Swarm Docker Swarm-specific options.
	Swarm *SwarmOpts `json:"swarm,omitempty"`
}

OrchestratorOpts Options specific to the selected orchestrator.

type PgEdgeVersion

type PgEdgeVersion struct {
	// PostgresVersion The Postgres major and minor version.
	PostgresVersion string `json:"postgres_version"`

	// SpockVersion The Spock major version.
	SpockVersion string `json:"spock_version"`
}

PgEdgeVersion defines model for PgEdgeVersion.

type PortMapping

type PortMapping struct {
	// ContainerPort The port number inside the container.
	ContainerPort *int64 `json:"container_port,omitempty"`

	// HostPort The port number on the host (if port-forwarded).
	HostPort *int64 `json:"host_port,omitempty"`

	// Name The name of the port (e.g., 'http', 'web-client').
	Name string `json:"name"`
}

PortMapping Port mapping information for a service instance.

type RemoveHostParams

type RemoveHostParams struct {
	// Force Force removal even if instances exist or quorum would be violated. Use only for disaster recovery when a host is permanently lost.
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

RemoveHostParams defines parameters for RemoveHost.

type RemoveHostResp

type RemoveHostResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RemoveHostResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseRemoveHostResp

func ParseRemoveHostResp(rsp *http.Response) (*RemoveHostResp, error)

ParseRemoveHostResp parses an HTTP response from a RemoveHostWithResponse call

func (RemoveHostResp) ContentType

func (r RemoveHostResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RemoveHostResp) Status

func (r RemoveHostResp) Status() string

Status returns HTTPResponse.Status

func (RemoveHostResp) StatusCode

func (r RemoveHostResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RemoveHostResponse

type RemoveHostResponse struct {
	Task Task `json:"task"`

	// UpdateDatabaseTasks The tasks that will update databases affected by the host removal.
	UpdateDatabaseTasks []Task `json:"update_database_tasks"`
}

RemoveHostResponse defines model for RemoveHostResponse.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RestartInstanceJSONBody

type RestartInstanceJSONBody struct {
	// ScheduledAt The time at which the restart is scheduled.
	ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
}

RestartInstanceJSONBody defines parameters for RestartInstance.

type RestartInstanceJSONRequestBody

type RestartInstanceJSONRequestBody RestartInstanceJSONBody

RestartInstanceJSONRequestBody defines body for RestartInstance for application/json ContentType.

type RestartInstanceResp

type RestartInstanceResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RestartInstanceResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseRestartInstanceResp

func ParseRestartInstanceResp(rsp *http.Response) (*RestartInstanceResp, error)

ParseRestartInstanceResp parses an HTTP response from a RestartInstanceWithResponse call

func (RestartInstanceResp) ContentType

func (r RestartInstanceResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RestartInstanceResp) Status

func (r RestartInstanceResp) Status() string

Status returns HTTPResponse.Status

func (RestartInstanceResp) StatusCode

func (r RestartInstanceResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RestartInstanceResponse

type RestartInstanceResponse struct {
	Task Task `json:"task"`
}

RestartInstanceResponse Response containing the restart task

type RestoreConfigSpec

type RestoreConfigSpec struct {
	Repository RestoreRepositorySpec `json:"repository"`

	// RestoreOptions Additional options to use when restoring this database. If omitted, the database will be restored to the latest point in the given repository.
	RestoreOptions *map[string]string `json:"restore_options,omitempty"`

	// SourceDatabaseId A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
	SourceDatabaseId string `json:"source_database_id"`

	// SourceDatabaseName The name of the database in this repository. The database will be renamed to the database_name in the DatabaseSpec after it's restored.
	SourceDatabaseName string `json:"source_database_name"`

	// SourceNodeName The name of the node to restore this database from.
	SourceNodeName string `json:"source_node_name"`
}

RestoreConfigSpec defines model for RestoreConfigSpec.

type RestoreDatabaseJSONRequestBody

type RestoreDatabaseJSONRequestBody = RestoreDatabaseRequest

RestoreDatabaseJSONRequestBody defines body for RestoreDatabase for application/json ContentType.

type RestoreDatabaseParams

type RestoreDatabaseParams struct {
	// Force Force restoration of a database even in an unmodifiable state
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

RestoreDatabaseParams defines parameters for RestoreDatabase.

type RestoreDatabaseRequest

type RestoreDatabaseRequest struct {
	RestoreConfig RestoreConfigSpec `json:"restore_config"`

	// TargetNodes The nodes to restore. Defaults to all nodes if empty or unspecified.
	TargetNodes *[]string `json:"target_nodes,omitempty"`
}

RestoreDatabaseRequest defines model for RestoreDatabaseRequest.

type RestoreDatabaseResp

type RestoreDatabaseResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *RestoreDatabaseResponse2
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseRestoreDatabaseResp

func ParseRestoreDatabaseResp(rsp *http.Response) (*RestoreDatabaseResp, error)

ParseRestoreDatabaseResp parses an HTTP response from a RestoreDatabaseWithResponse call

func (RestoreDatabaseResp) ContentType

func (r RestoreDatabaseResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RestoreDatabaseResp) Status

func (r RestoreDatabaseResp) Status() string

Status returns HTTPResponse.Status

func (RestoreDatabaseResp) StatusCode

func (r RestoreDatabaseResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RestoreDatabaseResponse2

type RestoreDatabaseResponse2 struct {
	Database Database6 `json:"database"`

	// NodeTasks The tasks that will restore each database node.
	NodeTasks []Task `json:"node_tasks"`
	Task      Task   `json:"task"`
}

RestoreDatabaseResponse2 defines model for RestoreDatabaseResponse2.

type RestoreRepositorySpec

type RestoreRepositorySpec struct {
	// AzureAccount The Azure account name for this repository. Only applies when type = 'azure'.
	AzureAccount *string `json:"azure_account,omitempty"`

	// AzureContainer The Azure container name for this repository. Only applies when type = 'azure'.
	AzureContainer *string `json:"azure_container,omitempty"`

	// AzureEndpoint The optional Azure endpoint for this repository. Only applies when type = 'azure'.
	AzureEndpoint *string `json:"azure_endpoint,omitempty"`

	// AzureKey An optional Azure storage account access key to use for this repository. If not provided, pgbackrest will use the VM's managed identity.
	AzureKey *string `json:"azure_key,omitempty"`

	// BasePath The base path within the repository to store backups. Required for type = 'posix' and 'cifs'.
	BasePath *string `json:"base_path,omitempty"`

	// CustomOptions Additional options to apply to this repository.
	CustomOptions *map[string]string `json:"custom_options,omitempty"`

	// GcsBucket The GCS bucket name for this repository. Only applies when type = 'gcs'.
	GcsBucket *string `json:"gcs_bucket,omitempty"`

	// GcsEndpoint The optional GCS endpoint for this repository. Only applies when type = 'gcs'.
	GcsEndpoint *string `json:"gcs_endpoint,omitempty"`

	// GcsKey Optional base64-encoded private key data. If omitted, pgbackrest will use the service account attached to the instance profile.
	GcsKey *string `json:"gcs_key,omitempty"`

	// Id A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
	Id *string `json:"id,omitempty"`

	// S3Bucket The S3 bucket name for this repository. Only applies when type = 's3'.
	S3Bucket *string `json:"s3_bucket,omitempty"`

	// S3Endpoint The optional S3 endpoint for this repository. Only applies when type = 's3'.
	S3Endpoint *string `json:"s3_endpoint,omitempty"`

	// S3Key An optional AWS access key ID to use for this repository. If not provided, pgbackrest will use the default credential provider chain.
	S3Key *string `json:"s3_key,omitempty"`

	// S3KeySecret The corresponding secret for the AWS access key ID in s3_key.
	S3KeySecret *string `json:"s3_key_secret,omitempty"`

	// S3Region The region of the S3 bucket for this repository. Only applies when type = 's3'.
	S3Region *string `json:"s3_region,omitempty"`

	// Type The type of this repository.
	Type RestoreRepositorySpecType `json:"type"`
}

RestoreRepositorySpec defines model for RestoreRepositorySpec.

type RestoreRepositorySpecType

type RestoreRepositorySpecType string

RestoreRepositorySpecType The type of this repository.

const (
	RestoreRepositorySpecTypeAzure RestoreRepositorySpecType = "azure"
	RestoreRepositorySpecTypeCifs  RestoreRepositorySpecType = "cifs"
	RestoreRepositorySpecTypeGcs   RestoreRepositorySpecType = "gcs"
	RestoreRepositorySpecTypePosix RestoreRepositorySpecType = "posix"
	RestoreRepositorySpecTypeS3    RestoreRepositorySpecType = "s3"
)

Defines values for RestoreRepositorySpecType.

func (RestoreRepositorySpecType) Valid

func (e RestoreRepositorySpecType) Valid() bool

Valid indicates whether the value is a known member of the RestoreRepositorySpecType enum.

type SQLScript

type SQLScript = []string

SQLScript Each element of this array is an individual SQL statement.

type ServiceInstance

type ServiceInstance struct {
	// CreatedAt The time that the service instance was created.
	CreatedAt time.Time `json:"created_at"`

	// DatabaseId A user-specified identifier. Must be 1-36 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.
	DatabaseId string `json:"database_id"`

	// Error An error message if the service instance is in an error state.
	Error *string `json:"error,omitempty"`

	// HostId The ID of the host this service instance is running on.
	HostId string `json:"host_id"`

	// ServiceId The service ID from the DatabaseSpec.
	ServiceId string `json:"service_id"`

	// ServiceInstanceId Unique identifier for the service instance.
	ServiceInstanceId string `json:"service_instance_id"`

	// State Current state of the service instance.
	State ServiceInstanceState `json:"state"`

	// Status Runtime status information for a service instance.
	Status *ServiceInstanceStatus `json:"status,omitempty"`

	// UpdatedAt The time that the service instance was last updated.
	UpdatedAt time.Time `json:"updated_at"`
}

ServiceInstance A service instance running on a host alongside the database.

type ServiceInstanceState

type ServiceInstanceState string

ServiceInstanceState Current state of the service instance.

const (
	ServiceInstanceStateCreating ServiceInstanceState = "creating"
	ServiceInstanceStateDeleting ServiceInstanceState = "deleting"
	ServiceInstanceStateFailed   ServiceInstanceState = "failed"
	ServiceInstanceStateRunning  ServiceInstanceState = "running"
)

Defines values for ServiceInstanceState.

func (ServiceInstanceState) Valid

func (e ServiceInstanceState) Valid() bool

Valid indicates whether the value is a known member of the ServiceInstanceState enum.

type ServiceInstanceStatus

type ServiceInstanceStatus struct {
	// Addresses The addresses of the host that's running this service instance.
	Addresses *[]string `json:"addresses,omitempty"`

	// ContainerId The Docker container ID.
	ContainerId *string `json:"container_id,omitempty"`

	// HealthCheck Health check result for a service instance.
	HealthCheck *HealthCheckResult `json:"health_check,omitempty"`

	// ImageVersion The container image version currently running.
	ImageVersion *string `json:"image_version,omitempty"`

	// LastHealthAt The time of the last health check attempt.
	LastHealthAt *time.Time `json:"last_health_at,omitempty"`

	// Ports Port mappings for this service instance.
	Ports *[]PortMapping `json:"ports,omitempty"`

	// ServiceReady Whether the service is ready to accept requests.
	ServiceReady *bool `json:"service_ready,omitempty"`
}

ServiceInstanceStatus Runtime status information for a service instance.

type ServiceSpec2

type ServiceSpec2 struct {
	// Config Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.
	Config *map[string]interface{} `json:"config,omitempty"`

	// ConnectAs Username of the database_users entry this service connects as. The user must exist in database_users and have appropriate roles for the service's needs.
	ConnectAs string `json:"connect_as"`

	// Cpus The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseConnection Controls how the service connects to the database. When omitted, all nodes are included with the local node first and target_session_attrs is derived from the service config.
	DatabaseConnection *DatabaseConnection `json:"database_connection,omitempty"`

	// HostIds The IDs of the hosts that should run this service. One service instance will be created per host.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.
	Memory *string `json:"memory,omitempty"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// Port The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.
	Port *int64 `json:"port,omitempty"`

	// ServiceId The unique identifier for this service.
	ServiceId string `json:"service_id"`

	// ServiceType The type of service to run.
	ServiceType ServiceSpec2ServiceType `json:"service_type"`

	// Version The version of the service (e.g., '1.0.0', '14.5') or the literal 'latest'.
	Version string `json:"version"`
}

ServiceSpec2 defines model for ServiceSpec2.

type ServiceSpec2ServiceType

type ServiceSpec2ServiceType string

ServiceSpec2ServiceType The type of service to run.

const (
	ServiceSpec2ServiceTypeMcp       ServiceSpec2ServiceType = "mcp"
	ServiceSpec2ServiceTypePostgrest ServiceSpec2ServiceType = "postgrest"
	ServiceSpec2ServiceTypeRag       ServiceSpec2ServiceType = "rag"
)

Defines values for ServiceSpec2ServiceType.

func (ServiceSpec2ServiceType) Valid

func (e ServiceSpec2ServiceType) Valid() bool

Valid indicates whether the value is a known member of the ServiceSpec2ServiceType enum.

type ServiceSpec3

type ServiceSpec3 struct {
	// Config Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.
	Config *map[string]interface{} `json:"config,omitempty"`

	// ConnectAs Username of the database_users entry this service connects as. The user must exist in database_users and have appropriate roles for the service's needs.
	ConnectAs string `json:"connect_as"`

	// Cpus The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseConnection Controls how the service connects to the database. When omitted, all nodes are included with the local node first and target_session_attrs is derived from the service config.
	DatabaseConnection *DatabaseConnection `json:"database_connection,omitempty"`

	// HostIds The IDs of the hosts that should run this service. One service instance will be created per host.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.
	Memory *string `json:"memory,omitempty"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// Port The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.
	Port *int64 `json:"port,omitempty"`

	// ServiceId The unique identifier for this service.
	ServiceId string `json:"service_id"`

	// ServiceType The type of service to run.
	ServiceType ServiceSpec3ServiceType `json:"service_type"`

	// Version The version of the service (e.g., '1.0.0', '14.5') or the literal 'latest'.
	Version string `json:"version"`
}

ServiceSpec3 defines model for ServiceSpec3.

type ServiceSpec3ServiceType

type ServiceSpec3ServiceType string

ServiceSpec3ServiceType The type of service to run.

const (
	ServiceSpec3ServiceTypeMcp       ServiceSpec3ServiceType = "mcp"
	ServiceSpec3ServiceTypePostgrest ServiceSpec3ServiceType = "postgrest"
	ServiceSpec3ServiceTypeRag       ServiceSpec3ServiceType = "rag"
)

Defines values for ServiceSpec3ServiceType.

func (ServiceSpec3ServiceType) Valid

func (e ServiceSpec3ServiceType) Valid() bool

Valid indicates whether the value is a known member of the ServiceSpec3ServiceType enum.

type ServiceSpec4

type ServiceSpec4 struct {
	// Config Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.
	Config *map[string]interface{} `json:"config,omitempty"`

	// ConnectAs Username of the database_users entry this service connects as. The user must exist in database_users and have appropriate roles for the service's needs.
	ConnectAs string `json:"connect_as"`

	// Cpus The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseConnection Controls how the service connects to the database. When omitted, all nodes are included with the local node first and target_session_attrs is derived from the service config.
	DatabaseConnection *DatabaseConnection `json:"database_connection,omitempty"`

	// HostIds The IDs of the hosts that should run this service. One service instance will be created per host.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.
	Memory *string `json:"memory,omitempty"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// Port The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.
	Port *int64 `json:"port,omitempty"`

	// ServiceId The unique identifier for this service.
	ServiceId string `json:"service_id"`

	// ServiceType The type of service to run.
	ServiceType ServiceSpec4ServiceType `json:"service_type"`

	// Version The version of the service (e.g., '1.0.0', '14.5') or the literal 'latest'.
	Version string `json:"version"`
}

ServiceSpec4 defines model for ServiceSpec4.

type ServiceSpec4ServiceType

type ServiceSpec4ServiceType string

ServiceSpec4ServiceType The type of service to run.

const (
	ServiceSpec4ServiceTypeMcp       ServiceSpec4ServiceType = "mcp"
	ServiceSpec4ServiceTypePostgrest ServiceSpec4ServiceType = "postgrest"
	ServiceSpec4ServiceTypeRag       ServiceSpec4ServiceType = "rag"
)

Defines values for ServiceSpec4ServiceType.

func (ServiceSpec4ServiceType) Valid

func (e ServiceSpec4ServiceType) Valid() bool

Valid indicates whether the value is a known member of the ServiceSpec4ServiceType enum.

type ServiceSpec5

type ServiceSpec5 struct {
	// Config Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.
	Config *map[string]interface{} `json:"config,omitempty"`

	// ConnectAs Username of the database_users entry this service connects as. The user must exist in database_users and have appropriate roles for the service's needs.
	ConnectAs string `json:"connect_as"`

	// Cpus The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseConnection Controls how the service connects to the database. When omitted, all nodes are included with the local node first and target_session_attrs is derived from the service config.
	DatabaseConnection *DatabaseConnection `json:"database_connection,omitempty"`

	// HostIds The IDs of the hosts that should run this service. One service instance will be created per host.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.
	Memory *string `json:"memory,omitempty"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// Port The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.
	Port *int64 `json:"port,omitempty"`

	// ServiceId The unique identifier for this service.
	ServiceId string `json:"service_id"`

	// ServiceType The type of service to run.
	ServiceType ServiceSpec5ServiceType `json:"service_type"`

	// Version The version of the service (e.g., '1.0.0', '14.5') or the literal 'latest'.
	Version string `json:"version"`
}

ServiceSpec5 defines model for ServiceSpec5.

type ServiceSpec5ServiceType

type ServiceSpec5ServiceType string

ServiceSpec5ServiceType The type of service to run.

const (
	ServiceSpec5ServiceTypeMcp       ServiceSpec5ServiceType = "mcp"
	ServiceSpec5ServiceTypePostgrest ServiceSpec5ServiceType = "postgrest"
	ServiceSpec5ServiceTypeRag       ServiceSpec5ServiceType = "rag"
)

Defines values for ServiceSpec5ServiceType.

func (ServiceSpec5ServiceType) Valid

func (e ServiceSpec5ServiceType) Valid() bool

Valid indicates whether the value is a known member of the ServiceSpec5ServiceType enum.

type ServiceSpec6

type ServiceSpec6 struct {
	// Config Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.
	Config *map[string]interface{} `json:"config,omitempty"`

	// ConnectAs Username of the database_users entry this service connects as. The user must exist in database_users and have appropriate roles for the service's needs.
	ConnectAs string `json:"connect_as"`

	// Cpus The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseConnection Controls how the service connects to the database. When omitted, all nodes are included with the local node first and target_session_attrs is derived from the service config.
	DatabaseConnection *DatabaseConnection `json:"database_connection,omitempty"`

	// HostIds The IDs of the hosts that should run this service. One service instance will be created per host.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.
	Memory *string `json:"memory,omitempty"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// Port The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.
	Port *int64 `json:"port,omitempty"`

	// ServiceId The unique identifier for this service.
	ServiceId string `json:"service_id"`

	// ServiceType The type of service to run.
	ServiceType ServiceSpec6ServiceType `json:"service_type"`

	// Version The version of the service (e.g., '1.0.0', '14.5') or the literal 'latest'.
	Version string `json:"version"`
}

ServiceSpec6 defines model for ServiceSpec6.

type ServiceSpec6ServiceType

type ServiceSpec6ServiceType string

ServiceSpec6ServiceType The type of service to run.

const (
	ServiceSpec6ServiceTypeMcp       ServiceSpec6ServiceType = "mcp"
	ServiceSpec6ServiceTypePostgrest ServiceSpec6ServiceType = "postgrest"
	ServiceSpec6ServiceTypeRag       ServiceSpec6ServiceType = "rag"
)

Defines values for ServiceSpec6ServiceType.

func (ServiceSpec6ServiceType) Valid

func (e ServiceSpec6ServiceType) Valid() bool

Valid indicates whether the value is a known member of the ServiceSpec6ServiceType enum.

type ServiceSpec7

type ServiceSpec7 struct {
	// Config Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.
	Config *map[string]interface{} `json:"config,omitempty"`

	// ConnectAs Username of the database_users entry this service connects as. The user must exist in database_users and have appropriate roles for the service's needs.
	ConnectAs string `json:"connect_as"`

	// Cpus The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseConnection Controls how the service connects to the database. When omitted, all nodes are included with the local node first and target_session_attrs is derived from the service config.
	DatabaseConnection *DatabaseConnection `json:"database_connection,omitempty"`

	// HostIds The IDs of the hosts that should run this service. One service instance will be created per host.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.
	Memory *string `json:"memory,omitempty"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// Port The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.
	Port *int64 `json:"port,omitempty"`

	// ServiceId The unique identifier for this service.
	ServiceId string `json:"service_id"`

	// ServiceType The type of service to run.
	ServiceType ServiceSpec7ServiceType `json:"service_type"`

	// Version The version of the service (e.g., '1.0.0', '14.5') or the literal 'latest'.
	Version string `json:"version"`
}

ServiceSpec7 defines model for ServiceSpec7.

type ServiceSpec7ServiceType

type ServiceSpec7ServiceType string

ServiceSpec7ServiceType The type of service to run.

const (
	ServiceSpec7ServiceTypeMcp       ServiceSpec7ServiceType = "mcp"
	ServiceSpec7ServiceTypePostgrest ServiceSpec7ServiceType = "postgrest"
	ServiceSpec7ServiceTypeRag       ServiceSpec7ServiceType = "rag"
)

Defines values for ServiceSpec7ServiceType.

func (ServiceSpec7ServiceType) Valid

func (e ServiceSpec7ServiceType) Valid() bool

Valid indicates whether the value is a known member of the ServiceSpec7ServiceType enum.

type ServiceSpec8

type ServiceSpec8 struct {
	// Config Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.
	Config *map[string]interface{} `json:"config,omitempty"`

	// ConnectAs Username of the database_users entry this service connects as. The user must exist in database_users and have appropriate roles for the service's needs.
	ConnectAs string `json:"connect_as"`

	// Cpus The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.
	Cpus *string `json:"cpus,omitempty"`

	// DatabaseConnection Controls how the service connects to the database. When omitted, all nodes are included with the local node first and target_session_attrs is derived from the service config.
	DatabaseConnection *DatabaseConnection `json:"database_connection,omitempty"`

	// HostIds The IDs of the hosts that should run this service. One service instance will be created per host.
	HostIds []string `json:"host_ids"`

	// Memory The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.
	Memory *string `json:"memory,omitempty"`

	// OrchestratorOpts Options specific to the selected orchestrator.
	OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"`

	// Port The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.
	Port *int64 `json:"port,omitempty"`

	// ServiceId The unique identifier for this service.
	ServiceId string `json:"service_id"`

	// ServiceType The type of service to run.
	ServiceType ServiceSpec8ServiceType `json:"service_type"`

	// Version The version of the service (e.g., '1.0.0', '14.5') or the literal 'latest'.
	Version string `json:"version"`
}

ServiceSpec8 defines model for ServiceSpec8.

type ServiceSpec8ServiceType

type ServiceSpec8ServiceType string

ServiceSpec8ServiceType The type of service to run.

const (
	ServiceSpec8ServiceTypeMcp       ServiceSpec8ServiceType = "mcp"
	ServiceSpec8ServiceTypePostgrest ServiceSpec8ServiceType = "postgrest"
	ServiceSpec8ServiceTypeRag       ServiceSpec8ServiceType = "rag"
)

Defines values for ServiceSpec8ServiceType.

func (ServiceSpec8ServiceType) Valid

func (e ServiceSpec8ServiceType) Valid() bool

Valid indicates whether the value is a known member of the ServiceSpec8ServiceType enum.

type StartInstanceParams

type StartInstanceParams struct {
	// Force Force starting an instance even if database in an unmodifiable state
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

StartInstanceParams defines parameters for StartInstance.

type StartInstanceResp

type StartInstanceResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *StartInstanceResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseStartInstanceResp

func ParseStartInstanceResp(rsp *http.Response) (*StartInstanceResp, error)

ParseStartInstanceResp parses an HTTP response from a StartInstanceWithResponse call

func (StartInstanceResp) ContentType

func (r StartInstanceResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (StartInstanceResp) Status

func (r StartInstanceResp) Status() string

Status returns HTTPResponse.Status

func (StartInstanceResp) StatusCode

func (r StartInstanceResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StartInstanceResponse

type StartInstanceResponse struct {
	Task Task `json:"task"`
}

StartInstanceResponse Response containing the start task

type StopInstanceParams

type StopInstanceParams struct {
	// Force Force stopping an instance even if database in an unmodifiable state
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

StopInstanceParams defines parameters for StopInstance.

type StopInstanceResp

type StopInstanceResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *StopInstanceResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseStopInstanceResp

func ParseStopInstanceResp(rsp *http.Response) (*StopInstanceResp, error)

ParseStopInstanceResp parses an HTTP response from a StopInstanceWithResponse call

func (StopInstanceResp) ContentType

func (r StopInstanceResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (StopInstanceResp) Status

func (r StopInstanceResp) Status() string

Status returns HTTPResponse.Status

func (StopInstanceResp) StatusCode

func (r StopInstanceResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StopInstanceResponse

type StopInstanceResponse struct {
	Task Task `json:"task"`
}

StopInstanceResponse Response containing the stop task

type SwarmOpts

type SwarmOpts struct {
	// ExtraLabels Arbitrary labels to apply to the Docker Swarm service
	ExtraLabels *map[string]string `json:"extra_labels,omitempty"`

	// ExtraNetworks A list of additional Docker Swarm networks to attach containers in this database to.
	ExtraNetworks *[]ExtraNetworkSpec `json:"extra_networks,omitempty"`

	// ExtraVolumes A list of extra volumes to mount. Each entry defines a host and container path.
	ExtraVolumes *[]ExtraVolumesSpec `json:"extra_volumes,omitempty"`

	// Image User-specified container image override. Bypasses manifest version constraints entirely — the CP will deploy this image without validating it against the version manifest. The CP verifies the image exists in its registry before accepting the spec. Clearing this field causes the CP to fall back to the manifest-resolved image on the next reconcile.
	Image *string `json:"image,omitempty"`
}

SwarmOpts Docker Swarm-specific options.

type SwitchoverDatabaseNodeJSONRequestBody

type SwitchoverDatabaseNodeJSONRequestBody = SwitchoverDatabaseNodeRequestBody

SwitchoverDatabaseNodeJSONRequestBody defines body for SwitchoverDatabaseNode for application/json ContentType.

type SwitchoverDatabaseNodeRequestBody

type SwitchoverDatabaseNodeRequestBody struct {
	// CandidateInstanceId Optional instance_id for the replica candidate.
	CandidateInstanceId *string `json:"candidate_instance_id,omitempty"`

	// ScheduledAt Optional scheduled time (ISO8601) for the switchover. If absent switchover happens immediately.
	ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
}

SwitchoverDatabaseNodeRequestBody defines model for SwitchoverDatabaseNodeRequestBody.

type SwitchoverDatabaseNodeResp

type SwitchoverDatabaseNodeResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *SwitchoverDatabaseNodeResponse
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseSwitchoverDatabaseNodeResp

func ParseSwitchoverDatabaseNodeResp(rsp *http.Response) (*SwitchoverDatabaseNodeResp, error)

ParseSwitchoverDatabaseNodeResp parses an HTTP response from a SwitchoverDatabaseNodeWithResponse call

func (SwitchoverDatabaseNodeResp) ContentType

func (r SwitchoverDatabaseNodeResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (SwitchoverDatabaseNodeResp) Status

Status returns HTTPResponse.Status

func (SwitchoverDatabaseNodeResp) StatusCode

func (r SwitchoverDatabaseNodeResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SwitchoverDatabaseNodeResponse

type SwitchoverDatabaseNodeResponse struct {
	Task Task `json:"task"`
}

SwitchoverDatabaseNodeResponse defines model for SwitchoverDatabaseNodeResponse.

type Task

type Task struct {
	// CompletedAt The time when the task was completed.
	CompletedAt *time.Time `json:"completed_at,omitempty"`

	// CreatedAt The time when the task was created.
	CreatedAt time.Time `json:"created_at"`

	// DatabaseId The database ID of the task.
	DatabaseId *string `json:"database_id,omitempty"`

	// EntityId The entity ID (database_id or host_id) that this task belongs to.
	EntityId string `json:"entity_id"`

	// Error The error message if the task failed.
	Error *string `json:"error,omitempty"`

	// HostId The ID of the host that the task is running on.
	HostId *string `json:"host_id,omitempty"`

	// InstanceId The ID of the instance that the task is operating on.
	InstanceId *string `json:"instance_id,omitempty"`

	// NodeName The name of the node that the task is operating on.
	NodeName *string `json:"node_name,omitempty"`

	// ParentId The parent task ID of the task.
	ParentId *openapi_types.UUID `json:"parent_id,omitempty"`

	// Scope The scope of the task (database or host).
	Scope TaskScope `json:"scope"`

	// Status The status of the task.
	Status TaskStatus `json:"status"`

	// TaskId The unique ID of the task.
	TaskId openapi_types.UUID `json:"task_id"`

	// Type The type of the task.
	Type string `json:"type"`
}

Task defines model for Task.

type TaskLog

type TaskLog struct {
	// DatabaseId The database ID of the task log. Deprecated: use entity_id instead.
	DatabaseId *string `json:"database_id,omitempty"`

	// EntityId The entity ID (database_id or host_id) that this task log belongs to.
	EntityId string `json:"entity_id"`

	// Entries Entries in the task log.
	Entries []TaskLogEntry `json:"entries"`

	// LastEntryId The ID of the last entry in the task log.
	LastEntryId *string `json:"last_entry_id,omitempty"`

	// Scope The scope of the task (database or host).
	Scope TaskLogScope `json:"scope"`

	// TaskId The unique ID of the task log.
	TaskId string `json:"task_id"`

	// TaskStatus The status of the task.
	TaskStatus TaskLogTaskStatus `json:"task_status"`
}

TaskLog defines model for TaskLog.

type TaskLogEntry

type TaskLogEntry struct {
	// Fields Additional fields for the log entry.
	Fields *map[string]interface{} `json:"fields,omitempty"`

	// Message The log message.
	Message string `json:"message"`

	// Timestamp The timestamp of the log entry.
	Timestamp time.Time `json:"timestamp"`
}

TaskLogEntry defines model for TaskLogEntry.

type TaskLogScope

type TaskLogScope string

TaskLogScope The scope of the task (database or host).

const (
	TaskLogScopeDatabase TaskLogScope = "database"
	TaskLogScopeHost     TaskLogScope = "host"
)

Defines values for TaskLogScope.

func (TaskLogScope) Valid

func (e TaskLogScope) Valid() bool

Valid indicates whether the value is a known member of the TaskLogScope enum.

type TaskLogTaskStatus

type TaskLogTaskStatus string

TaskLogTaskStatus The status of the task.

const (
	TaskLogTaskStatusCanceled  TaskLogTaskStatus = "canceled"
	TaskLogTaskStatusCanceling TaskLogTaskStatus = "canceling"
	TaskLogTaskStatusCompleted TaskLogTaskStatus = "completed"
	TaskLogTaskStatusFailed    TaskLogTaskStatus = "failed"
	TaskLogTaskStatusPending   TaskLogTaskStatus = "pending"
	TaskLogTaskStatusRunning   TaskLogTaskStatus = "running"
	TaskLogTaskStatusUnknown   TaskLogTaskStatus = "unknown"
)

Defines values for TaskLogTaskStatus.

func (TaskLogTaskStatus) Valid

func (e TaskLogTaskStatus) Valid() bool

Valid indicates whether the value is a known member of the TaskLogTaskStatus enum.

type TaskScope

type TaskScope string

TaskScope The scope of the task (database or host).

const (
	TaskScopeDatabase TaskScope = "database"
	TaskScopeHost     TaskScope = "host"
)

Defines values for TaskScope.

func (TaskScope) Valid

func (e TaskScope) Valid() bool

Valid indicates whether the value is a known member of the TaskScope enum.

type TaskStatus

type TaskStatus string

TaskStatus The status of the task.

const (
	TaskStatusCanceled  TaskStatus = "canceled"
	TaskStatusCanceling TaskStatus = "canceling"
	TaskStatusCompleted TaskStatus = "completed"
	TaskStatusFailed    TaskStatus = "failed"
	TaskStatusPending   TaskStatus = "pending"
	TaskStatusRunning   TaskStatus = "running"
	TaskStatusUnknown   TaskStatus = "unknown"
)

Defines values for TaskStatus.

func (TaskStatus) Valid

func (e TaskStatus) Valid() bool

Valid indicates whether the value is a known member of the TaskStatus enum.

type UpdateDatabaseJSONRequestBody

type UpdateDatabaseJSONRequestBody = UpdateDatabaseRequest2

UpdateDatabaseJSONRequestBody defines body for UpdateDatabase for application/json ContentType.

type UpdateDatabaseParams

type UpdateDatabaseParams struct {
	// ForceUpdate Force update the database even if the spec is the same.
	ForceUpdate *bool `form:"force_update,omitempty" json:"force_update,omitempty"`

	// RemoveHost Host IDs to treat as removed during this update. Events targeting these hosts will be skipped.
	RemoveHost *[]string `form:"remove_host,omitempty" json:"remove_host,omitempty"`
}

UpdateDatabaseParams defines parameters for UpdateDatabase.

type UpdateDatabaseRequest2

type UpdateDatabaseRequest2 struct {
	Spec DatabaseSpec5 `json:"spec"`

	// TenantId Unique identifier for the database's owner.
	TenantId *string `json:"tenant_id,omitempty"`
}

UpdateDatabaseRequest2 defines model for UpdateDatabaseRequest2.

type UpdateDatabaseResp

type UpdateDatabaseResp struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UpdateDatabaseResponse2
	JSON400      *APIError
	JSON404      *APIError
	JSON409      *APIError
	JSON500      *APIError
	JSONDefault  *APIError
}

func ParseUpdateDatabaseResp

func ParseUpdateDatabaseResp(rsp *http.Response) (*UpdateDatabaseResp, error)

ParseUpdateDatabaseResp parses an HTTP response from a UpdateDatabaseWithResponse call

func (UpdateDatabaseResp) ContentType

func (r UpdateDatabaseResp) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateDatabaseResp) Status

func (r UpdateDatabaseResp) Status() string

Status returns HTTPResponse.Status

func (UpdateDatabaseResp) StatusCode

func (r UpdateDatabaseResp) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateDatabaseResponse2

type UpdateDatabaseResponse2 struct {
	Database Database4 `json:"database"`
	Task     Task      `json:"task"`
}

UpdateDatabaseResponse2 defines model for UpdateDatabaseResponse2.

type VersionInfo

type VersionInfo struct {
	// Arch The CPU architecture of the API server.
	Arch string `json:"arch"`

	// Revision The VCS revision of the API server.
	Revision string `json:"revision"`

	// RevisionTime The timestamp associated with the revision.
	RevisionTime time.Time `json:"revision_time"`

	// Version The version of the API server.
	Version string `json:"version"`
}

VersionInfo defines model for VersionInfo.

Jump to

Keyboard shortcuts

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