pb

package
v0.0.0-...-cbe41fb Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	RestColService_GetSwaggerDoc_FullMethodName        = "/restcol.api.RestColService/GetSwaggerDoc"
	RestColService_CreateCollection_FullMethodName     = "/restcol.api.RestColService/CreateCollection"
	RestColService_ListCollections_FullMethodName      = "/restcol.api.RestColService/ListCollections"
	RestColService_GetCollection_FullMethodName        = "/restcol.api.RestColService/GetCollection"
	RestColService_DeleteCollection_FullMethodName     = "/restcol.api.RestColService/DeleteCollection"
	RestColService_CreateDocument_FullMethodName       = "/restcol.api.RestColService/CreateDocument"
	RestColService_GetDocument_FullMethodName          = "/restcol.api.RestColService/GetDocument"
	RestColService_DeleteDocument_FullMethodName       = "/restcol.api.RestColService/DeleteDocument"
	RestColService_QueryDocumentsStream_FullMethodName = "/restcol.api.RestColService/QueryDocumentsStream"
	RestColService_QueryDocument_FullMethodName        = "/restcol.api.RestColService/QueryDocument"
)

Variables

View Source
var (
	SchemaFieldDataType_name = map[int32]string{
		0: "SCHEMA_FIELD_DATA_TYPE_NONE",
		1: "SCHEMA_FIELD_DATA_TYPE_STRING",
		2: "SCHEMA_FIELD_DATA_TYPE_NUMBER",
		3: "SCHEMA_FIELD_DATA_TYPE_INTEGER",
		4: "SCHEMA_FIELD_DATA_TYPE_BOOL",
	}
	SchemaFieldDataType_value = map[string]int32{
		"SCHEMA_FIELD_DATA_TYPE_NONE":    0,
		"SCHEMA_FIELD_DATA_TYPE_STRING":  1,
		"SCHEMA_FIELD_DATA_TYPE_NUMBER":  2,
		"SCHEMA_FIELD_DATA_TYPE_INTEGER": 3,
		"SCHEMA_FIELD_DATA_TYPE_BOOL":    4,
	}
)

Enum value maps for SchemaFieldDataType.

View Source
var (
	CollectionType_name = map[int32]string{
		0: "COLLECTION_TYPE_NONE",
		1: "COLLECTION_TYPE_REGULAR_FILES",
		2: "COLLECTION_TYPE_TIMESERIES",
		3: "COLLECTION_TYPE_TRANSACTION",
		4: "COLLECTION_TYPE_VECTOR",
		5: "COLLECTION_TYPE_PROXY",
	}
	CollectionType_value = map[string]int32{
		"COLLECTION_TYPE_NONE":          0,
		"COLLECTION_TYPE_REGULAR_FILES": 1,
		"COLLECTION_TYPE_TIMESERIES":    2,
		"COLLECTION_TYPE_TRANSACTION":   3,
		"COLLECTION_TYPE_VECTOR":        4,
		"COLLECTION_TYPE_PROXY":         5,
	}
)

Enum value maps for CollectionType.

View Source
var (
	DataFormat_name = map[int32]string{
		0: "DATA_FORMAT_UNKNOWN",
		1: "DATA_FORMAT_AUTO",
		2: "DATA_FORMAT_JSON",
		3: "DATA_FORMAT_CSV",
		4: "DATA_FORMAT_XML",
		5: "DATA_FORMAT_URL",
		6: "DATA_FORMAT_MEDIA",
	}
	DataFormat_value = map[string]int32{
		"DATA_FORMAT_UNKNOWN": 0,
		"DATA_FORMAT_AUTO":    1,
		"DATA_FORMAT_JSON":    2,
		"DATA_FORMAT_CSV":     3,
		"DATA_FORMAT_XML":     4,
		"DATA_FORMAT_URL":     5,
		"DATA_FORMAT_MEDIA":   6,
	}
)

Enum value maps for DataFormat.

View Source
var File_restcol_proto protoreflect.FileDescriptor
View Source
var RestColService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "restcol.api.RestColService",
	HandlerType: (*RestColServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSwaggerDoc",
			Handler:    _RestColService_GetSwaggerDoc_Handler,
		},
		{
			MethodName: "CreateCollection",
			Handler:    _RestColService_CreateCollection_Handler,
		},
		{
			MethodName: "ListCollections",
			Handler:    _RestColService_ListCollections_Handler,
		},
		{
			MethodName: "GetCollection",
			Handler:    _RestColService_GetCollection_Handler,
		},
		{
			MethodName: "DeleteCollection",
			Handler:    _RestColService_DeleteCollection_Handler,
		},
		{
			MethodName: "CreateDocument",
			Handler:    _RestColService_CreateDocument_Handler,
		},
		{
			MethodName: "GetDocument",
			Handler:    _RestColService_GetDocument_Handler,
		},
		{
			MethodName: "DeleteDocument",
			Handler:    _RestColService_DeleteDocument_Handler,
		},
		{
			MethodName: "QueryDocument",
			Handler:    _RestColService_QueryDocument_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "QueryDocumentsStream",
			Handler:       _RestColService_QueryDocumentsStream_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "restcol.proto",
}

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

Functions

func RegisterRestColServiceHandler

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

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

func RegisterRestColServiceHandlerClient

func RegisterRestColServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestColServiceClient) error

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

func RegisterRestColServiceHandlerFromEndpoint

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

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

func RegisterRestColServiceHandlerServer

func RegisterRestColServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RestColServiceServer) error

RegisterRestColServiceHandlerServer registers the http handlers for service RestColService to "mux". UnaryRPC :call RestColServiceServer 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 RegisterRestColServiceHandlerFromEndpoint instead.

func RegisterRestColServiceServer

func RegisterRestColServiceServer(s grpc.ServiceRegistrar, srv RestColServiceServer)

Types

type CollectionMetadata

type CollectionMetadata struct {

	// pid is used to isolate resources (by projects), making the collections are belonged to a specific project
	ProjectId string `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	// cid (aka collectionId) would be used to naming ${collectionId} field, that field should be url safe
	// otherwise an error would be returned.
	// leave it empty would generate a random uuid for ${collectionId}
	CollectionId string                 `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	XCreatedAt   *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=_createdAt,json=CreatedAt,proto3" json:"_createdAt,omitempty"`       // ts when the collection was created
	XDeletedAt   *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=_deletedAt,json=DeletedAt,proto3,oneof" json:"_deletedAt,omitempty"` // ts when the collection was deleted
	// contains filtered or unexported fields
}

func (*CollectionMetadata) Descriptor deprecated

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

Deprecated: Use CollectionMetadata.ProtoReflect.Descriptor instead.

func (*CollectionMetadata) GetCollectionId

func (x *CollectionMetadata) GetCollectionId() string

func (*CollectionMetadata) GetProjectId

func (x *CollectionMetadata) GetProjectId() string

func (*CollectionMetadata) GetXCreatedAt

func (x *CollectionMetadata) GetXCreatedAt() *timestamppb.Timestamp

func (*CollectionMetadata) GetXDeletedAt

func (x *CollectionMetadata) GetXDeletedAt() *timestamppb.Timestamp

func (*CollectionMetadata) ProtoMessage

func (*CollectionMetadata) ProtoMessage()

func (*CollectionMetadata) ProtoReflect

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

func (*CollectionMetadata) Reset

func (x *CollectionMetadata) Reset()

func (*CollectionMetadata) String

func (x *CollectionMetadata) String() string

type CollectionType

type CollectionType int32
const (
	CollectionType_COLLECTION_TYPE_NONE          CollectionType = 0
	CollectionType_COLLECTION_TYPE_REGULAR_FILES CollectionType = 1
	CollectionType_COLLECTION_TYPE_TIMESERIES    CollectionType = 2
	CollectionType_COLLECTION_TYPE_TRANSACTION   CollectionType = 3
	CollectionType_COLLECTION_TYPE_VECTOR        CollectionType = 4
	CollectionType_COLLECTION_TYPE_PROXY         CollectionType = 5
)

func (CollectionType) Descriptor

func (CollectionType) Enum

func (x CollectionType) Enum() *CollectionType

func (CollectionType) EnumDescriptor deprecated

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

Deprecated: Use CollectionType.Descriptor instead.

func (CollectionType) Number

func (CollectionType) String

func (x CollectionType) String() string

func (CollectionType) Type

type CreateCollectionRequest

type CreateCollectionRequest struct {
	ProjectId      string          `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	CollectionId   *string         `protobuf:"bytes,2,opt,name=collectionId,proto3,oneof" json:"collectionId,omitempty"`
	Description    *string         `protobuf:"bytes,10,opt,name=description,proto3,oneof" json:"description,omitempty"`
	CollectionType *CollectionType `protobuf:"varint,11,opt,name=collectionType,proto3,enum=restcol.api.CollectionType,oneof" json:"collectionType,omitempty"`
	Schemas        []*SchemaField  `protobuf:"bytes,12,rep,name=schemas,proto3" json:"schemas,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCollectionRequest) Descriptor deprecated

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

Deprecated: Use CreateCollectionRequest.ProtoReflect.Descriptor instead.

func (*CreateCollectionRequest) GetCollectionId

func (x *CreateCollectionRequest) GetCollectionId() string

func (*CreateCollectionRequest) GetCollectionType

func (x *CreateCollectionRequest) GetCollectionType() CollectionType

func (*CreateCollectionRequest) GetDescription

func (x *CreateCollectionRequest) GetDescription() string

func (*CreateCollectionRequest) GetProjectId

func (x *CreateCollectionRequest) GetProjectId() string

func (*CreateCollectionRequest) GetSchemas

func (x *CreateCollectionRequest) GetSchemas() []*SchemaField

func (*CreateCollectionRequest) ProtoMessage

func (*CreateCollectionRequest) ProtoMessage()

func (*CreateCollectionRequest) ProtoReflect

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

func (*CreateCollectionRequest) Reset

func (x *CreateCollectionRequest) Reset()

func (*CreateCollectionRequest) String

func (x *CreateCollectionRequest) String() string

type CreateCollectionResponse

type CreateCollectionResponse struct {
	XMetadata      *CollectionMetadata `protobuf:"bytes,1,opt,name=_metadata,json=Metadata,proto3" json:"_metadata,omitempty"`
	Description    string              `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	CollectionType CollectionType      `protobuf:"varint,3,opt,name=collectionType,proto3,enum=restcol.api.CollectionType" json:"collectionType,omitempty"`
	Schemas        []*SchemaField      `protobuf:"bytes,10,rep,name=schemas,proto3" json:"schemas,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCollectionResponse) Descriptor deprecated

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

Deprecated: Use CreateCollectionResponse.ProtoReflect.Descriptor instead.

func (*CreateCollectionResponse) GetCollectionType

func (x *CreateCollectionResponse) GetCollectionType() CollectionType

func (*CreateCollectionResponse) GetDescription

func (x *CreateCollectionResponse) GetDescription() string

func (*CreateCollectionResponse) GetSchemas

func (x *CreateCollectionResponse) GetSchemas() []*SchemaField

func (*CreateCollectionResponse) GetXMetadata

func (x *CreateCollectionResponse) GetXMetadata() *CollectionMetadata

func (*CreateCollectionResponse) ProtoMessage

func (*CreateCollectionResponse) ProtoMessage()

func (*CreateCollectionResponse) ProtoReflect

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

func (*CreateCollectionResponse) Reset

func (x *CreateCollectionResponse) Reset()

func (*CreateCollectionResponse) String

func (x *CreateCollectionResponse) String() string

type CreateDocumentRequest

type CreateDocumentRequest struct {
	ProjectId    string      `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	CollectionId string      `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	DocumentId   *string     `protobuf:"bytes,3,opt,name=documentId,proto3,oneof" json:"documentId,omitempty"`
	Data         []byte      `protobuf:"bytes,10,opt,name=data,proto3" json:"data,omitempty"` // data represents rawdata for any kind of formating
	Dataformat   *DataFormat `protobuf:"varint,11,opt,name=dataformat,proto3,enum=restcol.api.DataFormat,oneof" json:"dataformat,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDocumentRequest) Descriptor deprecated

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

Deprecated: Use CreateDocumentRequest.ProtoReflect.Descriptor instead.

func (*CreateDocumentRequest) GetCollectionId

func (x *CreateDocumentRequest) GetCollectionId() string

func (*CreateDocumentRequest) GetData

func (x *CreateDocumentRequest) GetData() []byte

func (*CreateDocumentRequest) GetDataformat

func (x *CreateDocumentRequest) GetDataformat() DataFormat

func (*CreateDocumentRequest) GetDocumentId

func (x *CreateDocumentRequest) GetDocumentId() string

func (*CreateDocumentRequest) GetProjectId

func (x *CreateDocumentRequest) GetProjectId() string

func (*CreateDocumentRequest) ProtoMessage

func (*CreateDocumentRequest) ProtoMessage()

func (*CreateDocumentRequest) ProtoReflect

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

func (*CreateDocumentRequest) Reset

func (x *CreateDocumentRequest) Reset()

func (*CreateDocumentRequest) String

func (x *CreateDocumentRequest) String() string

type CreateDocumentResponse

type CreateDocumentResponse struct {
	XMetadata *DataMetadata `protobuf:"bytes,1,opt,name=_metadata,json=Metadata,proto3" json:"_metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDocumentResponse) Descriptor deprecated

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

Deprecated: Use CreateDocumentResponse.ProtoReflect.Descriptor instead.

func (*CreateDocumentResponse) GetXMetadata

func (x *CreateDocumentResponse) GetXMetadata() *DataMetadata

func (*CreateDocumentResponse) ProtoMessage

func (*CreateDocumentResponse) ProtoMessage()

func (*CreateDocumentResponse) ProtoReflect

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

func (*CreateDocumentResponse) Reset

func (x *CreateDocumentResponse) Reset()

func (*CreateDocumentResponse) String

func (x *CreateDocumentResponse) String() string

type DataFormat

type DataFormat int32
const (
	DataFormat_DATA_FORMAT_UNKNOWN DataFormat = 0
	DataFormat_DATA_FORMAT_AUTO    DataFormat = 1
	DataFormat_DATA_FORMAT_JSON    DataFormat = 2
	DataFormat_DATA_FORMAT_CSV     DataFormat = 3
	DataFormat_DATA_FORMAT_XML     DataFormat = 4
	DataFormat_DATA_FORMAT_URL     DataFormat = 5
	DataFormat_DATA_FORMAT_MEDIA   DataFormat = 6
)

func (DataFormat) Descriptor

func (DataFormat) Descriptor() protoreflect.EnumDescriptor

func (DataFormat) Enum

func (x DataFormat) Enum() *DataFormat

func (DataFormat) EnumDescriptor deprecated

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

Deprecated: Use DataFormat.Descriptor instead.

func (DataFormat) Number

func (x DataFormat) Number() protoreflect.EnumNumber

func (DataFormat) String

func (x DataFormat) String() string

func (DataFormat) Type

type DataMetadata

type DataMetadata struct {

	// pid is project id
	ProjectId string `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	// cid is collection id from collection data
	CollectionId string `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	// did (aka dataid) would be used to naming ${documentId} field, that field should be url safe
	DocumentId string                 `protobuf:"bytes,3,opt,name=documentId,proto3" json:"documentId,omitempty"`
	XCreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=_createdAt,json=CreatedAt,proto3" json:"_createdAt,omitempty"`       // ts when the record was created
	XDeletedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=_deletedAt,json=DeletedAt,proto3,oneof" json:"_deletedAt,omitempty"` // ts when the record was deleted
	Dataformat *DataFormat            `protobuf:"varint,12,opt,name=dataformat,proto3,enum=restcol.api.DataFormat,oneof" json:"dataformat,omitempty"`
	// contains filtered or unexported fields
}

func (*DataMetadata) Descriptor deprecated

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

Deprecated: Use DataMetadata.ProtoReflect.Descriptor instead.

func (*DataMetadata) GetCollectionId

func (x *DataMetadata) GetCollectionId() string

func (*DataMetadata) GetDataformat

func (x *DataMetadata) GetDataformat() DataFormat

func (*DataMetadata) GetDocumentId

func (x *DataMetadata) GetDocumentId() string

func (*DataMetadata) GetProjectId

func (x *DataMetadata) GetProjectId() string

func (*DataMetadata) GetXCreatedAt

func (x *DataMetadata) GetXCreatedAt() *timestamppb.Timestamp

func (*DataMetadata) GetXDeletedAt

func (x *DataMetadata) GetXDeletedAt() *timestamppb.Timestamp

func (*DataMetadata) ProtoMessage

func (*DataMetadata) ProtoMessage()

func (*DataMetadata) ProtoReflect

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

func (*DataMetadata) Reset

func (x *DataMetadata) Reset()

func (*DataMetadata) String

func (x *DataMetadata) String() string

type DeleteCollectionRequest

type DeleteCollectionRequest struct {
	ProjectId    string `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	CollectionId string `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteCollectionRequest) Descriptor deprecated

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

Deprecated: Use DeleteCollectionRequest.ProtoReflect.Descriptor instead.

func (*DeleteCollectionRequest) GetCollectionId

func (x *DeleteCollectionRequest) GetCollectionId() string

func (*DeleteCollectionRequest) GetProjectId

func (x *DeleteCollectionRequest) GetProjectId() string

func (*DeleteCollectionRequest) ProtoMessage

func (*DeleteCollectionRequest) ProtoMessage()

func (*DeleteCollectionRequest) ProtoReflect

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

func (*DeleteCollectionRequest) Reset

func (x *DeleteCollectionRequest) Reset()

func (*DeleteCollectionRequest) String

func (x *DeleteCollectionRequest) String() string

type DeleteCollectionResponse

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

func (*DeleteCollectionResponse) Descriptor deprecated

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

Deprecated: Use DeleteCollectionResponse.ProtoReflect.Descriptor instead.

func (*DeleteCollectionResponse) ProtoMessage

func (*DeleteCollectionResponse) ProtoMessage()

func (*DeleteCollectionResponse) ProtoReflect

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

func (*DeleteCollectionResponse) Reset

func (x *DeleteCollectionResponse) Reset()

func (*DeleteCollectionResponse) String

func (x *DeleteCollectionResponse) String() string

type DeleteDocumentRequest

type DeleteDocumentRequest struct {
	ProjectId    string `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	CollectionId string `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	DocumentId   string `protobuf:"bytes,3,opt,name=documentId,proto3" json:"documentId,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteDocumentRequest) Descriptor deprecated

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

Deprecated: Use DeleteDocumentRequest.ProtoReflect.Descriptor instead.

func (*DeleteDocumentRequest) GetCollectionId

func (x *DeleteDocumentRequest) GetCollectionId() string

func (*DeleteDocumentRequest) GetDocumentId

func (x *DeleteDocumentRequest) GetDocumentId() string

func (*DeleteDocumentRequest) GetProjectId

func (x *DeleteDocumentRequest) GetProjectId() string

func (*DeleteDocumentRequest) ProtoMessage

func (*DeleteDocumentRequest) ProtoMessage()

func (*DeleteDocumentRequest) ProtoReflect

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

func (*DeleteDocumentRequest) Reset

func (x *DeleteDocumentRequest) Reset()

func (*DeleteDocumentRequest) String

func (x *DeleteDocumentRequest) String() string

type DeleteDocumentResponse

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

func (*DeleteDocumentResponse) Descriptor deprecated

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

Deprecated: Use DeleteDocumentResponse.ProtoReflect.Descriptor instead.

func (*DeleteDocumentResponse) ProtoMessage

func (*DeleteDocumentResponse) ProtoMessage()

func (*DeleteDocumentResponse) ProtoReflect

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

func (*DeleteDocumentResponse) Reset

func (x *DeleteDocumentResponse) Reset()

func (*DeleteDocumentResponse) String

func (x *DeleteDocumentResponse) String() string

type GetCollectionRequest

type GetCollectionRequest struct {
	ProjectId    string `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	CollectionId string `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCollectionRequest) Descriptor deprecated

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

Deprecated: Use GetCollectionRequest.ProtoReflect.Descriptor instead.

func (*GetCollectionRequest) GetCollectionId

func (x *GetCollectionRequest) GetCollectionId() string

func (*GetCollectionRequest) GetProjectId

func (x *GetCollectionRequest) GetProjectId() string

func (*GetCollectionRequest) ProtoMessage

func (*GetCollectionRequest) ProtoMessage()

func (*GetCollectionRequest) ProtoReflect

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

func (*GetCollectionRequest) Reset

func (x *GetCollectionRequest) Reset()

func (*GetCollectionRequest) String

func (x *GetCollectionRequest) String() string

type GetCollectionResponse

type GetCollectionResponse struct {
	XMetadata      *CollectionMetadata `protobuf:"bytes,1,opt,name=_metadata,json=Metadata,proto3" json:"_metadata,omitempty"`
	Description    string              `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	CollectionType CollectionType      `protobuf:"varint,3,opt,name=collectionType,proto3,enum=restcol.api.CollectionType" json:"collectionType,omitempty"`
	Schemas        []*SchemaField      `protobuf:"bytes,10,rep,name=schemas,proto3" json:"schemas,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCollectionResponse) Descriptor deprecated

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

Deprecated: Use GetCollectionResponse.ProtoReflect.Descriptor instead.

func (*GetCollectionResponse) GetCollectionType

func (x *GetCollectionResponse) GetCollectionType() CollectionType

func (*GetCollectionResponse) GetDescription

func (x *GetCollectionResponse) GetDescription() string

func (*GetCollectionResponse) GetSchemas

func (x *GetCollectionResponse) GetSchemas() []*SchemaField

func (*GetCollectionResponse) GetXMetadata

func (x *GetCollectionResponse) GetXMetadata() *CollectionMetadata

func (*GetCollectionResponse) ProtoMessage

func (*GetCollectionResponse) ProtoMessage()

func (*GetCollectionResponse) ProtoReflect

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

func (*GetCollectionResponse) Reset

func (x *GetCollectionResponse) Reset()

func (*GetCollectionResponse) String

func (x *GetCollectionResponse) String() string

type GetDocumentRequest

type GetDocumentRequest struct {
	ProjectId    string `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	CollectionId string `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	DocumentId   string `protobuf:"bytes,3,opt,name=documentId,proto3" json:"documentId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDocumentRequest) Descriptor deprecated

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

Deprecated: Use GetDocumentRequest.ProtoReflect.Descriptor instead.

func (*GetDocumentRequest) GetCollectionId

func (x *GetDocumentRequest) GetCollectionId() string

func (*GetDocumentRequest) GetDocumentId

func (x *GetDocumentRequest) GetDocumentId() string

func (*GetDocumentRequest) GetProjectId

func (x *GetDocumentRequest) GetProjectId() string

func (*GetDocumentRequest) ProtoMessage

func (*GetDocumentRequest) ProtoMessage()

func (*GetDocumentRequest) ProtoReflect

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

func (*GetDocumentRequest) Reset

func (x *GetDocumentRequest) Reset()

func (*GetDocumentRequest) String

func (x *GetDocumentRequest) String() string

type GetDocumentResponse

type GetDocumentResponse struct {
	XMetadata *DataMetadata `protobuf:"bytes,1,opt,name=_metadata,json=Metadata,proto3" json:"_metadata,omitempty"`
	Data      []byte        `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDocumentResponse) Descriptor deprecated

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

Deprecated: Use GetDocumentResponse.ProtoReflect.Descriptor instead.

func (*GetDocumentResponse) GetData

func (x *GetDocumentResponse) GetData() []byte

func (*GetDocumentResponse) GetXMetadata

func (x *GetDocumentResponse) GetXMetadata() *DataMetadata

func (*GetDocumentResponse) ProtoMessage

func (*GetDocumentResponse) ProtoMessage()

func (*GetDocumentResponse) ProtoReflect

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

func (*GetDocumentResponse) Reset

func (x *GetDocumentResponse) Reset()

func (*GetDocumentResponse) String

func (x *GetDocumentResponse) String() string

type GetSwaggerDocRequest

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

func (*GetSwaggerDocRequest) Descriptor deprecated

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

Deprecated: Use GetSwaggerDocRequest.ProtoReflect.Descriptor instead.

func (*GetSwaggerDocRequest) GetProjectId

func (x *GetSwaggerDocRequest) GetProjectId() string

func (*GetSwaggerDocRequest) ProtoMessage

func (*GetSwaggerDocRequest) ProtoMessage()

func (*GetSwaggerDocRequest) ProtoReflect

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

func (*GetSwaggerDocRequest) Reset

func (x *GetSwaggerDocRequest) Reset()

func (*GetSwaggerDocRequest) String

func (x *GetSwaggerDocRequest) String() string

type ListCollectionsRequest

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

func (*ListCollectionsRequest) Descriptor deprecated

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

Deprecated: Use ListCollectionsRequest.ProtoReflect.Descriptor instead.

func (*ListCollectionsRequest) GetProjectId

func (x *ListCollectionsRequest) GetProjectId() string

func (*ListCollectionsRequest) ProtoMessage

func (*ListCollectionsRequest) ProtoMessage()

func (*ListCollectionsRequest) ProtoReflect

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

func (*ListCollectionsRequest) Reset

func (x *ListCollectionsRequest) Reset()

func (*ListCollectionsRequest) String

func (x *ListCollectionsRequest) String() string

type ListCollectionsResponse

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

func (*ListCollectionsResponse) Descriptor deprecated

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

Deprecated: Use ListCollectionsResponse.ProtoReflect.Descriptor instead.

func (*ListCollectionsResponse) ProtoMessage

func (*ListCollectionsResponse) ProtoMessage()

func (*ListCollectionsResponse) ProtoReflect

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

func (*ListCollectionsResponse) Reset

func (x *ListCollectionsResponse) Reset()

func (*ListCollectionsResponse) String

func (x *ListCollectionsResponse) String() string

type QueryDocumentRequest

type QueryDocumentRequest struct {
	ProjectId    string                 `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	CollectionId string                 `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	SinceTs      *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=sinceTs,proto3" json:"sinceTs,omitempty"`
	EndedAt      *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=endedAt,proto3,oneof" json:"endedAt,omitempty"`   // endedAt specifies when is the ended timeframe of the query
	Queryfields  string                 `protobuf:"bytes,5,opt,name=queryfields,proto3" json:"queryfields,omitempty"` // dot-concatenated fields, ex: fielda.fieldb.fieldc
	LimitCount   *int32                 `protobuf:"varint,6,opt,name=limitCount,proto3,oneof" json:"limitCount,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryDocumentRequest) Descriptor deprecated

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

Deprecated: Use QueryDocumentRequest.ProtoReflect.Descriptor instead.

func (*QueryDocumentRequest) GetCollectionId

func (x *QueryDocumentRequest) GetCollectionId() string

func (*QueryDocumentRequest) GetEndedAt

func (x *QueryDocumentRequest) GetEndedAt() *timestamppb.Timestamp

func (*QueryDocumentRequest) GetLimitCount

func (x *QueryDocumentRequest) GetLimitCount() int32

func (*QueryDocumentRequest) GetProjectId

func (x *QueryDocumentRequest) GetProjectId() string

func (*QueryDocumentRequest) GetQueryfields

func (x *QueryDocumentRequest) GetQueryfields() string

func (*QueryDocumentRequest) GetSinceTs

func (x *QueryDocumentRequest) GetSinceTs() *timestamppb.Timestamp

func (*QueryDocumentRequest) ProtoMessage

func (*QueryDocumentRequest) ProtoMessage()

func (*QueryDocumentRequest) ProtoReflect

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

func (*QueryDocumentRequest) Reset

func (x *QueryDocumentRequest) Reset()

func (*QueryDocumentRequest) String

func (x *QueryDocumentRequest) String() string

type QueryDocumentResponse

type QueryDocumentResponse struct {
	Docs *GetDocumentResponse `protobuf:"bytes,1,opt,name=docs,proto3" json:"docs,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryDocumentResponse) Descriptor deprecated

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

Deprecated: Use QueryDocumentResponse.ProtoReflect.Descriptor instead.

func (*QueryDocumentResponse) GetDocs

func (*QueryDocumentResponse) ProtoMessage

func (*QueryDocumentResponse) ProtoMessage()

func (*QueryDocumentResponse) ProtoReflect

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

func (*QueryDocumentResponse) Reset

func (x *QueryDocumentResponse) Reset()

func (*QueryDocumentResponse) String

func (x *QueryDocumentResponse) String() string

type QueryDocumentStreamRequest

type QueryDocumentStreamRequest struct {
	ProjectId    string                 `protobuf:"bytes,1,opt,name=projectId,proto3" json:"projectId,omitempty"`
	CollectionId string                 `protobuf:"bytes,2,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
	SinceTs      *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=sinceTs,proto3" json:"sinceTs,omitempty"`
	EndedAt      *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=endedAt,proto3,oneof" json:"endedAt,omitempty"`            // endedAt specifies when is the ended timeframe of the query
	Queryfields  string                 `protobuf:"bytes,5,opt,name=queryfields,proto3" json:"queryfields,omitempty"`          // dot-concatenated fields, ex: fielda.fieldb.fieldc
	FollowUpMode *bool                  `protobuf:"varint,6,opt,name=followUpMode,proto3,oneof" json:"followUpMode,omitempty"` // if on, the service would keep watch new coming docs
	// contains filtered or unexported fields
}

func (*QueryDocumentStreamRequest) Descriptor deprecated

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

Deprecated: Use QueryDocumentStreamRequest.ProtoReflect.Descriptor instead.

func (*QueryDocumentStreamRequest) GetCollectionId

func (x *QueryDocumentStreamRequest) GetCollectionId() string

func (*QueryDocumentStreamRequest) GetEndedAt

func (*QueryDocumentStreamRequest) GetFollowUpMode

func (x *QueryDocumentStreamRequest) GetFollowUpMode() bool

func (*QueryDocumentStreamRequest) GetProjectId

func (x *QueryDocumentStreamRequest) GetProjectId() string

func (*QueryDocumentStreamRequest) GetQueryfields

func (x *QueryDocumentStreamRequest) GetQueryfields() string

func (*QueryDocumentStreamRequest) GetSinceTs

func (*QueryDocumentStreamRequest) ProtoMessage

func (*QueryDocumentStreamRequest) ProtoMessage()

func (*QueryDocumentStreamRequest) ProtoReflect

func (*QueryDocumentStreamRequest) Reset

func (x *QueryDocumentStreamRequest) Reset()

func (*QueryDocumentStreamRequest) String

func (x *QueryDocumentStreamRequest) String() string

type RestColServiceClient

type RestColServiceClient interface {
	GetSwaggerDoc(ctx context.Context, in *GetSwaggerDocRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
	CreateCollection(ctx context.Context, in *CreateCollectionRequest, opts ...grpc.CallOption) (*CreateCollectionResponse, error)
	ListCollections(ctx context.Context, in *ListCollectionsRequest, opts ...grpc.CallOption) (*ListCollectionsResponse, error)
	GetCollection(ctx context.Context, in *GetCollectionRequest, opts ...grpc.CallOption) (*GetCollectionResponse, error)
	DeleteCollection(ctx context.Context, in *DeleteCollectionRequest, opts ...grpc.CallOption) (*DeleteCollectionResponse, error)
	CreateDocument(ctx context.Context, in *CreateDocumentRequest, opts ...grpc.CallOption) (*CreateDocumentResponse, error)
	// GetDocument endpoint is a generic endpoint for retrieving data across multiple collections
	GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*GetDocumentResponse, error)
	// DeleteDocument endpoint is a generic endpoint for deleting a specific data
	DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*DeleteDocumentResponse, error)
	QueryDocumentsStream(ctx context.Context, in *QueryDocumentStreamRequest, opts ...grpc.CallOption) (RestColService_QueryDocumentsStreamClient, error)
	QueryDocument(ctx context.Context, in *QueryDocumentRequest, opts ...grpc.CallOption) (*QueryDocumentResponse, error)
}

RestColServiceClient is the client API for RestColService 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.

type RestColServiceServer

type RestColServiceServer interface {
	GetSwaggerDoc(context.Context, *GetSwaggerDocRequest) (*httpbody.HttpBody, error)
	CreateCollection(context.Context, *CreateCollectionRequest) (*CreateCollectionResponse, error)
	ListCollections(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error)
	GetCollection(context.Context, *GetCollectionRequest) (*GetCollectionResponse, error)
	DeleteCollection(context.Context, *DeleteCollectionRequest) (*DeleteCollectionResponse, error)
	CreateDocument(context.Context, *CreateDocumentRequest) (*CreateDocumentResponse, error)
	// GetDocument endpoint is a generic endpoint for retrieving data across multiple collections
	GetDocument(context.Context, *GetDocumentRequest) (*GetDocumentResponse, error)
	// DeleteDocument endpoint is a generic endpoint for deleting a specific data
	DeleteDocument(context.Context, *DeleteDocumentRequest) (*DeleteDocumentResponse, error)
	QueryDocumentsStream(*QueryDocumentStreamRequest, RestColService_QueryDocumentsStreamServer) error
	QueryDocument(context.Context, *QueryDocumentRequest) (*QueryDocumentResponse, error)
	// contains filtered or unexported methods
}

RestColServiceServer is the server API for RestColService service. All implementations must embed UnimplementedRestColServiceServer for forward compatibility

type RestColService_QueryDocumentsStreamClient

type RestColService_QueryDocumentsStreamClient interface {
	Recv() (*GetDocumentResponse, error)
	grpc.ClientStream
}

type RestColService_QueryDocumentsStreamServer

type RestColService_QueryDocumentsStreamServer interface {
	Send(*GetDocumentResponse) error
	grpc.ServerStream
}

type SchemaField

type SchemaField struct {
	Name     string                   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Datatype SchemaFieldDataType      `protobuf:"varint,2,opt,name=datatype,proto3,enum=restcol.api.SchemaFieldDataType" json:"datatype,omitempty"`
	Example  *SchemaFieldExampleValue `protobuf:"bytes,3,opt,name=example,proto3,oneof" json:"example,omitempty"`
	// contains filtered or unexported fields
}

func (*SchemaField) Descriptor deprecated

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

Deprecated: Use SchemaField.ProtoReflect.Descriptor instead.

func (*SchemaField) GetDatatype

func (x *SchemaField) GetDatatype() SchemaFieldDataType

func (*SchemaField) GetExample

func (x *SchemaField) GetExample() *SchemaFieldExampleValue

func (*SchemaField) GetName

func (x *SchemaField) GetName() string

func (*SchemaField) ProtoMessage

func (*SchemaField) ProtoMessage()

func (*SchemaField) ProtoReflect

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

func (*SchemaField) Reset

func (x *SchemaField) Reset()

func (*SchemaField) String

func (x *SchemaField) String() string

type SchemaFieldDataType

type SchemaFieldDataType int32
const (
	SchemaFieldDataType_SCHEMA_FIELD_DATA_TYPE_NONE    SchemaFieldDataType = 0
	SchemaFieldDataType_SCHEMA_FIELD_DATA_TYPE_STRING  SchemaFieldDataType = 1
	SchemaFieldDataType_SCHEMA_FIELD_DATA_TYPE_NUMBER  SchemaFieldDataType = 2
	SchemaFieldDataType_SCHEMA_FIELD_DATA_TYPE_INTEGER SchemaFieldDataType = 3
	SchemaFieldDataType_SCHEMA_FIELD_DATA_TYPE_BOOL    SchemaFieldDataType = 4
)

func (SchemaFieldDataType) Descriptor

func (SchemaFieldDataType) Enum

func (SchemaFieldDataType) EnumDescriptor deprecated

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

Deprecated: Use SchemaFieldDataType.Descriptor instead.

func (SchemaFieldDataType) Number

func (SchemaFieldDataType) String

func (x SchemaFieldDataType) String() string

func (SchemaFieldDataType) Type

type SchemaFieldExampleValue

type SchemaFieldExampleValue struct {
	StringValue  *string  `protobuf:"bytes,1,opt,name=stringValue,proto3,oneof" json:"stringValue,omitempty"`
	NumberValue  *float64 `protobuf:"fixed64,2,opt,name=numberValue,proto3,oneof" json:"numberValue,omitempty"`
	IntegerValue *int64   `protobuf:"varint,3,opt,name=integerValue,proto3,oneof" json:"integerValue,omitempty"`
	BoolValue    *bool    `protobuf:"varint,4,opt,name=boolValue,proto3,oneof" json:"boolValue,omitempty"`
	// contains filtered or unexported fields
}

func (*SchemaFieldExampleValue) Descriptor deprecated

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

Deprecated: Use SchemaFieldExampleValue.ProtoReflect.Descriptor instead.

func (*SchemaFieldExampleValue) GetBoolValue

func (x *SchemaFieldExampleValue) GetBoolValue() bool

func (*SchemaFieldExampleValue) GetIntegerValue

func (x *SchemaFieldExampleValue) GetIntegerValue() int64

func (*SchemaFieldExampleValue) GetNumberValue

func (x *SchemaFieldExampleValue) GetNumberValue() float64

func (*SchemaFieldExampleValue) GetStringValue

func (x *SchemaFieldExampleValue) GetStringValue() string

func (*SchemaFieldExampleValue) ProtoMessage

func (*SchemaFieldExampleValue) ProtoMessage()

func (*SchemaFieldExampleValue) ProtoReflect

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

func (*SchemaFieldExampleValue) Reset

func (x *SchemaFieldExampleValue) Reset()

func (*SchemaFieldExampleValue) String

func (x *SchemaFieldExampleValue) String() string

type UnimplementedRestColServiceServer

type UnimplementedRestColServiceServer struct {
}

UnimplementedRestColServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedRestColServiceServer) CreateCollection

func (UnimplementedRestColServiceServer) CreateDocument

func (UnimplementedRestColServiceServer) DeleteCollection

func (UnimplementedRestColServiceServer) DeleteDocument

func (UnimplementedRestColServiceServer) GetCollection

func (UnimplementedRestColServiceServer) GetDocument

func (UnimplementedRestColServiceServer) GetSwaggerDoc

func (UnimplementedRestColServiceServer) ListCollections

func (UnimplementedRestColServiceServer) QueryDocument

type UnsafeRestColServiceServer

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

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

Jump to

Keyboard shortcuts

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