database

package
v0.2.3-alpha-8 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLSModeNone       = ""
	TLSModeSkipVerify = "skip-verify"
	TLSModePreferred  = "preferred"
	TLSModeStrict     = "true"
	TLSModeOff        = "false"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug    bool
	Host     string
	Port     int
	Database string
	Username string
	Password string
	TLS      TLSMode
}

func (Config) ConnectionString

func (c Config) ConnectionString() string

func (Config) String

func (c Config) String() string

type Service

type Service interface {
	GetMainDB() (*gorm.DB, error)
	GetConnection(c Config) (*gorm.DB, error)
}

func NewService

func NewService(c Config, l log.Service) Service

type TLSMode

type TLSMode string

Jump to

Keyboard shortcuts

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