config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 6 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        *blst.PrivateKey `json:"sign_key,omitempty"`
	ConversationID string           `json:"conversation_id,omitempty"`
	Members        []*core.Member   `json:"members,omitempty"`
	Threshold      uint8            `json:"threshold,omitempty"`

	Vote Vote `json:"vote,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"`
}

Jump to

Keyboard shortcuts

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