Documentation ¶
Index ¶
- Constants
- Variables
- func LookupPathIncomplete(path string) error
- func RegisterSource(name string, factory SourceFactory)
- func UnsupportedLookupPath(path string) error
- type Backend
- type BackendType
- type Credentials
- type DynamicSource
- type LookupPath
- type Namespace
- type OptionArgs
- type ServicePath
- type Source
- type SourceFactory
- type SourceIdentifier
- type SourceRegistry
- type SourceType
- type Sources
- type StaticSource
- type Subpath
Constants ¶
View Source
const ( // Kv : BackendType key value represents any key value storage Kv = iota // Db : BackendType database represents any database other than key value storage Db )
View Source
const ( Env = iota Metadata Store )
Variables ¶
View Source
var ( // Pattern : the pattern of the path // // ex: // vault+https://cluster01.company.internal/v1.1/company/team10/kv/peroject_01/stg/environment // <source>://<host>/<version>/<namespace>/<type>/<service>/<env>/<path> // default:// // // <version>/<namespace>/<type>/<service>/<env>/<path> // // alias+staging://environment // alias+<alias-name>://<path> // Pattern = regexp.MustCompile("^v([\\w\\.]+)\\/(.*)\\/(kv|db)+\\/(.*)\\/(stg|prod|canary|test|local)\\/(.*)") )
Functions ¶
func LookupPathIncomplete ¶
func RegisterSource ¶
func RegisterSource(name string, factory SourceFactory)
func UnsupportedLookupPath ¶
Types ¶
type BackendType ¶
type BackendType int
BackendType newtype that represents backend type in the path ex: kv or db
type Credentials ¶
type Credentials map[string]base.StringList
type DynamicSource ¶
type LookupPath ¶
type LookupPath struct {
// contains filtered or unexported fields
}
LookupPath : Represents the actual path of given source declaration
func ParseLookupPath ¶
func ParseLookupPath(path string) (LookupPath, error)
type Namespace ¶
type Namespace string
Namespace newtype that represents namespace identifier in the path
type OptionArgs ¶
type OptionArgs map[string]interface{}
type ServicePath ¶
type ServicePath Subpath
ServicePath newtype that represents service identifier in path
type SourceFactory ¶
type SourceFactory (func(uri md.LimitedURI, credential Credentials, options OptionArgs) (Source, error))
SourceFactory : Factory for source
type SourceIdentifier ¶
type SourceRegistry ¶
type SourceRegistry struct {
// contains filtered or unexported fields
}
func Registry ¶
func Registry(sources map[string]md.LimitedURI) (SourceRegistry, []error)
func (SourceRegistry) IsEmpty ¶
func (r SourceRegistry) IsEmpty() bool
func (SourceRegistry) Size ¶
func (r SourceRegistry) Size() int
type SourceType ¶
type SourceType int
Click to show internal directories.
Click to hide internal directories.