Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterUserV1Server(s grpc.ServiceRegistrar, srv UserV1Server)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetEmail() string
- func (x *CreateRequest) GetName() string
- func (x *CreateRequest) GetPassword() string
- func (x *CreateRequest) GetPasswordConfirm() string
- func (x *CreateRequest) GetRole() UserRole
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- type GetRequest
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetResponse) GetCreatedAt() *timestamppb.Timestamp
- func (x *GetResponse) GetEmail() string
- func (x *GetResponse) GetId() int64
- func (x *GetResponse) GetName() string
- func (x *GetResponse) GetRole() UserRole
- func (x *GetResponse) GetUpdatedAt() *timestamppb.Timestamp
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) ProtoReflect() protoreflect.Message
- func (x *GetResponse) Reset()
- func (x *GetResponse) String() string
- type UnimplementedUserV1Server
- func (UnimplementedUserV1Server) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedUserV1Server) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
- func (UnimplementedUserV1Server) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedUserV1Server) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
- type UnsafeUserV1Server
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetEmail() *wrapperspb.StringValue
- func (x *UpdateRequest) GetId() int64
- func (x *UpdateRequest) GetName() *wrapperspb.StringValue
- func (x *UpdateRequest) GetRole() UserRole
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetId() int64
- func (x *User) GetInfo() *UserInfo
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetEmail() string
- func (x *UserInfo) GetName() string
- func (x *UserInfo) GetPassword() string
- func (x *UserInfo) GetRole() UserRole
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
- type UserRole
- type UserV1Client
- type UserV1Server
Constants ¶
const ( UserV1_Create_FullMethodName = "/user_v1.UserV1/Create" UserV1_Get_FullMethodName = "/user_v1.UserV1/Get" UserV1_Update_FullMethodName = "/user_v1.UserV1/Update" UserV1_Delete_FullMethodName = "/user_v1.UserV1/Delete" )
Variables ¶
var ( UserRole_name = map[int32]string{ 0: "UNKNOWN", 1: "USER", 2: "ADMIN", } UserRole_value = map[string]int32{ "UNKNOWN": 0, "USER": 1, "ADMIN": 2, } )
Enum value maps for UserRole.
var File_user_proto protoreflect.FileDescriptor
var UserV1_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user_v1.UserV1", HandlerType: (*UserV1Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _UserV1_Create_Handler, }, { MethodName: "Get", Handler: _UserV1_Get_Handler, }, { MethodName: "Update", Handler: _UserV1_Update_Handler, }, { MethodName: "Delete", Handler: _UserV1_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserV1_ServiceDesc is the grpc.ServiceDesc for UserV1 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserV1Server ¶
func RegisterUserV1Server(s grpc.ServiceRegistrar, srv UserV1Server)
Types ¶
type CreateRequest ¶
type CreateRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` PasswordConfirm string `protobuf:"bytes,4,opt,name=password_confirm,json=passwordConfirm,proto3" json:"password_confirm,omitempty"` Role UserRole `protobuf:"varint,5,opt,name=role,proto3,enum=user_v1.UserRole" json:"role,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetEmail ¶
func (x *CreateRequest) GetEmail() string
func (*CreateRequest) GetName ¶
func (x *CreateRequest) GetName() string
func (*CreateRequest) GetPassword ¶
func (x *CreateRequest) GetPassword() string
func (*CreateRequest) GetPasswordConfirm ¶
func (x *CreateRequest) GetPasswordConfirm() string
func (*CreateRequest) GetRole ¶
func (x *CreateRequest) GetRole() UserRole
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetId ¶
func (x *CreateResponse) GetId() int64
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() int64
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type GetRequest ¶
type GetRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() int64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Role UserRole `protobuf:"varint,4,opt,name=role,proto3,enum=user_v1.UserRole" json:"role,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetCreatedAt ¶
func (x *GetResponse) GetCreatedAt() *timestamppb.Timestamp
func (*GetResponse) GetEmail ¶
func (x *GetResponse) GetEmail() string
func (*GetResponse) GetId ¶
func (x *GetResponse) GetId() int64
func (*GetResponse) GetName ¶
func (x *GetResponse) GetName() string
func (*GetResponse) GetRole ¶
func (x *GetResponse) GetRole() UserRole
func (*GetResponse) GetUpdatedAt ¶
func (x *GetResponse) GetUpdatedAt() *timestamppb.Timestamp
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type UnimplementedUserV1Server ¶
type UnimplementedUserV1Server struct { }
UnimplementedUserV1Server must be embedded to have forward compatible implementations.
func (UnimplementedUserV1Server) Create ¶
func (UnimplementedUserV1Server) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedUserV1Server) Delete ¶
func (UnimplementedUserV1Server) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
func (UnimplementedUserV1Server) Get ¶
func (UnimplementedUserV1Server) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedUserV1Server) Update ¶
func (UnimplementedUserV1Server) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error)
type UnsafeUserV1Server ¶
type UnsafeUserV1Server interface {
// contains filtered or unexported methods
}
UnsafeUserV1Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserV1Server will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Role UserRole `protobuf:"varint,4,opt,name=role,proto3,enum=user_v1.UserRole" json:"role,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetEmail ¶
func (x *UpdateRequest) GetEmail() *wrapperspb.StringValue
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() int64
func (*UpdateRequest) GetName ¶
func (x *UpdateRequest) GetName() *wrapperspb.StringValue
func (*UpdateRequest) GetRole ¶
func (x *UpdateRequest) GetRole() UserRole
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Info *UserInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserInfo ¶
type UserInfo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Role UserRole `protobuf:"varint,4,opt,name=role,proto3,enum=user_v1.UserRole" json:"role,omitempty"` // contains filtered or unexported fields }
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetPassword ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
type UserRole ¶
type UserRole int32
func (UserRole) Descriptor ¶
func (UserRole) Descriptor() protoreflect.EnumDescriptor
func (UserRole) EnumDescriptor
deprecated
func (UserRole) Number ¶
func (x UserRole) Number() protoreflect.EnumNumber
func (UserRole) Type ¶
func (UserRole) Type() protoreflect.EnumType
type UserV1Client ¶
type UserV1Client interface { Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
UserV1Client is the client API for UserV1 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 NewUserV1Client ¶
func NewUserV1Client(cc grpc.ClientConnInterface) UserV1Client
type UserV1Server ¶
type UserV1Server interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) Update(context.Context, *UpdateRequest) (*emptypb.Empty, error) Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
UserV1Server is the server API for UserV1 service. All implementations must embed UnimplementedUserV1Server for forward compatibility