ccontext

package
v3.8.3-patch.12 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: AGPL-3.0 Imports: 5 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

func WithSendOrderInfo

func WithSendOrderInfo(ctx context.Context, info *SendOrderInfo) 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{}

type SendOrderInfo

type SendOrderInfo struct {
	Lane     SendOrderLane
	Ordered  bool
	Seq      int64
	Deadline time.Time
}

func GetSendOrderInfo

func GetSendOrderInfo(ctx context.Context) (*SendOrderInfo, bool)

type SendOrderLane

type SendOrderLane int
const (
	SendOrderLaneText SendOrderLane = iota + 1
	SendOrderLaneMedia
)

Jump to

Keyboard shortcuts

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