api

package
v1.0.0-alpha.24 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 27 Imported by: 4

Documentation

Overview

Package api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Code_name = map[int32]string{
		0:  "OK",
		1:  "CANCELLED",
		2:  "UNKNOWN",
		3:  "INVALID_ARGUMENT",
		4:  "DEADLINE_EXCEEDED",
		5:  "NOT_FOUND",
		6:  "ALREADY_EXISTS",
		7:  "PERMISSION_DENIED",
		8:  "RESOURCE_EXHAUSTED",
		9:  "FAILED_PRECONDITION",
		10: "ABORTED",
		11: "OUT_OF_RANGE",
		12: "UNIMPLEMENTED",
		13: "INTERNAL",
		14: "UNAVAILABLE",
		15: "DATA_LOSS",
		16: "UNAUTHENTICATED",
		17: "CONFLICT",
		18: "BAD_GATEWAY",
		19: "METHOD_NOT_ALLOWED",
	}
	Code_value = map[string]int32{
		"OK":                  0,
		"CANCELLED":           1,
		"UNKNOWN":             2,
		"INVALID_ARGUMENT":    3,
		"DEADLINE_EXCEEDED":   4,
		"NOT_FOUND":           5,
		"ALREADY_EXISTS":      6,
		"PERMISSION_DENIED":   7,
		"RESOURCE_EXHAUSTED":  8,
		"FAILED_PRECONDITION": 9,
		"ABORTED":             10,
		"OUT_OF_RANGE":        11,
		"UNIMPLEMENTED":       12,
		"INTERNAL":            13,
		"UNAVAILABLE":         14,
		"DATA_LOSS":           15,
		"UNAUTHENTICATED":     16,
		"CONFLICT":            17,
		"BAD_GATEWAY":         18,
		"METHOD_NOT_ALLOWED":  19,
	}
)

Enum value maps for Code.

View Source
var (
	CollectionType_name = map[int32]string{
		0: "DOCUMENTS",
		1: "MESSAGES",
	}
	CollectionType_value = map[string]int32{
		"DOCUMENTS": 0,
		"MESSAGES":  1,
	}
)

Enum value maps for CollectionType.

View Source
var (
	HeaderPrefix   = "Tigris-"
	HeaderTxID     = HeaderPrefix + "Tx-Id"
	HeaderTxOrigin = HeaderPrefix + "Tx-Origin"
)
View Source
var Admin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tigrisdata.admin.v1.Admin",
	HandlerType: (*AdminServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "createNamespace",
			Handler:    _Admin_CreateNamespace_Handler,
		},
		{
			MethodName: "listNamespaces",
			Handler:    _Admin_ListNamespaces_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server/v1/admin.proto",
}

Admin_ServiceDesc is the grpc.ServiceDesc for Admin 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 Auth_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tigrisdata.auth.v1.Auth",
	HandlerType: (*AuthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "getAccessToken",
			Handler:    _Auth_GetAccessToken_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server/v1/auth.proto",
}

Auth_ServiceDesc is the grpc.ServiceDesc for Auth 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_server_v1_admin_proto protoreflect.FileDescriptor
View Source
var File_server_v1_api_proto protoreflect.FileDescriptor
View Source
var File_server_v1_auth_proto protoreflect.FileDescriptor
View Source
var File_server_v1_health_proto protoreflect.FileDescriptor
View Source
var HealthAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "HealthAPI",
	HandlerType: (*HealthAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Health",
			Handler:    _HealthAPI_Health_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server/v1/health.proto",
}

HealthAPI_ServiceDesc is the grpc.ServiceDesc for HealthAPI 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 Tigris_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "tigrisdata.v1.Tigris",
	HandlerType: (*TigrisServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "BeginTransaction",
			Handler:    _Tigris_BeginTransaction_Handler,
		},
		{
			MethodName: "CommitTransaction",
			Handler:    _Tigris_CommitTransaction_Handler,
		},
		{
			MethodName: "RollbackTransaction",
			Handler:    _Tigris_RollbackTransaction_Handler,
		},
		{
			MethodName: "Insert",
			Handler:    _Tigris_Insert_Handler,
		},
		{
			MethodName: "Replace",
			Handler:    _Tigris_Replace_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Tigris_Delete_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Tigris_Update_Handler,
		},
		{
			MethodName: "CreateOrUpdateCollection",
			Handler:    _Tigris_CreateOrUpdateCollection_Handler,
		},
		{
			MethodName: "DropCollection",
			Handler:    _Tigris_DropCollection_Handler,
		},
		{
			MethodName: "ListDatabases",
			Handler:    _Tigris_ListDatabases_Handler,
		},
		{
			MethodName: "ListCollections",
			Handler:    _Tigris_ListCollections_Handler,
		},
		{
			MethodName: "CreateDatabase",
			Handler:    _Tigris_CreateDatabase_Handler,
		},
		{
			MethodName: "DropDatabase",
			Handler:    _Tigris_DropDatabase_Handler,
		},
		{
			MethodName: "DescribeDatabase",
			Handler:    _Tigris_DescribeDatabase_Handler,
		},
		{
			MethodName: "DescribeCollection",
			Handler:    _Tigris_DescribeCollection_Handler,
		},
		{
			MethodName: "GetInfo",
			Handler:    _Tigris_GetInfo_Handler,
		},
		{
			MethodName: "Publish",
			Handler:    _Tigris_Publish_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Read",
			Handler:       _Tigris_Read_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Search",
			Handler:       _Tigris_Search_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Events",
			Handler:       _Tigris_Events_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Subscribe",
			Handler:       _Tigris_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "server/v1/api.proto",
}

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

Functions

func CodeToString

func CodeToString(c Code) string

CodeToString convert Tigris error code into string representation

func IsTxSupported

func IsTxSupported(ctx context.Context) bool

func MarshalStatus

func MarshalStatus(status *spb.Status) ([]byte, error)

MarshalStatus marshal status object

func RegisterAdminHandler

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

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

func RegisterAdminHandlerClient

func RegisterAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdminClient) error

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

func RegisterAdminHandlerFromEndpoint

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

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

func RegisterAdminHandlerServer

func RegisterAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdminServer) error

RegisterAdminHandlerServer registers the http handlers for service Admin to "mux". UnaryRPC :call AdminServer 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 RegisterAdminHandlerFromEndpoint instead.

func RegisterAdminServer

func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)

func RegisterAuthHandler

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

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

func RegisterAuthHandlerClient

func RegisterAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthClient) error

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

func RegisterAuthHandlerFromEndpoint

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

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

func RegisterAuthHandlerServer

func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServer) error

RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". UnaryRPC :call AuthServer 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 RegisterAuthHandlerFromEndpoint instead.

func RegisterAuthServer

func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)

func RegisterHealthAPIHandler

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

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

func RegisterHealthAPIHandlerClient

func RegisterHealthAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client HealthAPIClient) error

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

func RegisterHealthAPIHandlerFromEndpoint

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

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

func RegisterHealthAPIHandlerServer

func RegisterHealthAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server HealthAPIServer) error

RegisterHealthAPIHandlerServer registers the http handlers for service HealthAPI to "mux". UnaryRPC :call HealthAPIServer 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 RegisterHealthAPIHandlerFromEndpoint instead.

func RegisterHealthAPIServer

func RegisterHealthAPIServer(s grpc.ServiceRegistrar, srv HealthAPIServer)

func RegisterTigrisHandler

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

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

func RegisterTigrisHandlerClient

func RegisterTigrisHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TigrisClient) error

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

func RegisterTigrisHandlerFromEndpoint

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

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

func RegisterTigrisHandlerServer

func RegisterTigrisHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TigrisServer) error

RegisterTigrisHandlerServer registers the http handlers for service Tigris to "mux". UnaryRPC :call TigrisServer 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 RegisterTigrisHandlerFromEndpoint instead.

func RegisterTigrisServer

func RegisterTigrisServer(s grpc.ServiceRegistrar, srv TigrisServer)

func ToGRPCCode

func ToGRPCCode(code Code) codes.Code

ToGRPCCode converts Tigris error code to GRPC code Extended codes converted to 'Unknown' GRPC code

func ToHTTPCode

func ToHTTPCode(code Code) int

ToHTTPCode converts Tigris' code to HTTP status code Used to customize HTTP codes returned by GRPC-gateway

Types

type AdminClient

type AdminClient interface {
	// Creates a new namespace, if it does not exist
	CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error)
	// List all namespace
	ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
}

AdminClient is the client API for Admin 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 NewAdminClient

func NewAdminClient(cc grpc.ClientConnInterface) AdminClient

type AdminServer

type AdminServer interface {
	// Creates a new namespace, if it does not exist
	CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error)
	// List all namespace
	ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
}

AdminServer is the server API for Admin service. All implementations should embed UnimplementedAdminServer for forward compatibility

type AuthClient

type AuthClient interface {
	// Gets an access token.
	GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error)
}

AuthClient is the client API for Auth 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 NewAuthClient

func NewAuthClient(cc grpc.ClientConnInterface) AuthClient

type AuthServer

type AuthServer interface {
	// Gets an access token.
	GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error)
}

AuthServer is the server API for Auth service. All implementations should embed UnimplementedAuthServer for forward compatibility

type BeginTransactionRequest

type BeginTransactionRequest struct {

	// Database name this transaction belongs to.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// The transaction options.
	Options *TransactionOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

Start new transaction in database specified by "db".

func (*BeginTransactionRequest) Descriptor deprecated

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

Deprecated: Use BeginTransactionRequest.ProtoReflect.Descriptor instead.

func (*BeginTransactionRequest) GetDb

func (x *BeginTransactionRequest) GetDb() string

func (*BeginTransactionRequest) GetOptions

func (*BeginTransactionRequest) ProtoMessage

func (*BeginTransactionRequest) ProtoMessage()

func (*BeginTransactionRequest) ProtoReflect

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

func (*BeginTransactionRequest) Reset

func (x *BeginTransactionRequest) Reset()

func (*BeginTransactionRequest) String

func (x *BeginTransactionRequest) String() string

type BeginTransactionResponse

type BeginTransactionResponse struct {

	// Returns a tigris transactional context with details about the transactions.
	TxCtx *TransactionCtx `protobuf:"bytes,1,opt,name=tx_ctx,json=txCtx,proto3" json:"tx_ctx,omitempty"`
	// contains filtered or unexported fields
}

Start transaction returns transaction context which uniquely identifies the transaction

func (*BeginTransactionResponse) Descriptor deprecated

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

Deprecated: Use BeginTransactionResponse.ProtoReflect.Descriptor instead.

func (*BeginTransactionResponse) GetTxCtx

func (*BeginTransactionResponse) ProtoMessage

func (*BeginTransactionResponse) ProtoMessage()

func (*BeginTransactionResponse) ProtoReflect

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

func (*BeginTransactionResponse) Reset

func (x *BeginTransactionResponse) Reset()

func (*BeginTransactionResponse) String

func (x *BeginTransactionResponse) String() string

type Code

type Code int32

Codes returned by the Tigris server in the case of error

const (
	Code_OK                  Code = 0  // 200
	Code_CANCELLED           Code = 1  // 499
	Code_UNKNOWN             Code = 2  // 500
	Code_INVALID_ARGUMENT    Code = 3  // 400
	Code_DEADLINE_EXCEEDED   Code = 4  // 504
	Code_NOT_FOUND           Code = 5  // 404
	Code_ALREADY_EXISTS      Code = 6  // 409
	Code_PERMISSION_DENIED   Code = 7  // 403
	Code_RESOURCE_EXHAUSTED  Code = 8  // 429
	Code_FAILED_PRECONDITION Code = 9  // 412
	Code_ABORTED             Code = 10 // 409
	Code_OUT_OF_RANGE        Code = 11 // 400
	Code_UNIMPLEMENTED       Code = 12 // 501
	Code_INTERNAL            Code = 13 // 500
	Code_UNAVAILABLE         Code = 14 // 503
	Code_DATA_LOSS           Code = 15 // 500
	Code_UNAUTHENTICATED     Code = 16 // 401
	Code_CONFLICT            Code = 17 // 409
	Code_BAD_GATEWAY         Code = 18 // 502
	Code_METHOD_NOT_ALLOWED  Code = 19 // 405
)

func CodeFromString

func CodeFromString(c string) Code

CodeFromString parses Tigris error code from its string representation

func ToTigrisCode

func ToTigrisCode(code codes.Code) Code

ToTigrisCode converts GRPC code to Tigris code

func (Code) Descriptor

func (Code) Descriptor() protoreflect.EnumDescriptor

func (Code) Enum

func (x Code) Enum() *Code

func (Code) EnumDescriptor deprecated

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

Deprecated: Use Code.Descriptor instead.

func (Code) Number

func (x Code) Number() protoreflect.EnumNumber

func (Code) String

func (x Code) String() string

func (Code) Type

func (Code) Type() protoreflect.EnumType

type CollectionDescription

type CollectionDescription struct {

	// Name of the collection.
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// Metadata about the collection.
	Metadata *CollectionMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Collections schema
	Schema []byte `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
	// Collection size in bytes
	Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*CollectionDescription) Descriptor deprecated

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

Deprecated: Use CollectionDescription.ProtoReflect.Descriptor instead.

func (*CollectionDescription) GetCollection

func (x *CollectionDescription) GetCollection() string

func (*CollectionDescription) GetMetadata

func (x *CollectionDescription) GetMetadata() *CollectionMetadata

func (*CollectionDescription) GetSchema

func (x *CollectionDescription) GetSchema() []byte

func (*CollectionDescription) GetSize

func (x *CollectionDescription) GetSize() int64

func (*CollectionDescription) ProtoMessage

func (*CollectionDescription) ProtoMessage()

func (*CollectionDescription) ProtoReflect

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

func (*CollectionDescription) Reset

func (x *CollectionDescription) Reset()

func (*CollectionDescription) String

func (x *CollectionDescription) String() string

type CollectionInfo

type CollectionInfo struct {

	// Collection name.
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// Metadata about the collection.
	Metadata *CollectionMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*CollectionInfo) Descriptor deprecated

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

Deprecated: Use CollectionInfo.ProtoReflect.Descriptor instead.

func (*CollectionInfo) GetCollection

func (x *CollectionInfo) GetCollection() string

func (*CollectionInfo) GetMetadata

func (x *CollectionInfo) GetMetadata() *CollectionMetadata

func (*CollectionInfo) ProtoMessage

func (*CollectionInfo) ProtoMessage()

func (*CollectionInfo) ProtoReflect

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

func (*CollectionInfo) Reset

func (x *CollectionInfo) Reset()

func (*CollectionInfo) String

func (x *CollectionInfo) String() string

type CollectionMetadata

type CollectionMetadata struct {
	Type CollectionType `protobuf:"varint,1,opt,name=type,proto3,enum=tigrisdata.v1.CollectionType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*CollectionMetadata) Descriptor deprecated

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

Deprecated: Use CollectionMetadata.ProtoReflect.Descriptor instead.

func (*CollectionMetadata) GetType

func (x *CollectionMetadata) GetType() CollectionType

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 CollectionOptions

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

Collection requests modifying options.

func (*CollectionOptions) Descriptor deprecated

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

Deprecated: Use CollectionOptions.ProtoReflect.Descriptor instead.

func (*CollectionOptions) ProtoMessage

func (*CollectionOptions) ProtoMessage()

func (*CollectionOptions) ProtoReflect

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

func (*CollectionOptions) Reset

func (x *CollectionOptions) Reset()

func (*CollectionOptions) String

func (x *CollectionOptions) String() string

type CollectionType

type CollectionType int32

The type of this collection. Tigris supports Document based APIs for DOCUMENTS collection and Pub/Sub APIs for MESSAGES collection.

const (
	CollectionType_DOCUMENTS CollectionType = 0
	CollectionType_MESSAGES  CollectionType = 1
)

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 CommitTransactionRequest

type CommitTransactionRequest struct {

	// Database name this transaction belongs to.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// contains filtered or unexported fields
}

Commit transaction with the given ID

func (*CommitTransactionRequest) Descriptor deprecated

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

Deprecated: Use CommitTransactionRequest.ProtoReflect.Descriptor instead.

func (*CommitTransactionRequest) GetDb

func (x *CommitTransactionRequest) GetDb() string

func (*CommitTransactionRequest) ProtoMessage

func (*CommitTransactionRequest) ProtoMessage()

func (*CommitTransactionRequest) ProtoReflect

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

func (*CommitTransactionRequest) Reset

func (x *CommitTransactionRequest) Reset()

func (*CommitTransactionRequest) String

func (x *CommitTransactionRequest) String() string

type CommitTransactionResponse

type CommitTransactionResponse struct {

	// Status of commit transaction operation.
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CommitTransactionResponse) Descriptor deprecated

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

Deprecated: Use CommitTransactionResponse.ProtoReflect.Descriptor instead.

func (*CommitTransactionResponse) GetStatus

func (x *CommitTransactionResponse) GetStatus() string

func (*CommitTransactionResponse) ProtoMessage

func (*CommitTransactionResponse) ProtoMessage()

func (*CommitTransactionResponse) ProtoReflect

func (*CommitTransactionResponse) Reset

func (x *CommitTransactionResponse) Reset()

func (*CommitTransactionResponse) String

func (x *CommitTransactionResponse) String() string

type CreateDatabaseRequest

type CreateDatabaseRequest struct {

	// Create database with this name.
	Db      string           `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	Options *DatabaseOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDatabaseRequest) Descriptor deprecated

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

Deprecated: Use CreateDatabaseRequest.ProtoReflect.Descriptor instead.

func (*CreateDatabaseRequest) GetDb

func (x *CreateDatabaseRequest) GetDb() string

func (*CreateDatabaseRequest) GetOptions

func (x *CreateDatabaseRequest) GetOptions() *DatabaseOptions

func (*CreateDatabaseRequest) ProtoMessage

func (*CreateDatabaseRequest) ProtoMessage()

func (*CreateDatabaseRequest) ProtoReflect

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

func (*CreateDatabaseRequest) Reset

func (x *CreateDatabaseRequest) Reset()

func (*CreateDatabaseRequest) String

func (x *CreateDatabaseRequest) String() string

type CreateDatabaseResponse

type CreateDatabaseResponse struct {

	// A detailed response message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// An enum with value set as "created".
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateDatabaseResponse) Descriptor deprecated

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

Deprecated: Use CreateDatabaseResponse.ProtoReflect.Descriptor instead.

func (*CreateDatabaseResponse) GetMessage

func (x *CreateDatabaseResponse) GetMessage() string

func (*CreateDatabaseResponse) GetStatus

func (x *CreateDatabaseResponse) GetStatus() string

func (*CreateDatabaseResponse) ProtoMessage

func (*CreateDatabaseResponse) ProtoMessage()

func (*CreateDatabaseResponse) ProtoReflect

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

func (*CreateDatabaseResponse) Reset

func (x *CreateDatabaseResponse) Reset()

func (*CreateDatabaseResponse) String

func (x *CreateDatabaseResponse) String() string

type CreateNamespaceRequest

type CreateNamespaceRequest struct {

	// A unique namespace id.
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// A namespace name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateNamespaceRequest) Descriptor deprecated

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

Deprecated: Use CreateNamespaceRequest.ProtoReflect.Descriptor instead.

func (*CreateNamespaceRequest) GetId

func (x *CreateNamespaceRequest) GetId() int32

func (*CreateNamespaceRequest) GetName

func (x *CreateNamespaceRequest) GetName() string

func (*CreateNamespaceRequest) ProtoMessage

func (*CreateNamespaceRequest) ProtoMessage()

func (*CreateNamespaceRequest) ProtoReflect

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

func (*CreateNamespaceRequest) Reset

func (x *CreateNamespaceRequest) Reset()

func (*CreateNamespaceRequest) String

func (x *CreateNamespaceRequest) String() string

type CreateNamespaceResponse

type CreateNamespaceResponse struct {

	// A detailed response message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// An enum with value set as "created".
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateNamespaceResponse) Descriptor deprecated

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

Deprecated: Use CreateNamespaceResponse.ProtoReflect.Descriptor instead.

func (*CreateNamespaceResponse) GetMessage

func (x *CreateNamespaceResponse) GetMessage() string

func (*CreateNamespaceResponse) GetStatus

func (x *CreateNamespaceResponse) GetStatus() string

func (*CreateNamespaceResponse) ProtoMessage

func (*CreateNamespaceResponse) ProtoMessage()

func (*CreateNamespaceResponse) ProtoReflect

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

func (*CreateNamespaceResponse) Reset

func (x *CreateNamespaceResponse) Reset()

func (*CreateNamespaceResponse) String

func (x *CreateNamespaceResponse) String() string

type CreateOrUpdateCollectionRequest

type CreateOrUpdateCollectionRequest struct {

	// Database name where to create collection.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Collection name to create.
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// Schema of the documents in this collection. The schema specifications are same as
	// JSON schema specification defined <a href="https://json-schema.org/specification.html" title="here">here</a>.
	// <p></p>The following is an schema example:
	// `{
	//  "title": "user",
	//  "description": "Collection of documents with details of users",
	//  "properties": {
	//    "id": {
	//      "description": "A unique identifier for the user",
	//      "type": "integer"
	//    },
	//    "name": {
	//      "description": "Name of the user",
	//      "type": "string",
	//      "maxLength": 100
	//    },
	//    "balance": {
	//      "description": "User account balance",
	//      "type": "number"
	//    }
	//  },
	//  "primary_key": ["id"]
	// }`
	Schema []byte `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
	// If set to true then the update schema request to the collection will fail by returning a conflict with HTTP Status
	// code 409. The default is false.
	OnlyCreate bool               `protobuf:"varint,4,opt,name=only_create,json=onlyCreate,proto3" json:"only_create,omitempty"`
	Options    *CollectionOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
	// Type of the collection.
	// <li> DOCUMENTS: Support CRUD APIs.
	// <li> MESSAGES: Supports Pub/Sub APIs.
	Type CollectionType `protobuf:"varint,6,opt,name=type,proto3,enum=tigrisdata.v1.CollectionType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrUpdateCollectionRequest) Descriptor deprecated

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

Deprecated: Use CreateOrUpdateCollectionRequest.ProtoReflect.Descriptor instead.

func (*CreateOrUpdateCollectionRequest) GetCollection

func (x *CreateOrUpdateCollectionRequest) GetCollection() string

func (*CreateOrUpdateCollectionRequest) GetDb

func (*CreateOrUpdateCollectionRequest) GetOnlyCreate

func (x *CreateOrUpdateCollectionRequest) GetOnlyCreate() bool

func (*CreateOrUpdateCollectionRequest) GetOptions

func (*CreateOrUpdateCollectionRequest) GetSchema

func (x *CreateOrUpdateCollectionRequest) GetSchema() []byte

func (*CreateOrUpdateCollectionRequest) GetType

func (*CreateOrUpdateCollectionRequest) ProtoMessage

func (*CreateOrUpdateCollectionRequest) ProtoMessage()

func (*CreateOrUpdateCollectionRequest) ProtoReflect

func (*CreateOrUpdateCollectionRequest) Reset

func (*CreateOrUpdateCollectionRequest) String

func (*CreateOrUpdateCollectionRequest) UnmarshalJSON

func (x *CreateOrUpdateCollectionRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON on CreateCollectionRequest avoids unmarshalling schema. The req handler deserializes the schema.

type CreateOrUpdateCollectionResponse

type CreateOrUpdateCollectionResponse struct {

	// A detailed response message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// An enum with value set as "created" or "updated"
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateOrUpdateCollectionResponse) Descriptor deprecated

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

Deprecated: Use CreateOrUpdateCollectionResponse.ProtoReflect.Descriptor instead.

func (*CreateOrUpdateCollectionResponse) GetMessage

func (x *CreateOrUpdateCollectionResponse) GetMessage() string

func (*CreateOrUpdateCollectionResponse) GetStatus

func (*CreateOrUpdateCollectionResponse) ProtoMessage

func (*CreateOrUpdateCollectionResponse) ProtoMessage()

func (*CreateOrUpdateCollectionResponse) ProtoReflect

func (*CreateOrUpdateCollectionResponse) Reset

func (*CreateOrUpdateCollectionResponse) String

type CustomMarshaler

type CustomMarshaler struct {
	*runtime.JSONBuiltin
}

CustomMarshaler is a marshaler to customize the response. Currently, it is only used to marshal custom error message otherwise it just uses the inbuilt mux marshaller.

func (*CustomMarshaler) Marshal

func (c *CustomMarshaler) Marshal(v interface{}) ([]byte, error)

type DatabaseDescription

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

func (*DatabaseDescription) Descriptor deprecated

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

Deprecated: Use DatabaseDescription.ProtoReflect.Descriptor instead.

func (*DatabaseDescription) ProtoMessage

func (*DatabaseDescription) ProtoMessage()

func (*DatabaseDescription) ProtoReflect

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

func (*DatabaseDescription) Reset

func (x *DatabaseDescription) Reset()

func (*DatabaseDescription) String

func (x *DatabaseDescription) String() string

type DatabaseInfo

type DatabaseInfo struct {

	// Database name.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Metadata about the database.
	Metadata *DatabaseMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*DatabaseInfo) Descriptor deprecated

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

Deprecated: Use DatabaseInfo.ProtoReflect.Descriptor instead.

func (*DatabaseInfo) GetDb

func (x *DatabaseInfo) GetDb() string

func (*DatabaseInfo) GetMetadata

func (x *DatabaseInfo) GetMetadata() *DatabaseMetadata

func (*DatabaseInfo) ProtoMessage

func (*DatabaseInfo) ProtoMessage()

func (*DatabaseInfo) ProtoReflect

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

func (*DatabaseInfo) Reset

func (x *DatabaseInfo) Reset()

func (*DatabaseInfo) String

func (x *DatabaseInfo) String() string

type DatabaseMetadata

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

func (*DatabaseMetadata) Descriptor deprecated

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

Deprecated: Use DatabaseMetadata.ProtoReflect.Descriptor instead.

func (*DatabaseMetadata) ProtoMessage

func (*DatabaseMetadata) ProtoMessage()

func (*DatabaseMetadata) ProtoReflect

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

func (*DatabaseMetadata) Reset

func (x *DatabaseMetadata) Reset()

func (*DatabaseMetadata) String

func (x *DatabaseMetadata) String() string

type DatabaseOptions

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

Database requests modifying options.

func (*DatabaseOptions) Descriptor deprecated

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

Deprecated: Use DatabaseOptions.ProtoReflect.Descriptor instead.

func (*DatabaseOptions) ProtoMessage

func (*DatabaseOptions) ProtoMessage()

func (*DatabaseOptions) ProtoReflect

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

func (*DatabaseOptions) Reset

func (x *DatabaseOptions) Reset()

func (*DatabaseOptions) String

func (x *DatabaseOptions) String() string

type DeleteRequest

type DeleteRequest struct {

	// Database name where to insert documents.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Collection name where to insert documents.
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// Delete documents which matching specified filter.
	// A filter can simply be key, value where key
	// is the field name and value would be the value for this field. Or a filter can be logical where
	// two or more fields can be logically joined using $or and $and. A few examples of filter:
	// <li> To delete a user document where the id has a value 1: “`{"id": 1 }“`
	// <li> To delete all the user documents where the key "id" has a value 1 or 2 or 3: `{"$or": [{"id": 1}, {"id": 2}, {"id": 3}]}`
	Filter  []byte                `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	Options *DeleteRequestOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetCollection

func (x *DeleteRequest) GetCollection() string

func (*DeleteRequest) GetDb

func (x *DeleteRequest) GetDb() string

func (*DeleteRequest) GetFilter

func (x *DeleteRequest) GetFilter() []byte

func (*DeleteRequest) GetOptions

func (x *DeleteRequest) GetOptions() *DeleteRequestOptions

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

func (*DeleteRequest) UnmarshalJSON

func (x *DeleteRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON on DeleteRequest avoids unmarshalling filter and instead this way we can write a custom struct to do the unmarshalling and will be avoiding any extra allocation/copying.

type DeleteRequestOptions

type DeleteRequestOptions struct {
	WriteOptions *WriteOptions `protobuf:"bytes,1,opt,name=write_options,json=writeOptions,proto3" json:"write_options,omitempty"`
	// contains filtered or unexported fields
}

Additional options for deleted requests.

func (*DeleteRequestOptions) Descriptor deprecated

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

Deprecated: Use DeleteRequestOptions.ProtoReflect.Descriptor instead.

func (*DeleteRequestOptions) GetWriteOptions

func (x *DeleteRequestOptions) GetWriteOptions() *WriteOptions

func (*DeleteRequestOptions) ProtoMessage

func (*DeleteRequestOptions) ProtoMessage()

func (*DeleteRequestOptions) ProtoReflect

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

func (*DeleteRequestOptions) Reset

func (x *DeleteRequestOptions) Reset()

func (*DeleteRequestOptions) String

func (x *DeleteRequestOptions) String() string

type DeleteResponse

type DeleteResponse struct {

	// Has metadata related to the documents stored.
	Metadata *ResponseMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// an enum with value set as "deleted"
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetMetadata

func (x *DeleteResponse) GetMetadata() *ResponseMetadata

func (*DeleteResponse) GetStatus

func (x *DeleteResponse) GetStatus() string

func (*DeleteResponse) MarshalJSON

func (x *DeleteResponse) MarshalJSON() ([]byte, error)

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type DescribeCollectionRequest

type DescribeCollectionRequest struct {

	// Name of the database.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Name of the collection.
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// Collection options.
	Options *CollectionOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*DescribeCollectionRequest) Descriptor deprecated

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

Deprecated: Use DescribeCollectionRequest.ProtoReflect.Descriptor instead.

func (*DescribeCollectionRequest) GetCollection

func (x *DescribeCollectionRequest) GetCollection() string

func (*DescribeCollectionRequest) GetDb

func (x *DescribeCollectionRequest) GetDb() string

func (*DescribeCollectionRequest) GetOptions

func (*DescribeCollectionRequest) ProtoMessage

func (*DescribeCollectionRequest) ProtoMessage()

func (*DescribeCollectionRequest) ProtoReflect

func (*DescribeCollectionRequest) Reset

func (x *DescribeCollectionRequest) Reset()

func (*DescribeCollectionRequest) String

func (x *DescribeCollectionRequest) String() string

type DescribeCollectionResponse

type DescribeCollectionResponse struct {

	// Name of the collection.
	Collection string `protobuf:"bytes,1,opt,name=collection,proto3" json:"collection,omitempty"`
	// Metadata about the collection.
	Metadata *CollectionMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Schema of this collection.
	Schema []byte `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
	// The size of this collection in bytes.
	Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

A detailed description of the collection. The description returns collection metadata and the schema.

func (*DescribeCollectionResponse) Descriptor deprecated

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

Deprecated: Use DescribeCollectionResponse.ProtoReflect.Descriptor instead.

func (*DescribeCollectionResponse) GetCollection

func (x *DescribeCollectionResponse) GetCollection() string

func (*DescribeCollectionResponse) GetMetadata

func (*DescribeCollectionResponse) GetSchema

func (x *DescribeCollectionResponse) GetSchema() []byte

func (*DescribeCollectionResponse) GetSize

func (x *DescribeCollectionResponse) GetSize() int64

func (*DescribeCollectionResponse) MarshalJSON

func (x *DescribeCollectionResponse) MarshalJSON() ([]byte, error)

func (*DescribeCollectionResponse) ProtoMessage

func (*DescribeCollectionResponse) ProtoMessage()

func (*DescribeCollectionResponse) ProtoReflect

func (*DescribeCollectionResponse) Reset

func (x *DescribeCollectionResponse) Reset()

func (*DescribeCollectionResponse) String

func (x *DescribeCollectionResponse) String() string

type DescribeDatabaseRequest

type DescribeDatabaseRequest struct {

	// Name of the database.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// contains filtered or unexported fields
}

func (*DescribeDatabaseRequest) Descriptor deprecated

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

Deprecated: Use DescribeDatabaseRequest.ProtoReflect.Descriptor instead.

func (*DescribeDatabaseRequest) GetDb

func (x *DescribeDatabaseRequest) GetDb() string

func (*DescribeDatabaseRequest) ProtoMessage

func (*DescribeDatabaseRequest) ProtoMessage()

func (*DescribeDatabaseRequest) ProtoReflect

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

func (*DescribeDatabaseRequest) Reset

func (x *DescribeDatabaseRequest) Reset()

func (*DescribeDatabaseRequest) String

func (x *DescribeDatabaseRequest) String() string

type DescribeDatabaseResponse

type DescribeDatabaseResponse struct {

	// Name of the database.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Metadata about the database.
	Metadata *DatabaseMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// A detailed description about all the collections.
	// The description returns collection metadata and the schema.
	Collections []*CollectionDescription `protobuf:"bytes,3,rep,name=collections,proto3" json:"collections,omitempty"`
	// Sum of all the collections sizes present in this database
	Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

A detailed description of the database and all the associated collections. Description of the collection includes schema details as well.

func (*DescribeDatabaseResponse) Descriptor deprecated

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

Deprecated: Use DescribeDatabaseResponse.ProtoReflect.Descriptor instead.

func (*DescribeDatabaseResponse) GetCollections

func (x *DescribeDatabaseResponse) GetCollections() []*CollectionDescription

func (*DescribeDatabaseResponse) GetDb

func (x *DescribeDatabaseResponse) GetDb() string

func (*DescribeDatabaseResponse) GetMetadata

func (x *DescribeDatabaseResponse) GetMetadata() *DatabaseMetadata

func (*DescribeDatabaseResponse) GetSize

func (x *DescribeDatabaseResponse) GetSize() int64

func (*DescribeDatabaseResponse) MarshalJSON

func (x *DescribeDatabaseResponse) MarshalJSON() ([]byte, error)

func (*DescribeDatabaseResponse) ProtoMessage

func (*DescribeDatabaseResponse) ProtoMessage()

func (*DescribeDatabaseResponse) ProtoReflect

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

func (*DescribeDatabaseResponse) Reset

func (x *DescribeDatabaseResponse) Reset()

func (*DescribeDatabaseResponse) String

func (x *DescribeDatabaseResponse) String() string

type DropCollectionRequest

type DropCollectionRequest struct {

	// Database name of the collection.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Collection name to drop.
	Collection string             `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	Options    *CollectionOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*DropCollectionRequest) Descriptor deprecated

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

Deprecated: Use DropCollectionRequest.ProtoReflect.Descriptor instead.

func (*DropCollectionRequest) GetCollection

func (x *DropCollectionRequest) GetCollection() string

func (*DropCollectionRequest) GetDb

func (x *DropCollectionRequest) GetDb() string

func (*DropCollectionRequest) GetOptions

func (x *DropCollectionRequest) GetOptions() *CollectionOptions

func (*DropCollectionRequest) ProtoMessage

func (*DropCollectionRequest) ProtoMessage()

func (*DropCollectionRequest) ProtoReflect

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

func (*DropCollectionRequest) Reset

func (x *DropCollectionRequest) Reset()

func (*DropCollectionRequest) String

func (x *DropCollectionRequest) String() string

type DropCollectionResponse

type DropCollectionResponse struct {

	// A detailed response message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// An enum with value set as "dropped".
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DropCollectionResponse) Descriptor deprecated

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

Deprecated: Use DropCollectionResponse.ProtoReflect.Descriptor instead.

func (*DropCollectionResponse) GetMessage

func (x *DropCollectionResponse) GetMessage() string

func (*DropCollectionResponse) GetStatus

func (x *DropCollectionResponse) GetStatus() string

func (*DropCollectionResponse) ProtoMessage

func (*DropCollectionResponse) ProtoMessage()

func (*DropCollectionResponse) ProtoReflect

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

func (*DropCollectionResponse) Reset

func (x *DropCollectionResponse) Reset()

func (*DropCollectionResponse) String

func (x *DropCollectionResponse) String() string

type DropDatabaseRequest

type DropDatabaseRequest struct {

	// Drop database with this name. **Note**: Deletes all the collections in the database.
	// Use with caution.
	Db      string           `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	Options *DatabaseOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*DropDatabaseRequest) Descriptor deprecated

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

Deprecated: Use DropDatabaseRequest.ProtoReflect.Descriptor instead.

func (*DropDatabaseRequest) GetDb

func (x *DropDatabaseRequest) GetDb() string

func (*DropDatabaseRequest) GetOptions

func (x *DropDatabaseRequest) GetOptions() *DatabaseOptions

func (*DropDatabaseRequest) ProtoMessage

func (*DropDatabaseRequest) ProtoMessage()

func (*DropDatabaseRequest) ProtoReflect

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

func (*DropDatabaseRequest) Reset

func (x *DropDatabaseRequest) Reset()

func (*DropDatabaseRequest) String

func (x *DropDatabaseRequest) String() string

type DropDatabaseResponse

type DropDatabaseResponse struct {

	// A detailed response message.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// An enum with value set as "dropped".
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DropDatabaseResponse) Descriptor deprecated

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

Deprecated: Use DropDatabaseResponse.ProtoReflect.Descriptor instead.

func (*DropDatabaseResponse) GetMessage

func (x *DropDatabaseResponse) GetMessage() string

func (*DropDatabaseResponse) GetStatus

func (x *DropDatabaseResponse) GetStatus() string

func (*DropDatabaseResponse) ProtoMessage

func (*DropDatabaseResponse) ProtoMessage()

func (*DropDatabaseResponse) ProtoReflect

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

func (*DropDatabaseResponse) Reset

func (x *DropDatabaseResponse) Reset()

func (*DropDatabaseResponse) String

func (x *DropDatabaseResponse) String() string

type Error

type Error struct {

	// The status code is a short, machine parsable string,
	// which uniquely identifies the error type.
	// Tigris to HTTP code mapping [here](/reference/http-code)
	Code Code `protobuf:"varint,1,opt,name=code,proto3,enum=tigrisdata.v1.Code" json:"code,omitempty"`
	// A developer-facing descriptive error message
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

The Error type defines a logical error model

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() Code

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type ErrorDetails

type ErrorDetails struct {
	Code    string     `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string     `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Retry   *RetryInfo `protobuf:"bytes,3,opt,name=retry,proto3" json:"retry,omitempty"`
	// contains filtered or unexported fields
}

ErrorDetails defines error format passed by Tigris HTTP protocol

func (*ErrorDetails) Descriptor deprecated

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

Deprecated: Use ErrorDetails.ProtoReflect.Descriptor instead.

func (*ErrorDetails) GetCode

func (x *ErrorDetails) GetCode() string

func (*ErrorDetails) GetMessage

func (x *ErrorDetails) GetMessage() string

func (*ErrorDetails) GetRetry

func (x *ErrorDetails) GetRetry() *RetryInfo

func (*ErrorDetails) ProtoMessage

func (*ErrorDetails) ProtoMessage()

func (*ErrorDetails) ProtoReflect

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

func (*ErrorDetails) Reset

func (x *ErrorDetails) Reset()

func (*ErrorDetails) String

func (x *ErrorDetails) String() string

type EventsRequest

type EventsRequest struct {
	Db         string                `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	Collection string                `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	Options    *EventsRequestOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsRequest) Descriptor deprecated

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

Deprecated: Use EventsRequest.ProtoReflect.Descriptor instead.

func (*EventsRequest) GetCollection

func (x *EventsRequest) GetCollection() string

func (*EventsRequest) GetDb

func (x *EventsRequest) GetDb() string

func (*EventsRequest) GetOptions

func (x *EventsRequest) GetOptions() *EventsRequestOptions

func (*EventsRequest) ProtoMessage

func (*EventsRequest) ProtoMessage()

func (*EventsRequest) ProtoReflect

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

func (*EventsRequest) Reset

func (x *EventsRequest) Reset()

func (*EventsRequest) String

func (x *EventsRequest) String() string

type EventsRequestOptions

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

func (*EventsRequestOptions) Descriptor deprecated

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

Deprecated: Use EventsRequestOptions.ProtoReflect.Descriptor instead.

func (*EventsRequestOptions) ProtoMessage

func (*EventsRequestOptions) ProtoMessage()

func (*EventsRequestOptions) ProtoReflect

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

func (*EventsRequestOptions) Reset

func (x *EventsRequestOptions) Reset()

func (*EventsRequestOptions) String

func (x *EventsRequestOptions) String() string

type EventsResponse

type EventsResponse struct {
	Event *StreamEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsResponse) Descriptor deprecated

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

Deprecated: Use EventsResponse.ProtoReflect.Descriptor instead.

func (*EventsResponse) GetEvent

func (x *EventsResponse) GetEvent() *StreamEvent

func (*EventsResponse) MarshalJSON

func (x *EventsResponse) MarshalJSON() ([]byte, error)

func (*EventsResponse) ProtoMessage

func (*EventsResponse) ProtoMessage()

func (*EventsResponse) ProtoReflect

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

func (*EventsResponse) Reset

func (x *EventsResponse) Reset()

func (*EventsResponse) String

func (x *EventsResponse) String() string

type FacetCount

type FacetCount struct {
	Count int64  `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*FacetCount) Descriptor deprecated

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

Deprecated: Use FacetCount.ProtoReflect.Descriptor instead.

func (*FacetCount) GetCount

func (x *FacetCount) GetCount() int64

func (*FacetCount) GetValue

func (x *FacetCount) GetValue() string

func (*FacetCount) ProtoMessage

func (*FacetCount) ProtoMessage()

func (*FacetCount) ProtoReflect

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

func (*FacetCount) Reset

func (x *FacetCount) Reset()

func (*FacetCount) String

func (x *FacetCount) String() string

type FacetStats

type FacetStats struct {

	// Average of all values in a field. Only available for numeric fields
	Avg *float64 `protobuf:"fixed64,1,opt,name=avg,proto3,oneof" json:"avg,omitempty"`
	// Maximum of all values in a field. Only available for numeric fields
	Max *float64 `protobuf:"fixed64,2,opt,name=max,proto3,oneof" json:"max,omitempty"`
	// Minimum of all values in a field. Only available for numeric fields
	Min *float64 `protobuf:"fixed64,3,opt,name=min,proto3,oneof" json:"min,omitempty"`
	// Sum of all values in a field. Only available for numeric fields
	Sum *float64 `protobuf:"fixed64,4,opt,name=sum,proto3,oneof" json:"sum,omitempty"`
	// Total number of values in a field
	Count int64 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

Additional stats for faceted field

func (*FacetStats) Descriptor deprecated

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

Deprecated: Use FacetStats.ProtoReflect.Descriptor instead.

func (*FacetStats) GetAvg

func (x *FacetStats) GetAvg() float64

func (*FacetStats) GetCount

func (x *FacetStats) GetCount() int64

func (*FacetStats) GetMax

func (x *FacetStats) GetMax() float64

func (*FacetStats) GetMin

func (x *FacetStats) GetMin() float64

func (*FacetStats) GetSum

func (x *FacetStats) GetSum() float64

func (*FacetStats) MarshalJSON

func (x *FacetStats) MarshalJSON() ([]byte, error)

func (*FacetStats) ProtoMessage

func (*FacetStats) ProtoMessage()

func (*FacetStats) ProtoReflect

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

func (*FacetStats) Reset

func (x *FacetStats) Reset()

func (*FacetStats) String

func (x *FacetStats) String() string

type GetAccessTokenRequest

type GetAccessTokenRequest struct {

	// A valid refresh token.
	RefreshToken string `protobuf:"bytes,1,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccessTokenRequest) Descriptor deprecated

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

Deprecated: Use GetAccessTokenRequest.ProtoReflect.Descriptor instead.

func (*GetAccessTokenRequest) GetRefreshToken

func (x *GetAccessTokenRequest) GetRefreshToken() string

func (*GetAccessTokenRequest) ProtoMessage

func (*GetAccessTokenRequest) ProtoMessage()

func (*GetAccessTokenRequest) ProtoReflect

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

func (*GetAccessTokenRequest) Reset

func (x *GetAccessTokenRequest) Reset()

func (*GetAccessTokenRequest) String

func (x *GetAccessTokenRequest) String() string

type GetAccessTokenResponse

type GetAccessTokenResponse struct {

	// An access token.
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// Refresh token.
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAccessTokenResponse) Descriptor deprecated

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

Deprecated: Use GetAccessTokenResponse.ProtoReflect.Descriptor instead.

func (*GetAccessTokenResponse) GetAccessToken

func (x *GetAccessTokenResponse) GetAccessToken() string

func (*GetAccessTokenResponse) GetRefreshToken

func (x *GetAccessTokenResponse) GetRefreshToken() string

func (*GetAccessTokenResponse) ProtoMessage

func (*GetAccessTokenResponse) ProtoMessage()

func (*GetAccessTokenResponse) ProtoReflect

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

func (*GetAccessTokenResponse) Reset

func (x *GetAccessTokenResponse) Reset()

func (*GetAccessTokenResponse) String

func (x *GetAccessTokenResponse) String() string

type GetInfoRequest

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

func (*GetInfoRequest) Descriptor deprecated

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

Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.

func (*GetInfoRequest) ProtoMessage

func (*GetInfoRequest) ProtoMessage()

func (*GetInfoRequest) ProtoReflect

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

func (*GetInfoRequest) Reset

func (x *GetInfoRequest) Reset()

func (*GetInfoRequest) String

func (x *GetInfoRequest) String() string

type GetInfoResponse

type GetInfoResponse struct {
	ServerVersion string `protobuf:"bytes,1,opt,name=server_version,json=serverVersion,proto3" json:"server_version,omitempty"`
	// NOTE: This is a hack to propagate this object definition to OpenAPI
	Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInfoResponse) Descriptor deprecated

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

Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.

func (*GetInfoResponse) GetError

func (x *GetInfoResponse) GetError() *Error

func (*GetInfoResponse) GetServerVersion

func (x *GetInfoResponse) GetServerVersion() string

func (*GetInfoResponse) ProtoMessage

func (*GetInfoResponse) ProtoMessage()

func (*GetInfoResponse) ProtoReflect

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

func (*GetInfoResponse) Reset

func (x *GetInfoResponse) Reset()

func (*GetInfoResponse) String

func (x *GetInfoResponse) String() string

type HealthAPIClient

type HealthAPIClient interface {
	Health(ctx context.Context, in *HealthCheckInput, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}

HealthAPIClient is the client API for HealthAPI 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 NewHealthAPIClient

func NewHealthAPIClient(cc grpc.ClientConnInterface) HealthAPIClient

type HealthAPIServer

type HealthAPIServer interface {
	Health(context.Context, *HealthCheckInput) (*HealthCheckResponse, error)
}

HealthAPIServer is the server API for HealthAPI service. All implementations should embed UnimplementedHealthAPIServer for forward compatibility

type HealthCheckInput

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

func (*HealthCheckInput) Descriptor deprecated

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

Deprecated: Use HealthCheckInput.ProtoReflect.Descriptor instead.

func (*HealthCheckInput) ProtoMessage

func (*HealthCheckInput) ProtoMessage()

func (*HealthCheckInput) ProtoReflect

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

func (*HealthCheckInput) Reset

func (x *HealthCheckInput) Reset()

func (*HealthCheckInput) String

func (x *HealthCheckInput) String() string

type HealthCheckResponse

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

func (*HealthCheckResponse) Descriptor deprecated

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

Deprecated: Use HealthCheckResponse.ProtoReflect.Descriptor instead.

func (*HealthCheckResponse) GetResponse

func (x *HealthCheckResponse) GetResponse() string

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) ProtoReflect

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

func (*HealthCheckResponse) Reset

func (x *HealthCheckResponse) Reset()

func (*HealthCheckResponse) String

func (x *HealthCheckResponse) String() string

type InsertRequest

type InsertRequest struct {

	// Database name where to insert documents.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Collection name where to insert documents.
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// Array of documents to insert. Each document is a JSON object.
	Documents [][]byte              `protobuf:"bytes,3,rep,name=documents,proto3" json:"documents,omitempty"`
	Options   *InsertRequestOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*InsertRequest) Descriptor deprecated

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

Deprecated: Use InsertRequest.ProtoReflect.Descriptor instead.

func (*InsertRequest) GetCollection

func (x *InsertRequest) GetCollection() string

func (*InsertRequest) GetDb

func (x *InsertRequest) GetDb() string

func (*InsertRequest) GetDocuments

func (x *InsertRequest) GetDocuments() [][]byte

func (*InsertRequest) GetOptions

func (x *InsertRequest) GetOptions() *InsertRequestOptions

func (*InsertRequest) ProtoMessage

func (*InsertRequest) ProtoMessage()

func (*InsertRequest) ProtoReflect

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

func (*InsertRequest) Reset

func (x *InsertRequest) Reset()

func (*InsertRequest) String

func (x *InsertRequest) String() string

func (*InsertRequest) UnmarshalJSON

func (x *InsertRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON on InsertRequest avoids unmarshalling user document. We only need to extract primary/index keys from the document and want to store the document as-is in the database. This way there is no extra cost of serialization/deserialization and also less error-prone because we are not touching the user document. The req handler needs to extract out the relevant keys from the user docs and should pass it as-is to the underlying engine.

type InsertRequestOptions

type InsertRequestOptions struct {
	WriteOptions *WriteOptions `protobuf:"bytes,1,opt,name=write_options,json=writeOptions,proto3" json:"write_options,omitempty"`
	// contains filtered or unexported fields
}

additional options for insert requests.

func (*InsertRequestOptions) Descriptor deprecated

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

Deprecated: Use InsertRequestOptions.ProtoReflect.Descriptor instead.

func (*InsertRequestOptions) GetWriteOptions

func (x *InsertRequestOptions) GetWriteOptions() *WriteOptions

func (*InsertRequestOptions) ProtoMessage

func (*InsertRequestOptions) ProtoMessage()

func (*InsertRequestOptions) ProtoReflect

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

func (*InsertRequestOptions) Reset

func (x *InsertRequestOptions) Reset()

func (*InsertRequestOptions) String

func (x *InsertRequestOptions) String() string

type InsertResponse

type InsertResponse struct {

	// Has metadata related to the documents stored.
	Metadata *ResponseMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// An enum with value set as "inserted"
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// an array returns the value of the primary keys.
	Keys [][]byte `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*InsertResponse) Descriptor deprecated

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

Deprecated: Use InsertResponse.ProtoReflect.Descriptor instead.

func (*InsertResponse) GetKeys

func (x *InsertResponse) GetKeys() [][]byte

func (*InsertResponse) GetMetadata

func (x *InsertResponse) GetMetadata() *ResponseMetadata

func (*InsertResponse) GetStatus

func (x *InsertResponse) GetStatus() string

func (*InsertResponse) MarshalJSON

func (x *InsertResponse) MarshalJSON() ([]byte, error)

func (*InsertResponse) ProtoMessage

func (*InsertResponse) ProtoMessage()

func (*InsertResponse) ProtoReflect

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

func (*InsertResponse) Reset

func (x *InsertResponse) Reset()

func (*InsertResponse) String

func (x *InsertResponse) String() string

type ListCollectionsRequest

type ListCollectionsRequest struct {

	// List collection in this database.
	Db      string             `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	Options *CollectionOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCollectionsRequest) Descriptor deprecated

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

Deprecated: Use ListCollectionsRequest.ProtoReflect.Descriptor instead.

func (*ListCollectionsRequest) GetDb

func (x *ListCollectionsRequest) GetDb() string

func (*ListCollectionsRequest) GetOptions

func (x *ListCollectionsRequest) GetOptions() *CollectionOptions

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 {

	// Name of the database.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// List of the collections info in the database.
	Collections []*CollectionInfo `protobuf:"bytes,2,rep,name=collections,proto3" json:"collections,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCollectionsResponse) Descriptor deprecated

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

Deprecated: Use ListCollectionsResponse.ProtoReflect.Descriptor instead.

func (*ListCollectionsResponse) GetCollections

func (x *ListCollectionsResponse) GetCollections() []*CollectionInfo

func (*ListCollectionsResponse) GetDb

func (x *ListCollectionsResponse) GetDb() string

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 ListDatabasesRequest

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

func (*ListDatabasesRequest) Descriptor deprecated

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

Deprecated: Use ListDatabasesRequest.ProtoReflect.Descriptor instead.

func (*ListDatabasesRequest) ProtoMessage

func (*ListDatabasesRequest) ProtoMessage()

func (*ListDatabasesRequest) ProtoReflect

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

func (*ListDatabasesRequest) Reset

func (x *ListDatabasesRequest) Reset()

func (*ListDatabasesRequest) String

func (x *ListDatabasesRequest) String() string

type ListDatabasesResponse

type ListDatabasesResponse struct {

	// List of the databases.
	Databases []*DatabaseInfo `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDatabasesResponse) Descriptor deprecated

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

Deprecated: Use ListDatabasesResponse.ProtoReflect.Descriptor instead.

func (*ListDatabasesResponse) GetDatabases

func (x *ListDatabasesResponse) GetDatabases() []*DatabaseInfo

func (*ListDatabasesResponse) ProtoMessage

func (*ListDatabasesResponse) ProtoMessage()

func (*ListDatabasesResponse) ProtoReflect

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

func (*ListDatabasesResponse) Reset

func (x *ListDatabasesResponse) Reset()

func (*ListDatabasesResponse) String

func (x *ListDatabasesResponse) String() string

type ListNamespacesRequest

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

func (*ListNamespacesRequest) Descriptor deprecated

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

Deprecated: Use ListNamespacesRequest.ProtoReflect.Descriptor instead.

func (*ListNamespacesRequest) ProtoMessage

func (*ListNamespacesRequest) ProtoMessage()

func (*ListNamespacesRequest) ProtoReflect

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

func (*ListNamespacesRequest) Reset

func (x *ListNamespacesRequest) Reset()

func (*ListNamespacesRequest) String

func (x *ListNamespacesRequest) String() string

type ListNamespacesResponse

type ListNamespacesResponse struct {
	Namespaces []*NamespaceInfo `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"`
	// contains filtered or unexported fields
}

func (*ListNamespacesResponse) Descriptor deprecated

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

Deprecated: Use ListNamespacesResponse.ProtoReflect.Descriptor instead.

func (*ListNamespacesResponse) GetNamespaces

func (x *ListNamespacesResponse) GetNamespaces() []*NamespaceInfo

func (*ListNamespacesResponse) ProtoMessage

func (*ListNamespacesResponse) ProtoMessage()

func (*ListNamespacesResponse) ProtoReflect

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

func (*ListNamespacesResponse) Reset

func (x *ListNamespacesResponse) Reset()

func (*ListNamespacesResponse) String

func (x *ListNamespacesResponse) String() string

type Metadata

type Metadata struct {
	CreatedAt *time.Time `json:"created_at,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
}

func CreateMDFromResponseMD

func CreateMDFromResponseMD(x *ResponseMetadata) Metadata

type NamespaceInfo

type NamespaceInfo struct {

	// A unique namespace id.
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// A namespace name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*NamespaceInfo) Descriptor deprecated

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

Deprecated: Use NamespaceInfo.ProtoReflect.Descriptor instead.

func (*NamespaceInfo) GetId

func (x *NamespaceInfo) GetId() int32

func (*NamespaceInfo) GetName

func (x *NamespaceInfo) GetName() string

func (*NamespaceInfo) ProtoMessage

func (*NamespaceInfo) ProtoMessage()

func (*NamespaceInfo) ProtoReflect

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

func (*NamespaceInfo) Reset

func (x *NamespaceInfo) Reset()

func (*NamespaceInfo) String

func (x *NamespaceInfo) String() string

type Page

type Page struct {

	// Number representing the current page of results
	Current int32 `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"`
	// Maximum number of results per page
	Size int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

Pagination metadata for SearchResponse

func (*Page) Descriptor deprecated

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

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetCurrent

func (x *Page) GetCurrent() int32

func (*Page) GetSize

func (x *Page) GetSize() int32

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) ProtoReflect

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

func (*Page) Reset

func (x *Page) Reset()

func (*Page) String

func (x *Page) String() string

type PublishRequest

type PublishRequest struct {
	Db         string                 `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	Collection string                 `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	Messages   [][]byte               `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"`
	Options    *PublishRequestOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*PublishRequest) Descriptor deprecated

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

Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.

func (*PublishRequest) GetCollection

func (x *PublishRequest) GetCollection() string

func (*PublishRequest) GetDb

func (x *PublishRequest) GetDb() string

func (*PublishRequest) GetMessages

func (x *PublishRequest) GetMessages() [][]byte

func (*PublishRequest) GetOptions

func (x *PublishRequest) GetOptions() *PublishRequestOptions

func (*PublishRequest) ProtoMessage

func (*PublishRequest) ProtoMessage()

func (*PublishRequest) ProtoReflect

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

func (*PublishRequest) Reset

func (x *PublishRequest) Reset()

func (*PublishRequest) String

func (x *PublishRequest) String() string

type PublishRequestOptions

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

func (*PublishRequestOptions) Descriptor deprecated

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

Deprecated: Use PublishRequestOptions.ProtoReflect.Descriptor instead.

func (*PublishRequestOptions) ProtoMessage

func (*PublishRequestOptions) ProtoMessage()

func (*PublishRequestOptions) ProtoReflect

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

func (*PublishRequestOptions) Reset

func (x *PublishRequestOptions) Reset()

func (*PublishRequestOptions) String

func (x *PublishRequestOptions) String() string

type PublishResponse

type PublishResponse struct {
	Metadata *ResponseMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Status   string            `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	Keys     [][]byte          `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*PublishResponse) Descriptor deprecated

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

Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.

func (*PublishResponse) GetKeys

func (x *PublishResponse) GetKeys() [][]byte

func (*PublishResponse) GetMetadata

func (x *PublishResponse) GetMetadata() *ResponseMetadata

func (*PublishResponse) GetStatus

func (x *PublishResponse) GetStatus() string

func (*PublishResponse) ProtoMessage

func (*PublishResponse) ProtoMessage()

func (*PublishResponse) ProtoReflect

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

func (*PublishResponse) Reset

func (x *PublishResponse) Reset()

func (*PublishResponse) String

func (x *PublishResponse) String() string

type ReadRequest

type ReadRequest struct {

	// Database name to read documents from.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Collection name to read documents from.
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// Returns documents matching this filter. A filter can simply be a key, value pair where a key is the field name and the value would be the value for this field.
	// Tigris also allows complex filtering by passing logical expressions. Logical filters are applied on two or more fields using `$or` and `$and`.
	// A few examples of filters:
	// <li> To read a user document where the id has a value 1: “`{"id": 1 }“`
	// <li> To read all the user documents where the key "id" has a value 1 or 2 or 3: `{"$or": [{"id": 1}, {"id": 2}, {"id": 3}]}`
	// The detailed documentation of the filter is <a href="https://docs.tigrisdata.com/overview/query#specification-1" title="here">here</a>.
	Filter []byte `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// To read specific fields from a document. Default is all.
	Fields []byte `protobuf:"bytes,4,opt,name=fields,proto3" json:"fields,omitempty"`
	// Options that can be used to modify the results, for example `limit` to control the number of documents
	// returned by the server.
	Options *ReadRequestOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetCollection

func (x *ReadRequest) GetCollection() string

func (*ReadRequest) GetDb

func (x *ReadRequest) GetDb() string

func (*ReadRequest) GetFields

func (x *ReadRequest) GetFields() []byte

func (*ReadRequest) GetFilter

func (x *ReadRequest) GetFilter() []byte

func (*ReadRequest) GetOptions

func (x *ReadRequest) GetOptions() *ReadRequestOptions

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

func (*ReadRequest) UnmarshalJSON

func (x *ReadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON on ReadRequest avoids unmarshalling filter and instead this way we can write a custom struct to do the unmarshalling and will be avoiding any extra allocation/copying.

type ReadRequestOptions

type ReadRequestOptions struct {

	// Limit the number of documents returned by the read operation.
	Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// Number of documents to skip before starting to return resulting documents.
	Skip int64 `protobuf:"varint,3,opt,name=skip,proto3" json:"skip,omitempty"`
	// A cursor for use in pagination. The next streams will return documents after this offset.
	Offset []byte `protobuf:"bytes,4,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

Options that can be used to modify the results, for example "limit" to control the number of documents returned by the server.

func (*ReadRequestOptions) Descriptor deprecated

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

Deprecated: Use ReadRequestOptions.ProtoReflect.Descriptor instead.

func (*ReadRequestOptions) GetLimit

func (x *ReadRequestOptions) GetLimit() int64

func (*ReadRequestOptions) GetOffset

func (x *ReadRequestOptions) GetOffset() []byte

func (*ReadRequestOptions) GetSkip

func (x *ReadRequestOptions) GetSkip() int64

func (*ReadRequestOptions) ProtoMessage

func (*ReadRequestOptions) ProtoMessage()

func (*ReadRequestOptions) ProtoReflect

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

func (*ReadRequestOptions) Reset

func (x *ReadRequestOptions) Reset()

func (*ReadRequestOptions) String

func (x *ReadRequestOptions) String() string

type ReadResponse

type ReadResponse struct {

	// Object containing the collection document.
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// An internal key, used for pagination.
	ResumeToken []byte `protobuf:"bytes,2,opt,name=resume_token,json=resumeToken,proto3" json:"resume_token,omitempty"`
	// Has metadata related to the documents stored.
	Metadata *ResponseMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetData

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

func (*ReadResponse) GetMetadata

func (x *ReadResponse) GetMetadata() *ResponseMetadata

func (*ReadResponse) GetResumeToken

func (x *ReadResponse) GetResumeToken() []byte

func (*ReadResponse) MarshalJSON

func (x *ReadResponse) MarshalJSON() ([]byte, error)

MarshalJSON on read response avoid any encoding/decoding on x.Data. With this approach we are not doing any extra marshaling/unmarshalling in returning the data from the database. The document returned from the database is stored in x.Data and will return as-is.

Note: This also means any changes in ReadResponse proto needs to make sure that we add that here and similarly the openAPI specs needs to be specified Data as object instead of bytes.

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

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

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type ReplaceRequest

type ReplaceRequest struct {

	// Database name where to replace documents.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Collection name where to replace documents.
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// Array of documents to be replaced. Each document is a JSON object.
	Documents [][]byte               `protobuf:"bytes,3,rep,name=documents,proto3" json:"documents,omitempty"`
	Options   *ReplaceRequestOptions `protobuf:"bytes,4,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplaceRequest) Descriptor deprecated

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

Deprecated: Use ReplaceRequest.ProtoReflect.Descriptor instead.

func (*ReplaceRequest) GetCollection

func (x *ReplaceRequest) GetCollection() string

func (*ReplaceRequest) GetDb

func (x *ReplaceRequest) GetDb() string

func (*ReplaceRequest) GetDocuments

func (x *ReplaceRequest) GetDocuments() [][]byte

func (*ReplaceRequest) GetOptions

func (x *ReplaceRequest) GetOptions() *ReplaceRequestOptions

func (*ReplaceRequest) ProtoMessage

func (*ReplaceRequest) ProtoMessage()

func (*ReplaceRequest) ProtoReflect

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

func (*ReplaceRequest) Reset

func (x *ReplaceRequest) Reset()

func (*ReplaceRequest) String

func (x *ReplaceRequest) String() string

func (*ReplaceRequest) UnmarshalJSON

func (x *ReplaceRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON on ReplaceRequest avoids unmarshalling user document. We only need to extract primary/index keys from the document and want to store the document as-is in the database. This way there is no extra cost of serialization/deserialization and also less error-prone because we are not touching the user document. The req handler needs to extract out the relevant keys from the user docs and should pass it as-is to the underlying engine.

type ReplaceRequestOptions

type ReplaceRequestOptions struct {
	WriteOptions *WriteOptions `protobuf:"bytes,1,opt,name=write_options,json=writeOptions,proto3" json:"write_options,omitempty"`
	// contains filtered or unexported fields
}

Additional options for replace requests.

func (*ReplaceRequestOptions) Descriptor deprecated

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

Deprecated: Use ReplaceRequestOptions.ProtoReflect.Descriptor instead.

func (*ReplaceRequestOptions) GetWriteOptions

func (x *ReplaceRequestOptions) GetWriteOptions() *WriteOptions

func (*ReplaceRequestOptions) ProtoMessage

func (*ReplaceRequestOptions) ProtoMessage()

func (*ReplaceRequestOptions) ProtoReflect

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

func (*ReplaceRequestOptions) Reset

func (x *ReplaceRequestOptions) Reset()

func (*ReplaceRequestOptions) String

func (x *ReplaceRequestOptions) String() string

type ReplaceResponse

type ReplaceResponse struct {

	// Has metadata related to the documents stored.
	Metadata *ResponseMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// an enum with value set as "replaced"
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// an array returns the value of the primary keys.
	Keys [][]byte `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*ReplaceResponse) Descriptor deprecated

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

Deprecated: Use ReplaceResponse.ProtoReflect.Descriptor instead.

func (*ReplaceResponse) GetKeys

func (x *ReplaceResponse) GetKeys() [][]byte

func (*ReplaceResponse) GetMetadata

func (x *ReplaceResponse) GetMetadata() *ResponseMetadata

func (*ReplaceResponse) GetStatus

func (x *ReplaceResponse) GetStatus() string

func (*ReplaceResponse) MarshalJSON

func (x *ReplaceResponse) MarshalJSON() ([]byte, error)

func (*ReplaceResponse) ProtoMessage

func (*ReplaceResponse) ProtoMessage()

func (*ReplaceResponse) ProtoReflect

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

func (*ReplaceResponse) Reset

func (x *ReplaceResponse) Reset()

func (*ReplaceResponse) String

func (x *ReplaceResponse) String() string

type ResponseMetadata

type ResponseMetadata struct {

	// Time at which the document was inserted/replaced. Measured in nano-seconds since the Unix epoch.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Time at which the document was updated. Measured in nano-seconds since the Unix epoch.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// Time at which the document was deleted. Measured in nano-seconds since the Unix epoch.
	DeletedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"`
	// contains filtered or unexported fields
}

Has metadata related to the documents stored.

func (*ResponseMetadata) Descriptor deprecated

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

Deprecated: Use ResponseMetadata.ProtoReflect.Descriptor instead.

func (*ResponseMetadata) GetCreatedAt

func (x *ResponseMetadata) GetCreatedAt() *timestamppb.Timestamp

func (*ResponseMetadata) GetDeletedAt

func (x *ResponseMetadata) GetDeletedAt() *timestamppb.Timestamp

func (*ResponseMetadata) GetUpdatedAt

func (x *ResponseMetadata) GetUpdatedAt() *timestamppb.Timestamp

func (*ResponseMetadata) ProtoMessage

func (*ResponseMetadata) ProtoMessage()

func (*ResponseMetadata) ProtoReflect

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

func (*ResponseMetadata) Reset

func (x *ResponseMetadata) Reset()

func (*ResponseMetadata) String

func (x *ResponseMetadata) String() string

type RetryInfo

type RetryInfo struct {

	// retry delay advice in milliseconds
	Delay int32 `protobuf:"varint,3,opt,name=delay,proto3" json:"delay,omitempty"`
	// contains filtered or unexported fields
}

Contains retry information

func (*RetryInfo) Descriptor deprecated

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

Deprecated: Use RetryInfo.ProtoReflect.Descriptor instead.

func (*RetryInfo) GetDelay

func (x *RetryInfo) GetDelay() int32

func (*RetryInfo) ProtoMessage

func (*RetryInfo) ProtoMessage()

func (*RetryInfo) ProtoReflect

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

func (*RetryInfo) Reset

func (x *RetryInfo) Reset()

func (*RetryInfo) String

func (x *RetryInfo) String() string

type RollbackTransactionRequest

type RollbackTransactionRequest struct {

	// Database name this transaction belongs to.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// contains filtered or unexported fields
}

Rollback transaction with the given ID

func (*RollbackTransactionRequest) Descriptor deprecated

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

Deprecated: Use RollbackTransactionRequest.ProtoReflect.Descriptor instead.

func (*RollbackTransactionRequest) GetDb

func (*RollbackTransactionRequest) ProtoMessage

func (*RollbackTransactionRequest) ProtoMessage()

func (*RollbackTransactionRequest) ProtoReflect

func (*RollbackTransactionRequest) Reset

func (x *RollbackTransactionRequest) Reset()

func (*RollbackTransactionRequest) String

func (x *RollbackTransactionRequest) String() string

type RollbackTransactionResponse

type RollbackTransactionResponse struct {

	// Status of rollback transaction operation.
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*RollbackTransactionResponse) Descriptor deprecated

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

Deprecated: Use RollbackTransactionResponse.ProtoReflect.Descriptor instead.

func (*RollbackTransactionResponse) GetStatus

func (x *RollbackTransactionResponse) GetStatus() string

func (*RollbackTransactionResponse) ProtoMessage

func (*RollbackTransactionResponse) ProtoMessage()

func (*RollbackTransactionResponse) ProtoReflect

func (*RollbackTransactionResponse) Reset

func (x *RollbackTransactionResponse) Reset()

func (*RollbackTransactionResponse) String

func (x *RollbackTransactionResponse) String() string

type SearchFacet

type SearchFacet struct {
	Counts []*FacetCount `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts,omitempty"`
	Stats  *FacetStats   `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchFacet) Descriptor deprecated

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

Deprecated: Use SearchFacet.ProtoReflect.Descriptor instead.

func (*SearchFacet) GetCounts

func (x *SearchFacet) GetCounts() []*FacetCount

func (*SearchFacet) GetStats

func (x *SearchFacet) GetStats() *FacetStats

func (*SearchFacet) MarshalJSON

func (x *SearchFacet) MarshalJSON() ([]byte, error)

func (*SearchFacet) ProtoMessage

func (*SearchFacet) ProtoMessage()

func (*SearchFacet) ProtoReflect

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

func (*SearchFacet) Reset

func (x *SearchFacet) Reset()

func (*SearchFacet) String

func (x *SearchFacet) String() string

type SearchHit

type SearchHit struct {

	// Actual search document
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// Has metadata related to the search hit
	Metadata *SearchHitMeta `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchHit) Descriptor deprecated

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

Deprecated: Use SearchHit.ProtoReflect.Descriptor instead.

func (*SearchHit) GetData

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

func (*SearchHit) GetMetadata

func (x *SearchHit) GetMetadata() *SearchHitMeta

func (*SearchHit) MarshalJSON

func (x *SearchHit) MarshalJSON() ([]byte, error)

func (*SearchHit) ProtoMessage

func (*SearchHit) ProtoMessage()

func (*SearchHit) ProtoReflect

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

func (*SearchHit) Reset

func (x *SearchHit) Reset()

func (*SearchHit) String

func (x *SearchHit) String() string

type SearchHitMeta

type SearchHitMeta struct {

	// Time at which the document was inserted/replaced. Measured in nano-seconds since the Unix epoch.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Time at which the document was updated. Measured in nano-seconds since the Unix epoch.
	UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

Contains metadata related to the search hit, has information about document created_at/updated_at as well.

func (*SearchHitMeta) Descriptor deprecated

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

Deprecated: Use SearchHitMeta.ProtoReflect.Descriptor instead.

func (*SearchHitMeta) GetCreatedAt

func (x *SearchHitMeta) GetCreatedAt() *timestamppb.Timestamp

func (*SearchHitMeta) GetUpdatedAt

func (x *SearchHitMeta) GetUpdatedAt() *timestamppb.Timestamp

func (*SearchHitMeta) ProtoMessage

func (*SearchHitMeta) ProtoMessage()

func (*SearchHitMeta) ProtoReflect

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

func (*SearchHitMeta) Reset

func (x *SearchHitMeta) Reset()

func (*SearchHitMeta) String

func (x *SearchHitMeta) String() string

type SearchHitMetadata

type SearchHitMetadata struct {
	CreatedAt *time.Time `json:"created_at,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

func CreateMDFromSearchMD

func CreateMDFromSearchMD(x *SearchHitMeta) SearchHitMetadata

type SearchMetadata

type SearchMetadata struct {

	// Total number of search results across all pages
	Found int64 `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"`
	// Number representing the total pages of results
	TotalPages int32 `protobuf:"varint,2,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	Page       *Page `protobuf:"bytes,3,opt,name=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchMetadata) Descriptor deprecated

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

Deprecated: Use SearchMetadata.ProtoReflect.Descriptor instead.

func (*SearchMetadata) GetFound

func (x *SearchMetadata) GetFound() int64

func (*SearchMetadata) GetPage

func (x *SearchMetadata) GetPage() *Page

func (*SearchMetadata) GetTotalPages

func (x *SearchMetadata) GetTotalPages() int32

func (*SearchMetadata) MarshalJSON

func (x *SearchMetadata) MarshalJSON() ([]byte, error)

func (*SearchMetadata) ProtoMessage

func (*SearchMetadata) ProtoMessage()

func (*SearchMetadata) ProtoReflect

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

func (*SearchMetadata) Reset

func (x *SearchMetadata) Reset()

func (*SearchMetadata) String

func (x *SearchMetadata) String() string

type SearchRequest

type SearchRequest struct {

	// Database name to read documents from.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Collection name to read documents from.
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// Query string for searching across text fields
	Q string `protobuf:"bytes,3,opt,name=q,proto3" json:"q,omitempty"`
	// Array of fields to project search query against
	SearchFields []string `protobuf:"bytes,4,rep,name=search_fields,json=searchFields,proto3" json:"search_fields,omitempty"`
	// Filter stacks on top of query results to further narrow down the results. Similar to `ReadRequest.filter`
	Filter []byte `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
	// Facet query to aggregate results on given fields. The field name for the facet search can be passed like this `{"brand": { "size": 10 }}`
	// where the size controls the total facets for this field.
	Facet []byte `protobuf:"bytes,6,opt,name=facet,proto3" json:"facet,omitempty"`
	// Array of fields and corresponding sort orders to order the results `[{ "salary": "$desc" }]`
	Sort []byte `protobuf:"bytes,7,opt,name=sort,proto3" json:"sort,omitempty"`
	// Array of document field names to include in results. By default, all fields are included.
	IncludeFields []string `protobuf:"bytes,8,rep,name=include_fields,json=includeFields,proto3" json:"include_fields,omitempty"`
	// Array of document field names to exclude from results. `include_fields`, if specified, takes precedence over `exclude_fields`.
	ExcludeFields []string `protobuf:"bytes,9,rep,name=exclude_fields,json=excludeFields,proto3" json:"exclude_fields,omitempty"`
	// Optionally can set the number of hits to be returned per page, default is 20.
	PageSize int32 `protobuf:"varint,10,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optionally can specify the page to retrieve. If page is set then only hits for this page is returned
	Page int32 `protobuf:"varint,11,opt,name=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchRequest) Descriptor deprecated

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

Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.

func (*SearchRequest) GetCollection

func (x *SearchRequest) GetCollection() string

func (*SearchRequest) GetDb

func (x *SearchRequest) GetDb() string

func (*SearchRequest) GetExcludeFields

func (x *SearchRequest) GetExcludeFields() []string

func (*SearchRequest) GetFacet

func (x *SearchRequest) GetFacet() []byte

func (*SearchRequest) GetFilter

func (x *SearchRequest) GetFilter() []byte

func (*SearchRequest) GetIncludeFields

func (x *SearchRequest) GetIncludeFields() []string

func (*SearchRequest) GetPage

func (x *SearchRequest) GetPage() int32

func (*SearchRequest) GetPageSize

func (x *SearchRequest) GetPageSize() int32

func (*SearchRequest) GetQ

func (x *SearchRequest) GetQ() string

func (*SearchRequest) GetSearchFields

func (x *SearchRequest) GetSearchFields() []string

func (*SearchRequest) GetSort

func (x *SearchRequest) GetSort() []byte

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) ProtoReflect

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

func (*SearchRequest) Reset

func (x *SearchRequest) Reset()

func (*SearchRequest) String

func (x *SearchRequest) String() string

func (*SearchRequest) UnmarshalJSON

func (x *SearchRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON for SearchRequest avoids unmarshalling filter, facets, sort and fields

type SearchResponse

type SearchResponse struct {
	Hits   []*SearchHit            `protobuf:"bytes,1,rep,name=hits,proto3" json:"hits,omitempty"`
	Facets map[string]*SearchFacet `` /* 153-byte string literal not displayed */
	Meta   *SearchMetadata         `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"`
	// contains filtered or unexported fields
}

Response struct for search

func (*SearchResponse) Descriptor deprecated

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

Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.

func (*SearchResponse) GetFacets

func (x *SearchResponse) GetFacets() map[string]*SearchFacet

func (*SearchResponse) GetHits

func (x *SearchResponse) GetHits() []*SearchHit

func (*SearchResponse) GetMeta

func (x *SearchResponse) GetMeta() *SearchMetadata

func (*SearchResponse) MarshalJSON

func (x *SearchResponse) MarshalJSON() ([]byte, error)

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) ProtoReflect

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

func (*SearchResponse) Reset

func (x *SearchResponse) Reset()

func (*SearchResponse) String

func (x *SearchResponse) String() string

type StreamEvent

type StreamEvent struct {
	TxId       []byte `protobuf:"bytes,1,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	Op         string `protobuf:"bytes,3,opt,name=op,proto3" json:"op,omitempty"`
	Key        []byte `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	Lkey       []byte `protobuf:"bytes,5,opt,name=lkey,proto3" json:"lkey,omitempty"`
	Rkey       []byte `protobuf:"bytes,6,opt,name=rkey,proto3" json:"rkey,omitempty"`
	Data       []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	Last       bool   `protobuf:"varint,8,opt,name=last,proto3" json:"last,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamEvent) Descriptor deprecated

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

Deprecated: Use StreamEvent.ProtoReflect.Descriptor instead.

func (*StreamEvent) GetCollection

func (x *StreamEvent) GetCollection() string

func (*StreamEvent) GetData

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

func (*StreamEvent) GetKey

func (x *StreamEvent) GetKey() []byte

func (*StreamEvent) GetLast

func (x *StreamEvent) GetLast() bool

func (*StreamEvent) GetLkey

func (x *StreamEvent) GetLkey() []byte

func (*StreamEvent) GetOp

func (x *StreamEvent) GetOp() string

func (*StreamEvent) GetRkey

func (x *StreamEvent) GetRkey() []byte

func (*StreamEvent) GetTxId

func (x *StreamEvent) GetTxId() []byte

func (*StreamEvent) ProtoMessage

func (*StreamEvent) ProtoMessage()

func (*StreamEvent) ProtoReflect

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

func (*StreamEvent) Reset

func (x *StreamEvent) Reset()

func (*StreamEvent) String

func (x *StreamEvent) String() string

type SubscribeRequest

type SubscribeRequest struct {
	Db         string                   `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	Collection string                   `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	Options    *SubscribeRequestOptions `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetCollection

func (x *SubscribeRequest) GetCollection() string

func (*SubscribeRequest) GetDb

func (x *SubscribeRequest) GetDb() string

func (*SubscribeRequest) GetOptions

func (x *SubscribeRequest) GetOptions() *SubscribeRequestOptions

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SubscribeRequestOptions

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

func (*SubscribeRequestOptions) Descriptor deprecated

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

Deprecated: Use SubscribeRequestOptions.ProtoReflect.Descriptor instead.

func (*SubscribeRequestOptions) ProtoMessage

func (*SubscribeRequestOptions) ProtoMessage()

func (*SubscribeRequestOptions) ProtoReflect

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

func (*SubscribeRequestOptions) Reset

func (x *SubscribeRequestOptions) Reset()

func (*SubscribeRequestOptions) String

func (x *SubscribeRequestOptions) String() string

type SubscribeResponse

type SubscribeResponse struct {
	Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeResponse) Descriptor deprecated

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

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) GetMessage

func (x *SubscribeResponse) GetMessage() []byte

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) ProtoReflect

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

func (*SubscribeResponse) Reset

func (x *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (x *SubscribeResponse) String() string

type TigrisClient

type TigrisClient interface {
	// Starts a new transaction and returns a transactional object. All reads/writes performed
	// within a transaction will run with serializable isolation.
	BeginTransaction(ctx context.Context, in *BeginTransactionRequest, opts ...grpc.CallOption) (*BeginTransactionResponse, error)
	// Atomically commit all the changes performed in the context of the transaction. Commit provides all
	// or nothing semantics by ensuring no partial updates are in the database due to a transaction failure.
	CommitTransaction(ctx context.Context, in *CommitTransactionRequest, opts ...grpc.CallOption) (*CommitTransactionResponse, error)
	// Rollback transaction discards all the changes
	// performed in the transaction
	RollbackTransaction(ctx context.Context, in *RollbackTransactionRequest, opts ...grpc.CallOption) (*RollbackTransactionResponse, error)
	// Inserts new documents in the collection and returns an AlreadyExists error if any of the documents
	// in the request already exists. Insert provides idempotency by returning an error if the document
	// already exists. To replace documents, use REPLACE API instead of INSERT.
	Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error)
	// Inserts the documents or replaces the existing documents in the collections.
	Replace(ctx context.Context, in *ReplaceRequest, opts ...grpc.CallOption) (*ReplaceResponse, error)
	// Delete a range of documents in the collection using the condition provided in the filter.
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	// Update a range of documents in the collection using the condition provided in the filter.
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	// Reads a range of documents from the collection. Tigris does not require you to
	// index any fields and automatically index all the fields which means you can filter by any field in the document.
	// An empty filter will trigger reading all the documents inside this collection. The API supports pagination that
	// can be used by passing `Limit/Skip` parameters. The `skip` parameter skips the number of documents from the start and
	// the `limit` parameter is used to specify the number of documents to read. You can find more detailed documentation
	// of the Read API <a href="https://docs.tigrisdata.com/overview/query" title="here">here</a>.
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (Tigris_ReadClient, error)
	// Searches a collection for the documents matching the query. A search can be a term search or a phrase search.
	// Search API allows filtering the result set using filters as documented <a href="https://docs.tigrisdata.com/overview/query#specification-1" title="here">here</a>.
	// You can also perform a faceted search by passing the fields in the facet parameter.
	// You can find more detailed documentation of the Search API with multiple examples <a href="https://docs.tigrisdata.com/overview/search" title="here">here</a>.
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (Tigris_SearchClient, error)
	// Creates a new collection or atomically upgrades the collection to the new schema provided in the request.
	// Schema changes are applied atomically and immediately without any downtime.
	// This endpoint allows the creation of a collection based on the type. <p></p>
	// There are two collection types supported by Tigris:
	//    <li> DOCUMENTS: Support CRUD APIs.
	//    <li> MESSAGES: Supports Pub/Sub APIs.
	CreateOrUpdateCollection(ctx context.Context, in *CreateOrUpdateCollectionRequest, opts ...grpc.CallOption) (*CreateOrUpdateCollectionResponse, error)
	// Drop the collection inside this database. This API deletes all of the documents inside this collection and any metadata associated with it.
	DropCollection(ctx context.Context, in *DropCollectionRequest, opts ...grpc.CallOption) (*DropCollectionResponse, error)
	// List returns all the databases.
	ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error)
	// List all the collections present in the database passed in the request.
	ListCollections(ctx context.Context, in *ListCollectionsRequest, opts ...grpc.CallOption) (*ListCollectionsResponse, error)
	// Creates a new database. Returns an AlreadyExists error with a status code 409 if the database already exists.
	CreateDatabase(ctx context.Context, in *CreateDatabaseRequest, opts ...grpc.CallOption) (*CreateDatabaseResponse, error)
	// Drop database deletes all the collections in this database along with all of the documents, and associated metadata for these collections.
	DropDatabase(ctx context.Context, in *DropDatabaseRequest, opts ...grpc.CallOption) (*DropDatabaseResponse, error)
	// This API returns information related to the database along with all the collections inside the database.
	// This can be used to retrieve the size of the database or to retrieve schemas and the size of all the collections present in this database.
	DescribeDatabase(ctx context.Context, in *DescribeDatabaseRequest, opts ...grpc.CallOption) (*DescribeDatabaseResponse, error)
	// Returns the information related to the collection. This can be used to retrieve the schema or size of the collection.
	DescribeCollection(ctx context.Context, in *DescribeCollectionRequest, opts ...grpc.CallOption) (*DescribeCollectionResponse, error)
	// Stream real-time events for mutations made to the collections in the database. Each stream will have a transaction
	// identifier attached to it and will have a boolean flag “last” set to the last event of the transaction which will be useful
	// if a transaction performed more than one operation in the collection.
	Events(ctx context.Context, in *EventsRequest, opts ...grpc.CallOption) (Tigris_EventsClient, error)
	// Provides the information about the server. This information includes returning the server version, etc.
	GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
	// Publish API is use to publish messages to the collection.
	Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error)
	// Subscribe is used to subscribe to the collection and receive messages from it.
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Tigris_SubscribeClient, error)
}

TigrisClient is the client API for Tigris 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 NewTigrisClient

func NewTigrisClient(cc grpc.ClientConnInterface) TigrisClient

type TigrisError

type TigrisError struct {
	// Contains Tigris extended error code.
	// Codes upto Code_UNAUTHENTICATED are identical to GRPC error codes
	Code Code `json:"code,omitempty"`
	// A developer-facing error message.
	Message string `json:"message,omitempty"`

	// Contains extended error information.
	// For example retry information.
	Details []proto.Message `json:"details,omitempty"`
}

TigrisError is our Tigris HTTP counterpart of grpc status. All the APIs should use this Error to return as a user facing error. TigrisError will return grpcStatus to the muxer so that grpc client can see grpcStatus as the final output. For HTTP clients see the **MarshalStatus** method where we are returning the response by not the grpc code as that is not needed for HTTP clients.

func Errorf

func Errorf(c Code, format string, a ...interface{}) *TigrisError

Errorf constructs TigrisError

func FromErrorDetails

func FromErrorDetails(e *ErrorDetails) *TigrisError

FromErrorDetails construct TigrisError from the ErrorDetails, which contains extended code, retry information, etc...

func FromStatusError

func FromStatusError(err error) *TigrisError

FromStatusError parses GRPC status from error into TigrisError

func UnmarshalStatus

func UnmarshalStatus(b []byte) *TigrisError

UnmarshalStatus reconstruct TigrisError from HTTP error JSON body

func (*TigrisError) As

func (e *TigrisError) As(i any) bool

As is used by runtime.DefaultHTTPErrorHandler to override HTTP status code

func (*TigrisError) Error

func (e *TigrisError) Error() string

Error to return the underlying error message

func (*TigrisError) GRPCStatus

func (e *TigrisError) GRPCStatus() *status.Status

GRPCStatus converts the TigrisError and return status.Status. This is used to return grpc status to the grpc clients

func (*TigrisError) GetHTTPCode

func (e *TigrisError) GetHTTPCode() int

GetHTTPCode returns Tigris error code as a corresponding HTTP status code

func (*TigrisError) RetryDelay

func (e *TigrisError) RetryDelay() time.Duration

RetryDelay retrieves retry delay if it's attached to the error

func (*TigrisError) WithDetails

func (e *TigrisError) WithDetails(details ...proto.Message) *TigrisError

WithDetails a helper method for adding details to the TigrisError

func (*TigrisError) WithRetry

func (e *TigrisError) WithRetry(d time.Duration) *TigrisError

WithRetry attached retry information to the error

type TigrisServer

type TigrisServer interface {
	// Starts a new transaction and returns a transactional object. All reads/writes performed
	// within a transaction will run with serializable isolation.
	BeginTransaction(context.Context, *BeginTransactionRequest) (*BeginTransactionResponse, error)
	// Atomically commit all the changes performed in the context of the transaction. Commit provides all
	// or nothing semantics by ensuring no partial updates are in the database due to a transaction failure.
	CommitTransaction(context.Context, *CommitTransactionRequest) (*CommitTransactionResponse, error)
	// Rollback transaction discards all the changes
	// performed in the transaction
	RollbackTransaction(context.Context, *RollbackTransactionRequest) (*RollbackTransactionResponse, error)
	// Inserts new documents in the collection and returns an AlreadyExists error if any of the documents
	// in the request already exists. Insert provides idempotency by returning an error if the document
	// already exists. To replace documents, use REPLACE API instead of INSERT.
	Insert(context.Context, *InsertRequest) (*InsertResponse, error)
	// Inserts the documents or replaces the existing documents in the collections.
	Replace(context.Context, *ReplaceRequest) (*ReplaceResponse, error)
	// Delete a range of documents in the collection using the condition provided in the filter.
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// Update a range of documents in the collection using the condition provided in the filter.
	Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
	// Reads a range of documents from the collection. Tigris does not require you to
	// index any fields and automatically index all the fields which means you can filter by any field in the document.
	// An empty filter will trigger reading all the documents inside this collection. The API supports pagination that
	// can be used by passing `Limit/Skip` parameters. The `skip` parameter skips the number of documents from the start and
	// the `limit` parameter is used to specify the number of documents to read. You can find more detailed documentation
	// of the Read API <a href="https://docs.tigrisdata.com/overview/query" title="here">here</a>.
	Read(*ReadRequest, Tigris_ReadServer) error
	// Searches a collection for the documents matching the query. A search can be a term search or a phrase search.
	// Search API allows filtering the result set using filters as documented <a href="https://docs.tigrisdata.com/overview/query#specification-1" title="here">here</a>.
	// You can also perform a faceted search by passing the fields in the facet parameter.
	// You can find more detailed documentation of the Search API with multiple examples <a href="https://docs.tigrisdata.com/overview/search" title="here">here</a>.
	Search(*SearchRequest, Tigris_SearchServer) error
	// Creates a new collection or atomically upgrades the collection to the new schema provided in the request.
	// Schema changes are applied atomically and immediately without any downtime.
	// This endpoint allows the creation of a collection based on the type. <p></p>
	// There are two collection types supported by Tigris:
	//    <li> DOCUMENTS: Support CRUD APIs.
	//    <li> MESSAGES: Supports Pub/Sub APIs.
	CreateOrUpdateCollection(context.Context, *CreateOrUpdateCollectionRequest) (*CreateOrUpdateCollectionResponse, error)
	// Drop the collection inside this database. This API deletes all of the documents inside this collection and any metadata associated with it.
	DropCollection(context.Context, *DropCollectionRequest) (*DropCollectionResponse, error)
	// List returns all the databases.
	ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error)
	// List all the collections present in the database passed in the request.
	ListCollections(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error)
	// Creates a new database. Returns an AlreadyExists error with a status code 409 if the database already exists.
	CreateDatabase(context.Context, *CreateDatabaseRequest) (*CreateDatabaseResponse, error)
	// Drop database deletes all the collections in this database along with all of the documents, and associated metadata for these collections.
	DropDatabase(context.Context, *DropDatabaseRequest) (*DropDatabaseResponse, error)
	// This API returns information related to the database along with all the collections inside the database.
	// This can be used to retrieve the size of the database or to retrieve schemas and the size of all the collections present in this database.
	DescribeDatabase(context.Context, *DescribeDatabaseRequest) (*DescribeDatabaseResponse, error)
	// Returns the information related to the collection. This can be used to retrieve the schema or size of the collection.
	DescribeCollection(context.Context, *DescribeCollectionRequest) (*DescribeCollectionResponse, error)
	// Stream real-time events for mutations made to the collections in the database. Each stream will have a transaction
	// identifier attached to it and will have a boolean flag “last” set to the last event of the transaction which will be useful
	// if a transaction performed more than one operation in the collection.
	Events(*EventsRequest, Tigris_EventsServer) error
	// Provides the information about the server. This information includes returning the server version, etc.
	GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
	// Publish API is use to publish messages to the collection.
	Publish(context.Context, *PublishRequest) (*PublishResponse, error)
	// Subscribe is used to subscribe to the collection and receive messages from it.
	Subscribe(*SubscribeRequest, Tigris_SubscribeServer) error
}

TigrisServer is the server API for Tigris service. All implementations should embed UnimplementedTigrisServer for forward compatibility

type Tigris_EventsClient

type Tigris_EventsClient interface {
	Recv() (*EventsResponse, error)
	grpc.ClientStream
}

type Tigris_EventsServer

type Tigris_EventsServer interface {
	Send(*EventsResponse) error
	grpc.ServerStream
}

type Tigris_ReadClient

type Tigris_ReadClient interface {
	Recv() (*ReadResponse, error)
	grpc.ClientStream
}

type Tigris_ReadServer

type Tigris_ReadServer interface {
	Send(*ReadResponse) error
	grpc.ServerStream
}

type Tigris_SearchClient

type Tigris_SearchClient interface {
	Recv() (*SearchResponse, error)
	grpc.ClientStream
}

type Tigris_SearchServer

type Tigris_SearchServer interface {
	Send(*SearchResponse) error
	grpc.ServerStream
}

type Tigris_SubscribeClient

type Tigris_SubscribeClient interface {
	Recv() (*SubscribeResponse, error)
	grpc.ClientStream
}

type Tigris_SubscribeServer

type Tigris_SubscribeServer interface {
	Send(*SubscribeResponse) error
	grpc.ServerStream
}

type TransactionCtx

type TransactionCtx struct {

	// Unique for a single transactional request.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Serves as an internal identifier.
	Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
	// contains filtered or unexported fields
}

Contains ID which uniquely identifies transaction This context is returned by BeginTransaction request and should be passed in the metadata (headers) of subsequent requests in order to run them in the context of the same transaction.

func GetTransaction

func GetTransaction(ctx context.Context) *TransactionCtx

func (*TransactionCtx) Descriptor deprecated

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

Deprecated: Use TransactionCtx.ProtoReflect.Descriptor instead.

func (*TransactionCtx) GetId

func (x *TransactionCtx) GetId() string

func (*TransactionCtx) GetOrigin

func (x *TransactionCtx) GetOrigin() string

func (*TransactionCtx) ProtoMessage

func (*TransactionCtx) ProtoMessage()

func (*TransactionCtx) ProtoReflect

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

func (*TransactionCtx) Reset

func (x *TransactionCtx) Reset()

func (*TransactionCtx) String

func (x *TransactionCtx) String() string

type TransactionOptions

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

Options that can be used to modify the transaction semantics.

func (*TransactionOptions) Descriptor deprecated

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

Deprecated: Use TransactionOptions.ProtoReflect.Descriptor instead.

func (*TransactionOptions) ProtoMessage

func (*TransactionOptions) ProtoMessage()

func (*TransactionOptions) ProtoReflect

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

func (*TransactionOptions) Reset

func (x *TransactionOptions) Reset()

func (*TransactionOptions) String

func (x *TransactionOptions) String() string

type UnimplementedAdminServer

type UnimplementedAdminServer struct {
}

UnimplementedAdminServer should be embedded to have forward compatible implementations.

func (UnimplementedAdminServer) CreateNamespace

func (UnimplementedAdminServer) ListNamespaces

type UnimplementedAuthServer

type UnimplementedAuthServer struct {
}

UnimplementedAuthServer should be embedded to have forward compatible implementations.

func (UnimplementedAuthServer) GetAccessToken

type UnimplementedHealthAPIServer

type UnimplementedHealthAPIServer struct {
}

UnimplementedHealthAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedHealthAPIServer) Health

type UnimplementedTigrisServer

type UnimplementedTigrisServer struct {
}

UnimplementedTigrisServer should be embedded to have forward compatible implementations.

func (UnimplementedTigrisServer) BeginTransaction

func (UnimplementedTigrisServer) CreateDatabase

func (UnimplementedTigrisServer) Delete

func (UnimplementedTigrisServer) DescribeDatabase

func (UnimplementedTigrisServer) DropCollection

func (UnimplementedTigrisServer) DropDatabase

func (UnimplementedTigrisServer) Events

func (UnimplementedTigrisServer) GetInfo

func (UnimplementedTigrisServer) Insert

func (UnimplementedTigrisServer) ListCollections

func (UnimplementedTigrisServer) ListDatabases

func (UnimplementedTigrisServer) Publish

func (UnimplementedTigrisServer) Read

func (UnimplementedTigrisServer) Replace

func (UnimplementedTigrisServer) Search

func (UnimplementedTigrisServer) Subscribe

func (UnimplementedTigrisServer) Update

type UnsafeAdminServer

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

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

type UnsafeAuthServer

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

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

type UnsafeHealthAPIServer

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

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

type UnsafeTigrisServer

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

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

type UpdateRequest

type UpdateRequest struct {

	// Database name where to update documents
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Collection name where to update documents
	Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
	// Fields contains set of fields
	// with the values which need to be updated.
	// Should be proper JSON object.
	Fields []byte `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields,omitempty"`
	// Update documents which matching specified filter.
	// A filter can simply be key, value where key
	// is the field name and value would be the value for this field. Or a filter can be logical where
	// two or more fields can be logically joined using $or and $and. A few examples of filter:
	// <li> To update a user document where the id has a value 1: “`{"id": 1 }“`
	// <li> To update all the user documents where the key "id" has a value 1 or 2 or 3: `{"$or": [{"id": 1}, {"id": 2}, {"id": 3}]}`
	Filter  []byte                `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
	Options *UpdateRequestOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetCollection

func (x *UpdateRequest) GetCollection() string

func (*UpdateRequest) GetDb

func (x *UpdateRequest) GetDb() string

func (*UpdateRequest) GetFields

func (x *UpdateRequest) GetFields() []byte

func (*UpdateRequest) GetFilter

func (x *UpdateRequest) GetFilter() []byte

func (*UpdateRequest) GetOptions

func (x *UpdateRequest) GetOptions() *UpdateRequestOptions

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

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

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

func (*UpdateRequest) UnmarshalJSON

func (x *UpdateRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON on UpdateRequest avoids unmarshalling filter and instead this way we can write a custom struct to do the unmarshalling and will be avoiding any extra allocation/copying.

type UpdateRequestOptions

type UpdateRequestOptions struct {
	WriteOptions *WriteOptions `protobuf:"bytes,1,opt,name=write_options,json=writeOptions,proto3" json:"write_options,omitempty"`
	// contains filtered or unexported fields
}

Additional options for update requests.

func (*UpdateRequestOptions) Descriptor deprecated

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

Deprecated: Use UpdateRequestOptions.ProtoReflect.Descriptor instead.

func (*UpdateRequestOptions) GetWriteOptions

func (x *UpdateRequestOptions) GetWriteOptions() *WriteOptions

func (*UpdateRequestOptions) ProtoMessage

func (*UpdateRequestOptions) ProtoMessage()

func (*UpdateRequestOptions) ProtoReflect

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

func (*UpdateRequestOptions) Reset

func (x *UpdateRequestOptions) Reset()

func (*UpdateRequestOptions) String

func (x *UpdateRequestOptions) String() string

type UpdateResponse

type UpdateResponse struct {

	// Has metadata related to the documents stored.
	Metadata *ResponseMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// Returns the number of documents modified.
	ModifiedCount int32 `protobuf:"varint,2,opt,name=modified_count,json=modifiedCount,proto3" json:"modified_count,omitempty"`
	// an enum with value set as "updated".
	Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetMetadata

func (x *UpdateResponse) GetMetadata() *ResponseMetadata

func (*UpdateResponse) GetModifiedCount

func (x *UpdateResponse) GetModifiedCount() int32

func (*UpdateResponse) GetStatus

func (x *UpdateResponse) GetStatus() string

func (*UpdateResponse) MarshalJSON

func (x *UpdateResponse) MarshalJSON() ([]byte, error)

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

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

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

type WriteOptions

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

Additional options to modify write requests.

func (*WriteOptions) Descriptor deprecated

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

Deprecated: Use WriteOptions.ProtoReflect.Descriptor instead.

func (*WriteOptions) ProtoMessage

func (*WriteOptions) ProtoMessage()

func (*WriteOptions) ProtoReflect

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

func (*WriteOptions) Reset

func (x *WriteOptions) Reset()

func (*WriteOptions) String

func (x *WriteOptions) String() string

Jump to

Keyboard shortcuts

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