structs

package
v0.0.0-...-dba23ac Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bitmark = "bitmark"
	Testing = "testing"
	Local   = "local"
)

names of all chains

Variables

This section is empty.

Functions

func IsValidChain

func IsValidChain(name string) bool

validate a chain name

Types

type BitmarkdConfiguration

type BitmarkdConfiguration struct {
	DataDirectory string       `libucl:"data_directory" json:"data_directory"`
	PidFile       string       `libucl:"pidfile" json:"pidfile"`
	Chain         string       `libucl:"chain" json:"chain"`
	Nodes         string       `libucl:"nodes" json:"nodes"`
	Database      DatabaseType `libucl:"database" json:"database"`

	ClientRPC RPCType               `libucl:"client_rpc" json:"client_rpc"`
	Peering   peer.Configuration    `libucl:"peering" json:"peering"`
	Proofing  proof.Configuration   `libucl:"proofing" json:"proofing"`
	Bitcoin   bitcoin.Configuration `libucl:"bitcoin" json:"bitcoin"`
	Logging   LoggerType            `libucl:"logging" json:"logging"`
}

func NewBitmarkdConfiguration

func NewBitmarkdConfiguration(configurationFileName string) (*BitmarkdConfiguration, error)

will read decode and verify the configuration

func (*BitmarkdConfiguration) SaveToJson

func (b *BitmarkdConfiguration) SaveToJson(filename string) error

type Connection

type Connection struct {
	PublicKey string `libucl:"public_key" json:"public_key"`
	Blocks    string `libucl:"blocks" json:"blocks"`
	Submit    string `libucl:"submit" json:"submit"`
}

type DatabaseType

type DatabaseType struct {
	Directory string `libucl:"directory" json:"directory"`
	Name      string `libucl:"name" json:"name"`
}

type LoggerType

type LoggerType struct {
	Directory string            `libucl:"directory" json:"directory"`
	File      string            `libucl:"file" json:"file"`
	Size      int               `libucl:"size" json:"size"`
	Count     int               `libucl:"count" json:"count"`
	Levels    map[string]string `libucl:"levels" json:"levels"`
}

type LoglevelMap

type LoglevelMap map[string]string

to hold log levels

type PeerType

type PeerType struct {
	PrivateKey string       `libucl:"private_key" json:"private_key"`
	PublicKey  string       `libucl:"public_key" json:"public_key"`
	Connect    []Connection `libucl:"connect" json:"connect"`
}

type ProoferdConfiguration

type ProoferdConfiguration struct {
	DataDirectory string     `libucl:"data_directory" json:"data_directory"`
	PidFile       string     `libucl:"pidfile" json:"pidfile"`
	Chain         string     `libucl:"chain" json:"chain"`
	Threads       int        `libucl:"threads" json:"threads"`
	Peering       PeerType   `libucl:"peering" json:"peering"`
	Logging       LoggerType `libucl:"logging" json:"logging"`
}

func NewProoferdConfiguration

func NewProoferdConfiguration(configurationFileName string) (*ProoferdConfiguration, error)

will read decode and verify the configuration

func (*ProoferdConfiguration) SaveToJson

func (p *ProoferdConfiguration) SaveToJson(filename string) error

type RPCType

type RPCType struct {
	MaximumConnections int      `libucl:"maximum_connections" json:"maximum_connections"`
	Listen             []string `libucl:"listen" json:"listen"`
	Certificate        string   `libucl:"certificate" json:"certificate"`
	PrivateKey         string   `libucl:"private_key" json:"private_key"`
	Announce           []string `libucl:"announce" json:"announce"`
}

Jump to

Keyboard shortcuts

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