api

package
v0.24.107 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var (
	// allowed_roles is the option for the method to be allowed for the given
	// roles. It's comma-separated list of roles supported by the system.
	//
	// optional string allowed_roles = 1071;
	E_AllowedRoles = &file_annotations_proto_extTypes[0]
	// cli_cmd is the option for the method to be a CLI command.
	//
	// optional string cli_cmd = 1072;
	E_CliCmd = &file_annotations_proto_extTypes[1]
	// refresh_interval is the option for the method to be refreshed, in
	// seconds.
	//
	// optional int32 refresh_interval = 1073;
	E_RefreshInterval = &file_annotations_proto_extTypes[2]
	// scopes is the option for the method to be allowed for the given
	// scopes. It's comma-separated list of scopes supported by the system.
	// Scopes are used to authorize the method call, similarly to OAuth 2.0
	// scopes. Application may use scopes and/or allowed_roles to authorize the
	// method call.
	//
	// optional string scopes = 1074;
	E_Scopes = &file_annotations_proto_extTypes[3]
)

Extension fields to descriptorpb.MethodOptions.

View Source
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[4]
	// display is the option for the field's Display Name in the UI.
	//
	// optional string display = 51002;
	E_Display = &file_annotations_proto_extTypes[5]
	// description is the option for the field's description.
	//
	// optional string description = 51003;
	E_Description = &file_annotations_proto_extTypes[6]
	// required is the option for the field to be required.
	//
	// optional bool required = 51005;
	E_Required = &file_annotations_proto_extTypes[7]
	// required_or is the option for the field to be required, if one of the
	// other values is provided.
	// Comma-separated list of field names that are required if this field is
	// not provided. For example, "field1,field2" will be parsed as a list.
	//
	// optional string required_or = 51006;
	E_RequiredOr = &file_annotations_proto_extTypes[8]
	// min is the option for the field minimum length for strings, and minimum
	// value for numbers.
	//
	// optional int32 min = 51007;
	E_Min = &file_annotations_proto_extTypes[9]
	// max is the option for the field maximum length for strings, and maximum
	// value for numbers.
	//
	// optional int32 max = 51008;
	E_Max = &file_annotations_proto_extTypes[10]
	// min_count is the option for the field minimum count for lists.
	//
	// optional int32 min_count = 51009;
	E_MinCount = &file_annotations_proto_extTypes[11]
	// max_count is the option for the field maximum count for lists.
	//
	// optional int32 max_count = 51010;
	E_MaxCount = &file_annotations_proto_extTypes[12]
	// alias is the option for the field alias name for the search query.
	//
	// optional string alias = 51011;
	E_Alias = &file_annotations_proto_extTypes[13]
)

Extension fields to descriptorpb.FieldOptions.

View Source
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[15]
	// 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[16]
	// enum_description is the option for the field's description.
	//
	// optional string enum_description = 52003;
	E_EnumDescription = &file_annotations_proto_extTypes[17]
	// enum_group is the option for the field's group name.
	//
	// optional string enum_group = 52004;
	E_EnumGroup = &file_annotations_proto_extTypes[18]
)

Extension fields to descriptorpb.EnumValueOptions.

View Source
var (
	// generate_meta is the option for generating the message's meta
	// information. By default, only for Request and Response messages.
	//
	// optional bool generate_meta = 53001;
	E_GenerateMeta = &file_annotations_proto_extTypes[19]
	// 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[20]
	// message_description is the option for the message's description.
	//
	// optional string message_description = 53003;
	E_MessageDescription = &file_annotations_proto_extTypes[21]
	// generate_model is the option for generating the message's model
	// for search index.
	//
	// optional bool generate_model = 53004;
	E_GenerateModel = &file_annotations_proto_extTypes[22]
)

Extension fields to descriptorpb.MessageOptions.

View Source
var DefaultDescriber = NewDescriber()

DefaultDescriber is not thread safe. It's assumed the registration will be done once at startup

View Source
var (
	// is_bitmask marks the enum as a bitmask enum.
	//
	// optional bool is_bitmask = 54001;
	E_IsBitmask = &file_annotations_proto_extTypes[14]
)

Extension fields to descriptorpb.EnumOptions.

View Source
var File_annotations_proto protoreflect.FileDescriptor

Functions

func ConvertToMap added in v0.21.101

func ConvertToMap(msg proto.Message) values.MapAny

ConvertToMap converts protobuf message to a human readable dictionary

func Describe added in v0.17.80

func Describe(w io.Writer, msg proto.Message)

Describe prints protobuf message to a human readable text

func DocumentMessage added in v0.15.69

func DocumentMessage(w io.Writer, dscr *MessageDescription, indent string)

DocumentMessage prints the message description to a human readable text

func Documentation added in v0.17.80

func Documentation(w io.Writer, doc string, indent string, noFirstIndent bool)

func DocumentationOneLine added in v0.17.80

func DocumentationOneLine(w io.Writer, doc string)

func GetEnumDisplayValue added in v0.17.80

func GetEnumDisplayValue(enumDescriptor protoreflect.EnumDescriptor, value int32) string

GetEnumDisplayValue function to dynamically call DisplayName on an enum

func ValidateRequest added in v0.20.98

func ValidateRequest(ctx context.Context, req proto.Message, md *MessageDescription) (err error)

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 interface {
	ConvertToMap(msg proto.Message) values.MapAny
	Describe(w io.Writer, msg proto.Message)
	GetEnumDisplayValue(enumDescriptor protoreflect.EnumDescriptor, value int32) string
	GetTabularData(msg proto.Message) (*TabularData, error)
	RegisterEnumNameTypes(enumNameTypes map[string]reflect.Type)
}

Describer is an interface that describes a protobuf message in human readable format.

func NewDescriber added in v0.15.69

func NewDescriber(enumNameTypes ...map[string]reflect.Type) Describer

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) SetHeader

func (d DummyServerStream) SetHeader(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"`
	// IsBitmask is the option for the enum to be a bitmask enum.
	IsBitmask bool   `protobuf:"varint,4,opt,name=IsBitmask,proto3" json:"IsBitmask,omitempty"`
	FullName  string `protobuf:"bytes,5,opt,name=FullName,proto3" json:"FullName,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) GetFullName added in v0.17.78

func (x *EnumDescription) GetFullName() string

func (*EnumDescription) GetIsBitmask added in v0.17.78

func (x *EnumDescription) GetIsBitmask() bool

func (*EnumDescription) GetName

func (x *EnumDescription) GetName() string

func (*EnumDescription) Parse added in v0.18.85

func (e *EnumDescription) Parse(val any) int32

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 EnumLike added in v0.18.85

type EnumLike interface {
	Number() protoreflect.EnumNumber
}

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"`
	Group         string   `protobuf:"bytes,7,opt,name=Group,proto3" json:"Group,omitempty"`
	// contains filtered or unexported fields
}

func (*EnumMeta) Descriptor deprecated

func (*EnumMeta) Descriptor() ([]byte, []int)

Deprecated: Use EnumMeta.ProtoReflect.Descriptor instead.

func (*EnumMeta) GetArgs

func (x *EnumMeta) GetArgs() []string

func (*EnumMeta) GetDisplay

func (x *EnumMeta) GetDisplay() string

func (*EnumMeta) GetDisplayName added in v0.23.105

func (m *EnumMeta) GetDisplayName() string

func (*EnumMeta) GetDocumentation

func (x *EnumMeta) GetDocumentation() string

func (*EnumMeta) GetFullName

func (x *EnumMeta) GetFullName() string

func (*EnumMeta) GetGroup added in v0.19.95

func (x *EnumMeta) GetGroup() string

func (*EnumMeta) GetName

func (x *EnumMeta) GetName() string

func (*EnumMeta) GetValue

func (x *EnumMeta) GetValue() int32

func (*EnumMeta) ProtoMessage

func (*EnumMeta) ProtoMessage()

func (*EnumMeta) ProtoReflect

func (x *EnumMeta) ProtoReflect() protoreflect.Message

func (*EnumMeta) Reset

func (x *EnumMeta) Reset()

func (*EnumMeta) String

func (x *EnumMeta) String() string

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"`
	// 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"`
	// Required is the option for the field to be required.
	Required bool `protobuf:"varint,9,opt,name=Required,proto3" json:"Required,omitempty"`
	// RequiredOr is the option for the field to be required, if one of the
	// other values is provided.
	RequiredOr []string `protobuf:"bytes,10,rep,name=RequiredOr,proto3" json:"RequiredOr,omitempty"`
	// StructName is the full name of the nested struct,
	// for which Fields are provided.
	StructName string `protobuf:"bytes,11,opt,name=StructName,proto3" json:"StructName,omitempty"`
	// Fields is the list of fields for the nested struct.
	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"`
	// Min is the option for the field minimum length for strings, and minimum
	// value for numbers.
	Min int32 `protobuf:"varint,14,opt,name=Min,proto3" json:"Min,omitempty"`
	// Max is the option for the field maximum length for strings, and maximum
	// value for numbers.
	Max int32 `protobuf:"varint,15,opt,name=Max,proto3" json:"Max,omitempty"`
	// MinCount is the option for the field minimum count for lists.
	MinCount int32 `protobuf:"varint,16,opt,name=MinCount,proto3" json:"MinCount,omitempty"`
	// MaxCount is the option for the field maximum count for lists.
	MaxCount int32 `protobuf:"varint,17,opt,name=MaxCount,proto3" json:"MaxCount,omitempty"`
	// Deprecated is the option for the field to be deprecated.
	Deprecated bool `protobuf:"varint,18,opt,name=Deprecated,proto3" json:"Deprecated,omitempty"`
	// Alias is the option for the field alias name for the search query.
	Alias string `protobuf:"bytes,19,opt,name=Alias,proto3" json:"Alias,omitempty"`
	// contains filtered or unexported fields
}

func FilterPrintableFields added in v0.21.101

func FilterPrintableFields(fields []*FieldMeta) []*FieldMeta

FilterPrintableFields filters the fields by the names

func FindFieldMeta added in v0.18.86

func FindFieldMeta(fields []*FieldMeta, name string) *FieldMeta

func (*FieldMeta) Descriptor deprecated

func (*FieldMeta) Descriptor() ([]byte, []int)

Deprecated: Use FieldMeta.ProtoReflect.Descriptor instead.

func (*FieldMeta) GetAlias added in v0.23.105

func (x *FieldMeta) GetAlias() string

func (*FieldMeta) GetDeprecated added in v0.18.87

func (x *FieldMeta) GetDeprecated() bool

func (*FieldMeta) GetDisplay

func (x *FieldMeta) GetDisplay() string

func (*FieldMeta) GetDisplayName added in v0.23.105

func (m *FieldMeta) GetDisplayName() string

func (*FieldMeta) GetDocumentation

func (x *FieldMeta) GetDocumentation() string

func (*FieldMeta) GetEnumDescription

func (x *FieldMeta) GetEnumDescription() *EnumDescription

func (*FieldMeta) GetFields

func (x *FieldMeta) GetFields() []*FieldMeta

func (*FieldMeta) GetFullName

func (x *FieldMeta) GetFullName() string

func (*FieldMeta) GetMax added in v0.17.80

func (x *FieldMeta) GetMax() int32

func (*FieldMeta) GetMaxCount added in v0.17.84

func (x *FieldMeta) GetMaxCount() int32

func (*FieldMeta) GetMin added in v0.17.80

func (x *FieldMeta) GetMin() int32

func (*FieldMeta) GetMinCount added in v0.17.84

func (x *FieldMeta) GetMinCount() int32

func (*FieldMeta) GetName

func (x *FieldMeta) GetName() string

func (*FieldMeta) GetRequired added in v0.17.80

func (x *FieldMeta) GetRequired() bool

func (*FieldMeta) GetRequiredOr added in v0.17.80

func (x *FieldMeta) GetRequiredOr() []string

func (*FieldMeta) GetSearchOptions

func (x *FieldMeta) GetSearchOptions() SearchOption_Enum

func (*FieldMeta) GetSearchType

func (x *FieldMeta) GetSearchType() string

func (*FieldMeta) GetStructName added in v0.18.85

func (x *FieldMeta) GetStructName() string

func (*FieldMeta) GetType

func (x *FieldMeta) GetType() string

func (*FieldMeta) IsPrintable added in v0.21.101

func (m *FieldMeta) IsPrintable() bool

func (*FieldMeta) ProtoMessage

func (*FieldMeta) ProtoMessage()

func (*FieldMeta) ProtoReflect

func (x *FieldMeta) ProtoReflect() protoreflect.Message

func (*FieldMeta) Reset

func (x *FieldMeta) Reset()

func (*FieldMeta) String

func (x *FieldMeta) String() string

type HasMessageDescription added in v0.21.101

type HasMessageDescription interface {
	GetMessageDescription() *MessageDescription
}

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"`
	FullName      string       `protobuf:"bytes,5,opt,name=FullName,proto3" json:"FullName,omitempty"`
	// Deprecated is the option for the message to be deprecated.
	Deprecated bool `protobuf:"varint,8,opt,name=Deprecated,proto3" json:"Deprecated,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageDescription) Descriptor deprecated

func (*MessageDescription) Descriptor() ([]byte, []int)

Deprecated: Use MessageDescription.ProtoReflect.Descriptor instead.

func (*MessageDescription) FindField added in v0.18.86

func (m *MessageDescription) FindField(name string) *FieldMeta

func (*MessageDescription) GetDeprecated added in v0.18.87

func (x *MessageDescription) GetDeprecated() bool

func (*MessageDescription) GetDisplay

func (x *MessageDescription) GetDisplay() string

func (*MessageDescription) GetDisplayName added in v0.23.105

func (m *MessageDescription) GetDisplayName() string

func (*MessageDescription) GetDocumentation

func (x *MessageDescription) GetDocumentation() string

func (*MessageDescription) GetFields

func (x *MessageDescription) GetFields() []*FieldMeta

func (*MessageDescription) GetFullName added in v0.17.78

func (x *MessageDescription) GetFullName() string

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) Enum

func (SearchOption_Enum) EnumDescriptor deprecated

func (SearchOption_Enum) EnumDescriptor() ([]byte, []int)

Deprecated: Use SearchOption_Enum.Descriptor instead.

func (SearchOption_Enum) Number

func (SearchOption_Enum) String

func (x SearchOption_Enum) String() string

func (SearchOption_Enum) Type

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

type Table added in v0.17.79

type Table struct {
	// ID is the identifier for the resource
	ID string
	// Header is the header row of the table.
	Header []*FieldMeta
	// Rows is an array of rows.
	Rows []*TableRow

	// RawValue is the raw value of the table.
	RawValue any
}

func (*Table) Print added in v0.21.101

func (r *Table) Print(w io.Writer)

type TableRow added in v0.17.79

type TableRow struct {
	// Cells will be as wide as the column definitions array and contain string
	// representation of basic types as:
	// strings, numbers (float64 or int64), booleans.
	Cells []string
	// Values is the values corresponding to the Cells.
	Values []any
	// Fields is the fields corresponding to the Cells.
	Fields []*FieldMeta
	// RawValue is the raw value of the row.
	RawValue any
}

TableRow is an individual row in a table.

type TabularData added in v0.21.101

type TabularData struct {
	// Tables is an array of tables.
	Tables []*Table
}

func GetTabularData added in v0.21.101

func GetTabularData(msg proto.Message) (*TabularData, error)

func (*TabularData) Print added in v0.21.101

func (r *TabularData) Print(w io.Writer)

type Validator added in v0.20.98

type Validator interface {
	Validate(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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