config

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

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 5 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 {
	DB        string    `yaml:"db" json:"db" config:"modoki-db"`
	Domain    string    `yaml:"domain" json:"domain" config:"modoki-app-domain"`
	Namespace string    `yaml:"namespace" json:"namespace" config:"modoki-namespace"`
	Address   string    `yaml:"address" json:"address" config:"modoki-address"`
	Endpoints Endpoints `yaml:"endpoints" json:"endpoints" config:"-"`
	APIKeys   []string  `yaml:"api_keys" json:"api_keys" config:"modoki-api-key"` // TODO: Rename to modoki-api-keys

	DBElements dbElements `yaml:"-" json:"-"`
}

func ReadConfig

func ReadConfig() (*Config, error)

type Endpoint

type Endpoint struct {
	Endpoint string `yaml:"endpoint" json:"endpoint"`
	Insecure bool   `yaml:"insecure" json:"insecure"`
}

type Endpoints

type Endpoints struct {
	Generator *Endpoint `yaml:"generator" json:"generator"`
	App       *Endpoint `yaml:"app" json:"app"`
	UserOrg   *Endpoint `yaml:"user_org" json:"user_org"`

	Plugins []Plugin `yaml:"plugins" json:"plugins"`
}

type Plugin

type Plugin struct {
	Name       string `yaml:"name" json:"name"`
	MetricsAPI bool   `yaml:"metrics_api" json:"metrics_api"`
	Endpoint   `yaml:",inline" json:",inline"`
}

Jump to

Keyboard shortcuts

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