Documentation
¶
Index ¶
- Variables
- func RegisterLinkServiceServer(s grpc.ServiceRegistrar, srv LinkServiceServer)
- type Link
- type LinkServiceClient
- type LinkServiceServer
- type NewLinkRequest
- type NewLinkResponse
- type ShortURLToLinkRequest
- func (*ShortURLToLinkRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ShortURLToLinkRequest) GetShort() string
- func (*ShortURLToLinkRequest) ProtoMessage()
- func (x *ShortURLToLinkRequest) ProtoReflect() protoreflect.Message
- func (x *ShortURLToLinkRequest) Reset()
- func (x *ShortURLToLinkRequest) String() string
- type ShortURLToLinkResponse
- func (*ShortURLToLinkResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ShortURLToLinkResponse) GetLink() *Link
- func (*ShortURLToLinkResponse) ProtoMessage()
- func (x *ShortURLToLinkResponse) ProtoReflect() protoreflect.Message
- func (x *ShortURLToLinkResponse) Reset()
- func (x *ShortURLToLinkResponse) String() string
- type UnimplementedLinkServiceServer
- type UnsafeLinkServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_service_proto protoreflect.FileDescriptor
var LinkService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.LinkService", HandlerType: (*LinkServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "NewLink", Handler: _LinkService_NewLink_Handler, }, { MethodName: "ShortURLToLink", Handler: _LinkService_ShortURLToLink_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service.proto", }
LinkService_ServiceDesc is the grpc.ServiceDesc for LinkService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLinkServiceServer ¶
func RegisterLinkServiceServer(s grpc.ServiceRegistrar, srv LinkServiceServer)
Types ¶
type Link ¶
type Link struct {
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Original string `protobuf:"bytes,2,opt,name=original,proto3" json:"original,omitempty"`
Short string `protobuf:"bytes,3,opt,name=short,proto3" json:"short,omitempty"`
// contains filtered or unexported fields
}
func (*Link) Descriptor
deprecated
func (*Link) GetOriginal ¶
func (*Link) ProtoMessage ¶
func (*Link) ProtoMessage()
func (*Link) ProtoReflect ¶
func (x *Link) ProtoReflect() protoreflect.Message
type LinkServiceClient ¶
type LinkServiceClient interface {
NewLink(ctx context.Context, in *NewLinkRequest, opts ...grpc.CallOption) (*NewLinkResponse, error)
ShortURLToLink(ctx context.Context, in *ShortURLToLinkRequest, opts ...grpc.CallOption) (*ShortURLToLinkResponse, error)
}
LinkServiceClient is the client API for LinkService 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 NewLinkServiceClient ¶
func NewLinkServiceClient(cc grpc.ClientConnInterface) LinkServiceClient
type LinkServiceServer ¶
type LinkServiceServer interface {
NewLink(context.Context, *NewLinkRequest) (*NewLinkResponse, error)
ShortURLToLink(context.Context, *ShortURLToLinkRequest) (*ShortURLToLinkResponse, error)
// contains filtered or unexported methods
}
LinkServiceServer is the server API for LinkService service. All implementations must embed UnimplementedLinkServiceServer for forward compatibility
type NewLinkRequest ¶
type NewLinkRequest struct {
Original string `protobuf:"bytes,1,opt,name=original,proto3" json:"original,omitempty"`
// contains filtered or unexported fields
}
func (*NewLinkRequest) Descriptor
deprecated
func (*NewLinkRequest) Descriptor() ([]byte, []int)
Deprecated: Use NewLinkRequest.ProtoReflect.Descriptor instead.
func (*NewLinkRequest) GetOriginal ¶
func (x *NewLinkRequest) GetOriginal() string
func (*NewLinkRequest) ProtoMessage ¶
func (*NewLinkRequest) ProtoMessage()
func (*NewLinkRequest) ProtoReflect ¶
func (x *NewLinkRequest) ProtoReflect() protoreflect.Message
func (*NewLinkRequest) Reset ¶
func (x *NewLinkRequest) Reset()
func (*NewLinkRequest) String ¶
func (x *NewLinkRequest) String() string
type NewLinkResponse ¶
type NewLinkResponse struct {
Link *Link `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"`
// contains filtered or unexported fields
}
func (*NewLinkResponse) Descriptor
deprecated
func (*NewLinkResponse) Descriptor() ([]byte, []int)
Deprecated: Use NewLinkResponse.ProtoReflect.Descriptor instead.
func (*NewLinkResponse) GetLink ¶
func (x *NewLinkResponse) GetLink() *Link
func (*NewLinkResponse) ProtoMessage ¶
func (*NewLinkResponse) ProtoMessage()
func (*NewLinkResponse) ProtoReflect ¶
func (x *NewLinkResponse) ProtoReflect() protoreflect.Message
func (*NewLinkResponse) Reset ¶
func (x *NewLinkResponse) Reset()
func (*NewLinkResponse) String ¶
func (x *NewLinkResponse) String() string
type ShortURLToLinkRequest ¶
type ShortURLToLinkRequest struct {
Short string `protobuf:"bytes,1,opt,name=short,proto3" json:"short,omitempty"`
// contains filtered or unexported fields
}
func (*ShortURLToLinkRequest) Descriptor
deprecated
func (*ShortURLToLinkRequest) Descriptor() ([]byte, []int)
Deprecated: Use ShortURLToLinkRequest.ProtoReflect.Descriptor instead.
func (*ShortURLToLinkRequest) GetShort ¶
func (x *ShortURLToLinkRequest) GetShort() string
func (*ShortURLToLinkRequest) ProtoMessage ¶
func (*ShortURLToLinkRequest) ProtoMessage()
func (*ShortURLToLinkRequest) ProtoReflect ¶
func (x *ShortURLToLinkRequest) ProtoReflect() protoreflect.Message
func (*ShortURLToLinkRequest) Reset ¶
func (x *ShortURLToLinkRequest) Reset()
func (*ShortURLToLinkRequest) String ¶
func (x *ShortURLToLinkRequest) String() string
type ShortURLToLinkResponse ¶
type ShortURLToLinkResponse struct {
Link *Link `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"`
// contains filtered or unexported fields
}
func (*ShortURLToLinkResponse) Descriptor
deprecated
func (*ShortURLToLinkResponse) Descriptor() ([]byte, []int)
Deprecated: Use ShortURLToLinkResponse.ProtoReflect.Descriptor instead.
func (*ShortURLToLinkResponse) GetLink ¶
func (x *ShortURLToLinkResponse) GetLink() *Link
func (*ShortURLToLinkResponse) ProtoMessage ¶
func (*ShortURLToLinkResponse) ProtoMessage()
func (*ShortURLToLinkResponse) ProtoReflect ¶
func (x *ShortURLToLinkResponse) ProtoReflect() protoreflect.Message
func (*ShortURLToLinkResponse) Reset ¶
func (x *ShortURLToLinkResponse) Reset()
func (*ShortURLToLinkResponse) String ¶
func (x *ShortURLToLinkResponse) String() string
type UnimplementedLinkServiceServer ¶
type UnimplementedLinkServiceServer struct {
}
UnimplementedLinkServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLinkServiceServer) NewLink ¶
func (UnimplementedLinkServiceServer) NewLink(context.Context, *NewLinkRequest) (*NewLinkResponse, error)
func (UnimplementedLinkServiceServer) ShortURLToLink ¶
func (UnimplementedLinkServiceServer) ShortURLToLink(context.Context, *ShortURLToLinkRequest) (*ShortURLToLinkResponse, error)
type UnsafeLinkServiceServer ¶
type UnsafeLinkServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLinkServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LinkServiceServer will result in compilation errors.