grpc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Deprecated: Use Link.ProtoReflect.Descriptor instead.

func (*Link) GetId

func (x *Link) GetId() int64

func (*Link) GetOriginal

func (x *Link) GetOriginal() string

func (*Link) GetShort

func (x *Link) GetShort() string

func (*Link) ProtoMessage

func (*Link) ProtoMessage()

func (*Link) ProtoReflect

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

func (*Link) Reset

func (x *Link) Reset()

func (*Link) String

func (x *Link) String() string

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.

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 (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 (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.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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