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

cli

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const EnvPrefix = "FLOW"

Variables

View Source
var Bold = color.New(color.Bold).SprintfFunc()
View Source
var Green = color.New(color.FgGreen, color.Bold).SprintfFunc()
View Source
var Red = color.New(color.FgRed, color.Bold).SprintfFunc()
View Source
var Yellow = color.New(color.FgYellow, color.Bold).SprintfFunc()

Colors

Functions

func Exit

func Exit(code int, msg string)

func Exitf

func Exitf(code int, msg string, args ...interface{})

func ProjectExists

func ProjectExists(path string) bool

ProjectExists checks if project exists

func RandomSeed

func RandomSeed(n int) []byte

Types

type Account

type Account struct {
	// contains filtered or unexported fields
}

func (*Account) Address

func (a *Account) Address() flow.Address

func (*Account) DefaultKey

func (a *Account) DefaultKey() keys.AccountKey

type Contract

type Contract struct {
	Name   string
	Source string
	Target flow.Address
}

type Project

type Project struct {
	// contains filtered or unexported fields
}

Project has all the funcionality to manage project

func InitProject

func InitProject() *Project

InitProject initializes the project

func LoadProject

func LoadProject(configFilePath []string) *Project

LoadProject loads configuration and setup the project

func (*Project) ContractConflictExists

func (p *Project) ContractConflictExists(network string) bool

CheckContractConflict checks if there is any contract duplication between accounts for now we don't allow two different accounts deploying same contract

func (*Project) EmulatorServiceAccount

func (p *Project) EmulatorServiceAccount() *config.Account

func (*Project) GetAccountByAddress

func (p *Project) GetAccountByAddress(address string) *Account

func (*Project) GetAccountByName

func (p *Project) GetAccountByName(name string) *Account

func (*Project) GetAliases

func (p *Project) GetAliases(network string) map[string]string

func (*Project) GetAllAccountNames

func (p *Project) GetAllAccountNames() []string

func (*Project) GetContractsByNetwork

func (p *Project) GetContractsByNetwork(network string) []Contract

func (*Project) Host

func (p *Project) Host(network string) string

func (*Project) Save

func (p *Project) Save(path string)

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

func NewSpinner

func NewSpinner(prefix, suffix string) *Spinner

func (*Spinner) Start

func (s *Spinner) Start()

func (*Spinner) Stop

func (s *Spinner) Stop(message string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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