loader

package
v5.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigCreator

type ConfigCreator func() interface{}

type ConfigCreatorCache

type ConfigCreatorCache map[string]ConfigCreator

func (ConfigCreatorCache) CreateConfig

func (v ConfigCreatorCache) CreateConfig(id string) (interface{}, error)

func (ConfigCreatorCache) RegisterCreator

func (v ConfigCreatorCache) RegisterCreator(id string, creator ConfigCreator) error

type JSONConfigLoader

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

func NewJSONConfigLoader

func NewJSONConfigLoader(cache ConfigCreatorCache, idKey string, configKey string) *JSONConfigLoader

func (*JSONConfigLoader) Load

func (v *JSONConfigLoader) Load(raw []byte) (interface{}, string, error)

func (*JSONConfigLoader) LoadWithID

func (v *JSONConfigLoader) LoadWithID(raw []byte, id string) (interface{}, error)

Jump to

Keyboard shortcuts

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