config

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = driver.ErrNotFound

Functions

This section is empty.

Types

type Configure

type Configure struct {
	// contains filtered or unexported fields
}

func FromFile

func FromFile(file string, logger contract.Logger) (*Configure, error)

func (*Configure) Bool

func (e *Configure) Bool(namespace, key string) (bool, error)

func (*Configure) Close

func (e *Configure) Close()

func (*Configure) Decode

func (e *Configure) Decode(namespace, key string, value any, unmarshalFunc func([]byte, any) error) error

func (*Configure) Float64

func (e *Configure) Float64(namespace, key string) (float64, error)

func (*Configure) Get

func (e *Configure) Get(namespace, key string) ([]byte, error)

func (*Configure) Int

func (e *Configure) Int(namespace, key string) (int, error)

func (*Configure) Int64

func (e *Configure) Int64(namespace, key string) (int64, error)

func (*Configure) JsonDecode

func (e *Configure) JsonDecode(namespace, key string, value any) error

func (*Configure) OnKeyChange

func (e *Configure) OnKeyChange(namespace, key string, hook func([]byte) error) bool

func (*Configure) String

func (e *Configure) String(namespace, key string) (string, error)

func (*Configure) UnsafeGet

func (e *Configure) UnsafeGet(namespace, key string) ([]byte, error)

func (*Configure) YamlDecode

func (e *Configure) YamlDecode(namespace, key string, value any) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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