conf

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileExtensionSep       = "|"
	JsonFileExtension      = ".json"
	YamlOrYmlFileExtension = ".yaml|.yml"
)

Variables

View Source
var (
	//go:embed openapi/openapi.yaml
	OpenAPIDefaultConfig  string
	OpenAPIConfigFilePath = "conf/openapi/openapi.yaml"
)
View Source
var (
	//go:embed monitor/collector/collector.yaml
	MonitorCollectorDefaultConfig  string
	MonitorCollectorConfigFilePath string = "conf/monitor/collector/collector.yaml"

	//go:embed monitor/monitor/monitor.yaml
	MonitorDefaultConfig  string
	MonitorConfigFilePath string = "conf/monitor/monitor/monitor.yaml"

	//go:embed monitor/streaming/streaming.yaml
	MonitorStreamingDefaultConfig  string
	MonitorStreamingConfigFilePath string = "conf/monitor/streaming/streaming.yaml"

	//go:embed monitor/log-service/log-service.yaml
	MonitorLogServiceDefaultConfig  string
	MonitorLogServiceConfigFilePath string = "conf/monitor/log-service/log-service.yaml"

	// extensions
	//go:embed monitor/extensions/report-engine.yaml
	MonitorReportEngineDefaultConfig string
	MonitorReportEngineFilePath      string = "conf/monitor/extensions/report-engine.yaml"
)

monitor

View Source
var (
	//go:embed msp/msp.yaml
	MSPDefaultConfig  string
	MSPConfigFilePath string = "conf/msp/msp.yaml"

	//go:embed msp/init_sqls
	MSPAddonInitSqls   embed.FS
	MSPAddonFsRootPath = "msp/init_sqls"
)

msp

Functions

func FileUnmarshal added in v1.3.0

func FileUnmarshal(fileExtension string, file []byte) (interface{}, error)

Types

type ConfigurationFile added in v1.3.0

type ConfigurationFile struct {
	Index     string // file Index
	Filename  string // Filename with Extension
	Path      string // Path from dir root
	Extension string // file Extension
	Content   []byte // file contents
}

type ConfigurationSearcher added in v1.3.0

type ConfigurationSearcher map[string]*ConfigurationFile

type Configure added in v1.3.0

type Configure struct {
	FS      embed.FS
	Dirname string
}

func (*Configure) JsonReader added in v1.3.0

func (c *Configure) JsonReader() *ConfigurationSearcher

func (*Configure) YamlOrYmlReader added in v1.3.0

func (c *Configure) YamlOrYmlReader() *ConfigurationSearcher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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