config

package
v0.0.0-...-2ba9d02 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultContextTimeout = 30 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URI         string             `json:"uri" yaml:"uri"`
	Token       string             `json:"token" yaml:"token"`
	MagicHeader *MagicHeaderConfig `json:"magic_header,omitempty" yaml:"magic_header,omitempty"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

func LoadConfigEnv

func LoadConfigEnv() (c *Config, err error)

type MagicHeaderConfig

type MagicHeaderConfig struct {
	Key    string `json:"key" yaml:"key"`
	Value  string `json:"value" yaml:"value"`
	Header string `json:"header" yaml:"header"`
}

Jump to

Keyboard shortcuts

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