commands

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployBootstrapCommand

type DeployBootstrapCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	OwnerKey   flag.ECDSAPrivateKeyFromFile `long:"ownerkey" required:"true"     description:"contracts owner private key filename"`
	BackendURL string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	Verbosity  int                          `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule    string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

DeployBootstrapCommand is a command for deploying PassportLogic, PassportRegistry and PassportFactory contracts in one go

func (*DeployBootstrapCommand) Execute

func (c *DeployBootstrapCommand) Execute(args []string) error

Execute implements flags.Commander interface

type DeployPassportCommand

type DeployPassportCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	PassportOwnerKey flag.ECDSAPrivateKeyFromFile `long:"ownerkey" required:"true"     description:"passport owner private key filename"`
	BackendURL       string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	FactoryAddr      flag.EthereumAddress         `long:"factoryaddr"     required:"true" description:"Ethereum address of passport factory contract"`
	Verbosity        int                          `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule          string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

DeployPassportCommand deploys Passport contract

func (*DeployPassportCommand) Execute

func (c *DeployPassportCommand) Execute(args []string) error

Execute implements flags.Commander interface

type DeployPassportFactoryCommand

type DeployPassportFactoryCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	OwnerKey     flag.ECDSAPrivateKeyFromFile `long:"ownerkey" required:"true"     description:"factory contract owner private key filename"`
	BackendURL   string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	RegistryAddr flag.EthereumAddress         `long:"registryaddr"     required:"true" description:"Ethereum address of passport logic registry contract"`
	Verbosity    int                          `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule      string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

DeployPassportFactoryCommand deploys PassportFactory contract

func (*DeployPassportFactoryCommand) Execute

func (c *DeployPassportFactoryCommand) Execute(args []string) error

Execute implements flags.Commander interface

type PassportListCommand

type PassportListCommand struct {
	BackendURL  string               `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	FactoryAddr flag.EthereumAddress `long:"factoryaddr"     required:"true" description:"Ethereum address of passport factory contract"`
	FileName    string               `long:"out"     required:"true" description:"Save retrieved passports to the specified file"`
	Verbosity   int                  `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule     string               `long:"vmodule"                          description:"log verbosity pattern"`
}

PassportListCommand lists all passports from given passport factory

func (*PassportListCommand) Execute

func (c *PassportListCommand) Execute(args []string) error

Execute implements flags.Commander interface

type PassportPermissionCommand

type PassportPermissionCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	PassportAddress    flag.EthereumAddress         `long:"passaddr" required:"true"     description:"Ethereum address of passport contract"`
	PassportOwnerKey   flag.ECDSAPrivateKeyFromFile `long:"ownerkey" required:"true"     description:"passport owner private key filename"`
	BackendURL         string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	AddFactProvider    *flag.EthereumAddress        `long:"add"  description:"add data source to the whitelist"`
	RemoveFactProvider *flag.EthereumAddress        `long:"remove"  description:"remove data source from the whitelist"`
	EnableWhitelist    *bool                        `long:"enablewhitelist"                        description:"enables the use of a whitelist of data sources"`
	DisableWhitelist   *bool                        `long:"disablewhitelist"                        description:"disables the use of a whitelist of data sources"`
	Verbosity          int                          `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule            string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

PassportPermissionCommand changes permissions for passport

func (*PassportPermissionCommand) Execute

func (c *PassportPermissionCommand) Execute(args []string) error

Execute implements flags.Commander interface

type ReadFactCommand

type ReadFactCommand struct {
	cmdutils.QuorumPrivateTxICommand
	BackendURL          string                        `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	PassportAddress     flag.EthereumAddress          `long:"passaddr"         required:"true" description:"Ethereum address of passport contract"`
	FactProviderAddress flag.EthereumAddress          `long:"factprovideraddr" required:"true" description:"Ethereum address of fact provider"`
	FactKey             flag.FactKey                  `long:"fkey"             required:"true" description:"the key of the fact"`
	FactType            flag.DataType                 `` /* 144-byte string literal not displayed */
	FileName            string                        `long:"out"              required:"true" description:"save fact value to the specified file"`
	IPFSURL             string                        `` /* 142-byte string literal not displayed */
	PassportOwnerKey    *flag.ECDSAPrivateKeyFromFile `` /* 130-byte string literal not displayed */
	DataKeyFileName     string                        `long:"datakey"                          description:"data decryption key file name (only for privatedata data type)"`
	Verbosity           int                           `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule             string                        `long:"vmodule"                          description:"log verbosity pattern"`
}

ReadFactCommand reads latest passport fact value

func (*ReadFactCommand) Execute

func (c *ReadFactCommand) Execute(args []string) (err error)

Execute implements flags.Commander interface

type ReadFactTxCommand

type ReadFactTxCommand struct {
	cmdutils.QuorumPrivateTxICommand
	BackendURL       string                        `long:"backendurl" required:"true" description:"Ethereum backend URL"`
	PassportAddress  flag.EthereumAddress          `long:"passaddr"   required:"true" description:"Ethereum address of passport contract"`
	TXHash           flag.TXHash                   `long:"txhash"     required:"true" description:"the transaction hash to read value from"`
	FactType         flag.DataType                 `` /* 138-byte string literal not displayed */
	FileName         string                        `long:"out"        required:"true" description:"save fact value to the specified file"`
	IPFSURL          string                        `` /* 136-byte string literal not displayed */
	PassportOwnerKey *flag.ECDSAPrivateKeyFromFile `long:"ownerkey"                   description:"digital identity owner private key filename (only for privatedata data type)"`
	DataKeyFileName  string                        `long:"datakey"                    description:"data decryption key file name (only for privatedata data type)"`
	Verbosity        int                           `long:"verbosity"                  description:"log verbosity (0-9)" default:"2"`
	VModule          string                        `long:"vmodule"                    description:"log verbosity pattern"`
}

ReadFactTxCommand reads passport fact value from transaction

func (*ReadFactTxCommand) Execute

func (c *ReadFactTxCommand) Execute(args []string) (err error)

Execute implements flags.Commander interface

type ReadHistoryCommand

type ReadHistoryCommand struct {
	BackendURL      string               `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	PassportAddress flag.EthereumAddress `long:"passaddr" required:"true"     description:"Ethereum address of passport contract"`
	FileName        string               `long:"out"     required:"true" description:"Save retrieved passports to the specified file"`
	Verbosity       int                  `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule         string               `long:"vmodule"                          description:"log verbosity pattern"`
}

ReadHistoryCommand lists all passport fact changes

func (*ReadHistoryCommand) Execute

func (c *ReadHistoryCommand) Execute(args []string) error

Execute implements flags.Commander interface

type RootCommand

type RootCommand struct {
	Version               func()                       `short:"v" long:"version"  description:"Print the version of tool and exit"`
	DeployBootstrap       DeployBootstrapCommand       `command:"bootstrap"       description:"Deploy digital identity backbone contracts"`
	DeployPassportFactory DeployPassportFactoryCommand `command:"deploy-factory"  description:"Deploy digital identity factory contract"`
	DeployPassport        DeployPassportCommand        `command:"create"          description:"Deploy digital identity contract"`
	PassportList          PassportListCommand          `command:"list"            description:"Get list of digital identities from factory"`
	PassportPermission    PassportPermissionCommand    `command:"permission"      description:"Change permissions for digital identity"`
	UpgradePassportLogic  UpgradePassportLogicCommand  `command:"upgrade-logic"   description:"Upgrade digital identity logic"`
	ReadHistory           ReadHistoryCommand           `command:"history"         description:"Read history (changes) of digital identity"`
	ReadFactTx            ReadFactTxCommand            `command:"read-fact-tx"    description:"Read digital identity fact value using transaction hash"`
	ReadFact              ReadFactCommand              `command:"read-fact"       description:"Read latest fact value from digital identity"`
	WriteFact             WriteFactCommand             `command:"write-fact"      description:"Write fact value to digital identity"`
}

RootCommand is a root command used to parse command line arguments

var Root RootCommand

Root is a prepared command to be used in command line arguments parsing

type UpgradePassportLogicCommand

type UpgradePassportLogicCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	PassportOwnerKey flag.ECDSAPrivateKeyFromFile `long:"ownerkey" required:"true"     description:"passport owner private key filename"`
	RegistryAddr     flag.EthereumAddress         `long:"registryaddr"     required:"true" description:"Ethereum address of passport logic registry contract"`
	Version          string                       `long:"newversion"       required:"true" description:"the version of new passport logic contract (which will be deployed)"`
	BackendURL       string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	Verbosity        int                          `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule          string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

UpgradePassportLogicCommand upgrades passport logic

func (*UpgradePassportLogicCommand) Execute

func (c *UpgradePassportLogicCommand) Execute(args []string) error

Execute implements flags.Commander interface

type WriteFactCommand

type WriteFactCommand struct {
	cmdutils.QuorumPrivateTxIOCommand
	BackendURL      string                        `long:"backendurl"       required:"true" description:"Ethereum backend URL"`
	PassportAddress flag.EthereumAddress          `long:"passaddr"         required:"true" description:"Ethereum address of passport contract"`
	FactProviderKey *flag.ECDSAPrivateKeyFromFile `long:"factproviderkey"  required:"true" description:"data source (fact provider) private key filename"`
	FactKey         flag.FactKey                  `long:"fkey"             required:"true" description:"the key of the fact (max 32 bytes)"`
	FactType        flag.DataType                 `` /* 144-byte string literal not displayed */
	IPFSURL         string                        `` /* 143-byte string literal not displayed */
	DataKeyFileName string                        `` /* 133-byte string literal not displayed */
	Verbosity       int                           `long:"verbosity"                        description:"log verbosity (0-9)" default:"2"`
	VModule         string                        `long:"vmodule"                          description:"log verbosity pattern"`
}

WriteFactCommand writes fact to passport

func (*WriteFactCommand) Execute

func (c *WriteFactCommand) Execute(args []string) (err error)

Execute implements flags.Commander interface

Jump to

Keyboard shortcuts

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