psdb

package
v1.1.1-0...-dcff8be Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorClientConnectionNotInitialized = "the client connection to the database is not initialized"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) Close

func (c *Client) Close() error

func (*Client) Insert

func (c *Client) Insert(query string, args ...interface{}) (int64, error)

func (*Client) Select

func (c *Client) Select(query string, args ...interface{}) (*sql.Rows, error)

type Config

type Config struct {
	Org      string
	Database string
	Branch   string
	User     string
	Password string
	Host     string
}

func (*Config) AddToCommand

func (cfg *Config) AddToCommand(cmd *cobra.Command)

func (*Config) AddToViper

func (cfg *Config) AddToViper(v *viper.Viper)

func (Config) IsValid

func (cfg Config) IsValid() bool

func (Config) NewClient

func (cfg Config) NewClient() (*Client, error)

Jump to

Keyboard shortcuts

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