env

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestIdKey = "X-Request-Id"
)

Variables

This section is empty.

Functions

func GetRequestId added in v0.1.5

func GetRequestId(ctx *gin.Context) string

Types

type Env

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

func Instance

func Instance() *Env

func (*Env) InfluxDBClient

func (e *Env) InfluxDBClient() *influxdb2.Client

func (*Env) Logger

func (e *Env) Logger() *Logger

func (*Env) OSSClient

func (e *Env) OSSClient() *OSSClient

func (*Env) SetInfluxDBClient

func (e *Env) SetInfluxDBClient(client *influxdb2.Client)

func (*Env) SetLogger

func (e *Env) SetLogger(logger *Logger)

func (*Env) SetOSSClient

func (e *Env) SetOSSClient(client *OSSClient)

func (*Env) SetTablestoreClient

func (e *Env) SetTablestoreClient(client *TablestoreClient)

func (*Env) TablestoreClient

func (e *Env) TablestoreClient() *TablestoreClient

type InfluxDBClient

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

type Logger added in v0.1.5

type Logger struct {
	*zap.Logger
}

func (*Logger) WithRequestId added in v0.1.5

func (l *Logger) WithRequestId(ctx *gin.Context) *zap.Logger

type OSSClient

type OSSClient struct {
	EndPoint   string
	Bucket     string
	PathPrefix string
	Client     *oss.Client
}

type TablestoreClient

type TablestoreClient struct {
	TableName string
	Client    *tablestore.TableStoreClient
}

Jump to

Keyboard shortcuts

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