shortener

package
v0.0.0-...-dfd90ba Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Shortener_Get_FullMethodName    = "/shortener.Shortener/Get"
	Shortener_Create_FullMethodName = "/shortener.Shortener/Create"
)

Variables

View Source
var Shortener_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shortener.Shortener",
	HandlerType: (*ShortenerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Shortener_Get_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _Shortener_Create_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shortener.proto",
}

Shortener_ServiceDesc is the grpc.ServiceDesc for Shortener service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterShortenerServer

func RegisterShortenerServer(s grpc.ServiceRegistrar, srv ShortenerServer)

Types

type ShortenerClient

type ShortenerClient interface {
	Get(ctx context.Context, in *StringMessage, opts ...grpc.CallOption) (*StringMessage, error)
	Create(ctx context.Context, in *StringMessage, opts ...grpc.CallOption) (*StringMessage, error)
}

ShortenerClient is the client API for Shortener 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 NewShortenerClient

func NewShortenerClient(cc grpc.ClientConnInterface) ShortenerClient

type ShortenerServer

type ShortenerServer interface {
	Get(context.Context, *StringMessage) (*StringMessage, error)
	Create(context.Context, *StringMessage) (*StringMessage, error)
	// contains filtered or unexported methods
}

ShortenerServer is the server API for Shortener service. All implementations must embed UnimplementedShortenerServer for forward compatibility

type StringMessage

type StringMessage struct {
	URL                  string   `protobuf:"bytes,1,opt,name=URL,proto3" json:"URL,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StringMessage) Descriptor

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

func (*StringMessage) GetURL

func (m *StringMessage) GetURL() string

func (*StringMessage) ProtoMessage

func (*StringMessage) ProtoMessage()

func (*StringMessage) Reset

func (m *StringMessage) Reset()

func (*StringMessage) String

func (m *StringMessage) String() string

func (*StringMessage) XXX_DiscardUnknown

func (m *StringMessage) XXX_DiscardUnknown()

func (*StringMessage) XXX_Marshal

func (m *StringMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringMessage) XXX_Merge

func (m *StringMessage) XXX_Merge(src proto.Message)

func (*StringMessage) XXX_Size

func (m *StringMessage) XXX_Size() int

func (*StringMessage) XXX_Unmarshal

func (m *StringMessage) XXX_Unmarshal(b []byte) error

type UnimplementedShortenerServer

type UnimplementedShortenerServer struct {
}

UnimplementedShortenerServer must be embedded to have forward compatible implementations.

func (UnimplementedShortenerServer) Create

func (UnimplementedShortenerServer) Get

type UnsafeShortenerServer

type UnsafeShortenerServer interface {
	// contains filtered or unexported methods
}

UnsafeShortenerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShortenerServer will result in compilation errors.

Jump to

Keyboard shortcuts

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