driver

package
v0.0.0-...-3030a97 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSource

func NewSource(s string) string

func WithBind

func WithBind(e any)

WithBind 绑定数据 alias别名 > 调用Set设置 > flag > env > config > key/value store > default

func WithBindEnv

func WithBindEnv(prefix string)

func WithBindKey

func WithBindKey(key string, rawVal any)

WithBindKey 绑定单个

Types

type Config

type Config interface {
	// Options in the config
	Options() Options
}
var (
	// DefaultConfig Default Config Manager
	DefaultConfig Config
)

func NewConfig

func NewConfig(opts ...Option) (Config, error)

NewConfig returns new config

type Entity

type Entity interface {
	OnChange()
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithEntity

func WithEntity(e Entity) Option

WithEntity 实体

func WithSource

func WithSource(s ...source.Source) Option

WithSource source 数据源

type OptionFunc

type OptionFunc func(o *Options)

type Options

type Options struct {
	Source []source.Source
	Loader loader.Loader
	Reader reader.Reader

	Context context.Context

	Entity Entity
}

Directories

Path Synopsis
env

Jump to

Keyboard shortcuts

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