config

package
v0.0.0-...-f608160 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AuthTypeBasic basic authentification
	AuthTypeBasic string = "basic"
)

Variables

This section is empty.

Functions

func GetLastModified

func GetLastModified() time.Time

GetLastModified returns last modified timestamp for setting Last-Modified header

func GetLastModifiedHash

func GetLastModifiedHash() uint32

GetLastModifiedHash returns a hash that can be used to build an ETag

func Read

func Read(configPath string) error

Read cloud foundry data structure from YAML file.

Types

type Configuration

type Configuration struct {
	Server struct {
		AuthType  string `yaml:"authtype"`
		BasicAuth struct {
			UserName string `yaml:"username"`
			Password string `yaml:"password"`
		} `yaml:"basicauth"`
	} `yaml:"server"`
	CloudFoundries map[string]struct {
		APIURL   string   `yaml:"apiURL"`
		UAAURL   string   `yaml:"uaaURL"`
		UserName string   `yaml:"username"`
		Password string   `yaml:"password"`
		Labels   []string `yaml:"labels"`
	} `yaml:"cloudfoundries"`
}

Configuration struct for server configuration

func Get

func Get() Configuration

Get returns configuration object

Jump to

Keyboard shortcuts

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