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: 4 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 {
	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: Renamed to modoki-api-keys
	OIDC      OpenIDConnect `yaml:"oidc" json:"oidc"`
}

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 {
	App     *Endpoint `yaml:"app" json:"app"`
	UserOrg *Endpoint `yaml:"user_org" json:"user_org"`
	Token   *Endpoint `yaml:"token" json:"token"`
}

type OpenIDConnect

type OpenIDConnect struct {
	ClientID     string   `yaml:"client_id" json:"client_id" config:"oidc-client-id"`
	ClientSecret string   `yaml:"client_id" json:"client_id" config:"oidc-client-secret"`
	Scopes       []string `yaml:"scopes" json:"scopes" config:"oidc-scopes"`
	RedirectURL  string   `yaml:"redirect_url" json:"redirect_url" config:"oidc-redirect-url"`
	ProviderURL  string   `yaml:"provider_url" json:"provider_url" config:"oidc-provider-url"`
}

Jump to

Keyboard shortcuts

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