proto

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_Info_FullMethodName       = "/proto.UserService/Info"
	UserService_ListUser_FullMethodName   = "/proto.UserService/ListUser"
	UserService_CreateUser_FullMethodName = "/proto.UserService/CreateUser"
)

Variables

View Source
var File_internal_api_grpc_proto_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Info",
			Handler:    _UserService_Info_Handler,
		},
		{
			MethodName: "ListUser",
			Handler:    _UserService_ListUser_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _UserService_CreateUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/api/grpc/proto/user.proto",
}

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

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct{}

UnimplementedUserServiceServer 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 (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) Info

func (UnimplementedUserServiceServer) ListUser

type UnsafeUserServiceServer

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

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

type UserInfoRequest

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

func (*UserInfoRequest) Descriptor deprecated

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

Deprecated: Use UserInfoRequest.ProtoReflect.Descriptor instead.

func (*UserInfoRequest) GetId

func (x *UserInfoRequest) GetId() uint64

func (*UserInfoRequest) ProtoMessage

func (*UserInfoRequest) ProtoMessage()

func (*UserInfoRequest) ProtoReflect

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

func (*UserInfoRequest) Reset

func (x *UserInfoRequest) Reset()

func (*UserInfoRequest) String

func (x *UserInfoRequest) String() string

type UserListRequest

type UserListRequest struct {
	PageNum  uint64 `protobuf:"varint,1,opt,name=page_num,json=pageNum,proto3" json:"page_num,omitempty"`
	PageSize uint64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*UserListRequest) Descriptor deprecated

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

Deprecated: Use UserListRequest.ProtoReflect.Descriptor instead.

func (*UserListRequest) GetPageNum

func (x *UserListRequest) GetPageNum() uint64

func (*UserListRequest) GetPageSize

func (x *UserListRequest) GetPageSize() uint64

func (*UserListRequest) GetUsername

func (x *UserListRequest) GetUsername() string

func (*UserListRequest) ProtoMessage

func (*UserListRequest) ProtoMessage()

func (*UserListRequest) ProtoReflect

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

func (*UserListRequest) Reset

func (x *UserListRequest) Reset()

func (*UserListRequest) String

func (x *UserListRequest) String() string

type UserListResponse

type UserListResponse struct {
	Total uint64          `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	List  []*UserResponse `protobuf:"bytes,2,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

func (*UserListResponse) Descriptor deprecated

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

Deprecated: Use UserListResponse.ProtoReflect.Descriptor instead.

func (*UserListResponse) GetList

func (x *UserListResponse) GetList() []*UserResponse

func (*UserListResponse) GetTotal

func (x *UserListResponse) GetTotal() uint64

func (*UserListResponse) ProtoMessage

func (*UserListResponse) ProtoMessage()

func (*UserListResponse) ProtoReflect

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

func (*UserListResponse) Reset

func (x *UserListResponse) Reset()

func (*UserListResponse) String

func (x *UserListResponse) String() string

type UserRequest

type UserRequest struct {
	Telephone string `protobuf:"bytes,1,opt,name=telephone,proto3" json:"telephone,omitempty"`
	Password  string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	RealName  string `protobuf:"bytes,3,opt,name=real_name,json=realName,proto3" json:"real_name,omitempty"`
	Nickname  string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Avatar    string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Gender    uint32 `protobuf:"varint,6,opt,name=gender,proto3" json:"gender,omitempty"`
	Birthday  string `protobuf:"bytes,7,opt,name=birthday,proto3" json:"birthday,omitempty"`
	Status    uint32 `protobuf:"varint,8,opt,name=Status,proto3" json:"Status,omitempty"`
	// contains filtered or unexported fields
}

func (*UserRequest) Descriptor deprecated

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

Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.

func (*UserRequest) GetAvatar

func (x *UserRequest) GetAvatar() string

func (*UserRequest) GetBirthday

func (x *UserRequest) GetBirthday() string

func (*UserRequest) GetGender

func (x *UserRequest) GetGender() uint32

func (*UserRequest) GetNickname

func (x *UserRequest) GetNickname() string

func (*UserRequest) GetPassword

func (x *UserRequest) GetPassword() string

func (*UserRequest) GetRealName

func (x *UserRequest) GetRealName() string

func (*UserRequest) GetStatus

func (x *UserRequest) GetStatus() uint32

func (*UserRequest) GetTelephone

func (x *UserRequest) GetTelephone() string

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) ProtoReflect

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

func (*UserRequest) Reset

func (x *UserRequest) Reset()

func (*UserRequest) String

func (x *UserRequest) String() string

type UserResponse

type UserResponse struct {
	Id        uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Telephone string `protobuf:"bytes,2,opt,name=telephone,proto3" json:"telephone,omitempty"`
	RealName  string `protobuf:"bytes,3,opt,name=real_name,json=realName,proto3" json:"real_name,omitempty"`
	Nickname  string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Avatar    string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Gender    uint32 `protobuf:"varint,6,opt,name=gender,proto3" json:"gender,omitempty"`
	Birthday  string `protobuf:"bytes,7,opt,name=birthday,proto3" json:"birthday,omitempty"`
	// contains filtered or unexported fields
}

func (*UserResponse) Descriptor deprecated

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

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) GetAvatar

func (x *UserResponse) GetAvatar() string

func (*UserResponse) GetBirthday

func (x *UserResponse) GetBirthday() string

func (*UserResponse) GetGender

func (x *UserResponse) GetGender() uint32

func (*UserResponse) GetId

func (x *UserResponse) GetId() uint64

func (*UserResponse) GetNickname

func (x *UserResponse) GetNickname() string

func (*UserResponse) GetRealName

func (x *UserResponse) GetRealName() string

func (*UserResponse) GetTelephone

func (x *UserResponse) GetTelephone() string

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect

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

func (*UserResponse) Reset

func (x *UserResponse) Reset()

func (*UserResponse) String

func (x *UserResponse) String() string

type UserServiceClient

type UserServiceClient interface {
	Info(ctx context.Context, in *UserInfoRequest, opts ...grpc.CallOption) (*UserResponse, error)
	ListUser(ctx context.Context, in *UserListRequest, opts ...grpc.CallOption) (*UserListResponse, error)
	CreateUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error)
}

UserServiceClient is the client API for UserService 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 UserServiceServer

type UserServiceServer interface {
	Info(context.Context, *UserInfoRequest) (*UserResponse, error)
	ListUser(context.Context, *UserListRequest) (*UserListResponse, error)
	CreateUser(context.Context, *UserRequest) (*UserResponse, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.

Jump to

Keyboard shortcuts

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