mysqlx

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must(opts ...Option) *gorm.DB

func Optional added in v1.0.4

func Optional(opts ...Option) *gorm.DB

Types

type Config

type Config struct {
	Write       Configx   `json:"write" yaml:"write"`
	ReadOnly    []Configx `json:"read_only" yaml:"read_only"`
	MaxIdleConn int       `json:"max_idle_conn" yaml:"max_idle_conn"`
	MaxOpenConn int       `json:"max_open_conn" yaml:"max_open_conn"`
}

Config mysql的配置字段

type Configx

type Configx struct {
	Addr     string `json:"addr" yaml:"addr"`
	Port     int    `json:"port" yaml:"port"`
	DBName   string `json:"db_name" yaml:"db_name"`
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
	Param    string `json:"param" yaml:"param"`
}

type Option

type Option func(*Options)

func WithConfig

func WithConfig(conf Config) Option

type Options

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

Jump to

Keyboard shortcuts

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