Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultPaths() []string
- func Exists(path string) bool
- func GlobalPath() string
- func ProcessorRun(raw []byte) ([]byte, map[string]string)
- func StringToAddress(value string) (*flow.Address, error)
- func StringToHexKey(key string, sigAlgo string) (crypto.PrivateKey, error)
- func StringToKeyIndex(value string) (int, error)
- type Account
- type AccountKey
- type Accounts
- type Config
- type ConfigParsers
- type Contract
- type ContractDeployment
- type Contracts
- func (c *Contracts) AddOrUpdate(name string, contract Contract)
- func (c *Contracts) GetByName(name string) *Contract
- func (c *Contracts) GetByNameAndNetwork(name string, network string) *Contract
- func (c *Contracts) GetByNetwork(network string) Contracts
- func (c *Contracts) Remove(name string) error
- type Deploy
- type Deployments
- type Emulator
- type Emulators
- type KeyType
- type Loader
- type Network
- type Networks
- type Parser
Constants ¶
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 DefaultEmulatorConfigName = "default" PrivateKeyField = "privateKey" KMSContextField = "resourceName" DefaultEmulatorServiceAccountName = "emulator-account" )
const DefaultPath = "flow.json"
Variables ¶
var ErrDoesNotExist = errors.New("missing configuration, initialize it: flow init")
ErrDoesNotExist is error to be returned when config file does not exists
var ErrOutdatedFormat = errors.New("you are using old configuration format")
Functions ¶
func DefaultPaths ¶ added in v0.19.0
func DefaultPaths() []string
DefaultPaths determines default paths for configuration
func GlobalPath ¶ added in v0.19.0
func GlobalPath() string
GlobalPath gets global path based on home dir
func ProcessorRun ¶
ProcessorRun all pre-processors
func StringToAddress ¶ added in v0.19.0
func StringToHexKey ¶ added in v0.19.0
func StringToHexKey(key string, sigAlgo string) (crypto.PrivateKey, error)
func StringToKeyIndex ¶ added in v0.19.0
Types ¶
type Account ¶
type Account struct { Name string Address flow.Address Keys []AccountKey }
Account defines the configuration for a Flow account.
type AccountKey ¶
type AccountKey struct { Type KeyType Index int SigAlgo crypto.SignatureAlgorithm HashAlgo crypto.HashAlgorithm Context map[string]string }
AccountKey defines the configuration for a Flow account key.
type Accounts ¶
type Accounts []Account
func (*Accounts) AddOrUpdate ¶
AddOrUpdate add new or update if already present
type Config ¶
type Config struct { Emulators Emulators Contracts Contracts Networks Networks Accounts Accounts Deployments Deployments }
type ConfigParsers ¶
type ConfigParsers []Parser
ConfigParsers is a list of all configuration parsers.
func (*ConfigParsers) FindForFormat ¶
func (c *ConfigParsers) FindForFormat(extension string) Parser
FindForFormat finds a parser that can parse a specific format based on extension
type Contract ¶
Contract defines the configuration for a Cadence contract.
func StringToContracts ¶ added in v0.19.0
type ContractDeployment ¶ added in v0.19.0
ContractDeployment defines the deployment of the contract with possible args
type Contracts ¶
type Contracts []Contract
func (*Contracts) AddOrUpdate ¶
AddOrUpdate add new or update if already present
func (*Contracts) GetByNameAndNetwork ¶
GetByNameAndNetwork get contract array for account and network
func (*Contracts) GetByNetwork ¶
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 []ContractDeployment // contracts to deploy }
Deploy defines the configuration for a contract deployment.
type Deployments ¶
type Deployments []Deploy
func (*Deployments) AddOrUpdate ¶
func (d *Deployments) AddOrUpdate(deployment Deploy)
AddOrUpdate add new or update if already present
func (*Deployments) GetByAccountAndNetwork ¶
func (d *Deployments) GetByAccountAndNetwork(account string, network string) Deployments
GetByAccountAndNetwork get deploy by account and network
func (*Deployments) GetByNetwork ¶
func (d *Deployments) GetByNetwork(network string) Deployments
GetByNetwork get all deployments by network
type Emulators ¶
type Emulators []Emulator
func DefaultEmulators ¶
func DefaultEmulators() Emulators
DefaultEmulators gets all default emulators
func (*Emulators) AddOrUpdate ¶
AddOrUpdate add new or update if already present
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader contains actions for composing and modifying configuration.
func (*Loader) AddConfigParser ¶
AddConfigParser adds a new configuration parser.
type Network ¶
Network defines the configuration for a Flow network.
func DefaultEmulatorNetwork ¶
func DefaultEmulatorNetwork() Network
DefaultEmulatorNetwork get default emulator network
func DefaultMainnetNetwork ¶
func DefaultMainnetNetwork() Network
DefaultMainnetNetwork get default mainnet network
func DefaultTestnetNetwork ¶
func DefaultTestnetNetwork() Network
DefaultTestnetNetwork get default testnet network