Documentation
¶
Index ¶
- Variables
- func DocumentMessage(w io.Writer, dscr *MessageDescription, indent string)
- type ClientStreamAdapter
- func (c *ClientStreamAdapter[T]) CloseSend() error
- func (c *ClientStreamAdapter[T]) Context() context.Context
- func (c *ClientStreamAdapter[T]) Header() (metadata.MD, error)
- func (c *ClientStreamAdapter[T]) Recv() (*T, error)
- func (c *ClientStreamAdapter[T]) RecvMsg(m any) error
- func (c *ClientStreamAdapter[T]) SendMsg(_ any) error
- func (c *ClientStreamAdapter[T]) Trailer() metadata.MD
- type Describer
- type DummyServerStream
- type EnumDescription
- func (*EnumDescription) Descriptor() ([]byte, []int)deprecated
- func (x *EnumDescription) GetDocumentation() string
- func (x *EnumDescription) GetEnums() []*EnumMeta
- func (x *EnumDescription) GetIsFlag() bool
- func (x *EnumDescription) GetName() string
- func (*EnumDescription) ProtoMessage()
- func (x *EnumDescription) ProtoReflect() protoreflect.Message
- func (x *EnumDescription) Reset()
- func (x *EnumDescription) String() string
- type EnumMeta
- func (*EnumMeta) Descriptor() ([]byte, []int)deprecated
- func (x *EnumMeta) GetArgs() []string
- func (x *EnumMeta) GetDisplay() string
- func (x *EnumMeta) GetDocumentation() string
- func (x *EnumMeta) GetFullName() string
- func (x *EnumMeta) GetName() string
- func (x *EnumMeta) GetValue() int32
- func (*EnumMeta) ProtoMessage()
- func (x *EnumMeta) ProtoReflect() protoreflect.Message
- func (x *EnumMeta) Reset()
- func (x *EnumMeta) String() string
- type FieldMeta
- func (*FieldMeta) Descriptor() ([]byte, []int)deprecated
- func (x *FieldMeta) GetDisplay() string
- func (x *FieldMeta) GetDocumentation() string
- func (x *FieldMeta) GetEnumDescription() *EnumDescription
- func (x *FieldMeta) GetFields() []*FieldMeta
- func (x *FieldMeta) GetFullName() string
- func (x *FieldMeta) GetGoType() string
- func (x *FieldMeta) GetName() string
- func (x *FieldMeta) GetSearchOptions() SearchOption_Enum
- func (x *FieldMeta) GetSearchType() string
- func (x *FieldMeta) GetType() string
- func (*FieldMeta) ProtoMessage()
- func (x *FieldMeta) ProtoReflect() protoreflect.Message
- func (x *FieldMeta) Reset()
- func (x *FieldMeta) String() string
- type MessageDescription
- func (*MessageDescription) Descriptor() ([]byte, []int)deprecated
- func (x *MessageDescription) GetDisplay() string
- func (x *MessageDescription) GetDocumentation() string
- func (x *MessageDescription) GetFields() []*FieldMeta
- func (x *MessageDescription) GetName() string
- func (*MessageDescription) ProtoMessage()
- func (x *MessageDescription) ProtoReflect() protoreflect.Message
- func (x *MessageDescription) Reset()
- func (x *MessageDescription) String() string
- type ProxyClientStream
- func (p *ProxyClientStream[T]) CloseSend() error
- func (p *ProxyClientStream[T]) Context() context.Context
- func (p *ProxyClientStream[T]) Header() (metadata.MD, error)
- func (p *ProxyClientStream[T]) Recv() (*T, error)
- func (p *ProxyClientStream[T]) RecvMsg(m any) error
- func (p *ProxyClientStream[T]) SendMsg(m any) error
- func (p *ProxyClientStream[T]) Trailer() metadata.MD
- type SearchOption
- type SearchOption_Enum
- func (SearchOption_Enum) Descriptor() protoreflect.EnumDescriptor
- func (x SearchOption_Enum) Enum() *SearchOption_Enum
- func (SearchOption_Enum) EnumDescriptor() ([]byte, []int)deprecated
- func (x SearchOption_Enum) Number() protoreflect.EnumNumber
- func (x SearchOption_Enum) String() string
- func (SearchOption_Enum) Type() protoreflect.EnumType
- type ServerStreamAdapter
Constants ¶
This section is empty.
Variables ¶
var ( SearchOption_Enum_name = map[int32]string{ 0: "None", 1: "Facet", 2: "NoIndex", 4: "Exclude", 8: "Store", 16: "Sortable", 32: "Hidden", 64: "WithKeyword", 128: "WithText", } SearchOption_Enum_value = map[string]int32{ "None": 0, "Facet": 1, "NoIndex": 2, "Exclude": 4, "Store": 8, "Sortable": 16, "Hidden": 32, "WithKeyword": 64, "WithText": 128, } )
Enum value maps for SearchOption_Enum.
var ( // search is the option for OpenSearch Index. // It can include Index type: // facet|store|nested|object|flat_object|no_index,exclude. // - `object` for fields that should be indexed as object. // - `nested` for fields that should be indexed as nested. // - `flat_object` for nested fields that should not be indexed. // - `no_index` for fields that should not be indexed. // - `exclude` for fields that should not be included in the search results. // - `facet` for fields that should be indexed as facet. // - `store` for fields that should be stored. // - `hide` for fields that should be hidden in the search query by UI. // - `with_keyword` for text fields that also need keyword sub-index. // - `with_text` for keyword fields that also need text sub-index. // - other values are define type: // keyword|text|integer|float|double|boolean|date|geo_point|ip. // // optional string search = 51001; E_Search = &file_annotations_proto_extTypes[1] // display is the option for the field's Display Name in the UI. // // optional string display = 51002; E_Display = &file_annotations_proto_extTypes[2] // description is the option for the field's description. // // optional string description = 51003; E_Description = &file_annotations_proto_extTypes[3] // csv is the option for the field's Name in CSV header. // // optional string csv = 51004; E_Csv = &file_annotations_proto_extTypes[4] )
Extension fields to descriptorpb.FieldOptions.
var ( // args is the option for the field's arguments, // it can be used to specify the arguments for the enum value, as a string // of comma-separated values. // For example, "arg1,arg2,arg3" will be parsed as a list of strings // // optional string enum_args = 52001; E_EnumArgs = &file_annotations_proto_extTypes[6] // enum_display is the option for the field's Display Name in the UI. // // optional string enum_display = 52002; E_EnumDisplay = &file_annotations_proto_extTypes[7] // enum_description is the option for the field's description. // // optional string enum_description = 52003; E_EnumDescription = &file_annotations_proto_extTypes[8] )
Extension fields to descriptorpb.EnumValueOptions.
var ( // generate_meta is the option for generating the message's meta // information. // // optional bool generate_meta = 53001; E_GenerateMeta = &file_annotations_proto_extTypes[9] // message_display is the option for the message's Display Name in the UI. // // optional string message_display = 53002; E_MessageDisplay = &file_annotations_proto_extTypes[10] // message_description is the option for the message's description. // // optional string message_description = 53003; E_MessageDescription = &file_annotations_proto_extTypes[11] )
Extension fields to descriptorpb.MessageOptions.
var (
// optional string allowed_roles = 1071;
E_AllowedRoles = &file_annotations_proto_extTypes[0]
)
Extension fields to descriptorpb.MethodOptions.
var ( // is_flag marks the enum as a bitflags/flags enum. // // optional bool is_flag = 54001; E_IsFlag = &file_annotations_proto_extTypes[5] )
Extension fields to descriptorpb.EnumOptions.
var File_annotations_proto protoreflect.FileDescriptor
Functions ¶
func DocumentMessage ¶ added in v0.15.69
func DocumentMessage(w io.Writer, dscr *MessageDescription, indent string)
Types ¶
type ClientStreamAdapter ¶
type ClientStreamAdapter[T any] struct { Msgs <-chan *T ErrOnce sync.Once Err error Ctx context.Context }
ClientStreamAdapter implements grpc.ServerStreamingClient[T] (and its underlying grpc.ClientStream) by reading from a channel.
func (*ClientStreamAdapter[T]) CloseSend ¶
func (c *ClientStreamAdapter[T]) CloseSend() error
CloseSend is a no‑op for server‑streaming RPCs.
func (*ClientStreamAdapter[T]) Context ¶
func (c *ClientStreamAdapter[T]) Context() context.Context
Context returns the caller’s context.
func (*ClientStreamAdapter[T]) Header ¶
func (c *ClientStreamAdapter[T]) Header() (metadata.MD, error)
Header is a no‑op here.
func (*ClientStreamAdapter[T]) Recv ¶
func (c *ClientStreamAdapter[T]) Recv() (*T, error)
Recv gives you the next value from the channel, or EOF/error when done.
func (*ClientStreamAdapter[T]) RecvMsg ¶
func (c *ClientStreamAdapter[T]) RecvMsg(m any) error
RecvMsg must fill in the supplied pointer with the next message.
func (*ClientStreamAdapter[T]) SendMsg ¶
func (c *ClientStreamAdapter[T]) SendMsg(_ any) error
SendMsg is a no‑op (unconditionally nil) for server‑streaming.
func (*ClientStreamAdapter[T]) Trailer ¶
func (c *ClientStreamAdapter[T]) Trailer() metadata.MD
Trailer is a no‑op here.
type Describer ¶ added in v0.15.69
type Describer struct {
EnumNameTypes map[string]reflect.Type
// contains filtered or unexported fields
}
func NewDescriber ¶ added in v0.15.69
func (*Describer) DescribeMessage ¶ added in v0.15.69
DescribeMessage converts protobuf message to a human readable dictionary
func (*Describer) GetEnumDisplayValue ¶ added in v0.15.69
func (d *Describer) GetEnumDisplayValue(enumDescriptor protoreflect.EnumDescriptor, value int32) string
GetEnumDisplayValue function to dynamically call DisplayName on an enum
type DummyServerStream ¶
type DummyServerStream struct {
grpc.ServerStream
Ctx context.Context
}
DummyServerStream implements the non‑message pieces of grpc.ServerStream.
func (DummyServerStream) Context ¶
func (d DummyServerStream) Context() context.Context
func (DummyServerStream) SendHeader ¶
func (d DummyServerStream) SendHeader(md metadata.MD) error
func (DummyServerStream) SetTrailer ¶
func (d DummyServerStream) SetTrailer(md metadata.MD)
type EnumDescription ¶
type EnumDescription struct {
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
Enums []*EnumMeta `protobuf:"bytes,2,rep,name=Enums,proto3" json:"Enums,omitempty"`
Documentation string `protobuf:"bytes,3,opt,name=Documentation,proto3" json:"Documentation,omitempty"`
IsFlag bool `protobuf:"varint,4,opt,name=IsFlag,proto3" json:"IsFlag,omitempty"`
// contains filtered or unexported fields
}
func (*EnumDescription) Descriptor
deprecated
func (*EnumDescription) Descriptor() ([]byte, []int)
Deprecated: Use EnumDescription.ProtoReflect.Descriptor instead.
func (*EnumDescription) GetDocumentation ¶
func (x *EnumDescription) GetDocumentation() string
func (*EnumDescription) GetEnums ¶
func (x *EnumDescription) GetEnums() []*EnumMeta
func (*EnumDescription) GetIsFlag ¶ added in v0.15.69
func (x *EnumDescription) GetIsFlag() bool
func (*EnumDescription) GetName ¶
func (x *EnumDescription) GetName() string
func (*EnumDescription) ProtoMessage ¶
func (*EnumDescription) ProtoMessage()
func (*EnumDescription) ProtoReflect ¶
func (x *EnumDescription) ProtoReflect() protoreflect.Message
func (*EnumDescription) Reset ¶
func (x *EnumDescription) Reset()
func (*EnumDescription) String ¶
func (x *EnumDescription) String() string
type EnumMeta ¶
type EnumMeta struct {
Value int32 `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"`
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
FullName string `protobuf:"bytes,3,opt,name=FullName,proto3" json:"FullName,omitempty"`
Display string `protobuf:"bytes,4,opt,name=Display,proto3" json:"Display,omitempty"`
Documentation string `protobuf:"bytes,5,opt,name=Documentation,proto3" json:"Documentation,omitempty"`
Args []string `protobuf:"bytes,6,rep,name=Args,proto3" json:"Args,omitempty"`
// contains filtered or unexported fields
}
func (*EnumMeta) Descriptor
deprecated
func (*EnumMeta) GetDisplay ¶
func (*EnumMeta) GetDocumentation ¶
func (*EnumMeta) GetFullName ¶
func (*EnumMeta) ProtoMessage ¶
func (*EnumMeta) ProtoMessage()
func (*EnumMeta) ProtoReflect ¶
func (x *EnumMeta) ProtoReflect() protoreflect.Message
type FieldMeta ¶
type FieldMeta struct {
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
FullName string `protobuf:"bytes,2,opt,name=FullName,proto3" json:"FullName,omitempty"`
Display string `protobuf:"bytes,3,opt,name=Display,proto3" json:"Display,omitempty"`
Documentation string `protobuf:"bytes,4,opt,name=Documentation,proto3" json:"Documentation,omitempty"`
Type string `protobuf:"bytes,5,opt,name=Type,proto3" json:"Type,omitempty"`
GoType string `protobuf:"bytes,6,opt,name=GoType,proto3" json:"GoType,omitempty"`
// SearchType is the type of search for the field.
// It can be one of the following:
// keyword|text|integer|float|double|boolean|date|geo_point|ip|object|nested|flat_object.
SearchType string `protobuf:"bytes,7,opt,name=SearchType,proto3" json:"SearchType,omitempty"`
// SearchOptions is populated from es.api.search option.
SearchOptions SearchOption_Enum `protobuf:"varint,8,opt,name=SearchOptions,proto3,enum=es.api.SearchOption_Enum" json:"SearchOptions,omitempty"`
// Fields is provided for nested messages
Fields []*FieldMeta `protobuf:"bytes,12,rep,name=Fields,proto3" json:"Fields,omitempty"`
// EnumDescription is provided for enum fields
EnumDescription *EnumDescription `protobuf:"bytes,13,opt,name=EnumDescription,proto3" json:"EnumDescription,omitempty"`
// contains filtered or unexported fields
}
func (*FieldMeta) Descriptor
deprecated
func (*FieldMeta) GetDisplay ¶
func (*FieldMeta) GetDocumentation ¶
func (*FieldMeta) GetEnumDescription ¶
func (x *FieldMeta) GetEnumDescription() *EnumDescription
func (*FieldMeta) GetFullName ¶
func (*FieldMeta) GetSearchOptions ¶
func (x *FieldMeta) GetSearchOptions() SearchOption_Enum
func (*FieldMeta) GetSearchType ¶
func (*FieldMeta) ProtoMessage ¶
func (*FieldMeta) ProtoMessage()
func (*FieldMeta) ProtoReflect ¶
func (x *FieldMeta) ProtoReflect() protoreflect.Message
type MessageDescription ¶
type MessageDescription struct {
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
Display string `protobuf:"bytes,2,opt,name=Display,proto3" json:"Display,omitempty"`
Fields []*FieldMeta `protobuf:"bytes,3,rep,name=Fields,proto3" json:"Fields,omitempty"`
Documentation string `protobuf:"bytes,4,opt,name=Documentation,proto3" json:"Documentation,omitempty"`
// contains filtered or unexported fields
}
func (*MessageDescription) Descriptor
deprecated
func (*MessageDescription) Descriptor() ([]byte, []int)
Deprecated: Use MessageDescription.ProtoReflect.Descriptor instead.
func (*MessageDescription) GetDisplay ¶
func (x *MessageDescription) GetDisplay() string
func (*MessageDescription) GetDocumentation ¶
func (x *MessageDescription) GetDocumentation() string
func (*MessageDescription) GetFields ¶
func (x *MessageDescription) GetFields() []*FieldMeta
func (*MessageDescription) GetName ¶
func (x *MessageDescription) GetName() string
func (*MessageDescription) ProtoMessage ¶
func (*MessageDescription) ProtoMessage()
func (*MessageDescription) ProtoReflect ¶
func (x *MessageDescription) ProtoReflect() protoreflect.Message
func (*MessageDescription) Reset ¶
func (x *MessageDescription) Reset()
func (*MessageDescription) String ¶
func (x *MessageDescription) String() string
type ProxyClientStream ¶
type ProxyClientStream[T any] struct { Msgs <-chan *T ErrOnce sync.Once Err error Ctx context.Context }
ProxyClientStream adapts that channel back into a grpc.ServerStreamingClient.
func (*ProxyClientStream[T]) CloseSend ¶
func (p *ProxyClientStream[T]) CloseSend() error
func (*ProxyClientStream[T]) Context ¶
func (p *ProxyClientStream[T]) Context() context.Context
func (*ProxyClientStream[T]) Header ¶
func (p *ProxyClientStream[T]) Header() (metadata.MD, error)
implement ClientStream for grpc.ServerStreamingClient:
func (*ProxyClientStream[T]) Recv ¶
func (p *ProxyClientStream[T]) Recv() (*T, error)
func (*ProxyClientStream[T]) RecvMsg ¶
func (p *ProxyClientStream[T]) RecvMsg(m any) error
RecvMsg must populate the passed-in message. We call our Recv() to get the next *e2e.Basic, then copy it into m.
func (*ProxyClientStream[T]) SendMsg ¶
func (p *ProxyClientStream[T]) SendMsg(m any) error
SendMsg is a no-op for server‑streaming RPCs.
func (*ProxyClientStream[T]) Trailer ¶
func (p *ProxyClientStream[T]) Trailer() metadata.MD
type SearchOption ¶
type SearchOption struct {
// contains filtered or unexported fields
}
func (*SearchOption) Descriptor
deprecated
func (*SearchOption) Descriptor() ([]byte, []int)
Deprecated: Use SearchOption.ProtoReflect.Descriptor instead.
func (*SearchOption) ProtoMessage ¶
func (*SearchOption) ProtoMessage()
func (*SearchOption) ProtoReflect ¶
func (x *SearchOption) ProtoReflect() protoreflect.Message
func (*SearchOption) Reset ¶
func (x *SearchOption) Reset()
func (*SearchOption) String ¶
func (x *SearchOption) String() string
type SearchOption_Enum ¶
type SearchOption_Enum int32
const ( // None is the default value. SearchOption_None SearchOption_Enum = 0 // Facet is the option for the field to be indexed as facet. SearchOption_Facet SearchOption_Enum = 1 // NoIndex is the option for the field to be not indexed. SearchOption_NoIndex SearchOption_Enum = 2 // Exclude is the option for the field to be excluded from the search // results. SearchOption_Exclude SearchOption_Enum = 4 // Store is the option for the field to be stored. SearchOption_Store SearchOption_Enum = 8 // Sortable is the option for the field to be sortable. SearchOption_Sortable SearchOption_Enum = 16 // Hidden is the option for the field to be hidden in the search query // builder or by UI. SearchOption_Hidden SearchOption_Enum = 32 // WithKeyword is the option for text fields that also need // keyword sub-index. SearchOption_WithKeyword SearchOption_Enum = 64 // WithText is the option for keyword fields that also need text // sub-index. SearchOption_WithText SearchOption_Enum = 128 )
func (SearchOption_Enum) Descriptor ¶
func (SearchOption_Enum) Descriptor() protoreflect.EnumDescriptor
func (SearchOption_Enum) Enum ¶
func (x SearchOption_Enum) Enum() *SearchOption_Enum
func (SearchOption_Enum) EnumDescriptor
deprecated
func (SearchOption_Enum) EnumDescriptor() ([]byte, []int)
Deprecated: Use SearchOption_Enum.Descriptor instead.
func (SearchOption_Enum) Number ¶
func (x SearchOption_Enum) Number() protoreflect.EnumNumber
func (SearchOption_Enum) String ¶
func (x SearchOption_Enum) String() string
func (SearchOption_Enum) Type ¶
func (SearchOption_Enum) Type() protoreflect.EnumType
type ServerStreamAdapter ¶
type ServerStreamAdapter[T any] struct { DummyServerStream Msgs chan<- *T }
ServerStreamAdapter lets us capture Send() calls into a channel.
func (*ServerStreamAdapter[T]) Send ¶
func (s *ServerStreamAdapter[T]) Send(m *T) error