Documentation
¶
Index ¶
Constants ¶
const ( Sqlserver = "sqlserver" Psql = "psql" CreateMapKey = "create" DeleteMapKey = "delete" K8sMapKey = "k8sName" UserMapKey = "username" PassMapKey = "password" DbNameMapKey = "dbName" FqdnMapKey = "fqdn" PortMapKey = "port" ErrorOnMissingKeyOption = "missingkey=error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dbms ¶
Dbms is the instance associated with a Dbms resource. It contains the Driver responsible for the Operations executed on Endpoints.
func (Dbms) RenderOperation ¶
RenderOperation renders "actions" specified through the use of the Go text/template format. It renders Dbms.Input of the receiver. Data to be inserted is taken directly from values. See OpValues. If the rendering is successful, the method returns a rendered Operation, if an error is generated, it is returned along with an empty Operation struct. Keys which are specified but not found generate an error (i.e. no unreferenced keys are allowed).
type DbmsConfig ¶
type DbmsConfig []Dbms
DbmsConfig is a slice containing Dbms structs.
func (DbmsConfig) GetByDriverAndEndpoint ¶
func (c DbmsConfig) GetByDriverAndEndpoint(driver, endpoint string) (Dbms, error)
type DbmsConn ¶
type DbmsConn struct {
Driver
}
DbmsConn represents the DBMS connection. See Driver.
type Driver ¶
type Driver interface {
CreateDb(operation Operation) OpOutput
DeleteDb(operation Operation) OpOutput
Ping() error
}
Driver represents a struct responsible for executing CreateDb and DeleteDb operations on a system it supports. Drivers should provide a way to check their current status (i.e. whether it can accept CreateDb and DeleteDb operations at the moment of a Ping call
type MssqlConn ¶
type MssqlConn struct {
// contains filtered or unexported fields
}
func NewMssqlConn ¶
type OpOutput ¶
type OpOutput struct {
Out []string // May be changed to interface{} if typing is needed
Err error
}
OpOutput represents the return values of an operation. If the operation generates an error, it must be set in the Err field. If Err is nil, the operation is assumed to be successful.
type PsqlConn ¶
type PsqlConn struct {
// contains filtered or unexported fields
}