datasources

package
v0.0.0-...-1015d97 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDb

func ConnectDb(config DbConfig, opts ...gorm.Option) (dbConn *gorm.DB, err error)

func NewFastHTTPClient

func NewFastHTTPClient(insecureSkipVerify bool) (client *fasthttp.Client)

func NewJwtLocalKey

func NewJwtLocalKey(privateKeyPath string) (jwtSignKey crypto.PrivateKey, jwtVerifyKey crypto.PublicKey, jwtSigningMethod jwt.SigningMethod, err error)

Types

type DbConfig

type DbConfig struct {
	DbDriver        string
	DbName          string
	Host            string
	Username        string
	Password        string
	Timezone        string
	Port            int
	MaxIdleConns    int
	MaxOpenConns    int
	ConnMaxLifetime time.Duration
}

Jump to

Keyboard shortcuts

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