Documentation ¶
Index ¶
Constants ¶
View Source
const (
ErrNoClient = constErr("no client RPC methods found")
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLIFlag ¶
type CLIFlag[T GRPCScalar] struct { // contains filtered or unexported fields }
CLIFlag implements Value and Flag.
func NewCLIFlag ¶
func NewCLIFlag[T GRPCScalar](v T) *CLIFlag[T]
NewCLIFlag constructs a new CLIFlag with v as its default value. This is made generic primarily to use a type union for GRPC scalar types, to make it clear which types are supported. If we had union or sum types, there'd be no real reason to use generics here.
type Command ¶
type Command interface { AddCommand(name, usage string) (Command, error) Flags() FlagSet // SetRun sets the run function for the Command. SetRun(func() error) }
Command describes a command (or sub-command) that grpcli should map grpc service methods to.
type FlagSet ¶
type FlagSet interface { // Var adds a flag (referenced by name) to the FlagSet. Var(v Value, name, usage string) error }
FlagSet describes a set of flags that grpcli needs in order to add flags to sub-commands.
Click to show internal directories.
Click to hide internal directories.