config

package
v0.3.1-beta-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validator

func Validator() *validator.Validate

Types

type AuthorizedKeys

type AuthorizedKeys struct {
	// contains filtered or unexported fields
}

AuthorizedKeys keeps list of authorized public keys

func (*AuthorizedKeys) List

func (a *AuthorizedKeys) List() []string

List returns all keys as a string slice

func (*AuthorizedKeys) MarshalJSON

func (a *AuthorizedKeys) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*AuthorizedKeys) UnmarshalYAML

func (a *AuthorizedKeys) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements yaml.Unmarshaler

type Config

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

Config contains all the configuration necessary to run the signatory

func Default

func Default() *Config

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:"hostname_port"`
	UtilityAddress string          `yaml:"utility_address" validate:"hostname_port"`
	AuthorizedKeys *AuthorizedKeys `yaml:"authorized_keys"`
}

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"`
	AuthorizedKeys    *AuthorizedKeys `yaml:"authorized_keys"`
}

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