config

package
v0.0.0-...-91c8016 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MongoConf  map[string]TMongodbMetadata
	SVCConf    map[string]TServiceMetadata
	APIKeyConf map[string]TAPIKeyMetadata
)

Functions

func ParseAPIKeyConfig

func ParseAPIKeyConfig(Config string) map[string]TAPIKeyMetadata

func ParseMongoConfig

func ParseMongoConfig(Config string) map[string]TMongodbMetadata

func ParseServiceConfig

func ParseServiceConfig(Config string) map[string]TServiceMetadata

Types

type TAPIKeyMetadata

type TAPIKeyMetadata struct {
	Name string `json:"name,omitempty"`
	Key  string `json:"key,omitempty"`
}

type TConfigs

type TConfigs struct {
	Kind     string      `json:"kind"`
	Metadata interface{} `json:"metadata"`
}

type TMongodbMetadata

type TMongodbMetadata struct {
	Type     string `json:"type,omitempty"`
	Name     string `json:"name,omitempty"`
	DBName   string `json:"db_name,omitempty"`
	CollName string `json:"coll_name,omitempty"`
	URI      string `json:"uri,omitempty"`
}

type TRawConfig

type TRawConfig struct {
	Data []TConfigs `json:"data"`
}

type TServiceMetadata

type TServiceMetadata struct {
	Name string `json:"name,omitempty"`
	Host string `json:"host,omitempty"`
	Port string `json:"port,omitempty"`
	URI  string `json:"uri,omitempty"`
}

Jump to

Keyboard shortcuts

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