v1

package
v0.0.0-...-68ef9aa Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_todo_service_proto protoreflect.FileDescriptor

Functions

func NewToDoServiceEndpoints

func NewToDoServiceEndpoints() []*api.Endpoint

func RegisterToDoServiceHandler

func RegisterToDoServiceHandler(s server.Server, hdlr ToDoServiceHandler, opts ...server.HandlerOption) error

Types

type CreateRequest

type CreateRequest struct {
	Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	//任务实体
	ToDo *ToDo `protobuf:"bytes,2,opt,name=toDo,proto3" json:"toDo,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetApi

func (x *CreateRequest) GetApi() string

func (*CreateRequest) GetToDo

func (x *CreateRequest) GetToDo() *ToDo

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

func (x *CreateRequest) ProtoReflect() protoreflect.Message

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

type CreateResponse struct {
	Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	//已创建任务的ID
	Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetApi

func (x *CreateResponse) GetApi() string

func (*CreateResponse) GetId

func (x *CreateResponse) GetId() int64

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

func (x *CreateResponse) ProtoReflect() protoreflect.Message

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DeleteRequest

type DeleteRequest struct {
	Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	Id  int64  `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetApi

func (x *DeleteRequest) GetApi() string

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() int64

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	//删除的数量
	Deleted int64 `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) GetApi

func (x *DeleteResponse) GetApi() string

func (*DeleteResponse) GetDeleted

func (x *DeleteResponse) GetDeleted() int64

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

func (x *DeleteResponse) ProtoReflect() protoreflect.Message

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type ReadAllRequest

type ReadAllRequest struct {

	// API版本控制:这是明确指定版本的最佳实践
	Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	// contains filtered or unexported fields
}

请求数据以读取所有待办事项任务

func (*ReadAllRequest) Descriptor deprecated

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

Deprecated: Use ReadAllRequest.ProtoReflect.Descriptor instead.

func (*ReadAllRequest) GetApi

func (x *ReadAllRequest) GetApi() string

func (*ReadAllRequest) ProtoMessage

func (*ReadAllRequest) ProtoMessage()

func (*ReadAllRequest) ProtoReflect

func (x *ReadAllRequest) ProtoReflect() protoreflect.Message

func (*ReadAllRequest) Reset

func (x *ReadAllRequest) Reset()

func (*ReadAllRequest) String

func (x *ReadAllRequest) String() string

type ReadAllResponse

type ReadAllResponse struct {

	// API版本控制:这是明确指定版本的最佳实践
	Api   string  `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	ToDos []*ToDo `protobuf:"bytes,2,rep,name=toDos,proto3" json:"toDos,omitempty"`
	// contains filtered or unexported fields
}

包含所有待办事项任务的列表

func (*ReadAllResponse) Descriptor deprecated

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

Deprecated: Use ReadAllResponse.ProtoReflect.Descriptor instead.

func (*ReadAllResponse) GetApi

func (x *ReadAllResponse) GetApi() string

func (*ReadAllResponse) GetToDos

func (x *ReadAllResponse) GetToDos() []*ToDo

func (*ReadAllResponse) ProtoMessage

func (*ReadAllResponse) ProtoMessage()

func (*ReadAllResponse) ProtoReflect

func (x *ReadAllResponse) ProtoReflect() protoreflect.Message

func (*ReadAllResponse) Reset

func (x *ReadAllResponse) Reset()

func (*ReadAllResponse) String

func (x *ReadAllResponse) String() string

type ReadRequest

type ReadRequest struct {
	Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	Id  int64  `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetApi

func (x *ReadRequest) GetApi() string

func (*ReadRequest) GetId

func (x *ReadRequest) GetId() int64

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

func (x *ReadRequest) ProtoReflect() protoreflect.Message

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

type ReadResponse struct {
	Api  string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	Todo *ToDo  `protobuf:"bytes,2,opt,name=todo,proto3" json:"todo,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetApi

func (x *ReadResponse) GetApi() string

func (*ReadResponse) GetTodo

func (x *ReadResponse) GetTodo() *ToDo

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

func (x *ReadResponse) ProtoReflect() protoreflect.Message

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type ToDo

type ToDo struct {
	Id          int64                `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title       string               `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Description string               `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Reminder    *timestamp.Timestamp `protobuf:"bytes,4,opt,name=reminder,proto3" json:"reminder,omitempty"`
	// contains filtered or unexported fields
}

func (*ToDo) Descriptor deprecated

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

Deprecated: Use ToDo.ProtoReflect.Descriptor instead.

func (*ToDo) GetDescription

func (x *ToDo) GetDescription() string

func (*ToDo) GetId

func (x *ToDo) GetId() int64

func (*ToDo) GetReminder

func (x *ToDo) GetReminder() *timestamp.Timestamp

func (*ToDo) GetTitle

func (x *ToDo) GetTitle() string

func (*ToDo) ProtoMessage

func (*ToDo) ProtoMessage()

func (*ToDo) ProtoReflect

func (x *ToDo) ProtoReflect() protoreflect.Message

func (*ToDo) Reset

func (x *ToDo) Reset()

func (*ToDo) String

func (x *ToDo) String() string

type ToDoService

type ToDoService interface {
	//创建
	Create(ctx context.Context, in *CreateRequest, opts ...client.CallOption) (*CreateResponse, error)
	//读取
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
	//更新
	Update(ctx context.Context, in *UpdateRequest, opts ...client.CallOption) (*UpdateResponse, error)
	//删除
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
	//读取所有
	ReadAll(ctx context.Context, in *ReadAllRequest, opts ...client.CallOption) (*ReadAllResponse, error)
}

func NewToDoService

func NewToDoService(name string, c client.Client) ToDoService

type ToDoServiceHandler

type ToDoServiceHandler interface {
	//创建
	Create(context.Context, *CreateRequest, *CreateResponse) error
	//读取
	Read(context.Context, *ReadRequest, *ReadResponse) error
	//更新
	Update(context.Context, *UpdateRequest, *UpdateResponse) error
	//删除
	Delete(context.Context, *DeleteRequest, *DeleteResponse) error
	//读取所有
	ReadAll(context.Context, *ReadAllRequest, *ReadAllResponse) error
}

type UpdateRequest

type UpdateRequest struct {
	Api  string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	ToDo *ToDo  `protobuf:"bytes,2,opt,name=toDo,proto3" json:"toDo,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetApi

func (x *UpdateRequest) GetApi() string

func (*UpdateRequest) GetToDo

func (x *UpdateRequest) GetToDo() *ToDo

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

func (x *UpdateRequest) ProtoReflect() protoreflect.Message

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

type UpdateResponse struct {
	Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	//更新的数量
	Updated int64 `protobuf:"varint,2,opt,name=updated,proto3" json:"updated,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetApi

func (x *UpdateResponse) GetApi() string

func (*UpdateResponse) GetUpdated

func (x *UpdateResponse) GetUpdated() int64

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

func (x *UpdateResponse) ProtoReflect() protoreflect.Message

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

Jump to

Keyboard shortcuts

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