model

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewID

func NewID() string

NewID is a globally unique identifier. It is a [A-Z0-9] string 26 characters long. It is a UUID version 4 Guid that is zbased32 encoded with the padding stripped off.

func StringWithCharset

func StringWithCharset(length int, charset string) string

StringWithCharset is returning a random string based on a given string.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the programmatic interface to the provisioning server API.

func NewClient

func NewClient(address string) *Client

NewClient creates a client to the provisioning server at the given address.

func (*Client) DeleteCluster added in v0.11.0

func (c *Client) DeleteCluster(request *ProvisionClusterRequest) (*Cluster, error)

DeleteCluster requests the deletion of a RDS cluster from the configured provisioning server.

func (*Client) ProvisionCluster added in v0.4.0

func (c *Client) ProvisionCluster(request *ProvisionClusterRequest) (*Cluster, error)

ProvisionCluster requests the creation of a RDS cluster from the configured provisioning server.

type Cluster

type Cluster struct {
	VPCID                    string
	ClusterID                string
	Environment              string
	StateStore               string
	Apply                    bool
	InstanceType             string
	BackupRetentionPeriod    string
	DBEngine                 string
	Replicas                 string
	DBProxy                  bool
	CreationSnapshotARN      string
	EnableDevopsGuru         bool
	AllowMajorVersionUpgrade bool
	KMSKeyID                 string
	DeletionProtection       bool
}

Cluster represents a RDS Aurora cluster.

func ClusterFromReader

func ClusterFromReader(reader io.Reader) (*Cluster, error)

ClusterFromReader decodes a json-encoded cluster from the given io.Reader.

type ProvisionClusterRequest added in v0.4.0

type ProvisionClusterRequest struct {
	VPCID                    string `json:"vpcID,omitempty"`
	ClusterID                string `json:"clusterID,omitempty"`
	Environment              string `json:"environment,omitempty"`
	StateStore               string `json:"stateStore,omitempty"`
	Apply                    bool   `json:"apply,omitempty"`
	InstanceType             string `json:"instanceType"`
	BackupRetentionPeriod    string `json:"backupRetentionPeriod"`
	DBEngine                 string `json:"dbEngine"`
	Replicas                 string `json:"replicas"`
	DBProxy                  bool   `json:"dbProxy"`
	CreationSnapshotARN      string `json:"creationSnapshotARN,omitempty"`
	EnableDevopsGuru         bool   `json:"enableDevopsGuru"`
	AllowMajorVersionUpgrade bool   `json:"allowMajorVersionUpgrade,omitempty"`
	KMSKeyID                 string `json:"kmsKeyID,omitempty"`
	DeletionProtection       bool   `json:"deletionProtection,omitempty"`
}

ProvisionClusterRequest specifies the parameters for a new cluster.

func NewProvisionClusterRequestFromReader added in v0.4.0

func NewProvisionClusterRequestFromReader(reader io.Reader) (*ProvisionClusterRequest, error)

NewProvisionClusterRequestFromReader decodes the request and returns after validation and setting the defaults.

func (*ProvisionClusterRequest) SetDefaults added in v0.4.0

func (request *ProvisionClusterRequest) SetDefaults()

SetDefaults sets the default values for a cluster provision request.

func (*ProvisionClusterRequest) Validate added in v0.4.0

func (request *ProvisionClusterRequest) Validate() error

Validate validates the values of a cluster provision request.

Jump to

Keyboard shortcuts

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