database

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseFieldGroup

type DatabaseFieldGroup struct {
	DbConnectionArgs *DbConnectionArgsStruct `default:"{}" json:"DB_CONNECTION_ARGS,omitempty" yaml:"DB_CONNECTION_ARGS,omitempty"`
	DbUri            string                  `default:"" validate:"" json:"DB_URI,omitempty" yaml:"DB_URI,omitempty"`
}

DatabaseFieldGroup represents the DatabaseFieldGroup config fields

func NewDatabaseFieldGroup

func NewDatabaseFieldGroup(fullConfig map[string]interface{}) (*DatabaseFieldGroup, error)

NewDatabaseFieldGroup creates a new DatabaseFieldGroup

func (*DatabaseFieldGroup) Fields

func (fg *DatabaseFieldGroup) Fields() []string

Fields returns a list of strings representing the fields in this field group

func (*DatabaseFieldGroup) Validate

Validate checks the configuration settings for this field group

type DbConnectionArgsStruct

type DbConnectionArgsStruct struct {
	// MySQL arguments
	Ssl          *SslStruct `default:""  json:"ssl,omitempty" yaml:"ssl,omitempty"`
	Threadlocals bool       `default:""  json:"threadlocals,omitempty" yaml:"threadlocals,omitempty"`
	Autorollback bool       `default:""  json:"autorollback,omitempty" yaml:"autorollback,omitempty"`

	// Postgres arguments
	SslRootCert string `default:""  json:"sslrootcert,omitempty" yaml:"sslrootcert,omitempty"`
	SslMode     string `default:""  json:"sslmode,omitempty" yaml:"sslmode,omitempty"`
}

DbConnectionArgsStruct represents the DbConnectionArgsStruct config fields

func NewDbConnectionArgsStruct

func NewDbConnectionArgsStruct(fullConfig map[string]interface{}) (*DbConnectionArgsStruct, error)

NewDbConnectionArgsStruct creates a new DbConnectionArgsStruct

type SslStruct

type SslStruct struct {
	Ca string `default:"" validate:"" json:"ca,omitempty" yaml:"ca,omitempty"`
}

SslStruct represents the SslStruct config fields

func NewSslStruct

func NewSslStruct(fullConfig map[string]interface{}) (*SslStruct, error)

NewSslStruct creates a new SslStruct

Jump to

Keyboard shortcuts

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