Documentation ¶
Index ¶
- Variables
- func RegisterShortLinkServiceServer(s grpc.ServiceRegistrar, srv ShortLinkServiceServer)
- type CreateShortLinkRequest
- func (*CreateShortLinkRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShortLinkRequest) GetOriginalLink() string
- func (*CreateShortLinkRequest) ProtoMessage()
- func (x *CreateShortLinkRequest) ProtoReflect() protoreflect.Message
- func (x *CreateShortLinkRequest) Reset()
- func (x *CreateShortLinkRequest) String() string
- type CreateShortLinkResponse
- func (*CreateShortLinkResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateShortLinkResponse) GetExpiresAt() string
- func (x *CreateShortLinkResponse) GetShortLink() string
- func (*CreateShortLinkResponse) ProtoMessage()
- func (x *CreateShortLinkResponse) ProtoReflect() protoreflect.Message
- func (x *CreateShortLinkResponse) Reset()
- func (x *CreateShortLinkResponse) String() string
- type ShortLinkRequest
- type ShortLinkResponse
- func (*ShortLinkResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ShortLinkResponse) GetOriginalLink() string
- func (*ShortLinkResponse) ProtoMessage()
- func (x *ShortLinkResponse) ProtoReflect() protoreflect.Message
- func (x *ShortLinkResponse) Reset()
- func (x *ShortLinkResponse) String() string
- type ShortLinkServiceClient
- type ShortLinkServiceServer
- type UnimplementedShortLinkServiceServer
- type UnsafeShortLinkServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_link_proto protoreflect.FileDescriptor
var ShortLinkService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "link.ShortLinkService", HandlerType: (*ShortLinkServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetFullLink", Handler: _ShortLinkService_GetFullLink_Handler, }, { MethodName: "CreateShortLink", Handler: _ShortLinkService_CreateShortLink_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "link.proto", }
ShortLinkService_ServiceDesc is the grpc.ServiceDesc for ShortLinkService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterShortLinkServiceServer ¶
func RegisterShortLinkServiceServer(s grpc.ServiceRegistrar, srv ShortLinkServiceServer)
Types ¶
type CreateShortLinkRequest ¶
type CreateShortLinkRequest struct { OriginalLink string `protobuf:"bytes,1,opt,name=originalLink,proto3" json:"originalLink,omitempty"` // contains filtered or unexported fields }
func (*CreateShortLinkRequest) Descriptor
deprecated
func (*CreateShortLinkRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateShortLinkRequest.ProtoReflect.Descriptor instead.
func (*CreateShortLinkRequest) GetOriginalLink ¶
func (x *CreateShortLinkRequest) GetOriginalLink() string
func (*CreateShortLinkRequest) ProtoMessage ¶
func (*CreateShortLinkRequest) ProtoMessage()
func (*CreateShortLinkRequest) ProtoReflect ¶
func (x *CreateShortLinkRequest) ProtoReflect() protoreflect.Message
func (*CreateShortLinkRequest) Reset ¶
func (x *CreateShortLinkRequest) Reset()
func (*CreateShortLinkRequest) String ¶
func (x *CreateShortLinkRequest) String() string
type CreateShortLinkResponse ¶
type CreateShortLinkResponse struct { ShortLink string `protobuf:"bytes,1,opt,name=shortLink,proto3" json:"shortLink,omitempty"` ExpiresAt string `protobuf:"bytes,2,opt,name=expiresAt,proto3" json:"expiresAt,omitempty"` // contains filtered or unexported fields }
func (*CreateShortLinkResponse) Descriptor
deprecated
func (*CreateShortLinkResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateShortLinkResponse.ProtoReflect.Descriptor instead.
func (*CreateShortLinkResponse) GetExpiresAt ¶
func (x *CreateShortLinkResponse) GetExpiresAt() string
func (*CreateShortLinkResponse) GetShortLink ¶
func (x *CreateShortLinkResponse) GetShortLink() string
func (*CreateShortLinkResponse) ProtoMessage ¶
func (*CreateShortLinkResponse) ProtoMessage()
func (*CreateShortLinkResponse) ProtoReflect ¶
func (x *CreateShortLinkResponse) ProtoReflect() protoreflect.Message
func (*CreateShortLinkResponse) Reset ¶
func (x *CreateShortLinkResponse) Reset()
func (*CreateShortLinkResponse) String ¶
func (x *CreateShortLinkResponse) String() string
type ShortLinkRequest ¶
type ShortLinkRequest struct { ShortLink string `protobuf:"bytes,1,opt,name=shortLink,proto3" json:"shortLink,omitempty"` // contains filtered or unexported fields }
func (*ShortLinkRequest) Descriptor
deprecated
func (*ShortLinkRequest) Descriptor() ([]byte, []int)
Deprecated: Use ShortLinkRequest.ProtoReflect.Descriptor instead.
func (*ShortLinkRequest) GetShortLink ¶
func (x *ShortLinkRequest) GetShortLink() string
func (*ShortLinkRequest) ProtoMessage ¶
func (*ShortLinkRequest) ProtoMessage()
func (*ShortLinkRequest) ProtoReflect ¶
func (x *ShortLinkRequest) ProtoReflect() protoreflect.Message
func (*ShortLinkRequest) Reset ¶
func (x *ShortLinkRequest) Reset()
func (*ShortLinkRequest) String ¶
func (x *ShortLinkRequest) String() string
type ShortLinkResponse ¶
type ShortLinkResponse struct { OriginalLink string `protobuf:"bytes,1,opt,name=originalLink,proto3" json:"originalLink,omitempty"` // contains filtered or unexported fields }
func (*ShortLinkResponse) Descriptor
deprecated
func (*ShortLinkResponse) Descriptor() ([]byte, []int)
Deprecated: Use ShortLinkResponse.ProtoReflect.Descriptor instead.
func (*ShortLinkResponse) GetOriginalLink ¶
func (x *ShortLinkResponse) GetOriginalLink() string
func (*ShortLinkResponse) ProtoMessage ¶
func (*ShortLinkResponse) ProtoMessage()
func (*ShortLinkResponse) ProtoReflect ¶
func (x *ShortLinkResponse) ProtoReflect() protoreflect.Message
func (*ShortLinkResponse) Reset ¶
func (x *ShortLinkResponse) Reset()
func (*ShortLinkResponse) String ¶
func (x *ShortLinkResponse) String() string
type ShortLinkServiceClient ¶
type ShortLinkServiceClient interface { GetFullLink(ctx context.Context, in *ShortLinkRequest, opts ...grpc.CallOption) (*ShortLinkResponse, error) CreateShortLink(ctx context.Context, in *CreateShortLinkRequest, opts ...grpc.CallOption) (*CreateShortLinkResponse, error) }
ShortLinkServiceClient is the client API for ShortLinkService 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 NewShortLinkServiceClient ¶
func NewShortLinkServiceClient(cc grpc.ClientConnInterface) ShortLinkServiceClient
type ShortLinkServiceServer ¶
type ShortLinkServiceServer interface { GetFullLink(context.Context, *ShortLinkRequest) (*ShortLinkResponse, error) CreateShortLink(context.Context, *CreateShortLinkRequest) (*CreateShortLinkResponse, error) // contains filtered or unexported methods }
ShortLinkServiceServer is the server API for ShortLinkService service. All implementations must embed UnimplementedShortLinkServiceServer for forward compatibility
type UnimplementedShortLinkServiceServer ¶
type UnimplementedShortLinkServiceServer struct { }
UnimplementedShortLinkServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedShortLinkServiceServer) CreateShortLink ¶
func (UnimplementedShortLinkServiceServer) CreateShortLink(context.Context, *CreateShortLinkRequest) (*CreateShortLinkResponse, error)
func (UnimplementedShortLinkServiceServer) GetFullLink ¶
func (UnimplementedShortLinkServiceServer) GetFullLink(context.Context, *ShortLinkRequest) (*ShortLinkResponse, error)
type UnsafeShortLinkServiceServer ¶
type UnsafeShortLinkServiceServer interface {
// contains filtered or unexported methods
}
UnsafeShortLinkServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShortLinkServiceServer will result in compilation errors.