Documentation ¶
Index ¶
- Variables
- func RegisterProfileServer(s grpc.ServiceRegistrar, srv ProfileServer)
- type Email
- type Empty
- type ProfileClient
- type ProfileServer
- type UnimplementedProfileServer
- func (UnimplementedProfileServer) Create(context.Context, *User) (*Empty, error)
- func (UnimplementedProfileServer) Delete(context.Context, *UserId) (*Empty, error)
- func (UnimplementedProfileServer) GetByEmail(context.Context, *Email) (*User, error)
- func (UnimplementedProfileServer) GetById(context.Context, *UserId) (*User, error)
- func (UnimplementedProfileServer) GetByUsername(context.Context, *Username) (*User, error)
- func (UnimplementedProfileServer) Update(context.Context, *User) (*Empty, error)
- type UnsafeProfileServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetCountFollowing() int64
- func (x *User) GetEmail() string
- func (x *User) GetPassword() string
- func (x *User) GetUserId() uint64
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserId
- type Username
Constants ¶
This section is empty.
Variables ¶
var File_user_proto_user_proto protoreflect.FileDescriptor
var Profile_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.Profile", HandlerType: (*ProfileServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Profile_Create_Handler, }, { MethodName: "Update", Handler: _Profile_Update_Handler, }, { MethodName: "Delete", Handler: _Profile_Delete_Handler, }, { MethodName: "GetById", Handler: _Profile_GetById_Handler, }, { MethodName: "GetByUsername", Handler: _Profile_GetByUsername_Handler, }, { MethodName: "GetByEmail", Handler: _Profile_GetByEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/proto/user.proto", }
Profile_ServiceDesc is the grpc.ServiceDesc for Profile service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProfileServer ¶
func RegisterProfileServer(s grpc.ServiceRegistrar, srv ProfileServer)
Types ¶
type Email ¶
type Email struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*Email) Descriptor
deprecated
func (*Email) ProtoMessage ¶
func (*Email) ProtoMessage()
func (*Email) ProtoReflect ¶
func (x *Email) ProtoReflect() protoreflect.Message
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type ProfileClient ¶
type ProfileClient interface { Create(ctx context.Context, in *User, opts ...grpc.CallOption) (*Empty, error) Update(ctx context.Context, in *User, opts ...grpc.CallOption) (*Empty, error) Delete(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*Empty, error) GetById(ctx context.Context, in *UserId, opts ...grpc.CallOption) (*User, error) GetByUsername(ctx context.Context, in *Username, opts ...grpc.CallOption) (*User, error) GetByEmail(ctx context.Context, in *Email, opts ...grpc.CallOption) (*User, error) }
ProfileClient is the client API for Profile 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 NewProfileClient ¶
func NewProfileClient(cc grpc.ClientConnInterface) ProfileClient
type ProfileServer ¶
type ProfileServer interface { Create(context.Context, *User) (*Empty, error) Update(context.Context, *User) (*Empty, error) Delete(context.Context, *UserId) (*Empty, error) GetById(context.Context, *UserId) (*User, error) GetByUsername(context.Context, *Username) (*User, error) GetByEmail(context.Context, *Email) (*User, error) // contains filtered or unexported methods }
ProfileServer is the server API for Profile service. All implementations must embed UnimplementedProfileServer for forward compatibility
type UnimplementedProfileServer ¶
type UnimplementedProfileServer struct { }
UnimplementedProfileServer must be embedded to have forward compatible implementations.
func (UnimplementedProfileServer) GetByEmail ¶
func (UnimplementedProfileServer) GetByUsername ¶
type UnsafeProfileServer ¶
type UnsafeProfileServer interface {
// contains filtered or unexported methods
}
UnsafeProfileServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProfileServer will result in compilation errors.
type User ¶
type User struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_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"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` CountFollowing int64 `protobuf:"varint,6,opt,name=count_following,json=countFollowing,proto3" json:"count_following,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCountFollowing ¶
func (*User) GetPassword ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserId ¶
type UserId struct { UserId uint64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UserId) Descriptor
deprecated
func (*UserId) ProtoMessage ¶
func (*UserId) ProtoMessage()
func (*UserId) ProtoReflect ¶
func (x *UserId) ProtoReflect() protoreflect.Message
type Username ¶
type Username struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*Username) Descriptor
deprecated
func (*Username) GetUsername ¶
func (*Username) ProtoMessage ¶
func (*Username) ProtoMessage()
func (*Username) ProtoReflect ¶
func (x *Username) ProtoReflect() protoreflect.Message