Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterHasherServer(s grpc.ServiceRegistrar, srv HasherServer)
- type Handler
- type HashRequest
- type HashRequestItem
- func (*HashRequestItem) Descriptor() ([]byte, []int)deprecated
- func (x *HashRequestItem) GetData() string
- func (x *HashRequestItem) GetId() string
- func (x *HashRequestItem) GetType() HashType
- func (*HashRequestItem) ProtoMessage()
- func (x *HashRequestItem) ProtoReflect() protoreflect.Message
- func (x *HashRequestItem) Reset()
- func (x *HashRequestItem) String() string
- type HashResponse
- func (*HashResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HashResponse) GetItems() []*HashResponseItem
- func (x *HashResponse) GetMessage() string
- func (*HashResponse) ProtoMessage()
- func (x *HashResponse) ProtoReflect() protoreflect.Message
- func (x *HashResponse) Reset()
- func (x *HashResponse) String() string
- type HashResponseItem
- func (*HashResponseItem) Descriptor() ([]byte, []int)deprecated
- func (x *HashResponseItem) GetId() string
- func (x *HashResponseItem) GetResult() string
- func (*HashResponseItem) ProtoMessage()
- func (x *HashResponseItem) ProtoReflect() protoreflect.Message
- func (x *HashResponseItem) Reset()
- func (x *HashResponseItem) String() string
- type HashType
- type HasherClient
- type HasherServer
- type IUsecase
- type UnimplementedHasherServer
- type UnsafeHasherServer
Constants ¶
const (
Hasher_GetHashes_FullMethodName = "/hasher.Hasher/GetHashes"
)
Variables ¶
var ( HashType_name = map[int32]string{ 0: "HASH_UNSPECIFIED", 1: "HASH_SHA256", 2: "HASH_SHA512", } HashType_value = map[string]int32{ "HASH_UNSPECIFIED": 0, "HASH_SHA256": 1, "HASH_SHA512": 2, } )
Enum value maps for HashType.
var File_hasher_proto protoreflect.FileDescriptor
var Hasher_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hasher.Hasher", HandlerType: (*HasherServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetHashes", Handler: _Hasher_GetHashes_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hasher.proto", }
Hasher_ServiceDesc is the grpc.ServiceDesc for Hasher service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHasherServer ¶
func RegisterHasherServer(s grpc.ServiceRegistrar, srv HasherServer)
Types ¶
type Handler ¶
func (*Handler) GetHashes ¶
func (h *Handler) GetHashes(ctx context.Context, request *HashRequest) (response *HashResponse, err error)
type HashRequest ¶
type HashRequest struct { Items []*HashRequestItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*HashRequest) Descriptor
deprecated
func (*HashRequest) Descriptor() ([]byte, []int)
Deprecated: Use HashRequest.ProtoReflect.Descriptor instead.
func (*HashRequest) GetItems ¶
func (x *HashRequest) GetItems() []*HashRequestItem
func (*HashRequest) ProtoMessage ¶
func (*HashRequest) ProtoMessage()
func (*HashRequest) ProtoReflect ¶
func (x *HashRequest) ProtoReflect() protoreflect.Message
func (*HashRequest) Reset ¶
func (x *HashRequest) Reset()
func (*HashRequest) String ¶
func (x *HashRequest) String() string
type HashRequestItem ¶
type HashRequestItem struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Type HashType `protobuf:"varint,2,opt,name=type,proto3,enum=hasher.HashType" json:"type,omitempty"` Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*HashRequestItem) Descriptor
deprecated
func (*HashRequestItem) Descriptor() ([]byte, []int)
Deprecated: Use HashRequestItem.ProtoReflect.Descriptor instead.
func (*HashRequestItem) GetData ¶
func (x *HashRequestItem) GetData() string
func (*HashRequestItem) GetId ¶
func (x *HashRequestItem) GetId() string
func (*HashRequestItem) GetType ¶
func (x *HashRequestItem) GetType() HashType
func (*HashRequestItem) ProtoMessage ¶
func (*HashRequestItem) ProtoMessage()
func (*HashRequestItem) ProtoReflect ¶
func (x *HashRequestItem) ProtoReflect() protoreflect.Message
func (*HashRequestItem) Reset ¶
func (x *HashRequestItem) Reset()
func (*HashRequestItem) String ¶
func (x *HashRequestItem) String() string
type HashResponse ¶
type HashResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Items []*HashResponseItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*HashResponse) Descriptor
deprecated
func (*HashResponse) Descriptor() ([]byte, []int)
Deprecated: Use HashResponse.ProtoReflect.Descriptor instead.
func (*HashResponse) GetItems ¶
func (x *HashResponse) GetItems() []*HashResponseItem
func (*HashResponse) GetMessage ¶
func (x *HashResponse) GetMessage() string
func (*HashResponse) ProtoMessage ¶
func (*HashResponse) ProtoMessage()
func (*HashResponse) ProtoReflect ¶
func (x *HashResponse) ProtoReflect() protoreflect.Message
func (*HashResponse) Reset ¶
func (x *HashResponse) Reset()
func (*HashResponse) String ¶
func (x *HashResponse) String() string
type HashResponseItem ¶
type HashResponseItem struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Result string `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
func (*HashResponseItem) Descriptor
deprecated
func (*HashResponseItem) Descriptor() ([]byte, []int)
Deprecated: Use HashResponseItem.ProtoReflect.Descriptor instead.
func (*HashResponseItem) GetId ¶
func (x *HashResponseItem) GetId() string
func (*HashResponseItem) GetResult ¶
func (x *HashResponseItem) GetResult() string
func (*HashResponseItem) ProtoMessage ¶
func (*HashResponseItem) ProtoMessage()
func (*HashResponseItem) ProtoReflect ¶
func (x *HashResponseItem) ProtoReflect() protoreflect.Message
func (*HashResponseItem) Reset ¶
func (x *HashResponseItem) Reset()
func (*HashResponseItem) String ¶
func (x *HashResponseItem) String() string
type HashType ¶
type HashType int32
func (HashType) Descriptor ¶
func (HashType) Descriptor() protoreflect.EnumDescriptor
func (HashType) EnumDescriptor
deprecated
func (HashType) Number ¶
func (x HashType) Number() protoreflect.EnumNumber
func (HashType) Type ¶
func (HashType) Type() protoreflect.EnumType
type HasherClient ¶
type HasherClient interface {
GetHashes(ctx context.Context, in *HashRequest, opts ...grpc.CallOption) (*HashResponse, error)
}
HasherClient is the client API for Hasher 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 NewHasherClient ¶
func NewHasherClient(cc grpc.ClientConnInterface) HasherClient
type HasherServer ¶
type HasherServer interface { GetHashes(context.Context, *HashRequest) (*HashResponse, error) // contains filtered or unexported methods }
HasherServer is the server API for Hasher service. All implementations must embed UnimplementedHasherServer for forward compatibility
type IUsecase ¶
type IUsecase interface {
GetHashes(ctx context.Context, req []entity.HashRequestItem) ([]entity.HashResponseItem, error)
}
type UnimplementedHasherServer ¶
type UnimplementedHasherServer struct { }
UnimplementedHasherServer must be embedded to have forward compatible implementations.
func (UnimplementedHasherServer) GetHashes ¶
func (UnimplementedHasherServer) GetHashes(context.Context, *HashRequest) (*HashResponse, error)
type UnsafeHasherServer ¶
type UnsafeHasherServer interface {
// contains filtered or unexported methods
}
UnsafeHasherServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HasherServer will result in compilation errors.