generated

package
v0.0.0-...-be915d5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_users_proto protoreflect.FileDescriptor
View Source
var UsersService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.users.v1.UsersService",
	HandlerType: (*UsersServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _UsersService_List_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _UsersService_Get_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _UsersService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "users.proto",
}

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

Functions

func RegisterUsersServiceServer

func RegisterUsersServiceServer(s grpc.ServiceRegistrar, srv UsersServiceServer)

Types

type GetByIDRequest

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

func (*GetByIDRequest) Descriptor deprecated

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

Deprecated: Use GetByIDRequest.ProtoReflect.Descriptor instead.

func (*GetByIDRequest) GetId

func (x *GetByIDRequest) GetId() int64

func (*GetByIDRequest) ProtoMessage

func (*GetByIDRequest) ProtoMessage()

func (*GetByIDRequest) ProtoReflect

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

func (*GetByIDRequest) Reset

func (x *GetByIDRequest) Reset()

func (*GetByIDRequest) String

func (x *GetByIDRequest) String() string

type UnimplementedUsersServiceServer

type UnimplementedUsersServiceServer struct {
}

UnimplementedUsersServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUsersServiceServer) Delete

func (UnimplementedUsersServiceServer) Get

func (UnimplementedUsersServiceServer) List

type UnsafeUsersServiceServer

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

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

type User

type User struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Email    string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetUsername

func (x *User) GetUsername() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserList

type UserList struct {
	Users []*User `protobuf:"bytes,8,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*UserList) Descriptor deprecated

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

Deprecated: Use UserList.ProtoReflect.Descriptor instead.

func (*UserList) GetUsers

func (x *UserList) GetUsers() []*User

func (*UserList) ProtoMessage

func (*UserList) ProtoMessage()

func (*UserList) ProtoReflect

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

func (*UserList) Reset

func (x *UserList) Reset()

func (*UserList) String

func (x *UserList) String() string

type UsersServiceClient

type UsersServiceClient interface {
	List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserList, error)
	Get(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*User, error)
	Delete(ctx context.Context, in *GetByIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

UsersServiceClient is the client API for UsersService 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 UsersServiceServer

type UsersServiceServer interface {
	List(context.Context, *emptypb.Empty) (*UserList, error)
	Get(context.Context, *GetByIDRequest) (*User, error)
	Delete(context.Context, *GetByIDRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

UsersServiceServer is the server API for UsersService service. All implementations must embed UnimplementedUsersServiceServer for forward compatibility

Jump to

Keyboard shortcuts

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