commands

package
v0.0.0-...-1bb1391 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2019 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTicketCommand

type CreateTicketCommand struct {
	EventDIDAddress       flag.EthereumAddress         `long:"eventaddr"        required:"true" description:"Ethereum address of event DID contract"`
	ParticipantDIDAddress flag.EthereumAddress         `long:"participantaddr"  required:"true" description:"Ethereum address of participant DID contract"`
	PrivateKey            flag.ECDSAPrivateKeyFromFile `long:"privatekey"       required:"true" description:"private key filename of event owner"`
	BackendURL            string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"    default:"https://ropsten.infura.io"`
	IPFSURL               string                       `long:"ipfsurl"                          description:"IPFS node URL"           default:"https://ipfs.infura.io:5001"`
	Verbosity             log.Lvl                      `long:"verbosity"                        description:"log verbosity (0-9)"     default:"3"`
	VModule               string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

CreateTicketCommand handles `create-ticket` command

func (*CreateTicketCommand) Execute

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

Execute implements flags.Commander interface

type ReadTicketCommand

type ReadTicketCommand struct {
	EventDIDAddress       flag.EthereumAddress         `long:"eventaddr"        required:"true" description:"Ethereum address of event DID contract"`
	ParticipantDIDAddress flag.EthereumAddress         `long:"participantaddr"           required:"true" description:"Ethereum address of participant DID contract"`
	PrivateKey            flag.ECDSAPrivateKeyFromFile `long:"privatekey"       required:"true" description:"private key filename of participant"`
	BackendURL            string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"    default:"https://ropsten.infura.io"`
	IPFSURL               string                       `long:"ipfsurl"                          description:"IPFS node URL"           default:"https://ipfs.infura.io:5001"`
	Verbosity             log.Lvl                      `long:"verbosity"                        description:"log verbosity (0-9)"     default:"3"`
	VModule               string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

ReadTicketCommand handles `read-ticket` command

func (*ReadTicketCommand) Execute

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

Execute implements flags.Commander interface

type SignUpCommand

type SignUpCommand struct {
	EventDIDAddress       flag.EthereumAddress         `long:"eventaddr"        required:"true" description:"Ethereum address of event DID contract"`
	ParticipantDIDAddress flag.EthereumAddress         `long:"participantaddr"           required:"true" description:"Ethereum address of participant DID contract"`
	ParticipantFullName   string                       `long:"participantname"           required:"true" description:"Full name of participant"`
	PrivateKey            flag.ECDSAPrivateKeyFromFile `long:"privatekey"       required:"true" description:"private key filename of participant"`
	BackendURL            string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"    default:"https://ropsten.infura.io"`
	IPFSURL               string                       `long:"ipfsurl"                          description:"IPFS node URL"           default:"https://ipfs.infura.io:5001"`
	Verbosity             log.Lvl                      `long:"verbosity"                        description:"log verbosity (0-9)"     default:"3"`
	VModule               string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

SignUpCommand handles `signup` command

func (*SignUpCommand) Execute

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

Execute implements flags.Commander interface

type SignUpListCommand

type SignUpListCommand struct {
	EventDIDAddress flag.EthereumAddress         `long:"eventaddr"        required:"true" description:"Ethereum address of event DID contract"`
	PrivateKey      flag.ECDSAPrivateKeyFromFile `long:"privatekey"       required:"true" description:"private key filename of event owner"`
	BackendURL      string                       `long:"backendurl"       required:"true" description:"Ethereum backend URL"    default:"https://ropsten.infura.io"`
	IPFSURL         string                       `long:"ipfsurl"                          description:"IPFS node URL"           default:"https://ipfs.infura.io:5001"`
	Verbosity       log.Lvl                      `long:"verbosity"                        description:"log verbosity (0-9)"     default:"3"`
	VModule         string                       `long:"vmodule"                          description:"log verbosity pattern"`
}

SignUpListCommand handles `signup-list` command

func (*SignUpListCommand) Execute

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

Execute implements flags.Commander interface

type TicketManagementCommand

type TicketManagementCommand struct {
	Version        func()                `short:"v" long:"version"  description:"Print the version of tool and exit"`
	SignUp         SignUpCommand         `command:"signup"          description:"Sign up to participate in event (called by participant)"`
	SignUpList     SignUpListCommand     `command:"signup-list"     description:"List of registered participants (called by event organizer)"`
	CreateTicket   CreateTicketCommand   `command:"create-ticket"   description:"Creates ticket for participant (called by event organizer)"`
	ReadTicket     ReadTicketCommand     `command:"read-ticket"     description:"Reads ticket for participant (called by participant)"`
	ValidateTicket ValidateTicketCommand `command:"validate-ticket" description:"Validates participant ticket (called by event volunteers)"`
}

TicketManagementCommand is a root command used to parse command line arguments

var TicketManagement TicketManagementCommand

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

type ValidateTicketCommand

type ValidateTicketCommand struct {
	EventDIDAddress flag.EthereumAddress `long:"eventaddr"        required:"true" description:"Ethereum address of event DID contract"`
	TicketQRCode    string               `long:"ticket"           required:"true" description:"Ticket QR code to validate"`
	BackendURL      string               `long:"backendurl"       required:"true" description:"Ethereum backend URL"    default:"https://ropsten.infura.io"`
	Verbosity       log.Lvl              `long:"verbosity"                        description:"log verbosity (0-9)"     default:"3"`
	VModule         string               `long:"vmodule"                          description:"log verbosity pattern"`
}

ValidateTicketCommand handles `validate-ticket` command

func (*ValidateTicketCommand) Execute

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

Execute implements flags.Commander interface

Jump to

Keyboard shortcuts

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