config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Username     string
	PasswordHash string
}

Auth stores the username and password hash. Inbound HTTP request must be authenticated over HTTP Basic Auth and the credentials provided by the client will be compared to values stored here

type Config

type Config struct {
	Name        string
	DisplayName string
	Description string
	Port        string
	Database    struct {
		Driver string
		URL    string
		Tables []*Table
	}
	TLS struct {
		Enabled    bool
		PublicKey  string
		PrivateKey string
	}
	Descriptor *descriptor.Descriptor
	Auth       *Auth
	Logging    bool
}

Config defines the data structures which can be used and configured in the config.yaml file and other relevant data structures

var Options Config

Options is populated by this package's init() function

type Table

type Table struct {
	Name               string
	ColumnAsOptionName string
}

Table defines the name of the database table that will be queried and the table column which will be the `name` field when the query results are formatted for option routes.

Jump to

Keyboard shortcuts

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