define

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrintfDSN = true
)

Functions

This section is empty.

Types

type ComponentCron

type ComponentCron struct {
	ChannelBuffer  int `json:"channel_buffer"         yaml:"channel_buffer"`
	ResizeDuration int `json:"resize_duration"        yaml:"resize_duration"`
}

type ComponentEs

type ComponentEs struct {
	SlowThreshold,
	MaxConnTime,
	MaxIdleTime,
	MaxRepTime,
	KeepAliveTime int
}

type ComponentMongo

type ComponentMongo struct {
	MinPoolSize,
	MaxPoolSize,
	ReqMaxTime,
	SelectionTime,
	MaxIdleTime,
	SlowThreshold int
}

type ComponentMysql

type ComponentMysql struct {
	SlowThreshold int
	OpTimeout     int
}

type ComponentRedis

type ComponentRedis struct {
	IdleCheckTime,
	MaxReadTime,
	MaxWriteTime,
	MaxRequestTime,
	SlowThreshold int
}

type ConnectMysql

type ConnectMysql struct {
	Addr     string `yaml:"addr"`
	UserName string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"db"`
	Charset  string `yaml:"charset"`
	Options  string `yaml:"options"`
	// contains filtered or unexported fields
}

func (*ConnectMysql) GetConnectDSN

func (c *ConnectMysql) GetConnectDSN() string

func (*ConnectMysql) GetPrintDSN

func (c *ConnectMysql) GetPrintDSN() string

func (*ConnectMysql) ParserDSN

func (c *ConnectMysql) ParserDSN(val string) error

type ConnectRedis

type ConnectRedis struct {
	Addr string `yaml:"addr"`
	Pwd  string `yaml:"password"`
	DB   int    `yaml:"db"`
}

type EntityEs

type EntityEs struct {
	Addr       string `yaml:"addr"`
	User       string `yaml:"user"`
	Password   string `yaml:"password"`
	MaxIdleCnt int    `yaml:"max_idle"`
}

type EntityMongo

type EntityMongo struct {
	Addr     string `yaml:"addr"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	DSN      string `yaml:"dsn"`
}

type EntityMysql

type EntityMysql struct {
	MaxOpen int            `yaml:"max_open"`
	MaxIdle int            `yaml:"max_idle"`
	Master  ConnectMysql   `yaml:",inline"`
	Slave   []ConnectMysql `yaml:"slave"`
}

type EntityRedis

type EntityRedis struct {
	ConnectRedis `yaml:",inline"`
	PoolSize     int `yaml:"poolsize"`
}

type EsRespError

type EsRespError struct {
	Status uint64 `json:"status"`
	Error  struct {
		Type   string `json:"type"`
		Reason string `json:"reason"`
	} `json:"error"`
}

type EsRespSearch

type EsRespSearch struct {
	Took     uint64 `json:"took"`
	TimedOut bool   `json:"timed_out"`
	Hits     struct {
		Total struct {
			Value    uint64 `json:"value"`
			Relation string `json:"relation"`
		} `json:"total"`
		Hits interface{} `json:"hits"`
	} `json:"hits"`
}

type EsRespSearchItem

type EsRespSearchItem[T any] struct {
	Id     string `json:"_id"`
	Source T      `json:"_source"`
}

Jump to

Keyboard shortcuts

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