config

package
v0.0.0-...-30beee0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var YmlConfig = ReadYmlConfig()

Functions

func GetConstant

func GetConstant(name string) (interface{}, error)

func GetEndpoint

func GetEndpoint(endpoint string) *map[string]string

func MustGetConstant

func MustGetConstant(name string) interface{}

func MustGetConstantPath

func MustGetConstantPath(path string) interface{}

Types

type Config

type Config struct {
	Endpoints map[string]map[string]string `yaml:"endpoints"`
	Constants map[string]interface{}       `yaml:"constants"`
}

func ReadYmlConfig

func ReadYmlConfig() *Config

func (*Config) GetConstant

func (cfg *Config) GetConstant(name string) (interface{}, error)

func (*Config) GetConstantPath

func (cfg *Config) GetConstantPath(path string) (interface{}, error)

func (*Config) GetEndpoint

func (cfg *Config) GetEndpoint(endpoint string) *map[string]string

func (*Config) MustGetConstant

func (cfg *Config) MustGetConstant(name string) interface{}

func (*Config) MustGetConstantPath

func (cfg *Config) MustGetConstantPath(path string) interface{}

Jump to

Keyboard shortcuts

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