ccontext

package
v3.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Callback = "callback"
)

Variables

This section is empty.

Functions

func WithApiErrCode added in v3.5.0

func WithApiErrCode(ctx context.Context, cb ApiErrCodeCallback) context.Context

func WithInfo

func WithInfo(ctx context.Context, conf *GlobalConfig) context.Context

func WithOperationID

func WithOperationID(ctx context.Context, operationID string) context.Context

Types

type ApiErrCodeCallback added in v3.5.0

type ApiErrCodeCallback interface {
	OnError(ctx context.Context, err error)
}

func GetApiErrCodeCallback added in v3.5.0

func GetApiErrCodeCallback(ctx context.Context) ApiErrCodeCallback

type ContextInfo

type ContextInfo interface {
	UserID() string
	Token() string
	PlatformID() int32
	ApiAddr() string
	WsAddr() string
	DataDir() string
	LogLevel() uint32
	OperationID() string
	IsExternalExtensions() bool
}

func Info

func Info(ctx context.Context) ContextInfo

type GlobalConfig

type GlobalConfig struct {
	UserID string
	Token  string

	sdk_struct.IMConfig
}

type GlobalConfigKey

type GlobalConfigKey struct{}

Jump to

Keyboard shortcuts

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