user

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_GetUser_FullMethodName = "/user.UserService/GetUser"
)

Variables

View Source
var File_users_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUser",
			Handler:    _UserService_GetUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "users.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) GetUser

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 User

type User struct {
	Id        uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedAt string `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt string `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	Name      string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Avatar    string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Token     string `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() string

func (*User) GetId

func (x *User) GetId() uint64

func (*User) GetName

func (x *User) GetName() string

func (*User) GetToken

func (x *User) GetToken() string

func (*User) GetUpdatedAt

func (x *User) GetUpdatedAt() 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 UserRequest

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

func (*UserRequest) Descriptor deprecated

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

Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.

func (*UserRequest) GetToken

func (x *UserRequest) GetToken() 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 {
	Code    int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data    *User  `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*UserResponse) Descriptor deprecated

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

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) GetCode

func (x *UserResponse) GetCode() int32

func (*UserResponse) GetData

func (x *UserResponse) GetData() *User

func (*UserResponse) GetMessage

func (x *UserResponse) GetMessage() 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 {
	GetUser(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 {
	GetUser(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