Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // optional string placeholder = 6000; E_Placeholder = &file_protoconfig_go_kingpinv2_v1_extensions_proto_extTypes[0] // optional string envvar = 6001; E_Envvar = &file_protoconfig_go_kingpinv2_v1_extensions_proto_extTypes[1] // By default field represents a flag. // // optional bool argument = 6002; E_Argument = &file_protoconfig_go_kingpinv2_v1_extensions_proto_extTypes[2] )
Extension fields to descriptor.FieldOptions.
var ( // By default message represents just complex configuration type. If command_name is specified // such message becomes a kingpin.v2 command. // Name has to be unique within single protoconfig.Configuration type. // // optional protoconfig.go.kingpinv2.v1.Command command = 6002; E_Command = &file_protoconfig_go_kingpinv2_v1_extensions_proto_extTypes[3] )
Extension fields to descriptor.MessageOptions.
var File_protoconfig_go_kingpinv2_v1_extensions_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AllClause ¶
type AllClause interface { Required() AllClause HiddenPath() AllClause HiddenContent() AllClause DefaultPath(values string) PathOrContentClause DefaultContent(values string) PathOrContentClause PathOrContentClause }
type Clause ¶
type Clause struct {
// contains filtered or unexported fields
}
Clause is a fluid interface used to build extended flags. This is useful for flags that are a bit of uncommon logic extension like fileOrContent.
func (*Clause) DefaultContent ¶
func (f *Clause) DefaultContent(value string) PathOrContentClause
func (*Clause) DefaultPath ¶
func (f *Clause) DefaultPath(value string) PathOrContentClause
func (*Clause) HiddenContent ¶
HiddenContent hides a flag from usage but still allows it to be used.
func (*Clause) HiddenPath ¶
HiddenPath hides a -file flag from usage but still allows it to be used.
func (*Clause) PathOrContent ¶
func (f *Clause) PathOrContent() *PathOrContent
type Command ¶
type Command struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Command) Descriptor
deprecated
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type Content ¶
type Content struct { Content *any.Any `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` // any proto.Message // contains filtered or unexported fields }
Content is byte steam created from PathOrContent flag, a custom extension built on top of kingpin.v2 flags type.
func (*Content) Descriptor
deprecated
func (*Content) GetContent ¶
func (*Content) ProtoMessage ¶
func (*Content) ProtoMessage()
func (*Content) ProtoReflect ¶
func (x *Content) ProtoReflect() protoreflect.Message
type ExistingFile ¶
type ExistingFile struct { File *any.Any `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` // *os.File // contains filtered or unexported fields }
ExistingFile represents https://pkg.go.dev/github.com/alecthomas/kingpin/v2#ArgClause.ExistingFile. repeated ExistingFile represents https://pkg.go.dev/github.com/alecthomas/kingpin/v2#ArgClause.ExistingFiles.
func (*ExistingFile) Descriptor
deprecated
func (*ExistingFile) Descriptor() ([]byte, []int)
Deprecated: Use ExistingFile.ProtoReflect.Descriptor instead.
func (*ExistingFile) GetFile ¶
func (x *ExistingFile) GetFile() *any.Any
func (*ExistingFile) ProtoMessage ¶
func (*ExistingFile) ProtoMessage()
func (*ExistingFile) ProtoReflect ¶
func (x *ExistingFile) ProtoReflect() protoreflect.Message
func (*ExistingFile) Reset ¶
func (x *ExistingFile) Reset()
func (*ExistingFile) String ¶
func (x *ExistingFile) String() string
type FlagClause ¶
type FlagClause interface {
Flag(name, help string) *kingpin.FlagClause
}
type IP ¶
type IP struct { Ip *any.Any `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // *net.IP // contains filtered or unexported fields }
IP represents https://pkg.go.dev/github.com/alecthomas/kingpin/v2#ArgClause.IP. repeated IP represents https://pkg.go.dev/github.com/alecthomas/kingpin/v2#ArgClause.IPList.
func (*IP) Descriptor
deprecated
func (*IP) ProtoMessage ¶
func (*IP) ProtoMessage()
func (*IP) ProtoReflect ¶
func (x *IP) ProtoReflect() protoreflect.Message
type PathOrContent ¶
type PathOrContent struct {
// contains filtered or unexported fields
}
PathOrContent is a flag type that defines two flags to fetch bytes. Either from file (*-file flag) or content (* flag).
func (*PathOrContent) Content ¶
func (p *PathOrContent) Content() ([]byte, error)
Content returns content of the file. Flag that specifies path has priority. It returns error if the content is empty and required flag is set to true.
type PathOrContentClause ¶
type PathOrContentClause interface {
PathOrContent() *PathOrContent
}
type Regexp ¶
type Regexp struct { Regexp *any.Any `protobuf:"bytes,1,opt,name=regexp,proto3" json:"regexp,omitempty"` // **regexp.Regexp // contains filtered or unexported fields }
Regexp represents https://pkg.go.dev/github.com/alecthomas/kingpin/v2#ArgClause.Regexp. repeated Regexp represents https://pkg.go.dev/github.com/alecthomas/kingpin/v2#ArgClause.RegexpList.
func (*Regexp) Descriptor
deprecated
func (*Regexp) ProtoMessage ¶
func (*Regexp) ProtoMessage()
func (*Regexp) ProtoReflect ¶
func (x *Regexp) ProtoReflect() protoreflect.Message