tasklistgateway

package
v0.0.0-...-26984fd Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package tasklistgateway is a generated protocol buffer package.

It is generated from these files:

proto/task_list.proto

It has these top-level messages:

Task
GetTaskRequest

Package tasklistgateway is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTaskManagerHandler

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

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

func RegisterTaskManagerHandlerClient

func RegisterTaskManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TaskManagerClient) error

RegisterTaskManagerHandler registers the http handlers for service TaskManager to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TaskManagerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TaskManagerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TaskManagerClient" to call the correct interceptors.

func RegisterTaskManagerHandlerFromEndpoint

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

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

func RegisterTaskManagerServer

func RegisterTaskManagerServer(s *grpc.Server, srv TaskManagerServer)

Types

type GetTaskRequest

type GetTaskRequest struct {
	Id int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}

func (*GetTaskRequest) Descriptor

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

func (*GetTaskRequest) GetId

func (m *GetTaskRequest) GetId() int32

func (*GetTaskRequest) ProtoMessage

func (*GetTaskRequest) ProtoMessage()

func (*GetTaskRequest) Reset

func (m *GetTaskRequest) Reset()

func (*GetTaskRequest) String

func (m *GetTaskRequest) String() string

type Task

type Task struct {
	Id     int32  `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Title  string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
	Detail string `protobuf:"bytes,3,opt,name=detail" json:"detail,omitempty"`
}

func (*Task) Descriptor

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

func (*Task) GetDetail

func (m *Task) GetDetail() string

func (*Task) GetId

func (m *Task) GetId() int32

func (*Task) GetTitle

func (m *Task) GetTitle() string

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) Reset

func (m *Task) Reset()

func (*Task) String

func (m *Task) String() string

type TaskManagerClient

type TaskManagerClient interface {
	GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error)
	ListTasks(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (TaskManager_ListTasksClient, error)
}

func NewTaskManagerClient

func NewTaskManagerClient(cc *grpc.ClientConn) TaskManagerClient

type TaskManagerServer

type TaskManagerServer interface {
	GetTask(context.Context, *GetTaskRequest) (*Task, error)
	ListTasks(*google_protobuf.Empty, TaskManager_ListTasksServer) error
}

type TaskManager_ListTasksClient

type TaskManager_ListTasksClient interface {
	Recv() (*Task, error)
	grpc.ClientStream
}

type TaskManager_ListTasksServer

type TaskManager_ListTasksServer interface {
	Send(*Task) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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