datapb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DataService_List_FullMethodName   = "/datapb.DataService/List"
	DataService_Query_FullMethodName  = "/datapb.DataService/Query"
	DataService_Mutate_FullMethodName = "/datapb.DataService/Mutate"
)

Variables

View Source
var (
	Kind_name = map[int32]string{
		0: "KIND_STRING",
		1: "KIND_INT",
		2: "KIND_FLOAT",
		3: "KIND_BOOL",
	}
	Kind_value = map[string]int32{
		"KIND_STRING": 0,
		"KIND_INT":    1,
		"KIND_FLOAT":  2,
		"KIND_BOOL":   3,
	}
)

Enum value maps for Kind.

View Source
var (
	FilterOp_name = map[int32]string{
		0: "OP_EQ",
		1: "OP_NE",
		2: "OP_LT",
		3: "OP_LE",
		4: "OP_GT",
		5: "OP_GE",
		6: "OP_CONTAINS",
	}
	FilterOp_value = map[string]int32{
		"OP_EQ":       0,
		"OP_NE":       1,
		"OP_LT":       2,
		"OP_LE":       3,
		"OP_GT":       4,
		"OP_GE":       5,
		"OP_CONTAINS": 6,
	}
)

Enum value maps for FilterOp.

View Source
var (
	AggFunc_name = map[int32]string{
		0: "AGG_COUNT",
		1: "AGG_SUM",
		2: "AGG_AVG",
		3: "AGG_MIN",
		4: "AGG_MAX",
	}
	AggFunc_value = map[string]int32{
		"AGG_COUNT": 0,
		"AGG_SUM":   1,
		"AGG_AVG":   2,
		"AGG_MIN":   3,
		"AGG_MAX":   4,
	}
)

Enum value maps for AggFunc.

View Source
var (
	MutationKind_name = map[int32]string{
		0: "MUT_INSERT",
		1: "MUT_UPDATE",
		2: "MUT_DELETE",
	}
	MutationKind_value = map[string]int32{
		"MUT_INSERT": 0,
		"MUT_UPDATE": 1,
		"MUT_DELETE": 2,
	}
)

Enum value maps for MutationKind.

View Source
var DataService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "datapb.DataService",
	HandlerType: (*DataServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _DataService_List_Handler,
		},
		{
			MethodName: "Query",
			Handler:    _DataService_Query_Handler,
		},
		{
			MethodName: "Mutate",
			Handler:    _DataService_Mutate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/data.proto",
}

DataService_ServiceDesc is the grpc.ServiceDesc for DataService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_data_proto protoreflect.FileDescriptor

Functions

func RegisterDataServiceServer

func RegisterDataServiceServer(s grpc.ServiceRegistrar, srv DataServiceServer)

Types

type Agg

type Agg struct {
	Field string  `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	Func  AggFunc `protobuf:"varint,2,opt,name=func,proto3,enum=datapb.AggFunc" json:"func,omitempty"`
	// contains filtered or unexported fields
}

func (*Agg) Descriptor deprecated

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

Deprecated: Use Agg.ProtoReflect.Descriptor instead.

func (*Agg) GetField

func (x *Agg) GetField() string

func (*Agg) GetFunc

func (x *Agg) GetFunc() AggFunc

func (*Agg) ProtoMessage

func (*Agg) ProtoMessage()

func (*Agg) ProtoReflect

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

func (*Agg) Reset

func (x *Agg) Reset()

func (*Agg) String

func (x *Agg) String() string

type AggFunc

type AggFunc int32

AggFunc mirrors data.AggFunc.

const (
	AggFunc_AGG_COUNT AggFunc = 0
	AggFunc_AGG_SUM   AggFunc = 1
	AggFunc_AGG_AVG   AggFunc = 2
	AggFunc_AGG_MIN   AggFunc = 3
	AggFunc_AGG_MAX   AggFunc = 4
)

func (AggFunc) Descriptor

func (AggFunc) Descriptor() protoreflect.EnumDescriptor

func (AggFunc) Enum

func (x AggFunc) Enum() *AggFunc

func (AggFunc) EnumDescriptor deprecated

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

Deprecated: Use AggFunc.Descriptor instead.

func (AggFunc) Number

func (x AggFunc) Number() protoreflect.EnumNumber

func (AggFunc) String

func (x AggFunc) String() string

func (AggFunc) Type

func (AggFunc) Type() protoreflect.EnumType

type DataServiceClient

type DataServiceClient interface {
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	Query(ctx context.Context, in *Query, opts ...grpc.CallOption) (*View, error)
	Mutate(ctx context.Context, in *Mutation, opts ...grpc.CallOption) (*MutateResponse, error)
}

DataServiceClient is the client API for DataService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

DataService is the small list/query/mutate contract a grpcproxy.Client speaks to a grpcproxy.Server. The Server delegates each call to any data.Proxy (a MemoryProxy in practice), so the same query pipeline runs server-side and the client gets back the identical View.

type DataServiceServer

type DataServiceServer interface {
	List(context.Context, *ListRequest) (*ListResponse, error)
	Query(context.Context, *Query) (*View, error)
	Mutate(context.Context, *Mutation) (*MutateResponse, error)
	// contains filtered or unexported methods
}

DataServiceServer is the server API for DataService service. All implementations must embed UnimplementedDataServiceServer for forward compatibility.

DataService is the small list/query/mutate contract a grpcproxy.Client speaks to a grpcproxy.Server. The Server delegates each call to any data.Proxy (a MemoryProxy in practice), so the same query pipeline runs server-side and the client gets back the identical View.

type Filter

type Filter struct {
	Field string   `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	Op    FilterOp `protobuf:"varint,2,opt,name=op,proto3,enum=datapb.FilterOp" json:"op,omitempty"`
	Value *Value   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Filter) Descriptor deprecated

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

Deprecated: Use Filter.ProtoReflect.Descriptor instead.

func (*Filter) GetField

func (x *Filter) GetField() string

func (*Filter) GetOp

func (x *Filter) GetOp() FilterOp

func (*Filter) GetValue

func (x *Filter) GetValue() *Value

func (*Filter) ProtoMessage

func (*Filter) ProtoMessage()

func (*Filter) ProtoReflect

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

func (*Filter) Reset

func (x *Filter) Reset()

func (*Filter) String

func (x *Filter) String() string

type FilterOp

type FilterOp int32

FilterOp mirrors data.FilterOp.

const (
	FilterOp_OP_EQ       FilterOp = 0
	FilterOp_OP_NE       FilterOp = 1
	FilterOp_OP_LT       FilterOp = 2
	FilterOp_OP_LE       FilterOp = 3
	FilterOp_OP_GT       FilterOp = 4
	FilterOp_OP_GE       FilterOp = 5
	FilterOp_OP_CONTAINS FilterOp = 6
)

func (FilterOp) Descriptor

func (FilterOp) Descriptor() protoreflect.EnumDescriptor

func (FilterOp) Enum

func (x FilterOp) Enum() *FilterOp

func (FilterOp) EnumDescriptor deprecated

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

Deprecated: Use FilterOp.Descriptor instead.

func (FilterOp) Number

func (x FilterOp) Number() protoreflect.EnumNumber

func (FilterOp) String

func (x FilterOp) String() string

func (FilterOp) Type

type Group

type Group struct {
	Key        *Value            `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Rows       []*Record         `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"`
	Aggregates map[string]*Value `` /* 147-byte string literal not displayed */
	// contains filtered or unexported fields
}

Group mirrors data.Group.

func (*Group) Descriptor deprecated

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetAggregates

func (x *Group) GetAggregates() map[string]*Value

func (*Group) GetKey

func (x *Group) GetKey() *Value

func (*Group) GetRows

func (x *Group) GetRows() []*Record

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type Kind

type Kind int32

Kind mirrors data.Kind: the scalar type of a Value.

const (
	Kind_KIND_STRING Kind = 0
	Kind_KIND_INT    Kind = 1
	Kind_KIND_FLOAT  Kind = 2
	Kind_KIND_BOOL   Kind = 3
)

func (Kind) Descriptor

func (Kind) Descriptor() protoreflect.EnumDescriptor

func (Kind) Enum

func (x Kind) Enum() *Kind

func (Kind) EnumDescriptor deprecated

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

Deprecated: Use Kind.Descriptor instead.

func (Kind) Number

func (x Kind) Number() protoreflect.EnumNumber

func (Kind) String

func (x Kind) String() string

func (Kind) Type

func (Kind) Type() protoreflect.EnumType

type ListRequest

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

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {
	Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetRecords

func (x *ListResponse) GetRecords() []*Record

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type MutateResponse

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

func (*MutateResponse) Descriptor deprecated

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

Deprecated: Use MutateResponse.ProtoReflect.Descriptor instead.

func (*MutateResponse) ProtoMessage

func (*MutateResponse) ProtoMessage()

func (*MutateResponse) ProtoReflect

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

func (*MutateResponse) Reset

func (x *MutateResponse) Reset()

func (*MutateResponse) String

func (x *MutateResponse) String() string

type Mutation

type Mutation struct {
	Kind   MutationKind `protobuf:"varint,1,opt,name=kind,proto3,enum=datapb.MutationKind" json:"kind,omitempty"`
	Record *Record      `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`
	Key    *Value       `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*Mutation) Descriptor deprecated

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

Deprecated: Use Mutation.ProtoReflect.Descriptor instead.

func (*Mutation) GetKey

func (x *Mutation) GetKey() *Value

func (*Mutation) GetKind

func (x *Mutation) GetKind() MutationKind

func (*Mutation) GetRecord

func (x *Mutation) GetRecord() *Record

func (*Mutation) ProtoMessage

func (*Mutation) ProtoMessage()

func (*Mutation) ProtoReflect

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

func (*Mutation) Reset

func (x *Mutation) Reset()

func (*Mutation) String

func (x *Mutation) String() string

type MutationKind

type MutationKind int32

MutationKind mirrors data.MutationKind.

const (
	MutationKind_MUT_INSERT MutationKind = 0
	MutationKind_MUT_UPDATE MutationKind = 1
	MutationKind_MUT_DELETE MutationKind = 2
)

func (MutationKind) Descriptor

func (MutationKind) Enum

func (x MutationKind) Enum() *MutationKind

func (MutationKind) EnumDescriptor deprecated

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

Deprecated: Use MutationKind.Descriptor instead.

func (MutationKind) Number

func (MutationKind) String

func (x MutationKind) String() string

func (MutationKind) Type

type Query

type Query struct {
	Filters []*Filter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
	Sorts   []*Sort   `protobuf:"bytes,2,rep,name=sorts,proto3" json:"sorts,omitempty"`
	GroupBy string    `protobuf:"bytes,3,opt,name=group_by,json=groupBy,proto3" json:"group_by,omitempty"`
	Offset  int32     `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
	Limit   int32     `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
	Aggs    []*Agg    `protobuf:"bytes,6,rep,name=aggs,proto3" json:"aggs,omitempty"`
	// contains filtered or unexported fields
}

Query mirrors data.Query: filter, sort, group, page, aggregate.

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetAggs

func (x *Query) GetAggs() []*Agg

func (*Query) GetFilters

func (x *Query) GetFilters() []*Filter

func (*Query) GetGroupBy

func (x *Query) GetGroupBy() string

func (*Query) GetLimit

func (x *Query) GetLimit() int32

func (*Query) GetOffset

func (x *Query) GetOffset() int32

func (*Query) GetSorts

func (x *Query) GetSorts() []*Sort

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

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

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type Record

type Record struct {
	Fields map[string]*Value `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

Record mirrors data.Record: a row of named cells.

func (*Record) Descriptor deprecated

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetFields

func (x *Record) GetFields() map[string]*Value

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

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

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

type Sort

type Sort struct {
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	Desc  bool   `protobuf:"varint,2,opt,name=desc,proto3" json:"desc,omitempty"`
	// contains filtered or unexported fields
}

func (*Sort) Descriptor deprecated

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

Deprecated: Use Sort.ProtoReflect.Descriptor instead.

func (*Sort) GetDesc

func (x *Sort) GetDesc() bool

func (*Sort) GetField

func (x *Sort) GetField() string

func (*Sort) ProtoMessage

func (*Sort) ProtoMessage()

func (*Sort) ProtoReflect

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

func (*Sort) Reset

func (x *Sort) Reset()

func (*Sort) String

func (x *Sort) String() string

type UnimplementedDataServiceServer

type UnimplementedDataServiceServer struct{}

UnimplementedDataServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedDataServiceServer) List

func (UnimplementedDataServiceServer) Mutate

func (UnimplementedDataServiceServer) Query

type UnsafeDataServiceServer

type UnsafeDataServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDataServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataServiceServer will result in compilation errors.

type Value

type Value struct {
	Kind  Kind    `protobuf:"varint,1,opt,name=kind,proto3,enum=datapb.Kind" json:"kind,omitempty"`
	Str   string  `protobuf:"bytes,2,opt,name=str,proto3" json:"str,omitempty"`
	Int   int64   `protobuf:"varint,3,opt,name=int,proto3" json:"int,omitempty"`
	Float float64 `protobuf:"fixed64,4,opt,name=float,proto3" json:"float,omitempty"`
	Bool  bool    `protobuf:"varint,5,opt,name=bool,proto3" json:"bool,omitempty"`
	// contains filtered or unexported fields
}

Value mirrors data.Value: a tagged scalar. Only the field named by kind is meaningful.

func (*Value) Descriptor deprecated

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

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetBool

func (x *Value) GetBool() bool

func (*Value) GetFloat

func (x *Value) GetFloat() float64

func (*Value) GetInt

func (x *Value) GetInt() int64

func (*Value) GetKind

func (x *Value) GetKind() Kind

func (*Value) GetStr

func (x *Value) GetStr() string

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

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

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

type View

type View struct {
	Rows       []*Record         `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
	Groups     []*Group          `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"`
	Total      int32             `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
	Aggregates map[string]*Value `` /* 147-byte string literal not displayed */
	Grouped    bool              `protobuf:"varint,5,opt,name=grouped,proto3" json:"grouped,omitempty"`
	// contains filtered or unexported fields
}

View mirrors data.View. The grouped flag distinguishes a grouped view (whose Rows is nil and Groups non-nil) from an ungrouped one, which repeated fields alone cannot carry across the wire.

func (*View) Descriptor deprecated

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

Deprecated: Use View.ProtoReflect.Descriptor instead.

func (*View) GetAggregates

func (x *View) GetAggregates() map[string]*Value

func (*View) GetGrouped

func (x *View) GetGrouped() bool

func (*View) GetGroups

func (x *View) GetGroups() []*Group

func (*View) GetRows

func (x *View) GetRows() []*Record

func (*View) GetTotal

func (x *View) GetTotal() int32

func (*View) ProtoMessage

func (*View) ProtoMessage()

func (*View) ProtoReflect

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

func (*View) Reset

func (x *View) Reset()

func (*View) String

func (x *View) String() string

Jump to

Keyboard shortcuts

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