Documentation ¶
Index ¶
- 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() Enum
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- type Enum
- type GetRequest
- type GetResponse
- 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) GetId() int64
- func (x *UpdateRequest) GetMail() string
- func (x *UpdateRequest) GetName() string
- 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) GetEmail() string
- func (x *User) GetId() int64
- func (x *User) GetName() string
- func (x *User) GetRole() Enum
- 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 UserV1Client
- type UserV1Server
Constants ¶
This section is empty.
Variables ¶
var ( Enum_name = map[int32]string{ 0: "USER", 1: "ADMIN", } Enum_value = map[string]int32{ "USER": 0, "ADMIN": 1, } )
Enum value maps for Enum.
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: "users.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 *Enum `protobuf:"varint,5,opt,name=role,proto3,enum=user_v1.Enum,oneof" 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() Enum
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 Enum ¶
type Enum int32
func (Enum) Descriptor ¶
func (Enum) Descriptor() protoreflect.EnumDescriptor
func (Enum) EnumDescriptor
deprecated
func (Enum) Number ¶
func (x Enum) Number() protoreflect.EnumNumber
func (Enum) Type ¶
func (Enum) Type() protoreflect.EnumType
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 { User *User `protobuf:"bytes,1,opt,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetUser ¶
func (x *GetResponse) GetUser() *User
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 string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Mail string `protobuf:"bytes,3,opt,name=mail,proto3" json:"mail,omitempty"` // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() int64
func (*UpdateRequest) GetMail ¶
func (x *UpdateRequest) GetMail() string
func (*UpdateRequest) GetName ¶
func (x *UpdateRequest) GetName() string
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"` 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 *Enum `protobuf:"varint,4,opt,name=role,proto3,enum=user_v1.Enum,oneof" 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 (*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 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