Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGiorpcServer(s grpc.ServiceRegistrar, srv GiorpcServer)
- type DecodeRequest
- func (*DecodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DecodeRequest) GetEncoded() string
- func (x *DecodeRequest) GetEncoding() Encoding
- func (*DecodeRequest) ProtoMessage()
- func (x *DecodeRequest) ProtoReflect() protoreflect.Message
- func (x *DecodeRequest) Reset()
- func (x *DecodeRequest) String() string
- type DecodeResponse
- type EncodeRequest
- func (*EncodeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EncodeRequest) GetDecoded() string
- func (x *EncodeRequest) GetEncoding() Encoding
- func (*EncodeRequest) ProtoMessage()
- func (x *EncodeRequest) ProtoReflect() protoreflect.Message
- func (x *EncodeRequest) Reset()
- func (x *EncodeRequest) String() string
- type EncodeResponse
- type Encoding
- type GiorpcClient
- type GiorpcServer
- type Service
- type UnimplementedGiorpcServer
- type UnsafeGiorpcServer
Constants ¶
const ( Giorpc_Encode_FullMethodName = "/giorpc.Giorpc/Encode" Giorpc_Decode_FullMethodName = "/giorpc.Giorpc/Decode" )
Variables ¶
var ( Encoding_name = map[int32]string{ 0: "ENCODING_UNSPECIFIED", 1: "ENCODING_BASE32_STANDARD", 2: "ENCODING_BASE32_HEXIDECIMAL", 3: "ENCODING_BASE64_STANDARD", 4: "ENCODING_BASE64_URL_SAFE", } Encoding_value = map[string]int32{ "ENCODING_UNSPECIFIED": 0, "ENCODING_BASE32_STANDARD": 1, "ENCODING_BASE32_HEXIDECIMAL": 2, "ENCODING_BASE64_STANDARD": 3, "ENCODING_BASE64_URL_SAFE": 4, } )
Enum value maps for Encoding.
var File_example_proto protoreflect.FileDescriptor
var Giorpc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "giorpc.Giorpc", HandlerType: (*GiorpcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Encode", Handler: _Giorpc_Encode_Handler, }, { MethodName: "Decode", Handler: _Giorpc_Decode_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "example.proto", }
Giorpc_ServiceDesc is the grpc.ServiceDesc for Giorpc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGiorpcServer ¶
func RegisterGiorpcServer(s grpc.ServiceRegistrar, srv GiorpcServer)
Types ¶
type DecodeRequest ¶
type DecodeRequest struct { Encoding Encoding `protobuf:"varint,1,opt,name=encoding,proto3,enum=giorpc.Encoding" json:"encoding,omitempty"` Encoded string `protobuf:"bytes,2,opt,name=encoded,proto3" json:"encoded,omitempty"` // contains filtered or unexported fields }
func (*DecodeRequest) Descriptor
deprecated
func (*DecodeRequest) Descriptor() ([]byte, []int)
Deprecated: Use DecodeRequest.ProtoReflect.Descriptor instead.
func (*DecodeRequest) GetEncoded ¶
func (x *DecodeRequest) GetEncoded() string
func (*DecodeRequest) GetEncoding ¶
func (x *DecodeRequest) GetEncoding() Encoding
func (*DecodeRequest) ProtoMessage ¶
func (*DecodeRequest) ProtoMessage()
func (*DecodeRequest) ProtoReflect ¶
func (x *DecodeRequest) ProtoReflect() protoreflect.Message
func (*DecodeRequest) Reset ¶
func (x *DecodeRequest) Reset()
func (*DecodeRequest) String ¶
func (x *DecodeRequest) String() string
type DecodeResponse ¶
type DecodeResponse struct { Decoded string `protobuf:"bytes,1,opt,name=decoded,proto3" json:"decoded,omitempty"` // contains filtered or unexported fields }
func (*DecodeResponse) Descriptor
deprecated
func (*DecodeResponse) Descriptor() ([]byte, []int)
Deprecated: Use DecodeResponse.ProtoReflect.Descriptor instead.
func (*DecodeResponse) GetDecoded ¶
func (x *DecodeResponse) GetDecoded() string
func (*DecodeResponse) ProtoMessage ¶
func (*DecodeResponse) ProtoMessage()
func (*DecodeResponse) ProtoReflect ¶
func (x *DecodeResponse) ProtoReflect() protoreflect.Message
func (*DecodeResponse) Reset ¶
func (x *DecodeResponse) Reset()
func (*DecodeResponse) String ¶
func (x *DecodeResponse) String() string
type EncodeRequest ¶
type EncodeRequest struct { Encoding Encoding `protobuf:"varint,1,opt,name=encoding,proto3,enum=giorpc.Encoding" json:"encoding,omitempty"` Decoded string `protobuf:"bytes,2,opt,name=decoded,proto3" json:"decoded,omitempty"` // contains filtered or unexported fields }
func (*EncodeRequest) Descriptor
deprecated
func (*EncodeRequest) Descriptor() ([]byte, []int)
Deprecated: Use EncodeRequest.ProtoReflect.Descriptor instead.
func (*EncodeRequest) GetDecoded ¶
func (x *EncodeRequest) GetDecoded() string
func (*EncodeRequest) GetEncoding ¶
func (x *EncodeRequest) GetEncoding() Encoding
func (*EncodeRequest) ProtoMessage ¶
func (*EncodeRequest) ProtoMessage()
func (*EncodeRequest) ProtoReflect ¶
func (x *EncodeRequest) ProtoReflect() protoreflect.Message
func (*EncodeRequest) Reset ¶
func (x *EncodeRequest) Reset()
func (*EncodeRequest) String ¶
func (x *EncodeRequest) String() string
type EncodeResponse ¶
type EncodeResponse struct { Encoded string `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"` // contains filtered or unexported fields }
func (*EncodeResponse) Descriptor
deprecated
func (*EncodeResponse) Descriptor() ([]byte, []int)
Deprecated: Use EncodeResponse.ProtoReflect.Descriptor instead.
func (*EncodeResponse) GetEncoded ¶
func (x *EncodeResponse) GetEncoded() string
func (*EncodeResponse) ProtoMessage ¶
func (*EncodeResponse) ProtoMessage()
func (*EncodeResponse) ProtoReflect ¶
func (x *EncodeResponse) ProtoReflect() protoreflect.Message
func (*EncodeResponse) Reset ¶
func (x *EncodeResponse) Reset()
func (*EncodeResponse) String ¶
func (x *EncodeResponse) String() string
type Encoding ¶
type Encoding int32
func (Encoding) Descriptor ¶
func (Encoding) Descriptor() protoreflect.EnumDescriptor
func (Encoding) EnumDescriptor
deprecated
func (Encoding) Number ¶
func (x Encoding) Number() protoreflect.EnumNumber
func (Encoding) Type ¶
func (Encoding) Type() protoreflect.EnumType
type GiorpcClient ¶
type GiorpcClient interface { Encode(ctx context.Context, in *EncodeRequest, opts ...grpc.CallOption) (*EncodeResponse, error) Decode(ctx context.Context, in *DecodeRequest, opts ...grpc.CallOption) (*DecodeResponse, error) }
GiorpcClient is the client API for Giorpc 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 NewGiorpcClient ¶
func NewGiorpcClient(cc grpc.ClientConnInterface) GiorpcClient
type GiorpcServer ¶
type GiorpcServer interface { Encode(context.Context, *EncodeRequest) (*EncodeResponse, error) Decode(context.Context, *DecodeRequest) (*DecodeResponse, error) // contains filtered or unexported methods }
GiorpcServer is the server API for Giorpc service. All implementations must embed UnimplementedGiorpcServer for forward compatibility.
type Service ¶
type Service struct {
UnimplementedGiorpcServer
}
func (*Service) Decode ¶
func (s *Service) Decode(ctx context.Context, request *DecodeRequest) (*DecodeResponse, error)
func (*Service) Encode ¶
func (s *Service) Encode(ctx context.Context, request *EncodeRequest) (*EncodeResponse, error)
type UnimplementedGiorpcServer ¶
type UnimplementedGiorpcServer struct{}
UnimplementedGiorpcServer 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 (UnimplementedGiorpcServer) Decode ¶
func (UnimplementedGiorpcServer) Decode(context.Context, *DecodeRequest) (*DecodeResponse, error)
func (UnimplementedGiorpcServer) Encode ¶
func (UnimplementedGiorpcServer) Encode(context.Context, *EncodeRequest) (*EncodeResponse, error)
type UnsafeGiorpcServer ¶
type UnsafeGiorpcServer interface {
// contains filtered or unexported methods
}
UnsafeGiorpcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GiorpcServer will result in compilation errors.