Documentation ¶
Index ¶
- Variables
- func RegisterNoteV1Server(s grpc.ServiceRegistrar, srv NoteV1Server)
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetInfo() *UserInfo
- func (x *CreateRequest) GetPasswd() *UserPassword
- 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
- type NoteV1Client
- type NoteV1Server
- type RoleType
- type UnimplementedNoteV1Server
- func (UnimplementedNoteV1Server) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedNoteV1Server) Delete(context.Context, *DeleteRequest) (*empty.Empty, error)
- func (UnimplementedNoteV1Server) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedNoteV1Server) Update(context.Context, *UpdateRequest) (*empty.Empty, error)
- type UnsafeNoteV1Server
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetId() int64
- func (x *UpdateRequest) GetInfo() *UpdateUserInfo
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateUserInfo
- func (*UpdateUserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserInfo) GetEmail() *wrappers.StringValue
- func (x *UpdateUserInfo) GetName() *wrappers.StringValue
- func (x *UpdateUserInfo) GetRole() RoleType
- func (*UpdateUserInfo) ProtoMessage()
- func (x *UpdateUserInfo) ProtoReflect() protoreflect.Message
- func (x *UpdateUserInfo) Reset()
- func (x *UpdateUserInfo) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamp.Timestamp
- func (x *User) GetId() int64
- func (x *User) GetInfo() *UserInfo
- func (x *User) GetUpdatedAt() *timestamp.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) GetRole() RoleType
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
- type UserPassword
- func (*UserPassword) Descriptor() ([]byte, []int)deprecated
- func (x *UserPassword) GetPassword() string
- func (x *UserPassword) GetPasswordConfirm() string
- func (*UserPassword) ProtoMessage()
- func (x *UserPassword) ProtoReflect() protoreflect.Message
- func (x *UserPassword) Reset()
- func (x *UserPassword) String() string
Constants ¶
This section is empty.
Variables ¶
var ( RoleType_name = map[int32]string{ 0: "UNSPECIFIED", 1: "USER", 2: "ADMIN", } RoleType_value = map[string]int32{ "UNSPECIFIED": 0, "USER": 1, "ADMIN": 2, } )
Enum value maps for RoleType.
var File_note_proto protoreflect.FileDescriptor
var NoteV1_ServiceDesc = grpc.ServiceDesc{ ServiceName: "note_v1.NoteV1", HandlerType: (*NoteV1Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _NoteV1_Create_Handler, }, { MethodName: "Get", Handler: _NoteV1_Get_Handler, }, { MethodName: "Update", Handler: _NoteV1_Update_Handler, }, { MethodName: "Delete", Handler: _NoteV1_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "note.proto", }
NoteV1_ServiceDesc is the grpc.ServiceDesc for NoteV1 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNoteV1Server ¶
func RegisterNoteV1Server(s grpc.ServiceRegistrar, srv NoteV1Server)
Types ¶
type CreateRequest ¶
type CreateRequest struct { Info *UserInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` Passwd *UserPassword `protobuf:"bytes,2,opt,name=passwd,proto3" json:"passwd,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetInfo ¶
func (x *CreateRequest) GetInfo() *UserInfo
func (*CreateRequest) GetPasswd ¶
func (x *CreateRequest) GetPasswd() *UserPassword
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 { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,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 NoteV1Client ¶
type NoteV1Client 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) (*empty.Empty, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error) }
NoteV1Client is the client API for NoteV1 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 NewNoteV1Client ¶
func NewNoteV1Client(cc grpc.ClientConnInterface) NoteV1Client
type NoteV1Server ¶
type NoteV1Server interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) Update(context.Context, *UpdateRequest) (*empty.Empty, error) Delete(context.Context, *DeleteRequest) (*empty.Empty, error) // contains filtered or unexported methods }
NoteV1Server is the server API for NoteV1 service. All implementations must embed UnimplementedNoteV1Server for forward compatibility
type RoleType ¶
type RoleType int32
func (RoleType) Descriptor ¶
func (RoleType) Descriptor() protoreflect.EnumDescriptor
func (RoleType) EnumDescriptor
deprecated
func (RoleType) Number ¶
func (x RoleType) Number() protoreflect.EnumNumber
func (RoleType) Type ¶
func (RoleType) Type() protoreflect.EnumType
type UnimplementedNoteV1Server ¶
type UnimplementedNoteV1Server struct { }
UnimplementedNoteV1Server must be embedded to have forward compatible implementations.
func (UnimplementedNoteV1Server) Create ¶
func (UnimplementedNoteV1Server) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedNoteV1Server) Delete ¶
func (UnimplementedNoteV1Server) Delete(context.Context, *DeleteRequest) (*empty.Empty, error)
func (UnimplementedNoteV1Server) Get ¶
func (UnimplementedNoteV1Server) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedNoteV1Server) Update ¶
func (UnimplementedNoteV1Server) Update(context.Context, *UpdateRequest) (*empty.Empty, error)
type UnsafeNoteV1Server ¶
type UnsafeNoteV1Server interface {
// contains filtered or unexported methods
}
UnsafeNoteV1Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NoteV1Server will result in compilation errors.
type UpdateRequest ¶
type UpdateRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Info *UpdateUserInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,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) GetInfo ¶
func (x *UpdateRequest) GetInfo() *UpdateUserInfo
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 UpdateUserInfo ¶
type UpdateUserInfo struct { Name *wrappers.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Email *wrappers.StringValue `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Role RoleType `protobuf:"varint,3,opt,name=role,proto3,enum=note_v1.RoleType" json:"role,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserInfo) Descriptor
deprecated
func (*UpdateUserInfo) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserInfo.ProtoReflect.Descriptor instead.
func (*UpdateUserInfo) GetEmail ¶
func (x *UpdateUserInfo) GetEmail() *wrappers.StringValue
func (*UpdateUserInfo) GetName ¶
func (x *UpdateUserInfo) GetName() *wrappers.StringValue
func (*UpdateUserInfo) GetRole ¶
func (x *UpdateUserInfo) GetRole() RoleType
func (*UpdateUserInfo) ProtoMessage ¶
func (*UpdateUserInfo) ProtoMessage()
func (*UpdateUserInfo) ProtoReflect ¶
func (x *UpdateUserInfo) ProtoReflect() protoreflect.Message
func (*UpdateUserInfo) Reset ¶
func (x *UpdateUserInfo) Reset()
func (*UpdateUserInfo) String ¶
func (x *UpdateUserInfo) 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 *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamp.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 (*User) GetUpdatedAt ¶
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"` Role RoleType `protobuf:"varint,3,opt,name=role,proto3,enum=note_v1.RoleType" json:"role,omitempty"` // contains filtered or unexported fields }
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
type UserPassword ¶
type UserPassword struct { Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` PasswordConfirm string `protobuf:"bytes,2,opt,name=password_confirm,json=passwordConfirm,proto3" json:"password_confirm,omitempty"` // contains filtered or unexported fields }
func (*UserPassword) Descriptor
deprecated
func (*UserPassword) Descriptor() ([]byte, []int)
Deprecated: Use UserPassword.ProtoReflect.Descriptor instead.
func (*UserPassword) GetPassword ¶
func (x *UserPassword) GetPassword() string
func (*UserPassword) GetPasswordConfirm ¶
func (x *UserPassword) GetPasswordConfirm() string
func (*UserPassword) ProtoMessage ¶
func (*UserPassword) ProtoMessage()
func (*UserPassword) ProtoReflect ¶
func (x *UserPassword) ProtoReflect() protoreflect.Message
func (*UserPassword) Reset ¶
func (x *UserPassword) Reset()
func (*UserPassword) String ¶
func (x *UserPassword) String() string