component

package
v0.0.0-...-827907e Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CKArrayFloat64

type CKArrayFloat64 []float64

CKArrayFloat64 clickhouse float64数组类型自定义接口

func (*CKArrayFloat64) Scan

func (a *CKArrayFloat64) Scan(value interface{}) error

Scan 实现 sql.Scanner 接口

func (CKArrayFloat64) Value

func (a CKArrayFloat64) Value() (driver.Value, error)

Value 实现 driver.Valuer 接口

type CKArrayInt32

type CKArrayInt32 []int32

CKArrayInt32 clickhouse int32数组类型自定义接口

func (*CKArrayInt32) Scan

func (a *CKArrayInt32) Scan(value interface{}) error

Scan 实现 sql.Scanner 接口

func (CKArrayInt32) Value

func (a CKArrayInt32) Value() (driver.Value, error)

Value 实现 driver.Valuer 接口

type Component

type Component interface {
	InitC() error
	CloseC() error
}

Component 组件

type GormCasbin

type GormCasbin struct {
	Model    string
	Engine   *gorm.DB
	Enforcer *casbin.Enforcer
}

GormCasbin casbin访问控制组件

func (*GormCasbin) CloseC

func (c *GormCasbin) CloseC() error

CloseC 关闭组件

func (*GormCasbin) InitC

func (c *GormCasbin) InitC() error

InitC 初始化casbin组件

type GormClickHouse

type GormClickHouse struct {
	DSN    string `mapstructure:"dsn"`
	Engine *gorm.DB
}

GormClickHouse clickhouse数据库组件

func (*GormClickHouse) CloseC

func (m *GormClickHouse) CloseC() error

CloseC 关闭mysql组件

func (*GormClickHouse) InitC

func (m *GormClickHouse) InitC() error

InitC mysql组件初始化

type GormMysql

type GormMysql struct {
	DSN    string `mapstructure:"dsn"`
	Engine *gorm.DB
}

GormMysql mysql数据库组件

func (*GormMysql) CloseC

func (m *GormMysql) CloseC() error

CloseC 关闭mysql组件

func (*GormMysql) InitC

func (m *GormMysql) InitC() error

InitC mysql组件初始化

type Redis

type Redis struct {
	Addr   string          `mapstructure:"addr"`
	Passwd string          `mapstructure:"passwd"`
	Client *redis.Client   `mapstructure:"-"`
	Ctx    context.Context `mapstructure:"-"`
}

Redis 组件

func (*Redis) CloseC

func (r *Redis) CloseC() error

CloseC 关闭redis组件

func (*Redis) InitC

func (r *Redis) InitC() error

InitC 初始化redis组件

type Smtp

type Smtp struct {
	Host    string `mapstructure:"host"`
	Port    int    `mapstructure:"port"`
	User    string `mapstructure:"user"`
	Pass    string `mapstructure:"pass"`
	Secure  bool   `mapstructure:"secure"`
	Dialer  *gomail.Dialer
	Message *gomail.Message
}

Smtp 邮箱组件

func (*Smtp) CloseC

func (e *Smtp) CloseC() error

CloseC 关闭email组件

func (*Smtp) InitC

func (e *Smtp) InitC() error

InitC 初始化email组件

type XormCasbin

type XormCasbin struct {
	Model    string
	Engine   **xorm.Engine
	Enforcer *casbin.Enforcer
}

XormCasbin casbin访问控制组件

func (*XormCasbin) CloseC

func (c *XormCasbin) CloseC() error

CloseC 关闭组件

func (*XormCasbin) InitC

func (c *XormCasbin) InitC() error

InitC 初始化casbin组件

type XormMysql

type XormMysql struct {
	DSN    string `mapstructure:"dsn"`
	Engine *xorm.Engine
}

XormMysql mysql数据库组件

func (*XormMysql) CloseC

func (m *XormMysql) CloseC() error

CloseC 关闭mysql组件

func (*XormMysql) InitC

func (m *XormMysql) InitC() error

InitC mysql组件初始化

Jump to

Keyboard shortcuts

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