reader

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvReader

type EnvReader struct {
	Prefix string
}

EnvReader creates properties from the environment variables

func (*EnvReader) Read

func (f *EnvReader) Read() (map[string]Property, error)

type FileReader

type FileReader struct {
	Filename       string
	IgnoreNotFound bool
}

FileReader reads properties from a file

func (*FileReader) Read

func (f *FileReader) Read() (map[string]Property, error)

type ProgrammaticReader

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

ProgrammaticReader permits to define properties programmatically

func NewProgrammaticReader

func NewProgrammaticReader() *ProgrammaticReader

NewProgrammaticReader creats a new ProgrammaticReader instance

func (*ProgrammaticReader) Add

func (f *ProgrammaticReader) Add(key string, value string) *ProgrammaticReader

Add a new property

func (*ProgrammaticReader) AddProperty

func (f *ProgrammaticReader) AddProperty(key string, value Property) *ProgrammaticReader

AddProperty adds a new property

func (*ProgrammaticReader) Read

func (f *ProgrammaticReader) Read() (map[string]Property, error)

type Property

type Property struct {
	Value      string
	Resolvable bool
}

Property represents a property key-value pair

type Reader

type Reader interface {
	Read() (map[string]Property, error)
}

Reader creates a properies map

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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