grpc

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	FetchService_GetLatestIndexKey_FullMethodName       = "/grpc.FetchService/GetLatestIndexKey"
	FetchService_GetIndexKeys_FullMethodName            = "/grpc.FetchService/GetIndexKeys"
	FetchService_GetLatestObject_FullMethodName         = "/grpc.FetchService/GetLatestObject"
	FetchService_GetObjects_FullMethodName              = "/grpc.FetchService/GetObjects"
	FetchService_GetObjectsFromIndexKeys_FullMethodName = "/grpc.FetchService/GetObjectsFromIndexKeys"
)

Variables

View Source
var FetchService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.FetchService",
	HandlerType: (*FetchServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetLatestIndexKey",
			Handler:    _FetchService_GetLatestIndexKey_Handler,
		},
		{
			MethodName: "GetIndexKeys",
			Handler:    _FetchService_GetIndexKeys_Handler,
		},
		{
			MethodName: "GetLatestObject",
			Handler:    _FetchService_GetLatestObject_Handler,
		},
		{
			MethodName: "GetObjects",
			Handler:    _FetchService_GetObjects_Handler,
		},
		{
			MethodName: "GetObjectsFromIndexKeys",
			Handler:    _FetchService_GetObjectsFromIndexKeys_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/grpc/fetch-api.proto",
}

FetchService_ServiceDesc is the grpc.ServiceDesc for FetchService 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_pkg_grpc_fetch_api_proto protoreflect.FileDescriptor

Functions

func RegisterFetchServiceServer

func RegisterFetchServiceServer(s grpc.ServiceRegistrar, srv FetchServiceServer)

Types

type DataObject

type DataObject struct {

	// The index key of the object.
	IndexKey string `protobuf:"bytes,1,opt,name=index_key,json=indexKey,proto3" json:"index_key,omitempty"`
	// The data retrieved from the object.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

DataObject contains the index key and data retrieved from the object.

func (*DataObject) Descriptor deprecated

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

Deprecated: Use DataObject.ProtoReflect.Descriptor instead.

func (*DataObject) GetData

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

func (*DataObject) GetIndexKey

func (x *DataObject) GetIndexKey() string

func (*DataObject) ProtoMessage

func (*DataObject) ProtoMessage()

func (*DataObject) ProtoReflect

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

func (*DataObject) Reset

func (x *DataObject) Reset()

func (*DataObject) String

func (x *DataObject) String() string

type FetchServiceClient

type FetchServiceClient interface {
	// GetLatestIndexKey returns the latest index key for the given options
	GetLatestIndexKey(ctx context.Context, in *GetLatestIndexKeyRequest, opts ...grpc.CallOption) (*GetLatestIndexKeyResponse, error)
	// GetIndexKeys fetches and returns the list of index_keys that match the specified options
	GetIndexKeys(ctx context.Context, in *GetIndexKeysRequest, opts ...grpc.CallOption) (*GetIndexKeysResponse, error)
	// GetLatestObject fetches and returns the latest object that matches the specified options
	GetLatestObject(ctx context.Context, in *GetLatestObjectRequest, opts ...grpc.CallOption) (*GetLatestObjectResponse, error)
	// GetObjects fetches and returns the list of objects that match the specified options
	GetObjects(ctx context.Context, in *GetObjectsRequest, opts ...grpc.CallOption) (*GetObjectsResponse, error)
	// GetObjectsFromIndexKeys fetches and returns the list of objects that match the specified index key
	GetObjectsFromIndexKeys(ctx context.Context, in *GetObjectsFromIndexKeysRequest, opts ...grpc.CallOption) (*GetObjectsFromIndexKeysResponse, error)
}

FetchServiceClient is the client API for FetchService 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.

FetchService defines the gRPC service for fetching DIMO objects

type FetchServiceServer

type FetchServiceServer interface {
	// GetLatestIndexKey returns the latest index key for the given options
	GetLatestIndexKey(context.Context, *GetLatestIndexKeyRequest) (*GetLatestIndexKeyResponse, error)
	// GetIndexKeys fetches and returns the list of index_keys that match the specified options
	GetIndexKeys(context.Context, *GetIndexKeysRequest) (*GetIndexKeysResponse, error)
	// GetLatestObject fetches and returns the latest object that matches the specified options
	GetLatestObject(context.Context, *GetLatestObjectRequest) (*GetLatestObjectResponse, error)
	// GetObjects fetches and returns the list of objects that match the specified options
	GetObjects(context.Context, *GetObjectsRequest) (*GetObjectsResponse, error)
	// GetObjectsFromIndexKeys fetches and returns the list of objects that match the specified index key
	GetObjectsFromIndexKeys(context.Context, *GetObjectsFromIndexKeysRequest) (*GetObjectsFromIndexKeysResponse, error)
	// contains filtered or unexported methods
}

FetchServiceServer is the server API for FetchService service. All implementations must embed UnimplementedFetchServiceServer for forward compatibility.

FetchService defines the gRPC service for fetching DIMO objects

type GetIndexKeysRequest

type GetIndexKeysRequest struct {

	// Search options to filter the events.
	Options *SearchOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
	// The maximum number of index_keys to return.
	Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

GetIndexKeysRequest includes search options to filter the events.

func (*GetIndexKeysRequest) Descriptor deprecated

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

Deprecated: Use GetIndexKeysRequest.ProtoReflect.Descriptor instead.

func (*GetIndexKeysRequest) GetLimit

func (x *GetIndexKeysRequest) GetLimit() int32

func (*GetIndexKeysRequest) GetOptions

func (x *GetIndexKeysRequest) GetOptions() *SearchOptions

func (*GetIndexKeysRequest) ProtoMessage

func (*GetIndexKeysRequest) ProtoMessage()

func (*GetIndexKeysRequest) ProtoReflect

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

func (*GetIndexKeysRequest) Reset

func (x *GetIndexKeysRequest) Reset()

func (*GetIndexKeysRequest) String

func (x *GetIndexKeysRequest) String() string

type GetIndexKeysResponse

type GetIndexKeysResponse struct {

	// The list of index_keys retrieved for the specified search criteria.
	IndexKeys []string `protobuf:"bytes,1,rep,name=index_keys,json=indexKeys,proto3" json:"index_keys,omitempty"`
	// contains filtered or unexported fields
}

GetIndexKeysResponse returns the list of index_keys retrieved for the specified search criteria.

func (*GetIndexKeysResponse) Descriptor deprecated

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

Deprecated: Use GetIndexKeysResponse.ProtoReflect.Descriptor instead.

func (*GetIndexKeysResponse) GetIndexKeys

func (x *GetIndexKeysResponse) GetIndexKeys() []string

func (*GetIndexKeysResponse) ProtoMessage

func (*GetIndexKeysResponse) ProtoMessage()

func (*GetIndexKeysResponse) ProtoReflect

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

func (*GetIndexKeysResponse) Reset

func (x *GetIndexKeysResponse) Reset()

func (*GetIndexKeysResponse) String

func (x *GetIndexKeysResponse) String() string

type GetLatestIndexKeyRequest

type GetLatestIndexKeyRequest struct {
	Options *SearchOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

GetLatestIndexKeyRequest includes search options to filter the events.

func (*GetLatestIndexKeyRequest) Descriptor deprecated

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

Deprecated: Use GetLatestIndexKeyRequest.ProtoReflect.Descriptor instead.

func (*GetLatestIndexKeyRequest) GetOptions

func (x *GetLatestIndexKeyRequest) GetOptions() *SearchOptions

func (*GetLatestIndexKeyRequest) ProtoMessage

func (*GetLatestIndexKeyRequest) ProtoMessage()

func (*GetLatestIndexKeyRequest) ProtoReflect

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

func (*GetLatestIndexKeyRequest) Reset

func (x *GetLatestIndexKeyRequest) Reset()

func (*GetLatestIndexKeyRequest) String

func (x *GetLatestIndexKeyRequest) String() string

type GetLatestIndexKeyResponse

type GetLatestIndexKeyResponse struct {

	// The latest index key retrieved for the specified search criteria.
	IndexKey string `protobuf:"bytes,1,opt,name=index_key,json=indexKey,proto3" json:"index_key,omitempty"`
	// contains filtered or unexported fields
}

GetLatestIndexKeyResponse provides the latest index key retrieved for the specified search criteria.

func (*GetLatestIndexKeyResponse) Descriptor deprecated

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

Deprecated: Use GetLatestIndexKeyResponse.ProtoReflect.Descriptor instead.

func (*GetLatestIndexKeyResponse) GetIndexKey

func (x *GetLatestIndexKeyResponse) GetIndexKey() string

func (*GetLatestIndexKeyResponse) ProtoMessage

func (*GetLatestIndexKeyResponse) ProtoMessage()

func (*GetLatestIndexKeyResponse) ProtoReflect

func (*GetLatestIndexKeyResponse) Reset

func (x *GetLatestIndexKeyResponse) Reset()

func (*GetLatestIndexKeyResponse) String

func (x *GetLatestIndexKeyResponse) String() string

type GetLatestObjectRequest

type GetLatestObjectRequest struct {

	// Search options to filter the events.
	Options *SearchOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

GetLatestObjectRequest includes search options to filter the events.

func (*GetLatestObjectRequest) Descriptor deprecated

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

Deprecated: Use GetLatestObjectRequest.ProtoReflect.Descriptor instead.

func (*GetLatestObjectRequest) GetOptions

func (x *GetLatestObjectRequest) GetOptions() *SearchOptions

func (*GetLatestObjectRequest) ProtoMessage

func (*GetLatestObjectRequest) ProtoMessage()

func (*GetLatestObjectRequest) ProtoReflect

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

func (*GetLatestObjectRequest) Reset

func (x *GetLatestObjectRequest) Reset()

func (*GetLatestObjectRequest) String

func (x *GetLatestObjectRequest) String() string

type GetLatestObjectResponse

type GetLatestObjectResponse struct {

	// The data retrieved from the latest cloud event.
	DataObject *DataObject `protobuf:"bytes,1,opt,name=data_object,json=dataObject,proto3" json:"data_object,omitempty"`
	// contains filtered or unexported fields
}

GetLatestObjectResponse provides the data retrieved from the latest cloud event.

func (*GetLatestObjectResponse) Descriptor deprecated

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

Deprecated: Use GetLatestObjectResponse.ProtoReflect.Descriptor instead.

func (*GetLatestObjectResponse) GetDataObject

func (x *GetLatestObjectResponse) GetDataObject() *DataObject

func (*GetLatestObjectResponse) ProtoMessage

func (*GetLatestObjectResponse) ProtoMessage()

func (*GetLatestObjectResponse) ProtoReflect

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

func (*GetLatestObjectResponse) Reset

func (x *GetLatestObjectResponse) Reset()

func (*GetLatestObjectResponse) String

func (x *GetLatestObjectResponse) String() string

type GetObjectsFromIndexKeysRequest

type GetObjectsFromIndexKeysRequest struct {

	// The index_keys that will be retrieved.
	IndexKeys []string `protobuf:"bytes,1,rep,name=index_keys,json=indexKeys,proto3" json:"index_keys,omitempty"`
	// contains filtered or unexported fields
}

GetObjectsFromIndexKeysRequest includes the index key to filter the events.

func (*GetObjectsFromIndexKeysRequest) Descriptor deprecated

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

Deprecated: Use GetObjectsFromIndexKeysRequest.ProtoReflect.Descriptor instead.

func (*GetObjectsFromIndexKeysRequest) GetIndexKeys

func (x *GetObjectsFromIndexKeysRequest) GetIndexKeys() []string

func (*GetObjectsFromIndexKeysRequest) ProtoMessage

func (*GetObjectsFromIndexKeysRequest) ProtoMessage()

func (*GetObjectsFromIndexKeysRequest) ProtoReflect

func (*GetObjectsFromIndexKeysRequest) Reset

func (x *GetObjectsFromIndexKeysRequest) Reset()

func (*GetObjectsFromIndexKeysRequest) String

type GetObjectsFromIndexKeysResponse

type GetObjectsFromIndexKeysResponse struct {

	// The list of data retrieved from the objects.
	DataObjects []*DataObject `protobuf:"bytes,1,rep,name=data_objects,json=dataObjects,proto3" json:"data_objects,omitempty"`
	// contains filtered or unexported fields
}

GetObjectsFromNameResponse provides the list of data retrieved from the objects.

func (*GetObjectsFromIndexKeysResponse) Descriptor deprecated

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

Deprecated: Use GetObjectsFromIndexKeysResponse.ProtoReflect.Descriptor instead.

func (*GetObjectsFromIndexKeysResponse) GetDataObjects

func (x *GetObjectsFromIndexKeysResponse) GetDataObjects() []*DataObject

func (*GetObjectsFromIndexKeysResponse) ProtoMessage

func (*GetObjectsFromIndexKeysResponse) ProtoMessage()

func (*GetObjectsFromIndexKeysResponse) ProtoReflect

func (*GetObjectsFromIndexKeysResponse) Reset

func (*GetObjectsFromIndexKeysResponse) String

type GetObjectsRequest

type GetObjectsRequest struct {

	// Search options to filter the events.
	Options *SearchOptions `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"`
	// The maximum number of objects to return.
	Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

GetObjectsRequest includes search options to filter the events.

func (*GetObjectsRequest) Descriptor deprecated

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

Deprecated: Use GetObjectsRequest.ProtoReflect.Descriptor instead.

func (*GetObjectsRequest) GetLimit

func (x *GetObjectsRequest) GetLimit() int32

func (*GetObjectsRequest) GetOptions

func (x *GetObjectsRequest) GetOptions() *SearchOptions

func (*GetObjectsRequest) ProtoMessage

func (*GetObjectsRequest) ProtoMessage()

func (*GetObjectsRequest) ProtoReflect

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

func (*GetObjectsRequest) Reset

func (x *GetObjectsRequest) Reset()

func (*GetObjectsRequest) String

func (x *GetObjectsRequest) String() string

type GetObjectsResponse

type GetObjectsResponse struct {

	// The list of data retrieved from the objects.
	DataObjects []*DataObject `protobuf:"bytes,1,rep,name=data_objects,json=dataObjects,proto3" json:"data_objects,omitempty"`
	// contains filtered or unexported fields
}

GetObjectsResponse provides the list of data retrieved from the objects.

func (*GetObjectsResponse) Descriptor deprecated

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

Deprecated: Use GetObjectsResponse.ProtoReflect.Descriptor instead.

func (*GetObjectsResponse) GetDataObjects

func (x *GetObjectsResponse) GetDataObjects() []*DataObject

func (*GetObjectsResponse) ProtoMessage

func (*GetObjectsResponse) ProtoMessage()

func (*GetObjectsResponse) ProtoReflect

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

func (*GetObjectsResponse) Reset

func (x *GetObjectsResponse) Reset()

func (*GetObjectsResponse) String

func (x *GetObjectsResponse) String() string

type SearchOptions

type SearchOptions struct {

	// Only include events after this timestamp.
	After *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"`
	// Only include events before this timestamp.
	Before *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=before,proto3" json:"before,omitempty"`
	// Whether to sort results in ascending order by timestamp.
	TimestampAsc *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=timestamp_asc,json=timestampAsc,proto3" json:"timestamp_asc,omitempty"`
	// Primary filler value used to filter events.
	PrimaryFiller *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=primary_filler,json=primaryFiller,proto3" json:"primary_filler,omitempty"`
	// Data type to filter events.
	DataType *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=data_type,json=dataType,proto3" json:"data_type,omitempty"`
	// The subject of the event to filter.
	Subject *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"`
	// Secondary filler value used to filter events.
	SecondaryFiller *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=secondary_filler,json=secondaryFiller,proto3" json:"secondary_filler,omitempty"`
	// The source identifier responsible for creating the data.
	Source *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=source,proto3" json:"source,omitempty"`
	// The producer of the data, source entity responsible for creating the data.
	Producer *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=producer,proto3" json:"producer,omitempty"`
	// Additional optional metadata for more precise filtering.
	Optional *wrapperspb.StringValue `protobuf:"bytes,10,opt,name=optional,proto3" json:"optional,omitempty"`
	// contains filtered or unexported fields
}

SearchOptions provides filtering options to narrow down the search results for objects based on various criteria. If a field is not set, it is not used for filtering.

func (*SearchOptions) Descriptor deprecated

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

Deprecated: Use SearchOptions.ProtoReflect.Descriptor instead.

func (*SearchOptions) GetAfter

func (x *SearchOptions) GetAfter() *timestamppb.Timestamp

func (*SearchOptions) GetBefore

func (x *SearchOptions) GetBefore() *timestamppb.Timestamp

func (*SearchOptions) GetDataType

func (x *SearchOptions) GetDataType() *wrapperspb.StringValue

func (*SearchOptions) GetOptional

func (x *SearchOptions) GetOptional() *wrapperspb.StringValue

func (*SearchOptions) GetPrimaryFiller

func (x *SearchOptions) GetPrimaryFiller() *wrapperspb.StringValue

func (*SearchOptions) GetProducer

func (x *SearchOptions) GetProducer() *wrapperspb.StringValue

func (*SearchOptions) GetSecondaryFiller

func (x *SearchOptions) GetSecondaryFiller() *wrapperspb.StringValue

func (*SearchOptions) GetSource

func (x *SearchOptions) GetSource() *wrapperspb.StringValue

func (*SearchOptions) GetSubject

func (x *SearchOptions) GetSubject() *wrapperspb.StringValue

func (*SearchOptions) GetTimestampAsc

func (x *SearchOptions) GetTimestampAsc() *wrapperspb.BoolValue

func (*SearchOptions) ProtoMessage

func (*SearchOptions) ProtoMessage()

func (*SearchOptions) ProtoReflect

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

func (*SearchOptions) Reset

func (x *SearchOptions) Reset()

func (*SearchOptions) String

func (x *SearchOptions) String() string

type UnimplementedFetchServiceServer

type UnimplementedFetchServiceServer struct{}

UnimplementedFetchServiceServer must be embedded to have forward compatible implementations.

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

func (UnimplementedFetchServiceServer) GetIndexKeys

func (UnimplementedFetchServiceServer) GetLatestIndexKey

func (UnimplementedFetchServiceServer) GetLatestObject

func (UnimplementedFetchServiceServer) GetObjects

type UnsafeFetchServiceServer

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

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

Jump to

Keyboard shortcuts

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