TodoGrpc

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToDo_CreateTodoService_FullMethodName  = "/TodoGrpc.toDo/createTodoService"
	ToDo_DeleteTodoService_FullMethodName  = "/TodoGrpc.toDo/deleteTodoService"
	ToDo_GetAllTodosService_FullMethodName = "/TodoGrpc.toDo/getAllTodosService"
	ToDo_GetTodoByIDService_FullMethodName = "/TodoGrpc.toDo/getTodoByIDService"
	ToDo_UpdateTodoService_FullMethodName  = "/TodoGrpc.toDo/updateTodoService"
)

Variables

View Source
var File_models_todo_proto protoreflect.FileDescriptor
View Source
var ToDo_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "TodoGrpc.toDo",
	HandlerType: (*ToDoServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "createTodoService",
			Handler:    _ToDo_CreateTodoService_Handler,
		},
		{
			MethodName: "deleteTodoService",
			Handler:    _ToDo_DeleteTodoService_Handler,
		},
		{
			MethodName: "getTodoByIDService",
			Handler:    _ToDo_GetTodoByIDService_Handler,
		},
		{
			MethodName: "updateTodoService",
			Handler:    _ToDo_UpdateTodoService_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "getAllTodosService",
			Handler:       _ToDo_GetAllTodosService_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "models/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 RegisterToDoServer

func RegisterToDoServer(s grpc.ServiceRegistrar, srv ToDoServer)

Types

type Null

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

func (*Null) Descriptor deprecated

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

Deprecated: Use Null.ProtoReflect.Descriptor instead.

func (*Null) ProtoMessage

func (*Null) ProtoMessage()

func (*Null) ProtoReflect

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

func (*Null) Reset

func (x *Null) Reset()

func (*Null) String

func (x *Null) String() string

type ToDoClient

type ToDoClient interface {
	CreateTodoService(ctx context.Context, in *TodoRequest, opts ...grpc.CallOption) (*TodoResponse, error)
	DeleteTodoService(ctx context.Context, in *TodoQuery, opts ...grpc.CallOption) (*Todo, error)
	GetAllTodosService(ctx context.Context, in *Null, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Todo], error)
	GetTodoByIDService(ctx context.Context, in *TodoQuery, opts ...grpc.CallOption) (*Todo, error)
	UpdateTodoService(ctx context.Context, in *Todo, opts ...grpc.CallOption) (*Todo, 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 ToDoServer

type ToDoServer interface {
	CreateTodoService(context.Context, *TodoRequest) (*TodoResponse, error)
	DeleteTodoService(context.Context, *TodoQuery) (*Todo, error)
	GetAllTodosService(*Null, grpc.ServerStreamingServer[Todo]) error
	GetTodoByIDService(context.Context, *TodoQuery) (*Todo, error)
	UpdateTodoService(context.Context, *Todo) (*Todo, error)
	// contains filtered or unexported methods
}

ToDoServer is the server API for ToDo service. All implementations must embed UnimplementedToDoServer for forward compatibility.

type ToDo_GetAllTodosServiceClient

type ToDo_GetAllTodosServiceClient = grpc.ServerStreamingClient[Todo]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ToDo_GetAllTodosServiceServer

type ToDo_GetAllTodosServiceServer = grpc.ServerStreamingServer[Todo]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

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"`
	Titel       string `protobuf:"bytes,3,opt,name=Titel,proto3" json:"Titel,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() string

func (*Todo) GetTitel added in v0.1.1

func (x *Todo) GetTitel() 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 TodoQuery

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

func (*TodoQuery) Descriptor deprecated

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

Deprecated: Use TodoQuery.ProtoReflect.Descriptor instead.

func (*TodoQuery) GetId

func (x *TodoQuery) GetId() string

func (*TodoQuery) ProtoMessage

func (*TodoQuery) ProtoMessage()

func (*TodoQuery) ProtoReflect

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

func (*TodoQuery) Reset

func (x *TodoQuery) Reset()

func (*TodoQuery) String

func (x *TodoQuery) String() string

type TodoRequest

type TodoRequest struct {
	Description string `protobuf:"bytes,1,opt,name=Description,proto3" json:"Description,omitempty"`
	Titel       string `protobuf:"bytes,2,opt,name=Titel,proto3" json:"Titel,omitempty"`
	// contains filtered or unexported fields
}

func (*TodoRequest) Descriptor deprecated

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

Deprecated: Use TodoRequest.ProtoReflect.Descriptor instead.

func (*TodoRequest) GetDescription

func (x *TodoRequest) GetDescription() string

func (*TodoRequest) GetTitel added in v0.1.1

func (x *TodoRequest) GetTitel() string

func (*TodoRequest) ProtoMessage

func (*TodoRequest) ProtoMessage()

func (*TodoRequest) ProtoReflect

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

func (*TodoRequest) Reset

func (x *TodoRequest) Reset()

func (*TodoRequest) String

func (x *TodoRequest) String() string

type TodoResponse

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

func (*TodoResponse) Descriptor deprecated

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

Deprecated: Use TodoResponse.ProtoReflect.Descriptor instead.

func (*TodoResponse) GetId

func (x *TodoResponse) GetId() string

func (*TodoResponse) ProtoMessage

func (*TodoResponse) ProtoMessage()

func (*TodoResponse) ProtoReflect

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

func (*TodoResponse) Reset

func (x *TodoResponse) Reset()

func (*TodoResponse) String

func (x *TodoResponse) String() string

type UnimplementedToDoServer

type UnimplementedToDoServer struct{}

UnimplementedToDoServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedToDoServer) CreateTodoService

func (UnimplementedToDoServer) DeleteTodoService

func (UnimplementedToDoServer) DeleteTodoService(context.Context, *TodoQuery) (*Todo, error)

func (UnimplementedToDoServer) GetAllTodosService

func (UnimplementedToDoServer) GetTodoByIDService

func (UnimplementedToDoServer) GetTodoByIDService(context.Context, *TodoQuery) (*Todo, error)

func (UnimplementedToDoServer) UpdateTodoService

func (UnimplementedToDoServer) UpdateTodoService(context.Context, *Todo) (*Todo, error)

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