project

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:              "project",
	Short:            "Manage your Cadence project",
	TraverseChildren: true,
}
View Source
var DeployCommand = &command.Command{
	Cmd: &cobra.Command{
		Use:     "deploy",
		Short:   "Deploy Cadence contracts",
		Example: "flow project deploy --network testnet",
	},
	Flags: &deployFlags,
	Run: func(
		cmd *cobra.Command,
		args []string,
		globalFlags command.GlobalFlags,
		services *services.Services,
	) (command.Result, error) {
		c, err := services.Project.Deploy(globalFlags.Network, deployFlags.Update)
		if err != nil {
			return nil, err
		}

		return &DeployResult{c}, nil
	},
}
View Source
var EmulatorCommand *cobra.Command
View Source
var InitCommand = &command.Command{
	Cmd: &cobra.Command{
		Use:     "init",
		Short:   "Initialize a new configuration",
		Example: "flow project init",
	},
	Flags: &initFlag,
	Run: func(
		cmd *cobra.Command,
		args []string,
		globalFlags command.GlobalFlags,
		services *services.Services,
	) (command.Result, error) {
		fmt.Println("⚠️  DEPRECATION WARNING: use \"flow init\" instead")

		proj, err := services.Project.Init(
			initFlag.Reset,
			initFlag.Global,
			initFlag.ServiceKeySigAlgo,
			initFlag.ServiceKeyHashAlgo,
			initFlag.ServicePrivateKey,
		)
		if err != nil {
			return nil, err
		}

		return &config.InitResult{Project: proj}, nil
	},
}

Functions

This section is empty.

Types

type DeployResult

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

DeployResult result structure

func (*DeployResult) JSON

func (r *DeployResult) JSON() interface{}

JSON convert result to JSON

func (*DeployResult) Oneliner

func (r *DeployResult) Oneliner() string

Oneliner show result as one liner grep friendly

func (*DeployResult) String

func (r *DeployResult) String() string

String convert result to string

Jump to

Keyboard shortcuts

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