v1

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	QueryColum_DataType_name = map[int32]string{
		0: "UNKNOWN",
		1: "NUMBER",
		2: "DOUBLE",
		3: "STRING",
		4: "BOOL",
		5: "TIMESTAMP",
	}
	QueryColum_DataType_value = map[string]int32{
		"UNKNOWN":   0,
		"NUMBER":    1,
		"DOUBLE":    2,
		"STRING":    3,
		"BOOL":      4,
		"TIMESTAMP": 5,
	}
)

Enum value maps for QueryColum_DataType.

View Source
var (
	ErrInvalidLength        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflow          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group")
)
View Source
var File_vince_query_v1_query_proto protoreflect.FileDescriptor
View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Query",
			Handler:    _Query_Query_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "vince/query/v1/query.proto",
}

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

Functions

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

Types

type QueryClient

type QueryClient interface {
	Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
}

QueryClient is the client API for Query 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.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryColum

type QueryColum struct {
	Name     string              `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	DataType QueryColum_DataType `protobuf:"varint,2,opt,name=data_type,json=dataType,proto3,enum=v1.QueryColum_DataType" json:"data_type,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryColum) Descriptor deprecated

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

Deprecated: Use QueryColum.ProtoReflect.Descriptor instead.

func (*QueryColum) GetDataType

func (x *QueryColum) GetDataType() QueryColum_DataType

func (*QueryColum) GetName

func (x *QueryColum) GetName() string

func (*QueryColum) MarshalToSizedBufferVT

func (m *QueryColum) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryColum) MarshalToVT

func (m *QueryColum) MarshalToVT(dAtA []byte) (int, error)

func (*QueryColum) MarshalVT

func (m *QueryColum) MarshalVT() (dAtA []byte, err error)

func (*QueryColum) ProtoMessage

func (*QueryColum) ProtoMessage()

func (*QueryColum) ProtoReflect

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

func (*QueryColum) Reset

func (x *QueryColum) Reset()

func (*QueryColum) SizeVT

func (m *QueryColum) SizeVT() (n int)

func (*QueryColum) String

func (x *QueryColum) String() string

func (*QueryColum) UnmarshalVT

func (m *QueryColum) UnmarshalVT(dAtA []byte) error

type QueryColum_DataType

type QueryColum_DataType int32
const (
	QueryColum_UNKNOWN   QueryColum_DataType = 0
	QueryColum_NUMBER    QueryColum_DataType = 1
	QueryColum_DOUBLE    QueryColum_DataType = 2
	QueryColum_STRING    QueryColum_DataType = 3
	QueryColum_BOOL      QueryColum_DataType = 4
	QueryColum_TIMESTAMP QueryColum_DataType = 5
)

func (QueryColum_DataType) Descriptor

func (QueryColum_DataType) Enum

func (QueryColum_DataType) EnumDescriptor deprecated

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

Deprecated: Use QueryColum_DataType.Descriptor instead.

func (QueryColum_DataType) Number

func (QueryColum_DataType) String

func (x QueryColum_DataType) String() string

func (QueryColum_DataType) Type

type QueryParam

type QueryParam struct {
	Name  string      `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value *QueryValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryParam) Descriptor deprecated

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

Deprecated: Use QueryParam.ProtoReflect.Descriptor instead.

func (*QueryParam) GetName

func (x *QueryParam) GetName() string

func (*QueryParam) GetValue

func (x *QueryParam) GetValue() *QueryValue

func (*QueryParam) MarshalToSizedBufferVT

func (m *QueryParam) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryParam) MarshalToVT

func (m *QueryParam) MarshalToVT(dAtA []byte) (int, error)

func (*QueryParam) MarshalVT

func (m *QueryParam) MarshalVT() (dAtA []byte, err error)

func (*QueryParam) ProtoMessage

func (*QueryParam) ProtoMessage()

func (*QueryParam) ProtoReflect

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

func (*QueryParam) Reset

func (x *QueryParam) Reset()

func (*QueryParam) SizeVT

func (m *QueryParam) SizeVT() (n int)

func (*QueryParam) String

func (x *QueryParam) String() string

func (*QueryParam) UnmarshalVT

func (m *QueryParam) UnmarshalVT(dAtA []byte) error

type QueryRequest

type QueryRequest struct {
	Query  string        `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	Params []*QueryParam `protobuf:"bytes,2,rep,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRequest) Descriptor deprecated

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

Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.

func (*QueryRequest) GetParams

func (x *QueryRequest) GetParams() []*QueryParam

func (*QueryRequest) GetQuery

func (x *QueryRequest) GetQuery() string

func (*QueryRequest) MarshalToSizedBufferVT

func (m *QueryRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryRequest) MarshalToVT

func (m *QueryRequest) MarshalToVT(dAtA []byte) (int, error)

func (*QueryRequest) MarshalVT

func (m *QueryRequest) MarshalVT() (dAtA []byte, err error)

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) ProtoReflect

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

func (*QueryRequest) Reset

func (x *QueryRequest) Reset()

func (*QueryRequest) SizeVT

func (m *QueryRequest) SizeVT() (n int)

func (*QueryRequest) String

func (x *QueryRequest) String() string

func (*QueryRequest) UnmarshalVT

func (m *QueryRequest) UnmarshalVT(dAtA []byte) error

type QueryResponse

type QueryResponse struct {
	Elapsed *durationpb.Duration `protobuf:"bytes,1,opt,name=elapsed,proto3" json:"elapsed,omitempty"`
	Columns []*QueryColum        `protobuf:"bytes,2,rep,name=columns,proto3" json:"columns,omitempty"`
	Rows    []*QueryRow          `protobuf:"bytes,3,rep,name=rows,proto3" json:"rows,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryResponse) Descriptor deprecated

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

Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.

func (*QueryResponse) GetColumns

func (x *QueryResponse) GetColumns() []*QueryColum

func (*QueryResponse) GetElapsed

func (x *QueryResponse) GetElapsed() *durationpb.Duration

func (*QueryResponse) GetRows

func (x *QueryResponse) GetRows() []*QueryRow

func (*QueryResponse) MarshalToSizedBufferVT

func (m *QueryResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryResponse) MarshalToVT

func (m *QueryResponse) MarshalToVT(dAtA []byte) (int, error)

func (*QueryResponse) MarshalVT

func (m *QueryResponse) MarshalVT() (dAtA []byte, err error)

func (*QueryResponse) ProtoMessage

func (*QueryResponse) ProtoMessage()

func (*QueryResponse) ProtoReflect

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

func (*QueryResponse) Reset

func (x *QueryResponse) Reset()

func (*QueryResponse) SizeVT

func (m *QueryResponse) SizeVT() (n int)

func (*QueryResponse) String

func (x *QueryResponse) String() string

func (*QueryResponse) UnmarshalVT

func (m *QueryResponse) UnmarshalVT(dAtA []byte) error

type QueryRow

type QueryRow struct {
	Values []*QueryValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryRow) Descriptor deprecated

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

Deprecated: Use QueryRow.ProtoReflect.Descriptor instead.

func (*QueryRow) GetValues

func (x *QueryRow) GetValues() []*QueryValue

func (*QueryRow) MarshalToSizedBufferVT

func (m *QueryRow) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryRow) MarshalToVT

func (m *QueryRow) MarshalToVT(dAtA []byte) (int, error)

func (*QueryRow) MarshalVT

func (m *QueryRow) MarshalVT() (dAtA []byte, err error)

func (*QueryRow) ProtoMessage

func (*QueryRow) ProtoMessage()

func (*QueryRow) ProtoReflect

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

func (*QueryRow) Reset

func (x *QueryRow) Reset()

func (*QueryRow) SizeVT

func (m *QueryRow) SizeVT() (n int)

func (*QueryRow) String

func (x *QueryRow) String() string

func (*QueryRow) UnmarshalVT

func (m *QueryRow) UnmarshalVT(dAtA []byte) error

type QueryServer

type QueryServer interface {
	Query(context.Context, *QueryRequest) (*QueryResponse, error)
	// contains filtered or unexported methods
}

QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility

type QueryValue

type QueryValue struct {

	// Types that are assignable to Value:
	//
	//	*QueryValue_Number
	//	*QueryValue_Double
	//	*QueryValue_String_
	//	*QueryValue_Bool
	//	*QueryValue_Timestamp
	Value isQueryValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*QueryValue) Descriptor deprecated

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

Deprecated: Use QueryValue.ProtoReflect.Descriptor instead.

func (*QueryValue) GetBool

func (x *QueryValue) GetBool() bool

func (*QueryValue) GetDouble

func (x *QueryValue) GetDouble() float64

func (*QueryValue) GetNumber

func (x *QueryValue) GetNumber() int64

func (*QueryValue) GetString_

func (x *QueryValue) GetString_() string

func (*QueryValue) GetTimestamp

func (x *QueryValue) GetTimestamp() *timestamppb.Timestamp

func (*QueryValue) GetValue

func (m *QueryValue) GetValue() isQueryValue_Value

func (*QueryValue) MarshalToSizedBufferVT

func (m *QueryValue) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryValue) MarshalToVT

func (m *QueryValue) MarshalToVT(dAtA []byte) (int, error)

func (*QueryValue) MarshalVT

func (m *QueryValue) MarshalVT() (dAtA []byte, err error)

func (*QueryValue) ProtoMessage

func (*QueryValue) ProtoMessage()

func (*QueryValue) ProtoReflect

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

func (*QueryValue) Reset

func (x *QueryValue) Reset()

func (*QueryValue) SizeVT

func (m *QueryValue) SizeVT() (n int)

func (*QueryValue) String

func (x *QueryValue) String() string

func (*QueryValue) UnmarshalVT

func (m *QueryValue) UnmarshalVT(dAtA []byte) error

type QueryValue_Bool

type QueryValue_Bool struct {
	Bool bool `protobuf:"varint,4,opt,name=bool,proto3,oneof"`
}

func (*QueryValue_Bool) MarshalToSizedBufferVT

func (m *QueryValue_Bool) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryValue_Bool) MarshalToVT

func (m *QueryValue_Bool) MarshalToVT(dAtA []byte) (int, error)

func (*QueryValue_Bool) SizeVT

func (m *QueryValue_Bool) SizeVT() (n int)

type QueryValue_Double

type QueryValue_Double struct {
	Double float64 `protobuf:"fixed64,2,opt,name=double,proto3,oneof"`
}

func (*QueryValue_Double) MarshalToSizedBufferVT

func (m *QueryValue_Double) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryValue_Double) MarshalToVT

func (m *QueryValue_Double) MarshalToVT(dAtA []byte) (int, error)

func (*QueryValue_Double) SizeVT

func (m *QueryValue_Double) SizeVT() (n int)

type QueryValue_Number

type QueryValue_Number struct {
	Number int64 `protobuf:"varint,1,opt,name=number,proto3,oneof"`
}

func (*QueryValue_Number) MarshalToSizedBufferVT

func (m *QueryValue_Number) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryValue_Number) MarshalToVT

func (m *QueryValue_Number) MarshalToVT(dAtA []byte) (int, error)

func (*QueryValue_Number) SizeVT

func (m *QueryValue_Number) SizeVT() (n int)

type QueryValue_String_

type QueryValue_String_ struct {
	String_ string `protobuf:"bytes,3,opt,name=string,proto3,oneof"`
}

func (*QueryValue_String_) MarshalToSizedBufferVT

func (m *QueryValue_String_) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryValue_String_) MarshalToVT

func (m *QueryValue_String_) MarshalToVT(dAtA []byte) (int, error)

func (*QueryValue_String_) SizeVT

func (m *QueryValue_String_) SizeVT() (n int)

type QueryValue_Timestamp

type QueryValue_Timestamp struct {
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3,oneof"`
}

func (*QueryValue_Timestamp) MarshalToSizedBufferVT

func (m *QueryValue_Timestamp) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueryValue_Timestamp) MarshalToVT

func (m *QueryValue_Timestamp) MarshalToVT(dAtA []byte) (int, error)

func (*QueryValue_Timestamp) SizeVT

func (m *QueryValue_Timestamp) SizeVT() (n int)

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Query

type UnsafeQueryServer

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

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

Jump to

Keyboard shortcuts

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