Documentation ¶
Overview ¶
nolint: ireturn
Index ¶
- Variables
- type EnvReader
- type JSONReader
- type Reader
- type Registry
- func (c Registry) AddReader(reader Reader) error
- func (c Registry) AddReaders(readers ...Reader) error
- func (c Registry) Get(key string) (any, error)
- func (c Registry) GetBool(key string) (bool, error)
- func (c Registry) GetFloat32(key string) (float32, error)
- func (c Registry) GetFloat64(key string) (float64, error)
- func (c Registry) GetInt(key string) (int, error)
- func (c Registry) GetInt16(key string) (int16, error)
- func (c Registry) GetInt32(key string) (int32, error)
- func (c Registry) GetInt64(key string) (int64, error)
- func (c Registry) GetInt8(key string) (int8, error)
- func (c Registry) GetMap(key string) (map[string]*ajson.Node, error)
- func (c Registry) GetString(key string) (string, error)
- func (c Registry) GetUint(key string) (uint, error)
- func (c Registry) GetUint16(key string) (uint16, error)
- func (c Registry) GetUint32(key string) (uint32, error)
- func (c Registry) GetUint64(key string) (uint64, error)
- func (c Registry) GetUint8(key string) (uint8, error)
- func (c Registry) MustBool(credKey string) bool
- func (c Registry) MustFloat32(credKey string) float32
- func (c Registry) MustFloat64(credKey string) float64
- func (c Registry) MustInt(credKey string) int
- func (c Registry) MustInt16(credKey string) int16
- func (c Registry) MustInt32(credKey string) int32
- func (c Registry) MustInt64(credKey string) int64
- func (c Registry) MustInt8(credKey string) int8
- func (c Registry) MustString(credKey string) string
- func (c Registry) MustUint(credKey string) uint
- func (c Registry) MustUint16(credKey string) uint16
- func (c Registry) MustUint32(credKey string) uint32
- func (c Registry) MustUint64(credKey string) uint64
- func (c Registry) MustUint8(credKey string) uint8
- type ValueReader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyNotFound = errors.New("key not found") ErrValueNotFound = errors.New("value not found") ErrWrongType = errors.New("wrong type") ErrEnvVarNotSet = errors.New("environment variable not set") ErrJSONPathNotFound = errors.New("empty value at json path") ErrReaderNotFound = errors.New("reader not found") )
Functions ¶
This section is empty.
Types ¶
type EnvReader ¶
type JSONReader ¶
type JSONReader struct { KeyName string `json:"string" validate:"required"` FilePath string `json:"filePath" validate:"required"` JSONPath string `json:"jsonPath" validate:"required"` }
func (*JSONReader) Key ¶
func (r *JSONReader) Key() (string, error)
func (*JSONReader) Value ¶
func (r *JSONReader) Value() (any, error)
type Registry ¶
Registry of readers capable of scanning data of different type from file, env sources.
func NewRegistry ¶
func NewRegistry() Registry
func (Registry) AddReaders ¶
func (Registry) MustFloat32 ¶
func (Registry) MustFloat64 ¶
func (Registry) MustString ¶
func (Registry) MustUint16 ¶
func (Registry) MustUint32 ¶
func (Registry) MustUint64 ¶
type ValueReader ¶
type ValueReader struct { KeyName string `json:"string" validate:"required"` Val any `json:"val" validate:"required"` }
func (*ValueReader) Key ¶
func (r *ValueReader) Key() (string, error)
func (*ValueReader) Value ¶
func (r *ValueReader) Value() (any, error)
Directories ¶
Path | Synopsis |
---|---|
Package credscanning is a wrapper for scanning package.
|
Package credscanning is a wrapper for scanning package. |
Click to show internal directories.
Click to hide internal directories.