types

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerFromContext

func LoggerFromContext(ctx context.Context) (*zap.Logger, error)

func LoggerWithContext

func LoggerWithContext(ctx context.Context, logger *zap.Logger) context.Context

Types

type ContextKey

type ContextKey string
const (
	MC_API_CONTEXT ContextKey = "mc_api_context"
	MC_CONFIG      ContextKey = "mc_config"
	LOGGER         ContextKey = "mc_logger"
	SCHEDULER      ContextKey = "mc_scheduler"
	STORAGE_DB     ContextKey = "mc_storage_db"
	METRIC_DB      ContextKey = "mc_metric_db"
	BUS            ContextKey = "mc_bus"
	ENTITY_API     ContextKey = "mc_entity_api"
	ENCRYPTION_API ContextKey = "mc_encryption_api"
)

type McApiContext

type McApiContext struct {
	Tenant string `json:"tenant" yaml:"tenant"`
	UserID string `json:"userId" yaml:"userId"`
}

struct used in api request

Jump to

Keyboard shortcuts

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