proto

package
v0.22.16 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2022 Molecula Corp. (DBA FeatureBase). SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ColumnInfo

type ColumnInfo struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Datatype string `protobuf:"bytes,2,opt,name=datatype,proto3" json:"datatype,omitempty"`
	// contains filtered or unexported fields
}

func (*ColumnInfo) Descriptor deprecated

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

Deprecated: Use ColumnInfo.ProtoReflect.Descriptor instead.

func (*ColumnInfo) GetDatatype

func (x *ColumnInfo) GetDatatype() string

func (*ColumnInfo) GetName

func (x *ColumnInfo) GetName() string

func (*ColumnInfo) ProtoMessage

func (*ColumnInfo) ProtoMessage()

func (*ColumnInfo) ProtoReflect

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

func (*ColumnInfo) Reset

func (x *ColumnInfo) Reset()

func (*ColumnInfo) String

func (x *ColumnInfo) String() string

type ColumnResponse

type ColumnResponse struct {

	// Types that are assignable to ColumnVal:
	//
	//	*ColumnResponse_StringVal
	//	*ColumnResponse_Uint64Val
	//	*ColumnResponse_Int64Val
	//	*ColumnResponse_BoolVal
	//	*ColumnResponse_BlobVal
	//	*ColumnResponse_Uint64ArrayVal
	//	*ColumnResponse_StringArrayVal
	//	*ColumnResponse_Float64Val
	//	*ColumnResponse_DecimalVal
	//	*ColumnResponse_TimestampVal
	ColumnVal isColumnResponse_ColumnVal `protobuf_oneof:"columnVal"`
	// contains filtered or unexported fields
}

func (*ColumnResponse) Descriptor deprecated

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

Deprecated: Use ColumnResponse.ProtoReflect.Descriptor instead.

func (*ColumnResponse) GetBlobVal

func (x *ColumnResponse) GetBlobVal() []byte

func (*ColumnResponse) GetBoolVal

func (x *ColumnResponse) GetBoolVal() bool

func (*ColumnResponse) GetColumnVal

func (m *ColumnResponse) GetColumnVal() isColumnResponse_ColumnVal

func (*ColumnResponse) GetDecimalVal

func (x *ColumnResponse) GetDecimalVal() *Decimal

func (*ColumnResponse) GetFloat64Val

func (x *ColumnResponse) GetFloat64Val() float64

func (*ColumnResponse) GetInt64Val

func (x *ColumnResponse) GetInt64Val() int64

func (*ColumnResponse) GetStringArrayVal

func (x *ColumnResponse) GetStringArrayVal() *StringArray

func (*ColumnResponse) GetStringVal

func (x *ColumnResponse) GetStringVal() string

func (*ColumnResponse) GetTimestampVal

func (x *ColumnResponse) GetTimestampVal() string

func (*ColumnResponse) GetUint64ArrayVal

func (x *ColumnResponse) GetUint64ArrayVal() *Uint64Array

func (*ColumnResponse) GetUint64Val

func (x *ColumnResponse) GetUint64Val() uint64

func (*ColumnResponse) ProtoMessage

func (*ColumnResponse) ProtoMessage()

func (*ColumnResponse) ProtoReflect

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

func (*ColumnResponse) Reset

func (x *ColumnResponse) Reset()

func (*ColumnResponse) String

func (x *ColumnResponse) String() string

type ColumnResponse_BlobVal

type ColumnResponse_BlobVal struct {
	BlobVal []byte `protobuf:"bytes,5,opt,name=blobVal,proto3,oneof"`
}

type ColumnResponse_BoolVal

type ColumnResponse_BoolVal struct {
	BoolVal bool `protobuf:"varint,4,opt,name=boolVal,proto3,oneof"`
}

type ColumnResponse_DecimalVal

type ColumnResponse_DecimalVal struct {
	DecimalVal *Decimal `protobuf:"bytes,9,opt,name=decimalVal,proto3,oneof"`
}

type ColumnResponse_Float64Val

type ColumnResponse_Float64Val struct {
	Float64Val float64 `protobuf:"fixed64,8,opt,name=float64Val,proto3,oneof"`
}

type ColumnResponse_Int64Val

type ColumnResponse_Int64Val struct {
	Int64Val int64 `protobuf:"varint,3,opt,name=int64Val,proto3,oneof"`
}

type ColumnResponse_StringArrayVal

type ColumnResponse_StringArrayVal struct {
	StringArrayVal *StringArray `protobuf:"bytes,7,opt,name=stringArrayVal,proto3,oneof"`
}

type ColumnResponse_StringVal

type ColumnResponse_StringVal struct {
	StringVal string `protobuf:"bytes,1,opt,name=stringVal,proto3,oneof"`
}

type ColumnResponse_TimestampVal

type ColumnResponse_TimestampVal struct {
	TimestampVal string `protobuf:"bytes,10,opt,name=timestampVal,proto3,oneof"`
}

type ColumnResponse_Uint64ArrayVal

type ColumnResponse_Uint64ArrayVal struct {
	Uint64ArrayVal *Uint64Array `protobuf:"bytes,6,opt,name=uint64ArrayVal,proto3,oneof"`
}

type ColumnResponse_Uint64Val

type ColumnResponse_Uint64Val struct {
	Uint64Val uint64 `protobuf:"varint,2,opt,name=uint64Val,proto3,oneof"`
}

type ConstRowser

type ConstRowser []RowResponse

ConstRowser implements ToRowser with a slice of row responses.

func (ConstRowser) ToRows

func (c ConstRowser) ToRows(fn func(*RowResponse) error) error

ToRows calls a function with a pointer to each element of the slice.

type Decimal

type Decimal struct {
	Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	Scale int64 `protobuf:"varint,2,opt,name=scale,proto3" json:"scale,omitempty"`
	// contains filtered or unexported fields
}

func (*Decimal) Descriptor deprecated

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

Deprecated: Use Decimal.ProtoReflect.Descriptor instead.

func (*Decimal) GetScale

func (x *Decimal) GetScale() int64

func (*Decimal) GetValue

func (x *Decimal) GetValue() int64

func (*Decimal) ProtoMessage

func (*Decimal) ProtoMessage()

func (*Decimal) ProtoReflect

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

func (*Decimal) Reset

func (x *Decimal) Reset()

func (*Decimal) String

func (x *Decimal) String() string

type EmptyStream

type EmptyStream struct{}

EmptyStream implements StreamClient interface. It always returns empty RowResponse

func (EmptyStream) Recv

func (EmptyStream) Recv() (*RowResponse, error)

Recv returns io.EOF

type IdsOrKeys

type IdsOrKeys struct {

	// Types that are assignable to Type:
	//
	//	*IdsOrKeys_Ids
	//	*IdsOrKeys_Keys
	Type isIdsOrKeys_Type `protobuf_oneof:"type"`
	// contains filtered or unexported fields
}

func (*IdsOrKeys) Descriptor deprecated

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

Deprecated: Use IdsOrKeys.ProtoReflect.Descriptor instead.

func (*IdsOrKeys) GetIds

func (x *IdsOrKeys) GetIds() *Uint64Array

func (*IdsOrKeys) GetKeys

func (x *IdsOrKeys) GetKeys() *StringArray

func (*IdsOrKeys) GetType

func (m *IdsOrKeys) GetType() isIdsOrKeys_Type

func (*IdsOrKeys) ProtoMessage

func (*IdsOrKeys) ProtoMessage()

func (*IdsOrKeys) ProtoReflect

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

func (*IdsOrKeys) Reset

func (x *IdsOrKeys) Reset()

func (*IdsOrKeys) String

func (x *IdsOrKeys) String() string

type IdsOrKeys_Ids

type IdsOrKeys_Ids struct {
	Ids *Uint64Array `protobuf:"bytes,1,opt,name=ids,proto3,oneof"`
}

type IdsOrKeys_Keys

type IdsOrKeys_Keys struct {
	Keys *StringArray `protobuf:"bytes,2,opt,name=keys,proto3,oneof"`
}

type QueryPQLRequest

type QueryPQLRequest struct {
	Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"`
	Pql   string `protobuf:"bytes,2,opt,name=pql,proto3" json:"pql,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryPQLRequest) Descriptor deprecated

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

Deprecated: Use QueryPQLRequest.ProtoReflect.Descriptor instead.

func (*QueryPQLRequest) GetIndex

func (x *QueryPQLRequest) GetIndex() string

func (*QueryPQLRequest) GetPql

func (x *QueryPQLRequest) GetPql() string

func (*QueryPQLRequest) ProtoMessage

func (*QueryPQLRequest) ProtoMessage()

func (*QueryPQLRequest) ProtoReflect

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

func (*QueryPQLRequest) Reset

func (x *QueryPQLRequest) Reset()

func (*QueryPQLRequest) String

func (x *QueryPQLRequest) String() string

type QuerySQLRequest

type QuerySQLRequest struct {
	Sql string `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"`
	// contains filtered or unexported fields
}

func (*QuerySQLRequest) Descriptor deprecated

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

Deprecated: Use QuerySQLRequest.ProtoReflect.Descriptor instead.

func (*QuerySQLRequest) GetSql

func (x *QuerySQLRequest) GetSql() string

func (*QuerySQLRequest) ProtoMessage

func (*QuerySQLRequest) ProtoMessage()

func (*QuerySQLRequest) ProtoReflect

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

func (*QuerySQLRequest) Reset

func (x *QuerySQLRequest) Reset()

func (*QuerySQLRequest) String

func (x *QuerySQLRequest) String() string

type Row

type Row struct {
	Columns []*ColumnResponse `protobuf:"bytes,1,rep,name=columns,proto3" json:"columns,omitempty"`
	// contains filtered or unexported fields
}

func (*Row) Descriptor deprecated

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

Deprecated: Use Row.ProtoReflect.Descriptor instead.

func (*Row) GetColumns

func (x *Row) GetColumns() []*ColumnResponse

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) ProtoReflect

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

func (*Row) Reset

func (x *Row) Reset()

func (*Row) String

func (x *Row) String() string

type RowResponse

type RowResponse struct {
	Headers     []*ColumnInfo     `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	Columns     []*ColumnResponse `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"`
	StatusError *StatusError      `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"`
	Duration    int64             `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"`
	// contains filtered or unexported fields
}

func Error

func Error(err error) *RowResponse

Error is a helper function to create a RowResponse based on an error message. If the error is a grpc Status, then the status code is passed through.

func ErrorCode

func ErrorCode(err error, c codes.Code) *RowResponse

ErrorCode is a helper function to create a RowResponse based on a grpc status code and an error message.

func ErrorWrap

func ErrorWrap(err error, message string) *RowResponse

ErrorWrap prepends a message to the existing status error message.

func ErrorWrapf

func ErrorWrapf(err error, format string, args ...interface{}) *RowResponse

ErrorWrapf prepends a message to the existing status error message with the format specifier.

func (*RowResponse) Descriptor deprecated

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

Deprecated: Use RowResponse.ProtoReflect.Descriptor instead.

func (*RowResponse) GetColumns

func (x *RowResponse) GetColumns() []*ColumnResponse

func (*RowResponse) GetDuration

func (x *RowResponse) GetDuration() int64

func (*RowResponse) GetHeaders

func (x *RowResponse) GetHeaders() []*ColumnInfo

func (*RowResponse) GetStatusError

func (x *RowResponse) GetStatusError() *StatusError

func (*RowResponse) ProtoMessage

func (*RowResponse) ProtoMessage()

func (*RowResponse) ProtoReflect

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

func (*RowResponse) Reset

func (x *RowResponse) Reset()

func (*RowResponse) String

func (x *RowResponse) String() string

type RowResponseSorter

type RowResponseSorter struct {
	// contains filtered or unexported fields
}

RowResponseSorter implements the sort interface for a provided []RowResponse based on the column index, type, and sort direction.

func NewRowResponseSorter

func NewRowResponseSorter(idxs []int, dirs []bool, typs []string, rrs []*RowResponse) (*RowResponseSorter, error)

NewRowResponseSorter return a new RowResponseSorter. It does input validation and returns an error if the inputs aren't compatible.

func (RowResponseSorter) Len

func (r RowResponseSorter) Len() int

func (RowResponseSorter) Less

func (r RowResponseSorter) Less(i, j int) bool

func (RowResponseSorter) Swap

func (r RowResponseSorter) Swap(i, j int)

type StatusError

type StatusError struct {
	Code    uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusError) Descriptor deprecated

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

Deprecated: Use StatusError.ProtoReflect.Descriptor instead.

func (*StatusError) GetCode

func (x *StatusError) GetCode() uint32

func (*StatusError) GetMessage

func (x *StatusError) GetMessage() string

func (*StatusError) ProtoMessage

func (*StatusError) ProtoMessage()

func (*StatusError) ProtoReflect

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

func (*StatusError) Reset

func (x *StatusError) Reset()

func (*StatusError) String

func (x *StatusError) String() string

type StreamClient

type StreamClient interface {
	Recv() (*RowResponse, error)
}

StreamClient is an interface for a stream which can return a RowResponse sent to a stream via Send().

type StreamServer

type StreamServer interface {
	Send(*RowResponse) error
}

StreamServer is an interface for a stream which can accept a RowResponse to be later returned by the stream via Recv().

type StringArray

type StringArray struct {
	Vals []string `protobuf:"bytes,1,rep,name=vals,proto3" json:"vals,omitempty"`
	// contains filtered or unexported fields
}

func (*StringArray) Descriptor deprecated

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

Deprecated: Use StringArray.ProtoReflect.Descriptor instead.

func (*StringArray) GetVals

func (x *StringArray) GetVals() []string

func (*StringArray) ProtoMessage

func (*StringArray) ProtoMessage()

func (*StringArray) ProtoReflect

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

func (*StringArray) Reset

func (x *StringArray) Reset()

func (*StringArray) String

func (x *StringArray) String() string

type TableResponse

type TableResponse struct {
	Headers     []*ColumnInfo `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	Rows        []*Row        `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"`
	StatusError *StatusError  `protobuf:"bytes,3,opt,name=StatusError,proto3" json:"StatusError,omitempty"`
	Duration    int64         `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"`
	// contains filtered or unexported fields
}

func RowsToTable

func RowsToTable(tr ToRowser, n int) (*TableResponse, error)

RowsToTable is a helper function which takes a ToRowser, along with the number of rows, and returns a TableResponse. The number of rows is treated as a hint.

func (*TableResponse) Descriptor deprecated

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

Deprecated: Use TableResponse.ProtoReflect.Descriptor instead.

func (*TableResponse) GetDuration

func (x *TableResponse) GetDuration() int64

func (*TableResponse) GetHeaders

func (x *TableResponse) GetHeaders() []*ColumnInfo

func (*TableResponse) GetRows

func (x *TableResponse) GetRows() []*Row

func (*TableResponse) GetStatusError

func (x *TableResponse) GetStatusError() *StatusError

func (*TableResponse) ProtoMessage

func (*TableResponse) ProtoMessage()

func (*TableResponse) ProtoReflect

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

func (*TableResponse) Reset

func (x *TableResponse) Reset()

func (*TableResponse) String

func (x *TableResponse) String() string

type ToRowser

type ToRowser interface {
	ToRows(func(*RowResponse) error) error
}

ToRowser is an interface for any type that can represent itself as one or more RowResponses. ToRows takes a callback function which should be called for each row in the response.

type ToTabler

type ToTabler interface {
	ToTable() (*TableResponse, error)
}

ToTabler is an interface for any type that can represent itself as a TableResponse.

type Uint64Array

type Uint64Array struct {
	Vals []uint64 `protobuf:"varint,1,rep,packed,name=vals,proto3" json:"vals,omitempty"`
	// contains filtered or unexported fields
}

func (*Uint64Array) Descriptor deprecated

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

Deprecated: Use Uint64Array.ProtoReflect.Descriptor instead.

func (*Uint64Array) GetVals

func (x *Uint64Array) GetVals() []uint64

func (*Uint64Array) ProtoMessage

func (*Uint64Array) ProtoMessage()

func (*Uint64Array) ProtoReflect

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

func (*Uint64Array) Reset

func (x *Uint64Array) Reset()

func (*Uint64Array) String

func (x *Uint64Array) String() string

Jump to

Keyboard shortcuts

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