dbinstance

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAlreadyExists is thrown when db instance already exists
	ErrAlreadyExists = errors.New("instance already exists")
	// ErrNotExists is thrown when db instance does not exists
	ErrNotExists = errors.New("instance does not exists")
	// ErrInstanceNotReady is thrown when gsql instance is still not marked as Ready
	ErrInstanceNotReady = errors.New("instance is not ready")
)

Functions

func Create

func Create(ins DbInstance) (map[string]string, error)

Create instance if not exists

func Update

func Update(ins DbInstance) (map[string]string, error)

Update instance if instance exists

Types

type DbInstance

type DbInstance interface {
	// contains filtered or unexported methods
}

DbInstance interface to operate database server

type Generic

type Generic struct {
	Host         string
	Port         uint16
	Engine       string
	User         string
	Password     string
	PublicIP     string
	SSLEnabled   bool
	SkipCAVerify bool
}

Generic represents database instance which can be connected by address and port

type Gsql

type Gsql struct {
	Name        string
	Config      string
	User        string
	Password    string
	ProjectID   string
	APIEndpoint string
}

Gsql represents a google sql instance

func GsqlNew

func GsqlNew(name, config, user, password, apiEndpoint string) *Gsql

GsqlNew create a new Gsql object and return

Jump to

Keyboard shortcuts

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