config

package
v0.1.5-beta.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validator

func Validator() *validator.Validate

Types

type Config

type Config struct {
	Vaults map[string]*VaultConfig `yaml:"vaults" validate:"gt=0,dive,required"`
	Tezos  TezosConfig             `yaml:"tezos" validate:"dive,keys,startswith=tz1|startswith=tz2|startswith=tz3,len=36,endkeys,dive"`
	Server ServerConfig            `yaml:"server"`
}

Config contains all the configuration necessary to run the signatory

func (*Config) Read

func (c *Config) Read(file string) error

Read read the config from a file

type ServerConfig

type ServerConfig struct {
	Address        string `yaml:"address" validate:"required,hostport"`
	UtilityAddress string `yaml:"utility_address" validate:"required,hostport"`
}

ServerConfig contains the information necessary to the tezos signing server

type TezosConfig

type TezosConfig map[string]*TezosPolicy

TezosConfig contains the configuration related to tezos network

type TezosPolicy

type TezosPolicy struct {
	AllowedOperations []string `yaml:"allowed_operations" validate:"dive,oneof=generic block endorsement"`
	AllowedKinds      []string `` /* 203-byte string literal not displayed */
	LogPayloads       bool     `yaml:"log_payloads"`
}

TezosPolicy contains policy definition for a specific address

type VaultConfig

type VaultConfig struct {
	Driver string    `yaml:"driver" validate:"required"`
	Config yaml.Node `yaml:"config"`
}

VaultConfig represents single vault instance

Jump to

Keyboard shortcuts

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