v2beta

package
v0.0.0-...-3361740 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package v2beta is a generated protocol buffer package.

It is generated from these files:

urls.proto

It has these top-level messages:

Url
GetUrlsRequest
GetUrlsResponse
GetUrlRequest
GetUrlResponse
CreateUrlRequest
CreateUrlResponse

Package v2beta is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUrlServiceHandler

func RegisterUrlServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterUrlServiceHandler registers the http handlers for service UrlService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterUrlServiceHandlerFromEndpoint

func RegisterUrlServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterUrlServiceHandlerFromEndpoint is same as RegisterUrlServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterUrlServiceServer

func RegisterUrlServiceServer(s *grpc.Server, srv UrlServiceServer)

Types

type CreateUrlRequest

type CreateUrlRequest struct {
	Link string `protobuf:"bytes,1,opt,name=link" json:"link,omitempty"`
}

func (*CreateUrlRequest) Descriptor

func (*CreateUrlRequest) Descriptor() ([]byte, []int)
func (m *CreateUrlRequest) GetLink() string

func (*CreateUrlRequest) ProtoMessage

func (*CreateUrlRequest) ProtoMessage()

func (*CreateUrlRequest) Reset

func (m *CreateUrlRequest) Reset()

func (*CreateUrlRequest) String

func (m *CreateUrlRequest) String() string

type CreateUrlResponse

type CreateUrlResponse struct {
	Url *Url `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
}

func (*CreateUrlResponse) Descriptor

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

func (*CreateUrlResponse) GetUrl

func (m *CreateUrlResponse) GetUrl() *Url

func (*CreateUrlResponse) ProtoMessage

func (*CreateUrlResponse) ProtoMessage()

func (*CreateUrlResponse) Reset

func (m *CreateUrlResponse) Reset()

func (*CreateUrlResponse) String

func (m *CreateUrlResponse) String() string

type GetUrlRequest

type GetUrlRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
}

func (*GetUrlRequest) Descriptor

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

func (*GetUrlRequest) GetKey

func (m *GetUrlRequest) GetKey() string

func (*GetUrlRequest) ProtoMessage

func (*GetUrlRequest) ProtoMessage()

func (*GetUrlRequest) Reset

func (m *GetUrlRequest) Reset()

func (*GetUrlRequest) String

func (m *GetUrlRequest) String() string

type GetUrlResponse

type GetUrlResponse struct {
	Url *Url `protobuf:"bytes,1,opt,name=Url" json:"Url,omitempty"`
}

func (*GetUrlResponse) Descriptor

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

func (*GetUrlResponse) GetUrl

func (m *GetUrlResponse) GetUrl() *Url

func (*GetUrlResponse) ProtoMessage

func (*GetUrlResponse) ProtoMessage()

func (*GetUrlResponse) Reset

func (m *GetUrlResponse) Reset()

func (*GetUrlResponse) String

func (m *GetUrlResponse) String() string

type GetUrlsRequest

type GetUrlsRequest struct {
}

func (*GetUrlsRequest) Descriptor

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

func (*GetUrlsRequest) ProtoMessage

func (*GetUrlsRequest) ProtoMessage()

func (*GetUrlsRequest) Reset

func (m *GetUrlsRequest) Reset()

func (*GetUrlsRequest) String

func (m *GetUrlsRequest) String() string

type GetUrlsResponse

type GetUrlsResponse struct {
	Keys []string `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
}

func (*GetUrlsResponse) Descriptor

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

func (*GetUrlsResponse) GetKeys

func (m *GetUrlsResponse) GetKeys() []string

func (*GetUrlsResponse) ProtoMessage

func (*GetUrlsResponse) ProtoMessage()

func (*GetUrlsResponse) Reset

func (m *GetUrlsResponse) Reset()

func (*GetUrlsResponse) String

func (m *GetUrlsResponse) String() string

type Url

type Url struct {
	Key      string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	Link     string `protobuf:"bytes,2,opt,name=link" json:"link,omitempty"`
	Creation string `protobuf:"bytes,3,opt,name=creation" json:"creation,omitempty"`
}

func (*Url) Descriptor

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

func (*Url) GetCreation

func (m *Url) GetCreation() string

func (*Url) GetKey

func (m *Url) GetKey() string
func (m *Url) GetLink() string

func (*Url) ProtoMessage

func (*Url) ProtoMessage()

func (*Url) Reset

func (m *Url) Reset()

func (*Url) String

func (m *Url) String() string

type UrlServiceClient

type UrlServiceClient interface {
	// List returns all available URLs keys
	List(ctx context.Context, in *GetUrlsRequest, opts ...grpc.CallOption) (*GetUrlsResponse, error)
	// Create creates a new Url
	Create(ctx context.Context, in *CreateUrlRequest, opts ...grpc.CallOption) (*CreateUrlResponse, error)
	// Get return a Url
	Get(ctx context.Context, in *GetUrlRequest, opts ...grpc.CallOption) (*GetUrlResponse, error)
}

func NewUrlServiceClient

func NewUrlServiceClient(cc *grpc.ClientConn) UrlServiceClient

type UrlServiceServer

type UrlServiceServer interface {
	// List returns all available URLs keys
	List(context.Context, *GetUrlsRequest) (*GetUrlsResponse, error)
	// Create creates a new Url
	Create(context.Context, *CreateUrlRequest) (*CreateUrlResponse, error)
	// Get return a Url
	Get(context.Context, *GetUrlRequest) (*GetUrlResponse, error)
}

Jump to

Keyboard shortcuts

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