config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Configurations = &Config{}

Configurations is kie config items

Functions

func Init

func Init() error

Init initiate config files

Types

type Config

type Config struct {
	DB   DB   `yaml:"db"`
	RBAC RBAC `yaml:"rbac"`
	//config from cli
	ConfigFile     string
	NodeName       string
	ListenPeerAddr string
	PeerAddr       string
	AdvertiseAddr  string
}

Config is yaml file struct

type DB

type DB struct {
	URI        string `yaml:"uri"`
	PoolSize   int    `yaml:"poolSize"`
	SSLEnabled bool   `yaml:"sslEnabled"`
	RootCA     string `yaml:"rootCAFile"`
	Timeout    string `yaml:"timeout"`
	VerifyPeer bool   `yaml:"verifyPeer"`
}

DB is yaml file struct to set mongodb config

func GetDB

func GetDB() DB

GetDB return db configs

type RBAC added in v0.2.0

type RBAC struct {
	Enabled    bool   `yaml:"enabled"`
	PubKeyFile string `yaml:"rsaPublicKeyFile"`
}

RBAC is rbac config

func GetRBAC added in v0.2.0

func GetRBAC() RBAC

GetRBAC return rbac config

Jump to

Keyboard shortcuts

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