config

package
Version: v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(cfgFile string, cfg *Config) error

Types

type Config

type Config struct {
	DB    db.Config `json:"db"`
	Dapp  Dapp      `json:"dapp"`
	Group Group     `json:"group,omitempty"`
}

type Dapp

type Dapp struct {
	mixin.Keystore
	ClientSecret string `json:"client_secret"`
	Pin          string `json:"pin"`
}

type Group

type Group struct {
	// 节点管理员 mixin id
	Admins []string `json:"admins,omitempty"`
	// 节点用于签名的私钥
	SignKey string `json:"sign_key,omitempty"`
	// 节点共享的用户解密的私钥
	PrivateKey string   `json:"private_key,omitempty"`
	Members    []Member `json:"members,omitempty"`
	Threshold  uint8    `json:"threshold,omitempty"`

	Vote Vote `json:"vote,omitempty"`
}

type Member

type Member struct {
	ClientID string `json:"client_id,omitempty"`
	// 节点共享的用户验证签名的公钥
	VerifyKey string `json:"verify_key,omitempty"`
}

type Redis

type Redis struct {
	Addr string `json:"addr,omitempty"`
	DB   int    `json:"db,omitempty"`
}

type Vote

type Vote struct {
	Asset  string          `json:"asset,omitempty"`
	Amount decimal.Decimal `json:"amount,omitempty"`
}

Source Files

Jump to

Keyboard shortcuts

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