Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCommand ¶
type AccountCommand struct { Register AccountRegisterCommand `command:"register" description:"Registers a new public key/account in registry"` PublicKey AccountPublicKeyCommand `command:"public-key" description:"Fetches a public key by address"` }
AccountCommand wraps functionality for working with accounts
type AccountPublicKeyCommand ¶
type AccountPublicKeyCommand struct { }
AccountPublicKeyCommand fetches a public key by address
type AccountRegisterCommand ¶
type AccountRegisterCommand struct { }
AccountRegisterCommand Registers a new public key/account in registry"
type ClientCommand ¶
type ClientCommand struct { Account AccountCommand `command:"account" description:"Working with registry accounts(public keys)"` DIDDoc DIDDocCommand `command:"diddoc" description:"Working with DID documents"` CommonOpts }
ClientCommand with command line flags and env vars
func (*ClientCommand) Execute ¶
func (c *ClientCommand) Execute(_ []string) error
Execute is the entry point for "client" command, called by flag parser
type CommonOptionsCommander ¶
type CommonOptionsCommander interface { SetCommon(commonOpts CommonOpts) Execute(args []string) error }
CommonOptionsCommander extends flags.Commander with SetCommon All commands should implement this interfaces
type CommonOpts ¶
type CommonOpts struct { Revision string Logger *zap.SugaredLogger }
CommonOpts sets externally from main, shared across all commands
func (*CommonOpts) SetCommon ¶
func (c *CommonOpts) SetCommon(commonOpts CommonOpts)
SetCommon satisfies CommonOptionsCommander interface and sets common option fields The method called by main for each command
type DIDDocCommand ¶
type DIDDocCommand struct { }
DIDDocCommand wraps functionality for working with DID documents
type GrpcServerGroup ¶
type GrpcServerGroup struct { Port int `long:"port" env:"PORT" default:"2018" description:"port"` Address string `long:"address" env:"ADDRESS" default:"" description:"listening address"` }
GrpcServerGroup contains grpc server configuration options
type HTTPServerGroup ¶
type HTTPServerGroup struct { Port int `long:"port" env:"PORT" default:"2017" description:"port"` Address string `long:"address" env:"ADDRESS" default:"" description:"listening address"` }
HTTPServerGroup contains http server configuration options
type ImmuDBGroup ¶
type ImmuDBGroup struct { Host string `long:"host" env:"HOST" default:"localhost" description:"immudb host"` Port int `long:"port" env:"PORT" default:"3322" description:"immudb port"` User string `long:"user" env:"USER" default:"immudb" description:"immudb user"` Pass string `long:"password" env:"PASSWORD" default:"immudb" description:"immudb password"` DBName string `long:"dbname" env:"NAME" default:"defaultdb" description:"immudb database name"` }
ImmuDBGroup db connection details
type ServerCommand ¶
type ServerCommand struct { Port int `long:"port" env:"SERVER_PORT" default:"2017" description:"port"` Address string `long:"address" env:"SERVER_ADDRESS" default:"" description:"listening address"` HTTPServer HTTPServerGroup `group:"http" namespace:"http" env-namespace:"HTTP"` GrpcServer GrpcServerGroup `group:"grpc" namespace:"grpc" env-namespace:"GRPC"` // Database connection DB ImmuDBGroup `group:"db" namespace:"db" env-namespace:"DB"` // Timeouts ReadTimeout time.Duration `long:"read-timeout" env:"READ_TIMEOUT" default:"5s" description:"read timeout"` WriteTimeout time.Duration `long:"write-timeout" env:"WRITE_TIMEOUT" default:"10s" description:"write timeout"` IdleTimeout time.Duration `long:"idle-timeout" env:"IDLE_TIMEOUT" default:"120s" description:"idle timeout"` ShutdownTimeout time.Duration `long:"shutdown-timeout" env:"SHUTDOWN_TIMEOUT" default:"20s" description:"shutdown timeout"` SentryDSN string `long:"sentry-dsn" env:"SENTRY_DSN" default:"" description:"sentry dsn"` CommonOpts }
ServerCommand with command line flags and env vars
func (*ServerCommand) Execute ¶
func (s *ServerCommand) Execute(_ []string) error
Execute is the entry point for "server" command, called by flag parser