entityproto

package module
v0.0.0-...-4092974 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_entity_proto protoreflect.FileDescriptor
View Source
var RPC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "entityproto.RPC",
	HandlerType: (*RPCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Index",
			Handler:    _RPC_Index_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _RPC_Get_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _RPC_Create_Handler,
		},
		{
			MethodName: "Patch",
			Handler:    _RPC_Patch_Handler,
		},
		{
			MethodName: "Put",
			Handler:    _RPC_Put_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _RPC_Delete_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Import",
			Handler:       _RPC_Import_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "entity.proto",
}

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

Functions

func RegisterRPCServer

func RegisterRPCServer(s grpc.ServiceRegistrar, srv RPCServer)

Types

type CommandResponse

type CommandResponse struct {
	RowsAffected int64 `protobuf:"varint,1,opt,name=rowsAffected,proto3" json:"rowsAffected,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandResponse) Descriptor deprecated

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

Deprecated: Use CommandResponse.ProtoReflect.Descriptor instead.

func (*CommandResponse) GetRowsAffected

func (x *CommandResponse) GetRowsAffected() int64

func (*CommandResponse) ProtoMessage

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) ProtoReflect

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

func (*CommandResponse) Reset

func (x *CommandResponse) Reset()

func (*CommandResponse) String

func (x *CommandResponse) String() string

type Entity

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

func (*Entity) Descriptor deprecated

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

Deprecated: Use Entity.ProtoReflect.Descriptor instead.

func (*Entity) GetJson

func (x *Entity) GetJson() []byte

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) ProtoReflect

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

func (*Entity) Reset

func (x *Entity) Reset()

func (*Entity) String

func (x *Entity) String() string

type ImportResponse

type ImportResponse struct {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	RowsAffected int64  `protobuf:"varint,2,opt,name=rowsAffected,proto3" json:"rowsAffected,omitempty"`
	Errors       []byte `protobuf:"bytes,3,opt,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*ImportResponse) Descriptor deprecated

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

Deprecated: Use ImportResponse.ProtoReflect.Descriptor instead.

func (*ImportResponse) GetErrors

func (x *ImportResponse) GetErrors() []byte

func (*ImportResponse) GetRowsAffected

func (x *ImportResponse) GetRowsAffected() int64

func (*ImportResponse) GetSuccess

func (x *ImportResponse) GetSuccess() bool

func (*ImportResponse) ProtoMessage

func (*ImportResponse) ProtoMessage()

func (*ImportResponse) ProtoReflect

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

func (*ImportResponse) Reset

func (x *ImportResponse) Reset()

func (*ImportResponse) String

func (x *ImportResponse) String() string

type IndexRequest

type IndexRequest struct {
	CurrentPage int64 `protobuf:"varint,1,opt,name=currentPage,proto3" json:"currentPage,omitempty"`
	PerPage     int64 `protobuf:"varint,2,opt,name=perPage,proto3" json:"perPage,omitempty"`
	// contains filtered or unexported fields
}

func (*IndexRequest) Descriptor deprecated

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

Deprecated: Use IndexRequest.ProtoReflect.Descriptor instead.

func (*IndexRequest) GetCurrentPage

func (x *IndexRequest) GetCurrentPage() int64

func (*IndexRequest) GetPerPage

func (x *IndexRequest) GetPerPage() int64

func (*IndexRequest) ProtoMessage

func (*IndexRequest) ProtoMessage()

func (*IndexRequest) ProtoReflect

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

func (*IndexRequest) Reset

func (x *IndexRequest) Reset()

func (*IndexRequest) String

func (x *IndexRequest) String() string

type IndexResponse

type IndexResponse struct {
	Results     []*Entity `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	CurrentPage int64     `protobuf:"varint,2,opt,name=currentPage,proto3" json:"currentPage,omitempty"`
	PerPage     int64     `protobuf:"varint,3,opt,name=perPage,proto3" json:"perPage,omitempty"`
	TotalCount  int64     `protobuf:"varint,4,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
	PageCount   int64     `protobuf:"varint,5,opt,name=pageCount,proto3" json:"pageCount,omitempty"`
	// contains filtered or unexported fields
}

func (*IndexResponse) Descriptor deprecated

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

Deprecated: Use IndexResponse.ProtoReflect.Descriptor instead.

func (*IndexResponse) GetCurrentPage

func (x *IndexResponse) GetCurrentPage() int64

func (*IndexResponse) GetPageCount

func (x *IndexResponse) GetPageCount() int64

func (*IndexResponse) GetPerPage

func (x *IndexResponse) GetPerPage() int64

func (*IndexResponse) GetResults

func (x *IndexResponse) GetResults() []*Entity

func (*IndexResponse) GetTotalCount

func (x *IndexResponse) GetTotalCount() int64

func (*IndexResponse) ProtoMessage

func (*IndexResponse) ProtoMessage()

func (*IndexResponse) ProtoReflect

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

func (*IndexResponse) Reset

func (x *IndexResponse) Reset()

func (*IndexResponse) String

func (x *IndexResponse) String() string

type KeyEntityRequest

type KeyEntityRequest struct {
	Key  string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Json []byte `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"`
	// contains filtered or unexported fields
}

func (*KeyEntityRequest) Descriptor deprecated

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

Deprecated: Use KeyEntityRequest.ProtoReflect.Descriptor instead.

func (*KeyEntityRequest) GetJson

func (x *KeyEntityRequest) GetJson() []byte

func (*KeyEntityRequest) GetKey

func (x *KeyEntityRequest) GetKey() string

func (*KeyEntityRequest) ProtoMessage

func (*KeyEntityRequest) ProtoMessage()

func (*KeyEntityRequest) ProtoReflect

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

func (*KeyEntityRequest) Reset

func (x *KeyEntityRequest) Reset()

func (*KeyEntityRequest) String

func (x *KeyEntityRequest) String() string

type KeyRequest

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

func (*KeyRequest) Descriptor deprecated

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

Deprecated: Use KeyRequest.ProtoReflect.Descriptor instead.

func (*KeyRequest) GetKey

func (x *KeyRequest) GetKey() string

func (*KeyRequest) ProtoMessage

func (*KeyRequest) ProtoMessage()

func (*KeyRequest) ProtoReflect

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

func (*KeyRequest) Reset

func (x *KeyRequest) Reset()

func (*KeyRequest) String

func (x *KeyRequest) String() string

type RPCClient

type RPCClient interface {
	Index(ctx context.Context, in *IndexRequest, opts ...grpc.CallOption) (*IndexResponse, error)
	Get(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*Entity, error)
	Create(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*CommandResponse, error)
	Patch(ctx context.Context, in *KeyEntityRequest, opts ...grpc.CallOption) (*CommandResponse, error)
	Put(ctx context.Context, in *KeyEntityRequest, opts ...grpc.CallOption) (*CommandResponse, error)
	Delete(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*CommandResponse, error)
	Import(ctx context.Context, opts ...grpc.CallOption) (RPC_ImportClient, error)
}

RPCClient is the client API for RPC 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 NewRPCClient

func NewRPCClient(cc grpc.ClientConnInterface) RPCClient

type RPCServer

RPCServer is the server API for RPC service. All implementations must embed UnimplementedRPCServer for forward compatibility

type RPC_ImportClient

type RPC_ImportClient interface {
	Send(*Entity) error
	CloseAndRecv() (*ImportResponse, error)
	grpc.ClientStream
}

type RPC_ImportServer

type RPC_ImportServer interface {
	SendAndClose(*ImportResponse) error
	Recv() (*Entity, error)
	grpc.ServerStream
}

type UnimplementedRPCServer

type UnimplementedRPCServer struct {
}

UnimplementedRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedRPCServer) Create

func (UnimplementedRPCServer) Delete

func (UnimplementedRPCServer) Get

func (UnimplementedRPCServer) Import

func (UnimplementedRPCServer) Index

func (UnimplementedRPCServer) Patch

func (UnimplementedRPCServer) Put

type UnsafeRPCServer

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

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

Jump to

Keyboard shortcuts

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