client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	//Config of the client
	Config() *Config

	//FetchFile queries the remote configuration service and returns the resulting file
	FetchFile(source string) ([]byte, error)

	//FetchAs queries the remote configuration service and returns the result in specified format
	FetchAs(extension Extension) (string, error)

	//FetchAsJSON queries the remote configuration service and returns the result as a JSON string
	FetchAsJSON() (string, error)

	//FetchAsYAML queries the remote configuration service and returns the result as a YAML string
	FetchAsYAML() (string, error)

	//FetchAsProperties queries the remote configuration service and returns the result as a Properties string
	FetchAsProperties() (string, error)

	//Encrypt encrypts the value server side and returns result
	Encrypt(value string) (string, error)

	//Decrypt decrypts the value server side and returns result
	Decrypt(value string) (string, error)
}

Client Spring Cloud Config Client

func NewClient

func NewClient(c Config) Client

NewClient creates instance of the Client

type Config

type Config struct {
	URI         string
	Profile     string
	Application string
	Label       string
}

Config needed to fetch a remote configuration

type Extension

type Extension string

Extension format of downloaded config

func ParseExtension

func ParseExtension(str string) (Extension, error)

ParseExtension parse string into Extension type

Jump to

Keyboard shortcuts

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