config

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name     string `json:"name,omitempty"`
	Port     int    `json:"port,omitempty"`
	LogLevel string `json:"log_level,omitempty"`
	Auth0    Auth0  `json:"auth0,omitempty"`
}

Application struct to read in configs

type Auth0 added in v0.3.0

type Auth0 struct {
	Identifier string `json:"identifier,omitempty"`
	Domain     string `json:"domain,omitempty"`
}

Auth0 struct

type Client

type Client struct {
	Headers map[string]string `json:"headers,omitempty"`
	Health  string            `json:"health,omitempty"`
	ID      string            `json:"id,omitempty"`
	Secret  string            `json:"secret,omitempty"`
	Timeout int               `json:"timeout,omitempty"`
	URL     string            `json:"url,omitempty"`
}

Client struct used in Dependents

type Config

type Config struct {
	Application Application
	Datasource  Datasource
	Dependents  Dependents
}

Config struct

func Unmarshal

func Unmarshal() (Config, error)

Unmarshal configs

type Datasource

type Datasource struct {
	Mongo map[string]Mongo `json:"mongo,omitempty"`
}

Datasource struct to read in configs

type Dependents

type Dependents struct {
	Clients map[string]Client `json:"clients,omitempty"`
}

Dependents struct to read in configs

type Mongo

type Mongo struct {
	Database    string            `json:"database,omitempty"`
	URI         string            `json:"uri,omitempty"`
	Collections map[string]string `json:"collections,omitempty"`
}

Mongo struct used in Datasource

Jump to

Keyboard shortcuts

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