v1

package
v0.0.0-...-ce2ccc6 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Todo_List_FullMethodName   = "/todo.v1.Todo/List"
	Todo_Add_FullMethodName    = "/todo.v1.Todo/Add"
	Todo_Delete_FullMethodName = "/todo.v1.Todo/Delete"
	Todo_Mark_FullMethodName   = "/todo.v1.Todo/Mark"
)
View Source
const OperationTodoAdd = "/todo.v1.Todo/Add"
View Source
const OperationTodoDelete = "/todo.v1.Todo/Delete"
View Source
const OperationTodoList = "/todo.v1.Todo/List"
View Source
const OperationTodoMark = "/todo.v1.Todo/Mark"

Variables

View Source
var File_todo_v1_todo_proto protoreflect.FileDescriptor
View Source
var Todo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "todo.v1.Todo",
	HandlerType: (*TodoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _Todo_List_Handler,
		},
		{
			MethodName: "Add",
			Handler:    _Todo_Add_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Todo_Delete_Handler,
		},
		{
			MethodName: "Mark",
			Handler:    _Todo_Mark_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "todo/v1/todo.proto",
}

Todo_ServiceDesc is the grpc.ServiceDesc for Todo service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTodoHTTPServer

func RegisterTodoHTTPServer(s *http.Server, srv TodoHTTPServer)

func RegisterTodoServer

func RegisterTodoServer(s grpc.ServiceRegistrar, srv TodoServer)

Types

type AddReply

type AddReply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Item    *Item  `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*AddReply) Descriptor deprecated

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

Deprecated: Use AddReply.ProtoReflect.Descriptor instead.

func (*AddReply) GetItem

func (x *AddReply) GetItem() *Item

func (*AddReply) GetMessage

func (x *AddReply) GetMessage() string

func (*AddReply) ProtoMessage

func (*AddReply) ProtoMessage()

func (*AddReply) ProtoReflect

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

func (*AddReply) Reset

func (x *AddReply) Reset()

func (*AddReply) String

func (x *AddReply) String() string

type AddRequest

type AddRequest struct {
	Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRequest) Descriptor deprecated

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

Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.

func (*AddRequest) GetItem

func (x *AddRequest) GetItem() *Item

func (*AddRequest) ProtoMessage

func (*AddRequest) ProtoMessage()

func (*AddRequest) ProtoReflect

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

func (*AddRequest) Reset

func (x *AddRequest) Reset()

func (*AddRequest) String

func (x *AddRequest) String() string

type DeleteReply

type DeleteReply struct {
	Message string  `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Items   []*Item `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteReply) Descriptor deprecated

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

Deprecated: Use DeleteReply.ProtoReflect.Descriptor instead.

func (*DeleteReply) GetItems

func (x *DeleteReply) GetItems() []*Item

func (*DeleteReply) GetMessage

func (x *DeleteReply) GetMessage() string

func (*DeleteReply) ProtoMessage

func (*DeleteReply) ProtoMessage()

func (*DeleteReply) ProtoReflect

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

func (*DeleteReply) Reset

func (x *DeleteReply) Reset()

func (*DeleteReply) String

func (x *DeleteReply) String() string

type DeleteRequest

type DeleteRequest struct {

	// Types that are assignable to DeleteLabel:
	//
	//	*DeleteRequest_Title
	//	*DeleteRequest_Id
	DeleteLabel isDeleteRequest_DeleteLabel `protobuf_oneof:"deleteLabel"`
	// contains filtered or unexported fields
}

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetDeleteLabel

func (m *DeleteRequest) GetDeleteLabel() isDeleteRequest_DeleteLabel

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) GetTitle

func (x *DeleteRequest) GetTitle() string

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 DeleteRequest_Id

type DeleteRequest_Id struct {
	Id string `protobuf:"bytes,2,opt,name=id,proto3,oneof"`
}

type DeleteRequest_Title

type DeleteRequest_Title struct {
	Title string `protobuf:"bytes,1,opt,name=title,proto3,oneof"`
}

type Item

type Item struct {
	Id          string                 `protobuf:"bytes,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"`
	Marked      bool                   `protobuf:"varint,4,opt,name=marked,proto3" json:"marked,omitempty"`
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt   *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetCreatedAt

func (x *Item) GetCreatedAt() *timestamppb.Timestamp

func (*Item) GetDescription

func (x *Item) GetDescription() string

func (*Item) GetId

func (x *Item) GetId() string

func (*Item) GetMarked

func (x *Item) GetMarked() bool

func (*Item) GetTitle

func (x *Item) GetTitle() string

func (*Item) GetUpdatedAt

func (x *Item) GetUpdatedAt() *timestamppb.Timestamp

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

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

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

type ListReply

type ListReply struct {
	Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ListReply) Descriptor deprecated

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

Deprecated: Use ListReply.ProtoReflect.Descriptor instead.

func (*ListReply) GetItems

func (x *ListReply) GetItems() []*Item

func (*ListReply) ProtoMessage

func (*ListReply) ProtoMessage()

func (*ListReply) ProtoReflect

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

func (*ListReply) Reset

func (x *ListReply) Reset()

func (*ListReply) String

func (x *ListReply) String() string

type ListRequest

type ListRequest struct {
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type MarkReply

type MarkReply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Item    *Item  `protobuf:"bytes,2,opt,name=item,proto3" json:"item,omitempty"`
	// contains filtered or unexported fields
}

func (*MarkReply) Descriptor deprecated

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

Deprecated: Use MarkReply.ProtoReflect.Descriptor instead.

func (*MarkReply) GetItem

func (x *MarkReply) GetItem() *Item

func (*MarkReply) GetMessage

func (x *MarkReply) GetMessage() string

func (*MarkReply) ProtoMessage

func (*MarkReply) ProtoMessage()

func (*MarkReply) ProtoReflect

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

func (*MarkReply) Reset

func (x *MarkReply) Reset()

func (*MarkReply) String

func (x *MarkReply) String() string

type MarkRequest

type MarkRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*MarkRequest) Descriptor deprecated

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

Deprecated: Use MarkRequest.ProtoReflect.Descriptor instead.

func (*MarkRequest) GetId

func (x *MarkRequest) GetId() string

func (*MarkRequest) ProtoMessage

func (*MarkRequest) ProtoMessage()

func (*MarkRequest) ProtoReflect

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

func (*MarkRequest) Reset

func (x *MarkRequest) Reset()

func (*MarkRequest) String

func (x *MarkRequest) String() string

type TodoClient

type TodoClient interface {
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error)
	Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddReply, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteReply, error)
	Mark(ctx context.Context, in *MarkRequest, opts ...grpc.CallOption) (*MarkReply, error)
}

TodoClient is the client API for Todo service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewTodoClient

func NewTodoClient(cc grpc.ClientConnInterface) TodoClient

type TodoHTTPClient

type TodoHTTPClient interface {
	Add(ctx context.Context, req *AddRequest, opts ...http.CallOption) (rsp *AddReply, err error)
	Delete(ctx context.Context, req *DeleteRequest, opts ...http.CallOption) (rsp *DeleteReply, err error)
	List(ctx context.Context, req *ListRequest, opts ...http.CallOption) (rsp *ListReply, err error)
	Mark(ctx context.Context, req *MarkRequest, opts ...http.CallOption) (rsp *MarkReply, err error)
}

func NewTodoHTTPClient

func NewTodoHTTPClient(client *http.Client) TodoHTTPClient

type TodoHTTPClientImpl

type TodoHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*TodoHTTPClientImpl) Add

func (c *TodoHTTPClientImpl) Add(ctx context.Context, in *AddRequest, opts ...http.CallOption) (*AddReply, error)

func (*TodoHTTPClientImpl) Delete

func (*TodoHTTPClientImpl) List

func (*TodoHTTPClientImpl) Mark

type TodoServer

type TodoServer interface {
	List(context.Context, *ListRequest) (*ListReply, error)
	Add(context.Context, *AddRequest) (*AddReply, error)
	Delete(context.Context, *DeleteRequest) (*DeleteReply, error)
	Mark(context.Context, *MarkRequest) (*MarkReply, error)
	// contains filtered or unexported methods
}

TodoServer is the server API for Todo service. All implementations must embed UnimplementedTodoServer for forward compatibility

type UnimplementedTodoServer

type UnimplementedTodoServer struct {
}

UnimplementedTodoServer must be embedded to have forward compatible implementations.

func (UnimplementedTodoServer) Add

func (UnimplementedTodoServer) Delete

func (UnimplementedTodoServer) List

func (UnimplementedTodoServer) Mark

type UnsafeTodoServer

type UnsafeTodoServer interface {
	// contains filtered or unexported methods
}

UnsafeTodoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TodoServer will result in compilation errors.

Jump to

Keyboard shortcuts

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