physicalfile

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveIni added in v1.0.1

func ResolveIni(reader io.Reader) (map[string]interface{}, error)

Types

type PhysicalFileProvider

type PhysicalFileProvider struct {
	goconf.ConfigurationProvider

	Source *PhysicalFileSource

	LoadFile ResolvePhysicalFile
}

func NewPhysicalFileProvider

func NewPhysicalFileProvider(source *PhysicalFileSource, loadFile ResolvePhysicalFile) *PhysicalFileProvider

func (*PhysicalFileProvider) Load

func (provider *PhysicalFileProvider) Load() error

func (*PhysicalFileProvider) String

func (provider *PhysicalFileProvider) String() string

type PhysicalFileSource

type PhysicalFileSource struct {

	// 文件路径
	FilePath string
	// contains filtered or unexported fields
}

func FromReader

func FromReader(reader io.Reader, fn ResolvePhysicalFile) *PhysicalFileSource

func Ini added in v1.0.1

func Ini(filePath string) *PhysicalFileSource

func IniReader added in v1.0.1

func IniReader(reader io.Reader) *PhysicalFileSource

func Json

func Json(filePath string) *PhysicalFileSource

func JsonReader

func JsonReader(reader io.Reader) *PhysicalFileSource

func PhysicalFile

func PhysicalFile(filePath string, fn ResolvePhysicalFile) *PhysicalFileSource

func Yaml

func Yaml(filePath string) *PhysicalFileSource

func YamlReader

func YamlReader(reader io.Reader) *PhysicalFileSource

func (*PhysicalFileSource) BuildProvider

func (source *PhysicalFileSource) BuildProvider(builder goconf.Builder) goconf.Provider

func (*PhysicalFileSource) ResolveFile

func (source *PhysicalFileSource) ResolveFile() error

type ResolvePhysicalFile

type ResolvePhysicalFile func(io.Reader) (map[string]*goconf.ExtractedValue, error)

Jump to

Keyboard shortcuts

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