core

package
v1.1.40-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: MIT Imports: 8 Imported by: 8

Documentation

Index

Constants

View Source
const SdkVersion = "v1.1.40-rc1"

Variables

View Source
var (
	GetISVAppSettingsByEnv      = config.GetISVAppSettingsByEnv
	GetInternalAppSettingsByEnv = config.GetInternalAppSettingsByEnv
	NewISVAppSettings           = config.NewISVAppSettingsByOpts
	NewInternalAppSettings      = config.NewInternalAppSettingsByOpts
	SetAppCredentials           = config.SetAppCredentials
	SetAppEventKey              = config.SetAppEventKey
	SetHelpDeskCredentials      = config.SetHelpDeskCredentials
)

Functions

func NewConfig added in v1.1.41

func NewConfig(domain Domain, appSettings *config.AppSettings, opts ...ConfigOpt) *config.Config

func SetLogger added in v1.1.41

func SetLogger(logger log.Logger) func(o *configOpt)

func SetLoggerLevel added in v1.1.41

func SetLoggerLevel(logLevel LoggerLevel) func(o *configOpt)

func SetStore added in v1.1.41

func SetStore(store store.Store) func(o *configOpt)

Types

type ConfigOpt added in v1.1.41

type ConfigOpt func(o *configOpt)

type Context

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

func WarpContext

func WarpContext(c context.Context) *Context

Deprecated, please use `WrapContext`

func WrapContext added in v1.1.8

func WrapContext(c context.Context) *Context

func (*Context) Deadline

func (c *Context) Deadline() (deadline time.Time, ok bool)

func (*Context) Done

func (c *Context) Done() <-chan struct{}

func (*Context) Err

func (c *Context) Err() error

func (*Context) Get

func (c *Context) Get(key string) (value interface{}, exists bool)

Get returns the value for the given key, ie: (value, true). If the value does not exists it returns (nil, false)

func (*Context) GetHTTPStatusCode

func (c *Context) GetHTTPStatusCode() int

func (*Context) GetHeader added in v1.1.26

func (c *Context) GetHeader() *model.OapiHeader

func (*Context) GetRequestID

func (c *Context) GetRequestID() string

func (*Context) Set

func (c *Context) Set(key string, value interface{})

func (*Context) Value

func (c *Context) Value(key interface{}) interface{}

type Domain added in v1.1.41

type Domain string
const (
	DomainFeiShu    Domain = Domain(constants.DomainFeiShu)
	DomainLarkSuite Domain = Domain(constants.DomainLarkSuite)
)

type LoggerLevel added in v1.1.41

type LoggerLevel int
const (
	LoggerLevelDebug LoggerLevel = LoggerLevel(log.LevelDebug)
	LoggerLevelInfo  LoggerLevel = LoggerLevel(log.LevelInfo)
	LoggerLevelWarn  LoggerLevel = LoggerLevel(log.LevelWarn)
	LoggerLevelError LoggerLevel = LoggerLevel(log.LevelError)
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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