db

package
v0.0.0-...-8afe9cc Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckConfig

type CheckConfig struct {
	DbConn           string                 `json:"db_conn" yaml:"db_conn"`
	DbQuery          string                 `json:"db_query" yaml:"db_query"`
	DbResponse       string                 `json:"db_response" yaml:"db_response"`
	ComparisonParams contract.CompareParams `json:"comparisonParams" yaml:"comparisonParams"`
}

type Db

type Db struct {
	Config   *CheckConfig
	Vars     contract.Vars
	Report   contract.ReportAttachement
	Comparer contract.Comparer
	// contains filtered or unexported fields
}

func (*Db) Check

func (e *Db) Check() error

func (*Db) Do

func (e *Db) Do() error

func (*Db) GetConfig

func (e *Db) GetConfig() interface{}

func (*Db) IsValid

func (e *Db) IsValid() error

func (*Db) ResponseBody

func (e *Db) ResponseBody() *string

func (*Db) SetReport

func (e *Db) SetReport(r contract.ReportAttachement)

func (*Db) SetVars

func (e *Db) SetVars(vv contract.Vars)

type DbCheck

type DbCheck struct {
	Check *CheckConfig `yaml:"db,omitempty"`
}

type PGLoader

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

func NewPGLoader

func NewPGLoader(defaultConn string) *PGLoader

func (PGLoader) DefaultConnectionString

func (p PGLoader) DefaultConnectionString() string

func (PGLoader) Get

func (p PGLoader) Get(connection string) (*sql.DB, error)

type Unmarshaller

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

func NewUnmarshaller

func NewUnmarshaller(
	connectLoader contract.DBConnectLoader,
	comparer contract.Comparer,
) *Unmarshaller

func (*Unmarshaller) Build

func (u *Unmarshaller) Build(unmarshal func(interface{}) error) (contract.Doer, error)

Jump to

Keyboard shortcuts

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