config

package
v0.0.0-...-bbd11b6 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: MIT Imports: 7 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 {
	Databases map[string]*Database
	Groups    map[string]*Group
	Policies  map[string]*Policy
	Users     map[string]*User
}

func LoadDir

func LoadDir(root string) (*Config, error)

func NewConfig

func NewConfig() *Config

func (*Config) CheckDependencies

func (c *Config) CheckDependencies() error

type Database

type Database struct {
	Endpoint     string `hcl:"endpoint"`
	Port         int    `hcl:"port"`
	User         string `hcl:"user"`
	Password     string `hcl:"password"`
	DatabaseName string `hcl:"database_name"`
}

type Group

type Group struct {
	Policies []string `hcl:"policies"`
}

type Policy

type Policy struct {
	Database string   `hcl:"database"`
	Queries  []string `hcl:"queries"`
}

type User

type User struct {
	Group string `hcl:"group"`
}

Jump to

Keyboard shortcuts

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