Documentation
¶
Index ¶
- Constants
- Variables
- func Exists(path string) bool
- func ProcessorRun(raw []byte) ([]byte, map[string]string)
- type Account
- type AccountKey
- type Accounts
- type Config
- type ConfigParsers
- type Contract
- type Contracts
- 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" )
Variables ¶
var ErrDoesNotExist = errors.New("project config file does not exist")
ErrDoesNotExist is error to be returned when config file does not exists
var ErrOutdatedFormat = errors.New("you are using old configuration format")
Functions ¶
Types ¶
type Account ¶
type Account struct {
Name string
Address flow.Address
ChainID flow.ChainID
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 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 []string // contracts names 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) []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 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
type Networks ¶
type Networks []Network
func (*Networks) AddOrUpdate ¶
AddOrUpdate add new network or update if already present