sql

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientInstanceKey = `SQLClient`
)

Variables

View Source
var (
	ErrCredentialsNotFound = errors.New("credentials not found")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Connect(string, interface{}) error
	Connection() (string, string)
	CreateCredentials(cloudrunner.Credentials) error
	CreateDeployment(cloudrunner.Deployment) error
	DB() *gorm.DB
	DeleteCredentials(string) error
	GetCredentials(string) (cloudrunner.Credentials, error)
	GetDeployment(string) (cloudrunner.Deployment, error)
	ListCredentials() ([]cloudrunner.Credentials, error)
	UpdateDeployment(cloudrunner.Deployment) error
	WithHost(string)
	WithName(string)
	WithPass(string)
	WithUser(string)
}

Client holds the DB connection and makes all queries to the DB.

func NewClient

func NewClient() Client

NewClient returns a new instance of Client.

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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