Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_transform_proto protoreflect.FileDescriptor
var Transformer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "transform.transformer", HandlerType: (*TransformerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "expand", Handler: _Transformer_Expand_Handler, }, { MethodName: "shorten", Handler: _Transformer_Shorten_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "transform.proto", }
Transformer_ServiceDesc is the grpc.ServiceDesc for Transformer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTransformerServer ¶
func RegisterTransformerServer(s grpc.ServiceRegistrar, srv TransformerServer)
Types ¶
type ExpandReq ¶
type ExpandReq struct { Shorten string `protobuf:"bytes,1,opt,name=shorten,proto3" json:"shorten,omitempty"` // contains filtered or unexported fields }
func (*ExpandReq) Descriptor
deprecated
func (*ExpandReq) GetShorten ¶
func (*ExpandReq) ProtoMessage ¶
func (*ExpandReq) ProtoMessage()
func (*ExpandReq) ProtoReflect ¶
func (x *ExpandReq) ProtoReflect() protoreflect.Message
type ExpandResp ¶
type ExpandResp struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*ExpandResp) Descriptor
deprecated
func (*ExpandResp) Descriptor() ([]byte, []int)
Deprecated: Use ExpandResp.ProtoReflect.Descriptor instead.
func (*ExpandResp) GetUrl ¶
func (x *ExpandResp) GetUrl() string
func (*ExpandResp) ProtoMessage ¶
func (*ExpandResp) ProtoMessage()
func (*ExpandResp) ProtoReflect ¶
func (x *ExpandResp) ProtoReflect() protoreflect.Message
func (*ExpandResp) Reset ¶
func (x *ExpandResp) Reset()
func (*ExpandResp) String ¶
func (x *ExpandResp) String() string
type ShortenReq ¶
type ShortenReq struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*ShortenReq) Descriptor
deprecated
func (*ShortenReq) Descriptor() ([]byte, []int)
Deprecated: Use ShortenReq.ProtoReflect.Descriptor instead.
func (*ShortenReq) GetUrl ¶
func (x *ShortenReq) GetUrl() string
func (*ShortenReq) ProtoMessage ¶
func (*ShortenReq) ProtoMessage()
func (*ShortenReq) ProtoReflect ¶
func (x *ShortenReq) ProtoReflect() protoreflect.Message
func (*ShortenReq) Reset ¶
func (x *ShortenReq) Reset()
func (*ShortenReq) String ¶
func (x *ShortenReq) String() string
type ShortenResp ¶
type ShortenResp struct { Shorten string `protobuf:"bytes,1,opt,name=shorten,proto3" json:"shorten,omitempty"` // contains filtered or unexported fields }
func (*ShortenResp) Descriptor
deprecated
func (*ShortenResp) Descriptor() ([]byte, []int)
Deprecated: Use ShortenResp.ProtoReflect.Descriptor instead.
func (*ShortenResp) GetShorten ¶
func (x *ShortenResp) GetShorten() string
func (*ShortenResp) ProtoMessage ¶
func (*ShortenResp) ProtoMessage()
func (*ShortenResp) ProtoReflect ¶
func (x *ShortenResp) ProtoReflect() protoreflect.Message
func (*ShortenResp) Reset ¶
func (x *ShortenResp) Reset()
func (*ShortenResp) String ¶
func (x *ShortenResp) String() string
type TransformerClient ¶
type TransformerClient interface { Expand(ctx context.Context, in *ExpandReq, opts ...grpc.CallOption) (*ExpandResp, error) Shorten(ctx context.Context, in *ShortenReq, opts ...grpc.CallOption) (*ShortenResp, error) }
TransformerClient is the client API for Transformer 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 NewTransformerClient ¶
func NewTransformerClient(cc grpc.ClientConnInterface) TransformerClient
type TransformerServer ¶
type TransformerServer interface { Expand(context.Context, *ExpandReq) (*ExpandResp, error) Shorten(context.Context, *ShortenReq) (*ShortenResp, error) // contains filtered or unexported methods }
TransformerServer is the server API for Transformer service. All implementations must embed UnimplementedTransformerServer for forward compatibility
type UnimplementedTransformerServer ¶
type UnimplementedTransformerServer struct { }
UnimplementedTransformerServer must be embedded to have forward compatible implementations.
func (UnimplementedTransformerServer) Expand ¶
func (UnimplementedTransformerServer) Expand(context.Context, *ExpandReq) (*ExpandResp, error)
func (UnimplementedTransformerServer) Shorten ¶
func (UnimplementedTransformerServer) Shorten(context.Context, *ShortenReq) (*ShortenResp, error)
type UnsafeTransformerServer ¶
type UnsafeTransformerServer interface {
// contains filtered or unexported methods
}
UnsafeTransformerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TransformerServer will result in compilation errors.