parser

package
v1.5.7-rc1-tmp Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// ScopeApplication : scope application
	ScopeApplication = "application"
	// GeneralType defines the general type
	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 defines config item

type ConfigurationParser

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

ConfigurationParser interface

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 defines configurator config

type DefaultConfigurationParser

type DefaultConfigurationParser struct{}

DefaultConfigurationParser for supporting properties file in config center

func (*DefaultConfigurationParser) Parse

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

Parse load content

func (*DefaultConfigurationParser) ParseToUrls

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

ParseToUrls is used to parse content to urls

Jump to

Keyboard shortcuts

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