protos

package
v0.0.0-...-696e5ce Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_url_service_proto protoreflect.FileDescriptor

Functions

func RegisterShortenerServer

func RegisterShortenerServer(s *grpc.Server, srv ShortenerServer)

Types

type Code

type Code struct {
	Code string `protobuf:"bytes,1,opt,name=Code,proto3" json:"Code,omitempty"`
	// contains filtered or unexported fields
}

func (*Code) Descriptor deprecated

func (*Code) Descriptor() ([]byte, []int)

Deprecated: Use Code.ProtoReflect.Descriptor instead.

func (*Code) GetCode

func (x *Code) GetCode() string

func (*Code) ProtoMessage

func (*Code) ProtoMessage()

func (*Code) ProtoReflect

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

func (*Code) Reset

func (x *Code) Reset()

func (*Code) String

func (x *Code) String() string

type ShortenerClient

type ShortenerClient interface {
	CreateURL(ctx context.Context, in *URL, opts ...grpc.CallOption) (*Code, error)
	GetURL(ctx context.Context, in *Code, opts ...grpc.CallOption) (*URL, error)
	GetStats(ctx context.Context, in *Code, opts ...grpc.CallOption) (*Stats, error)
}

ShortenerClient is the client API for Shortener service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewShortenerClient

func NewShortenerClient(cc grpc.ClientConnInterface) ShortenerClient

type ShortenerServer

type ShortenerServer interface {
	CreateURL(context.Context, *URL) (*Code, error)
	GetURL(context.Context, *Code) (*URL, error)
	GetStats(context.Context, *Code) (*Stats, error)
}

ShortenerServer is the server API for Shortener service.

type Stats

type Stats struct {
	Stats string `protobuf:"bytes,1,opt,name=Stats,proto3" json:"Stats,omitempty"`
	// contains filtered or unexported fields
}

func (*Stats) Descriptor deprecated

func (*Stats) Descriptor() ([]byte, []int)

Deprecated: Use Stats.ProtoReflect.Descriptor instead.

func (*Stats) GetStats

func (x *Stats) GetStats() string

func (*Stats) ProtoMessage

func (*Stats) ProtoMessage()

func (*Stats) ProtoReflect

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

func (*Stats) Reset

func (x *Stats) Reset()

func (*Stats) String

func (x *Stats) String() string

type URL

type URL struct {
	LongUrl string `protobuf:"bytes,1,opt,name=LongUrl,proto3" json:"LongUrl,omitempty"`
	TTL     int64  `protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"`
	Stats   string `protobuf:"bytes,3,opt,name=Stats,proto3" json:"Stats,omitempty"`
	// contains filtered or unexported fields
}

func (*URL) Descriptor deprecated

func (*URL) Descriptor() ([]byte, []int)

Deprecated: Use URL.ProtoReflect.Descriptor instead.

func (*URL) GetLongUrl

func (x *URL) GetLongUrl() string

func (*URL) GetStats

func (x *URL) GetStats() string

func (*URL) GetTTL

func (x *URL) GetTTL() int64

func (*URL) ProtoMessage

func (*URL) ProtoMessage()

func (*URL) ProtoReflect

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

func (*URL) Reset

func (x *URL) Reset()

func (*URL) String

func (x *URL) String() string

type UnimplementedShortenerServer

type UnimplementedShortenerServer struct {
}

UnimplementedShortenerServer can be embedded to have forward compatible implementations.

func (*UnimplementedShortenerServer) CreateURL

func (*UnimplementedShortenerServer) GetStats

func (*UnimplementedShortenerServer) GetURL

Jump to

Keyboard shortcuts

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