pb

package
v0.0.0-...-1a196e1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pb is a generated protocol buffer package.

It is generated from these files:

todo.proto

It has these top-level messages:

Void
Task
Tasks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTodoServer

func RegisterTodoServer(s *grpc.Server, srv TodoServer)

Types

type Task

type Task struct {
	Title   string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"`
	Content string `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"`
}

Task 是單個工作記事資料。

func (*Task) Descriptor

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

func (*Task) GetContent

func (m *Task) GetContent() string

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 Tasks

type Tasks struct {
	Tasks []*Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"`
}

Tasks 會回傳多個工作記事資料。

func (*Tasks) Descriptor

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

func (*Tasks) GetTasks

func (m *Tasks) GetTasks() []*Task

func (*Tasks) ProtoMessage

func (*Tasks) ProtoMessage()

func (*Tasks) Reset

func (m *Tasks) Reset()

func (*Tasks) String

func (m *Tasks) String() string

type TodoClient

type TodoClient interface {
	Add(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Task, error)
	List(ctx context.Context, in *Void, opts ...grpc.CallOption) (*Tasks, error)
}

func NewTodoClient

func NewTodoClient(cc *grpc.ClientConn) TodoClient

type TodoServer

type TodoServer interface {
	Add(context.Context, *Task) (*Task, error)
	List(context.Context, *Void) (*Tasks, error)
}

type Void

type Void struct {
}

Void 呈現一個什麼都沒有的資料。

func (*Void) Descriptor

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

func (*Void) ProtoMessage

func (*Void) ProtoMessage()

func (*Void) Reset

func (m *Void) Reset()

func (*Void) String

func (m *Void) String() string

Jump to

Keyboard shortcuts

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