parser

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// ScopeApplication ...
	ScopeApplication = "application"
	// GeneralType ...
	GeneralType = "general"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigItem

type ConfigItem struct {
	Type              string            `yaml:"type"`
	Enabled           bool              `yaml:"enabled"`
	Addresses         []string          `yaml:"addresses"`
	ProviderAddresses []string          `yaml:"providerAddresses"`
	Services          []string          `yaml:"services"`
	Applications      []string          `yaml:"applications"`
	Parameters        map[string]string `yaml:"parameters"`
	Side              string            `yaml:"side"`
}

ConfigItem ...

type ConfigurationParser

type ConfigurationParser interface {
	Parse(string) (map[string]string, error)
	ParseToUrls(content string) ([]*common.URL, error)
}

ConfigurationParser ...

type ConfiguratorConfig

type ConfiguratorConfig struct {
	ConfigVersion string       `yaml:"configVersion"`
	Scope         string       `yaml:"scope"`
	Key           string       `yaml:"key"`
	Enabled       bool         `yaml:"enabled"`
	Configs       []ConfigItem `yaml:"configs"`
}

ConfiguratorConfig ...

type DefaultConfigurationParser

type DefaultConfigurationParser struct{}

DefaultConfigurationParser for support properties file in config center

func (*DefaultConfigurationParser) Parse

func (parser *DefaultConfigurationParser) Parse(content string) (map[string]string, error)

Parse ...

func (*DefaultConfigurationParser) ParseToUrls

func (parser *DefaultConfigurationParser) ParseToUrls(content string) ([]*common.URL, error)

ParseToUrls ...

Jump to

Keyboard shortcuts

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