Documentation ¶
Index ¶
- func NewBackend(linkService link_service.LinkService) pbLink.LinkServiceServer
- type Backend
- func (b *Backend) GetLink(ctx context.Context, in *pbLink.GetLinkReq) (*pbLink.GetLinkRes, error)
- func (b *Backend) ShortenLink(ctx context.Context, in *pbLink.ShortenLinkReq) (*pbLink.ShortenLinkRes, error)
- func (b *Backend) VisitByKey(ctx context.Context, in *pbLink.VisitByKeyReq) (*pbLink.VisitByKeyRes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBackend ¶
func NewBackend(linkService link_service.LinkService) pbLink.LinkServiceServer
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements the protobuf interface
func (*Backend) GetLink ¶
func (b *Backend) GetLink(ctx context.Context, in *pbLink.GetLinkReq) (*pbLink.GetLinkRes, error)
func (*Backend) ShortenLink ¶
func (b *Backend) ShortenLink(ctx context.Context, in *pbLink.ShortenLinkReq) (*pbLink.ShortenLinkRes, error)
func (*Backend) VisitByKey ¶
func (b *Backend) VisitByKey(ctx context.Context, in *pbLink.VisitByKeyReq) (*pbLink.VisitByKeyRes, error)
Click to show internal directories.
Click to hide internal directories.