model

package
v0.0.0-...-619e060 Latest Latest
Warning

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

Go to latest
Published: May 31, 2017 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package model is a generated protocol buffer package.

It is generated from these files:

model.proto

It has these top-level messages:

ExampleRequest
ExampleResponse

Package model is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterExampleServiceHandler

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

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

func RegisterExampleServiceHandlerFromEndpoint

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

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

func RegisterExampleServiceServer

func RegisterExampleServiceServer(s *grpc.Server, srv ExampleServiceServer)

Types

type ExampleRequest

type ExampleRequest struct {
	Message string `protobuf:"bytes,1,opt,name=Message" json:"Message,omitempty"`
}

func (*ExampleRequest) Descriptor

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

func (*ExampleRequest) GetMessage

func (m *ExampleRequest) GetMessage() string

func (*ExampleRequest) ProtoMessage

func (*ExampleRequest) ProtoMessage()

func (*ExampleRequest) Reset

func (m *ExampleRequest) Reset()

func (*ExampleRequest) String

func (m *ExampleRequest) String() string

type ExampleResponse

type ExampleResponse struct {
	Message string `protobuf:"bytes,1,opt,name=Message" json:"Message,omitempty"`
}

func (*ExampleResponse) Descriptor

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

func (*ExampleResponse) GetMessage

func (m *ExampleResponse) GetMessage() string

func (*ExampleResponse) ProtoMessage

func (*ExampleResponse) ProtoMessage()

func (*ExampleResponse) Reset

func (m *ExampleResponse) Reset()

func (*ExampleResponse) String

func (m *ExampleResponse) String() string

type ExampleServiceClient

type ExampleServiceClient interface {
	Echo(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error)
}

func NewExampleServiceClient

func NewExampleServiceClient(cc *grpc.ClientConn) ExampleServiceClient

type ExampleServiceServer

type ExampleServiceServer interface {
	Echo(context.Context, *ExampleRequest) (*ExampleResponse, error)
}

Jump to

Keyboard shortcuts

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