foundation

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(configpath string, opts LoggingOptions) (ConfigStore, Logger)

Init all foundation dependencies

Types

type ConfigStore

type ConfigStore interface {
	Get(key string) interface{}
	GetConfig(key string) interface{}
	GetConfigX(key string, defaultvalue interface{}) interface{}
}

ConfigStore functions

func GetConfigStore

func GetConfigStore() ConfigStore

GetConfigStore to get configuration store

type Logger

type Logger interface {
	Debug(ctx context.Context, args ...interface{})
	Info(ctx context.Context, args ...interface{})
	Warn(ctx context.Context, args ...interface{})
	Error(ctx context.Context, args ...interface{})

	InfoF(ctx context.Context, format string, args ...interface{})
	WarnF(ctx context.Context, format string, args ...interface{})
	DebugF(ctx context.Context, format string, args ...interface{})
	ErrorF(ctx context.Context, format string, args ...interface{})
}

Logger functions

func GetLogger

func GetLogger() Logger

GetLogger to get logger instance

type LoggingOptions added in v1.2.5

type LoggingOptions struct {
	ExtraHooks []logrus.Hook
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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