config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TLS struct {
		Active bool   `yaml:"active"`
		Crt    string `yaml:"crt"`
		Key    string `yaml:"key"`
	} `yaml:"tls"`

	BasicAuth struct {
		Active   bool   `yaml:"active"`
		Username string `yaml:"username"`
		Password string `yaml:"password"`
	} `yaml:"basicAuth"`

	BearerAuth struct {
		Active     bool   `yaml:"active"`
		SigningKey string `yaml:"signingKey"`
	} `yaml:"bearerAuth"`

	Scripts []struct {
		Name   string `yaml:"name"`
		Script string `yaml:"script"`
	} `yaml:"scripts"`
}

Config represents the structur of the configuration file

func (*Config) GetScript

func (c *Config) GetScript(scriptName string) string

GetScript returns a script for a given name

func (*Config) LoadConfig

func (c *Config) LoadConfig(file string) error

LoadConfig reads the configuration file and umarshal the data into the config struct

Jump to

Keyboard shortcuts

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