api

package
v0.14.64 Latest Latest
Warning

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

Go to latest
Published: May 4, 2025 License: Apache-2.0 Imports: 11 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 (
	// 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.

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[5]
	// 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[6]
	// enum_description is the option for the field's description.
	//
	// optional string enum_description = 52003;
	E_EnumDescription = &file_annotations_proto_extTypes[7]
)

Extension fields to descriptorpb.EnumValueOptions.

View Source
var (
	// generate_meta is the option for generating the message's meta
	// information.
	//
	// optional bool generate_meta = 53001;
	E_GenerateMeta = &file_annotations_proto_extTypes[8]
	// 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[9]
	// message_description is the option for the message's description.
	//
	// optional string message_description = 52003;
	E_MessageDescription = &file_annotations_proto_extTypes[10]
)

Extension fields to descriptorpb.MessageOptions.

View Source
var (
	// optional string allowed_roles = 1071;
	E_AllowedRoles = &file_annotations_proto_extTypes[0]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var File_annotations_proto protoreflect.FileDescriptor

Functions

This section is empty.

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 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"`
	// 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) 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) 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) GetDocumentation

func (x *EnumMeta) GetDocumentation() string

func (*EnumMeta) GetFullName

func (x *EnumMeta) GetFullName() 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"`
	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) Descriptor() ([]byte, []int)

Deprecated: Use FieldMeta.ProtoReflect.Descriptor instead.

func (*FieldMeta) GetDisplay

func (x *FieldMeta) GetDisplay() 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) GetGoType

func (x *FieldMeta) GetGoType() string

func (*FieldMeta) GetName

func (x *FieldMeta) GetName() string

func (*FieldMeta) GetSearchOptions

func (x *FieldMeta) GetSearchOptions() SearchOption_Enum

func (*FieldMeta) GetSearchType

func (x *FieldMeta) GetSearchType() string

func (*FieldMeta) GetType

func (x *FieldMeta) GetType() string

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

Jump to

Keyboard shortcuts

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