config

package
v0.0.1-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func New

func New() Config

func (*Config) Exists

func (config *Config) Exists(basePath string) bool

func (*Config) GetPath

func (config *Config) GetPath(basePath string, fileNames []FileName) (string, *FileName, error)

func (*Config) Read

func (config *Config) Read(configPath string, fileType FileType, out interface{}) error

Read Configuration file

func (*Config) SetFS

func (config *Config) SetFS(fs afero.Fs)

type FileName

type FileName struct {
	FileName string
	Type     FileType
}

func GetProjectFileNames

func GetProjectFileNames() []FileName

GetProjectFileNames represents project-specific configuration file names

func GetUserFileNames

func GetUserFileNames() []FileName

GetUserFileNames represents developer and project-specific configuration file names

type FileType

type FileType int64
const (
	YAML FileType = iota
	JSON
)

Jump to

Keyboard shortcuts

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