database

package
v0.0.0-...-b262f20 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnDB

func ConnDB(dsn string, dbtype config.DBTYPE) (*gorm.DB, error)

func Elastic6Conn

func Elastic6Conn(option ElasticOption) (client *elastic6.Client)

func ElasticConn

func ElasticConn(option ElasticOption) (client *elastic.Client)

func GenDialector

func GenDialector(dsn string, dbtype config.DBTYPE) (dialector gorm.Dialector)

Types

type ElasticOption

type ElasticOption struct {
	Addresses []string
	User      string
	Pass      string
}

type Es6Retrier

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

func NewEs6Retrier

func NewEs6Retrier() *Es6Retrier

func (*Es6Retrier) Retry

func (r *Es6Retrier) Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error)

type EsRetrier

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

func NewEsRetrier

func NewEsRetrier() *EsRetrier

func (*EsRetrier) Retry

func (r *EsRetrier) Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error)

Jump to

Keyboard shortcuts

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