todov1

package
v0.0.0-...-ca35f81 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Event_name = map[int32]string{
		0: "EVENT_UNSPECIFIED",
		1: "EVENT_CREATE",
		2: "EVENT_UPDATE",
		3: "EVENT_DELETE",
	}
	Event_value = map[string]int32{
		"EVENT_UNSPECIFIED": 0,
		"EVENT_CREATE":      1,
		"EVENT_UPDATE":      2,
		"EVENT_DELETE":      3,
	}
)

Enum value maps for Event.

View Source
var File_todo_v1_event_proto protoreflect.FileDescriptor
View Source
var File_todo_v1_todo_proto protoreflect.FileDescriptor
View Source
var File_todo_v1_todo_service_proto protoreflect.FileDescriptor
View Source
var TodoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "todo.v1.TodoService",
	HandlerType: (*TodoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListTodos",
			Handler:    _TodoService_ListTodos_Handler,
		},
		{
			MethodName: "CreateTodo",
			Handler:    _TodoService_CreateTodo_Handler,
		},
		{
			MethodName: "UpdateTodo",
			Handler:    _TodoService_UpdateTodo_Handler,
		},
		{
			MethodName: "DeleteTodo",
			Handler:    _TodoService_DeleteTodo_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeEvent",
			Handler:       _TodoService_SubscribeEvent_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "todo/v1/todo_service.proto",
}

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

Functions

func RegisterTodoServiceServer

func RegisterTodoServiceServer(s grpc.ServiceRegistrar, srv TodoServiceServer)

Types

type CreateTodoRequest

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

func (*CreateTodoRequest) Descriptor deprecated

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

Deprecated: Use CreateTodoRequest.ProtoReflect.Descriptor instead.

func (*CreateTodoRequest) GetTodo

func (x *CreateTodoRequest) GetTodo() *Todo

func (*CreateTodoRequest) ProtoMessage

func (*CreateTodoRequest) ProtoMessage()

func (*CreateTodoRequest) ProtoReflect

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

func (*CreateTodoRequest) Reset

func (x *CreateTodoRequest) Reset()

func (*CreateTodoRequest) String

func (x *CreateTodoRequest) String() string

func (*CreateTodoRequest) Validate

func (m *CreateTodoRequest) Validate() error

Validate checks the field values on CreateTodoRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreateTodoRequestValidationError

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

CreateTodoRequestValidationError is the validation error returned by CreateTodoRequest.Validate if the designated constraints aren't met.

func (CreateTodoRequestValidationError) Cause

Cause function returns cause value.

func (CreateTodoRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateTodoRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateTodoRequestValidationError) Field

Field function returns field value.

func (CreateTodoRequestValidationError) Key

Key function returns key value.

func (CreateTodoRequestValidationError) Reason

Reason function returns reason value.

type DeleteTodoRequest

type DeleteTodoRequest struct {
	TodoId string `protobuf:"bytes,1,opt,name=todo_id,json=todoId,proto3" json:"todo_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteTodoRequest) Descriptor deprecated

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

Deprecated: Use DeleteTodoRequest.ProtoReflect.Descriptor instead.

func (*DeleteTodoRequest) GetTodoId

func (x *DeleteTodoRequest) GetTodoId() string

func (*DeleteTodoRequest) ProtoMessage

func (*DeleteTodoRequest) ProtoMessage()

func (*DeleteTodoRequest) ProtoReflect

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

func (*DeleteTodoRequest) Reset

func (x *DeleteTodoRequest) Reset()

func (*DeleteTodoRequest) String

func (x *DeleteTodoRequest) String() string

func (*DeleteTodoRequest) Validate

func (m *DeleteTodoRequest) Validate() error

Validate checks the field values on DeleteTodoRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type DeleteTodoRequestValidationError

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

DeleteTodoRequestValidationError is the validation error returned by DeleteTodoRequest.Validate if the designated constraints aren't met.

func (DeleteTodoRequestValidationError) Cause

Cause function returns cause value.

func (DeleteTodoRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteTodoRequestValidationError) ErrorName

ErrorName returns error name.

func (DeleteTodoRequestValidationError) Field

Field function returns field value.

func (DeleteTodoRequestValidationError) Key

Key function returns key value.

func (DeleteTodoRequestValidationError) Reason

Reason function returns reason value.

type Event

type Event int32
const (
	Event_EVENT_UNSPECIFIED Event = 0
	Event_EVENT_CREATE      Event = 1
	Event_EVENT_UPDATE      Event = 2
	Event_EVENT_DELETE      Event = 3
)

func (Event) Descriptor

func (Event) Descriptor() protoreflect.EnumDescriptor

func (Event) Enum

func (x Event) Enum() *Event

func (Event) EnumDescriptor deprecated

func (Event) EnumDescriptor() ([]byte, []int)

Deprecated: Use Event.Descriptor instead.

func (Event) Number

func (x Event) Number() protoreflect.EnumNumber

func (Event) String

func (x Event) String() string

func (Event) Type

func (Event) Type() protoreflect.EnumType

type ListTodosRequest

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

func (*ListTodosRequest) Descriptor deprecated

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

Deprecated: Use ListTodosRequest.ProtoReflect.Descriptor instead.

func (*ListTodosRequest) ProtoMessage

func (*ListTodosRequest) ProtoMessage()

func (*ListTodosRequest) ProtoReflect

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

func (*ListTodosRequest) Reset

func (x *ListTodosRequest) Reset()

func (*ListTodosRequest) String

func (x *ListTodosRequest) String() string

func (*ListTodosRequest) Validate

func (m *ListTodosRequest) Validate() error

Validate checks the field values on ListTodosRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListTodosRequestValidationError

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

ListTodosRequestValidationError is the validation error returned by ListTodosRequest.Validate if the designated constraints aren't met.

func (ListTodosRequestValidationError) Cause

Cause function returns cause value.

func (ListTodosRequestValidationError) Error

Error satisfies the builtin error interface

func (ListTodosRequestValidationError) ErrorName

ErrorName returns error name.

func (ListTodosRequestValidationError) Field

Field function returns field value.

func (ListTodosRequestValidationError) Key

Key function returns key value.

func (ListTodosRequestValidationError) Reason

Reason function returns reason value.

type ListTodosResponse

type ListTodosResponse struct {
	Todos []*Todo `protobuf:"bytes,1,rep,name=todos,proto3" json:"todos,omitempty"`
	// contains filtered or unexported fields
}

func (*ListTodosResponse) Descriptor deprecated

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

Deprecated: Use ListTodosResponse.ProtoReflect.Descriptor instead.

func (*ListTodosResponse) GetTodos

func (x *ListTodosResponse) GetTodos() []*Todo

func (*ListTodosResponse) ProtoMessage

func (*ListTodosResponse) ProtoMessage()

func (*ListTodosResponse) ProtoReflect

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

func (*ListTodosResponse) Reset

func (x *ListTodosResponse) Reset()

func (*ListTodosResponse) String

func (x *ListTodosResponse) String() string

func (*ListTodosResponse) Validate

func (m *ListTodosResponse) Validate() error

Validate checks the field values on ListTodosResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListTodosResponseValidationError

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

ListTodosResponseValidationError is the validation error returned by ListTodosResponse.Validate if the designated constraints aren't met.

func (ListTodosResponseValidationError) Cause

Cause function returns cause value.

func (ListTodosResponseValidationError) Error

Error satisfies the builtin error interface

func (ListTodosResponseValidationError) ErrorName

ErrorName returns error name.

func (ListTodosResponseValidationError) Field

Field function returns field value.

func (ListTodosResponseValidationError) Key

Key function returns key value.

func (ListTodosResponseValidationError) Reason

Reason function returns reason value.

type SubscribeEventRequest

type SubscribeEventRequest struct {
	Events []Event `protobuf:"varint,1,rep,packed,name=events,proto3,enum=todo.v1.Event" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeEventRequest) Descriptor deprecated

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

Deprecated: Use SubscribeEventRequest.ProtoReflect.Descriptor instead.

func (*SubscribeEventRequest) GetEvents

func (x *SubscribeEventRequest) GetEvents() []Event

func (*SubscribeEventRequest) ProtoMessage

func (*SubscribeEventRequest) ProtoMessage()

func (*SubscribeEventRequest) ProtoReflect

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

func (*SubscribeEventRequest) Reset

func (x *SubscribeEventRequest) Reset()

func (*SubscribeEventRequest) String

func (x *SubscribeEventRequest) String() string

func (*SubscribeEventRequest) Validate

func (m *SubscribeEventRequest) Validate() error

Validate checks the field values on SubscribeEventRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type SubscribeEventRequestValidationError

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

SubscribeEventRequestValidationError is the validation error returned by SubscribeEventRequest.Validate if the designated constraints aren't met.

func (SubscribeEventRequestValidationError) Cause

Cause function returns cause value.

func (SubscribeEventRequestValidationError) Error

Error satisfies the builtin error interface

func (SubscribeEventRequestValidationError) ErrorName

ErrorName returns error name.

func (SubscribeEventRequestValidationError) Field

Field function returns field value.

func (SubscribeEventRequestValidationError) Key

Key function returns key value.

func (SubscribeEventRequestValidationError) Reason

Reason function returns reason value.

type SubscribeEventResponse

type SubscribeEventResponse struct {
	Event Event `protobuf:"varint,1,opt,name=event,proto3,enum=todo.v1.Event" json:"event,omitempty"`
	Todo  *Todo `protobuf:"bytes,2,opt,name=todo,proto3" json:"todo,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeEventResponse) Descriptor deprecated

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

Deprecated: Use SubscribeEventResponse.ProtoReflect.Descriptor instead.

func (*SubscribeEventResponse) GetEvent

func (x *SubscribeEventResponse) GetEvent() Event

func (*SubscribeEventResponse) GetTodo

func (x *SubscribeEventResponse) GetTodo() *Todo

func (*SubscribeEventResponse) ProtoMessage

func (*SubscribeEventResponse) ProtoMessage()

func (*SubscribeEventResponse) ProtoReflect

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

func (*SubscribeEventResponse) Reset

func (x *SubscribeEventResponse) Reset()

func (*SubscribeEventResponse) String

func (x *SubscribeEventResponse) String() string

func (*SubscribeEventResponse) Validate

func (m *SubscribeEventResponse) Validate() error

Validate checks the field values on SubscribeEventResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type SubscribeEventResponseValidationError

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

SubscribeEventResponseValidationError is the validation error returned by SubscribeEventResponse.Validate if the designated constraints aren't met.

func (SubscribeEventResponseValidationError) Cause

Cause function returns cause value.

func (SubscribeEventResponseValidationError) Error

Error satisfies the builtin error interface

func (SubscribeEventResponseValidationError) ErrorName

ErrorName returns error name.

func (SubscribeEventResponseValidationError) Field

Field function returns field value.

func (SubscribeEventResponseValidationError) Key

Key function returns key value.

func (SubscribeEventResponseValidationError) Reason

Reason function returns reason value.

type Todo

type Todo struct {
	Id          string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Description string                 `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Completed   bool                   `protobuf:"varint,3,opt,name=completed,proto3" json:"completed,omitempty"`
	ModifiedAt  *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"`
	CreatedAt   *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Todo) Descriptor deprecated

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

Deprecated: Use Todo.ProtoReflect.Descriptor instead.

func (*Todo) GetCompleted

func (x *Todo) GetCompleted() bool

func (*Todo) GetCreatedAt

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

func (*Todo) GetDescription

func (x *Todo) GetDescription() string

func (*Todo) GetId

func (x *Todo) GetId() string

func (*Todo) GetModifiedAt

func (x *Todo) GetModifiedAt() *timestamppb.Timestamp

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

func (*Todo) Validate

func (m *Todo) Validate() error

Validate checks the field values on Todo with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type TodoServiceClient

type TodoServiceClient interface {
	ListTodos(ctx context.Context, in *ListTodosRequest, opts ...grpc.CallOption) (*ListTodosResponse, error)
	CreateTodo(ctx context.Context, in *CreateTodoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdateTodo(ctx context.Context, in *UpdateTodoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteTodo(ctx context.Context, in *DeleteTodoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SubscribeEvent(ctx context.Context, in *SubscribeEventRequest, opts ...grpc.CallOption) (TodoService_SubscribeEventClient, error)
}

TodoServiceClient is the client API for TodoService 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.

type TodoServiceServer

type TodoServiceServer interface {
	ListTodos(context.Context, *ListTodosRequest) (*ListTodosResponse, error)
	CreateTodo(context.Context, *CreateTodoRequest) (*emptypb.Empty, error)
	UpdateTodo(context.Context, *UpdateTodoRequest) (*emptypb.Empty, error)
	DeleteTodo(context.Context, *DeleteTodoRequest) (*emptypb.Empty, error)
	SubscribeEvent(*SubscribeEventRequest, TodoService_SubscribeEventServer) error
	// contains filtered or unexported methods
}

TodoServiceServer is the server API for TodoService service. All implementations must embed UnimplementedTodoServiceServer for forward compatibility

type TodoService_SubscribeEventClient

type TodoService_SubscribeEventClient interface {
	Recv() (*SubscribeEventResponse, error)
	grpc.ClientStream
}

type TodoService_SubscribeEventServer

type TodoService_SubscribeEventServer interface {
	Send(*SubscribeEventResponse) error
	grpc.ServerStream
}

type TodoValidationError

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

TodoValidationError is the validation error returned by Todo.Validate if the designated constraints aren't met.

func (TodoValidationError) Cause

func (e TodoValidationError) Cause() error

Cause function returns cause value.

func (TodoValidationError) Error

func (e TodoValidationError) Error() string

Error satisfies the builtin error interface

func (TodoValidationError) ErrorName

func (e TodoValidationError) ErrorName() string

ErrorName returns error name.

func (TodoValidationError) Field

func (e TodoValidationError) Field() string

Field function returns field value.

func (TodoValidationError) Key

func (e TodoValidationError) Key() bool

Key function returns key value.

func (TodoValidationError) Reason

func (e TodoValidationError) Reason() string

Reason function returns reason value.

type UnimplementedTodoServiceServer

type UnimplementedTodoServiceServer struct {
}

UnimplementedTodoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTodoServiceServer) CreateTodo

func (UnimplementedTodoServiceServer) DeleteTodo

func (UnimplementedTodoServiceServer) ListTodos

func (UnimplementedTodoServiceServer) SubscribeEvent

func (UnimplementedTodoServiceServer) UpdateTodo

type UnsafeTodoServiceServer

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

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

type UpdateTodoRequest

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

func (*UpdateTodoRequest) Descriptor deprecated

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

Deprecated: Use UpdateTodoRequest.ProtoReflect.Descriptor instead.

func (*UpdateTodoRequest) GetTodo

func (x *UpdateTodoRequest) GetTodo() *Todo

func (*UpdateTodoRequest) ProtoMessage

func (*UpdateTodoRequest) ProtoMessage()

func (*UpdateTodoRequest) ProtoReflect

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

func (*UpdateTodoRequest) Reset

func (x *UpdateTodoRequest) Reset()

func (*UpdateTodoRequest) String

func (x *UpdateTodoRequest) String() string

func (*UpdateTodoRequest) Validate

func (m *UpdateTodoRequest) Validate() error

Validate checks the field values on UpdateTodoRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpdateTodoRequestValidationError

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

UpdateTodoRequestValidationError is the validation error returned by UpdateTodoRequest.Validate if the designated constraints aren't met.

func (UpdateTodoRequestValidationError) Cause

Cause function returns cause value.

func (UpdateTodoRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateTodoRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateTodoRequestValidationError) Field

Field function returns field value.

func (UpdateTodoRequestValidationError) Key

Key function returns key value.

func (UpdateTodoRequestValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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