Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEmulatorConfigName = "default"

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Name    string
	Address flow.Address
	ChainID flow.ChainID
	Keys    []AccountKey
}

Account is main config for each account

type AccountKey

type AccountKey struct {
	Type     KeyType
	Index    int
	SigAlgo  crypto.SignatureAlgorithm
	HashAlgo crypto.HashAlgorithm
	Context  map[string]string
}

AccountKey is config for account key

type Accounts

type Accounts []Account

func (*Accounts) GetByAddress

func (a *Accounts) GetByAddress(address string) Account

GetByAddress get account by address

func (*Accounts) GetByName

func (a *Accounts) GetByName(name string) Account

GetAccountByName get account by name

type Config

type Config struct {
	Emulators   Emulators
	Contracts   Contracts
	Networks    Networks
	Accounts    Accounts
	Deployments Deployments
}

type Contract

type Contract struct {
	Name    string
	Source  string
	Network string
	Alias   string
}

Contract is config for contract

func (*Contract) IsAlias

func (c *Contract) IsAlias() bool

IsAlias checks if contract has an alias

type Contracts

type Contracts []Contract

func (*Contracts) GetByName

func (c *Contracts) GetByName(name string) Contract

GetByName get contract by name

func (*Contracts) GetByNameAndNetwork

func (c *Contracts) GetByNameAndNetwork(name string, network string) Contract

GetByNameAndNetwork get contract array for account and network

func (*Contracts) GetByNetwork

func (c *Contracts) GetByNetwork(network string) Contracts

GetByNetwork returns all contracts for specific network

type Deploy

type Deploy struct {
	Network   string   // network name to deploy to
	Account   string   // account name to which to deploy to
	Contracts []string // contracts names to deploy
}

Deploy structure for contract

type Deployments

type Deployments []Deploy

func (*Deployments) GetByAccountAndNetwork

func (d *Deployments) GetByAccountAndNetwork(account string, network string) []Deploy

GetByAccountAndNetwork get deploy by account and network

func (*Deployments) GetByNetwork

func (d *Deployments) GetByNetwork(network string) Deployments

GetByNetwork get all deployments by network

type Emulator

type Emulator struct {
	Name           string
	Port           int
	ServiceAccount string
}

Emulator is config for emulator

type Emulators

type Emulators []Emulator

func (*Emulators) GetDefault

func (e *Emulators) GetDefault() Emulator

type KeyType

type KeyType string
const (
	KeyTypeHex       KeyType = "hex"        // Hex private key with in memory signer
	KeyTypeGoogleKMS KeyType = "google-kms" // Google KMS signer
	KeyTypeShell     KeyType = "shell"      // Exec out to a shell script
)

type Network

type Network struct {
	Name    string
	Host    string
	ChainID flow.ChainID
}

Network config sets host and chain id

type Networks

type Networks []Network

func (*Networks) GetByName

func (n *Networks) GetByName(name string) Network

GetByName get network by name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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