transform

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_transform_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use ExpandReq.ProtoReflect.Descriptor instead.

func (*ExpandReq) GetShorten

func (x *ExpandReq) GetShorten() string

func (*ExpandReq) ProtoMessage

func (*ExpandReq) ProtoMessage()

func (*ExpandReq) ProtoReflect

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

func (*ExpandReq) Reset

func (x *ExpandReq) Reset()

func (*ExpandReq) String

func (x *ExpandReq) String() string

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.

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) Shorten

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.

Jump to

Keyboard shortcuts

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