Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterStudentServiceServer(s grpc.ServiceRegistrar, srv StudentServiceServer)
- type CreateStudentRequest
- func (*CreateStudentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateStudentRequest) GetBirthDay() string
- func (x *CreateStudentRequest) GetPhones() []*StudentPhoneNumber
- func (x *CreateStudentRequest) GetStudentFname() string
- func (x *CreateStudentRequest) GetStudentLname() string
- func (*CreateStudentRequest) ProtoMessage()
- func (x *CreateStudentRequest) ProtoReflect() protoreflect.Message
- func (x *CreateStudentRequest) Reset()
- func (x *CreateStudentRequest) String() string
- type CreateStudentResponse
- func (*CreateStudentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateStudentResponse) GetStudentId() string
- func (*CreateStudentResponse) ProtoMessage()
- func (x *CreateStudentResponse) ProtoReflect() protoreflect.Message
- func (x *CreateStudentResponse) Reset()
- func (x *CreateStudentResponse) String() string
- type GetAllStudentsRequest
- func (*GetAllStudentsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllStudentsRequest) GetField() string
- func (x *GetAllStudentsRequest) GetLimit() int32
- func (x *GetAllStudentsRequest) GetPage() int32
- func (x *GetAllStudentsRequest) GetValues() string
- func (*GetAllStudentsRequest) ProtoMessage()
- func (x *GetAllStudentsRequest) ProtoReflect() protoreflect.Message
- func (x *GetAllStudentsRequest) Reset()
- func (x *GetAllStudentsRequest) String() string
- type GetAllStudentsResponse
- func (*GetAllStudentsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllStudentsResponse) GetStudents() []*Student
- func (*GetAllStudentsResponse) ProtoMessage()
- func (x *GetAllStudentsResponse) ProtoReflect() protoreflect.Message
- func (x *GetAllStudentsResponse) Reset()
- func (x *GetAllStudentsResponse) String() string
- type GetStudentByIdRequest
- func (*GetStudentByIdRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetStudentByIdRequest) GetStudentId() string
- func (*GetStudentByIdRequest) ProtoMessage()
- func (x *GetStudentByIdRequest) ProtoReflect() protoreflect.Message
- func (x *GetStudentByIdRequest) Reset()
- func (x *GetStudentByIdRequest) String() string
- type Student
- func (*Student) Descriptor() ([]byte, []int)deprecated
- func (x *Student) GetBirthDay() string
- func (x *Student) GetCreatedAt() string
- func (x *Student) GetDeletedAt() string
- func (x *Student) GetPhones() []*StudentPhoneNumber
- func (x *Student) GetPoint() int64
- func (x *Student) GetStudentFname() string
- func (x *Student) GetStudentId() string
- func (x *Student) GetStudentLname() string
- func (x *Student) GetUpdatedAt() string
- func (*Student) ProtoMessage()
- func (x *Student) ProtoReflect() protoreflect.Message
- func (x *Student) Reset()
- func (x *Student) String() string
- type StudentPhoneNumber
- func (*StudentPhoneNumber) Descriptor() ([]byte, []int)deprecated
- func (x *StudentPhoneNumber) GetPhoneNumber() string
- func (*StudentPhoneNumber) ProtoMessage()
- func (x *StudentPhoneNumber) ProtoReflect() protoreflect.Message
- func (x *StudentPhoneNumber) Reset()
- func (x *StudentPhoneNumber) String() string
- type StudentServiceClient
- type StudentServiceServer
- type UnimplementedStudentServiceServer
- func (UnimplementedStudentServiceServer) CreateStudent(context.Context, *CreateStudentRequest) (*CreateStudentResponse, error)
- func (UnimplementedStudentServiceServer) GetAllStudent(context.Context, *GetAllStudentsRequest) (*GetAllStudentsResponse, error)
- func (UnimplementedStudentServiceServer) GetStudentById(context.Context, *GetStudentByIdRequest) (*Student, error)
- func (UnimplementedStudentServiceServer) UpdateStudent(context.Context, *UpdateStudentRequest) (*Student, error)
- type UnsafeStudentServiceServer
- type UpdateStudentRequest
- func (*UpdateStudentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateStudentRequest) GetPhones() []*StudentPhoneNumber
- func (x *UpdateStudentRequest) GetStudentFname() string
- func (x *UpdateStudentRequest) GetStudentLname() string
- func (*UpdateStudentRequest) ProtoMessage()
- func (x *UpdateStudentRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateStudentRequest) Reset()
- func (x *UpdateStudentRequest) String() string
Constants ¶
const ( StudentService_CreateStudent_FullMethodName = "/StudentService/CreateStudent" StudentService_GetAllStudent_FullMethodName = "/StudentService/GetAllStudent" StudentService_GetStudentById_FullMethodName = "/StudentService/GetStudentById" StudentService_UpdateStudent_FullMethodName = "/StudentService/UpdateStudent" )
Variables ¶
var File_student_proto_proto protoreflect.FileDescriptor
var StudentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "StudentService", HandlerType: (*StudentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateStudent", Handler: _StudentService_CreateStudent_Handler, }, { MethodName: "GetAllStudent", Handler: _StudentService_GetAllStudent_Handler, }, { MethodName: "GetStudentById", Handler: _StudentService_GetStudentById_Handler, }, { MethodName: "UpdateStudent", Handler: _StudentService_UpdateStudent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "student/proto.proto", }
StudentService_ServiceDesc is the grpc.ServiceDesc for StudentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStudentServiceServer ¶
func RegisterStudentServiceServer(s grpc.ServiceRegistrar, srv StudentServiceServer)
Types ¶
type CreateStudentRequest ¶
type CreateStudentRequest struct { StudentFname string `protobuf:"bytes,1,opt,name=student_fname,json=studentFname,proto3" json:"student_fname,omitempty"` StudentLname string `protobuf:"bytes,2,opt,name=student_lname,json=studentLname,proto3" json:"student_lname,omitempty"` BirthDay string `protobuf:"bytes,3,opt,name=birth_day,json=birthDay,proto3" json:"birth_day,omitempty"` Phones []*StudentPhoneNumber `protobuf:"bytes,4,rep,name=phones,proto3" json:"phones,omitempty"` // contains filtered or unexported fields }
func (*CreateStudentRequest) Descriptor
deprecated
func (*CreateStudentRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateStudentRequest.ProtoReflect.Descriptor instead.
func (*CreateStudentRequest) GetBirthDay ¶
func (x *CreateStudentRequest) GetBirthDay() string
func (*CreateStudentRequest) GetPhones ¶
func (x *CreateStudentRequest) GetPhones() []*StudentPhoneNumber
func (*CreateStudentRequest) GetStudentFname ¶
func (x *CreateStudentRequest) GetStudentFname() string
func (*CreateStudentRequest) GetStudentLname ¶
func (x *CreateStudentRequest) GetStudentLname() string
func (*CreateStudentRequest) ProtoMessage ¶
func (*CreateStudentRequest) ProtoMessage()
func (*CreateStudentRequest) ProtoReflect ¶
func (x *CreateStudentRequest) ProtoReflect() protoreflect.Message
func (*CreateStudentRequest) Reset ¶
func (x *CreateStudentRequest) Reset()
func (*CreateStudentRequest) String ¶
func (x *CreateStudentRequest) String() string
type CreateStudentResponse ¶
type CreateStudentResponse struct { StudentId string `protobuf:"bytes,1,opt,name=student_id,json=studentId,proto3" json:"student_id,omitempty"` // contains filtered or unexported fields }
func (*CreateStudentResponse) Descriptor
deprecated
func (*CreateStudentResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateStudentResponse.ProtoReflect.Descriptor instead.
func (*CreateStudentResponse) GetStudentId ¶
func (x *CreateStudentResponse) GetStudentId() string
func (*CreateStudentResponse) ProtoMessage ¶
func (*CreateStudentResponse) ProtoMessage()
func (*CreateStudentResponse) ProtoReflect ¶
func (x *CreateStudentResponse) ProtoReflect() protoreflect.Message
func (*CreateStudentResponse) Reset ¶
func (x *CreateStudentResponse) Reset()
func (*CreateStudentResponse) String ¶
func (x *CreateStudentResponse) String() string
type GetAllStudentsRequest ¶
type GetAllStudentsRequest struct { Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"` Values string `protobuf:"bytes,4,opt,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
func (*GetAllStudentsRequest) Descriptor
deprecated
func (*GetAllStudentsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllStudentsRequest.ProtoReflect.Descriptor instead.
func (*GetAllStudentsRequest) GetField ¶
func (x *GetAllStudentsRequest) GetField() string
func (*GetAllStudentsRequest) GetLimit ¶
func (x *GetAllStudentsRequest) GetLimit() int32
func (*GetAllStudentsRequest) GetPage ¶
func (x *GetAllStudentsRequest) GetPage() int32
func (*GetAllStudentsRequest) GetValues ¶
func (x *GetAllStudentsRequest) GetValues() string
func (*GetAllStudentsRequest) ProtoMessage ¶
func (*GetAllStudentsRequest) ProtoMessage()
func (*GetAllStudentsRequest) ProtoReflect ¶
func (x *GetAllStudentsRequest) ProtoReflect() protoreflect.Message
func (*GetAllStudentsRequest) Reset ¶
func (x *GetAllStudentsRequest) Reset()
func (*GetAllStudentsRequest) String ¶
func (x *GetAllStudentsRequest) String() string
type GetAllStudentsResponse ¶
type GetAllStudentsResponse struct { Students []*Student `protobuf:"bytes,1,rep,name=students,proto3" json:"students,omitempty"` // contains filtered or unexported fields }
func (*GetAllStudentsResponse) Descriptor
deprecated
func (*GetAllStudentsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAllStudentsResponse.ProtoReflect.Descriptor instead.
func (*GetAllStudentsResponse) GetStudents ¶
func (x *GetAllStudentsResponse) GetStudents() []*Student
func (*GetAllStudentsResponse) ProtoMessage ¶
func (*GetAllStudentsResponse) ProtoMessage()
func (*GetAllStudentsResponse) ProtoReflect ¶
func (x *GetAllStudentsResponse) ProtoReflect() protoreflect.Message
func (*GetAllStudentsResponse) Reset ¶
func (x *GetAllStudentsResponse) Reset()
func (*GetAllStudentsResponse) String ¶
func (x *GetAllStudentsResponse) String() string
type GetStudentByIdRequest ¶
type GetStudentByIdRequest struct { StudentId string `protobuf:"bytes,1,opt,name=student_id,json=studentId,proto3" json:"student_id,omitempty"` // contains filtered or unexported fields }
func (*GetStudentByIdRequest) Descriptor
deprecated
func (*GetStudentByIdRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStudentByIdRequest.ProtoReflect.Descriptor instead.
func (*GetStudentByIdRequest) GetStudentId ¶
func (x *GetStudentByIdRequest) GetStudentId() string
func (*GetStudentByIdRequest) ProtoMessage ¶
func (*GetStudentByIdRequest) ProtoMessage()
func (*GetStudentByIdRequest) ProtoReflect ¶
func (x *GetStudentByIdRequest) ProtoReflect() protoreflect.Message
func (*GetStudentByIdRequest) Reset ¶
func (x *GetStudentByIdRequest) Reset()
func (*GetStudentByIdRequest) String ¶
func (x *GetStudentByIdRequest) String() string
type Student ¶
type Student struct { StudentId string `protobuf:"bytes,1,opt,name=student_id,json=studentId,proto3" json:"student_id,omitempty"` StudentFname string `protobuf:"bytes,2,opt,name=student_fname,json=studentFname,proto3" json:"student_fname,omitempty"` StudentLname string `protobuf:"bytes,3,opt,name=student_lname,json=studentLname,proto3" json:"student_lname,omitempty"` BirthDay string `protobuf:"bytes,4,opt,name=birth_day,json=birthDay,proto3" json:"birth_day,omitempty"` Phones []*StudentPhoneNumber `protobuf:"bytes,5,rep,name=phones,proto3" json:"phones,omitempty"` CreatedAt string `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt string `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` DeletedAt string `protobuf:"bytes,8,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` Point int64 `protobuf:"varint,9,opt,name=point,proto3" json:"point,omitempty"` // contains filtered or unexported fields }
func (*Student) Descriptor
deprecated
func (*Student) GetBirthDay ¶
func (*Student) GetCreatedAt ¶
func (*Student) GetDeletedAt ¶
func (*Student) GetPhones ¶
func (x *Student) GetPhones() []*StudentPhoneNumber
func (*Student) GetStudentFname ¶
func (*Student) GetStudentId ¶
func (*Student) GetStudentLname ¶
func (*Student) GetUpdatedAt ¶
func (*Student) ProtoMessage ¶
func (*Student) ProtoMessage()
func (*Student) ProtoReflect ¶
func (x *Student) ProtoReflect() protoreflect.Message
type StudentPhoneNumber ¶
type StudentPhoneNumber struct { PhoneNumber string `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // contains filtered or unexported fields }
func (*StudentPhoneNumber) Descriptor
deprecated
func (*StudentPhoneNumber) Descriptor() ([]byte, []int)
Deprecated: Use StudentPhoneNumber.ProtoReflect.Descriptor instead.
func (*StudentPhoneNumber) GetPhoneNumber ¶
func (x *StudentPhoneNumber) GetPhoneNumber() string
func (*StudentPhoneNumber) ProtoMessage ¶
func (*StudentPhoneNumber) ProtoMessage()
func (*StudentPhoneNumber) ProtoReflect ¶
func (x *StudentPhoneNumber) ProtoReflect() protoreflect.Message
func (*StudentPhoneNumber) Reset ¶
func (x *StudentPhoneNumber) Reset()
func (*StudentPhoneNumber) String ¶
func (x *StudentPhoneNumber) String() string
type StudentServiceClient ¶
type StudentServiceClient interface { CreateStudent(ctx context.Context, in *CreateStudentRequest, opts ...grpc.CallOption) (*CreateStudentResponse, error) GetAllStudent(ctx context.Context, in *GetAllStudentsRequest, opts ...grpc.CallOption) (*GetAllStudentsResponse, error) GetStudentById(ctx context.Context, in *GetStudentByIdRequest, opts ...grpc.CallOption) (*Student, error) UpdateStudent(ctx context.Context, in *UpdateStudentRequest, opts ...grpc.CallOption) (*Student, error) }
StudentServiceClient is the client API for StudentService 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 NewStudentServiceClient ¶
func NewStudentServiceClient(cc grpc.ClientConnInterface) StudentServiceClient
type StudentServiceServer ¶
type StudentServiceServer interface { CreateStudent(context.Context, *CreateStudentRequest) (*CreateStudentResponse, error) GetAllStudent(context.Context, *GetAllStudentsRequest) (*GetAllStudentsResponse, error) GetStudentById(context.Context, *GetStudentByIdRequest) (*Student, error) UpdateStudent(context.Context, *UpdateStudentRequest) (*Student, error) // contains filtered or unexported methods }
StudentServiceServer is the server API for StudentService service. All implementations must embed UnimplementedStudentServiceServer for forward compatibility
type UnimplementedStudentServiceServer ¶
type UnimplementedStudentServiceServer struct { }
UnimplementedStudentServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedStudentServiceServer) CreateStudent ¶
func (UnimplementedStudentServiceServer) CreateStudent(context.Context, *CreateStudentRequest) (*CreateStudentResponse, error)
func (UnimplementedStudentServiceServer) GetAllStudent ¶
func (UnimplementedStudentServiceServer) GetAllStudent(context.Context, *GetAllStudentsRequest) (*GetAllStudentsResponse, error)
func (UnimplementedStudentServiceServer) GetStudentById ¶
func (UnimplementedStudentServiceServer) GetStudentById(context.Context, *GetStudentByIdRequest) (*Student, error)
func (UnimplementedStudentServiceServer) UpdateStudent ¶
func (UnimplementedStudentServiceServer) UpdateStudent(context.Context, *UpdateStudentRequest) (*Student, error)
type UnsafeStudentServiceServer ¶
type UnsafeStudentServiceServer interface {
// contains filtered or unexported methods
}
UnsafeStudentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StudentServiceServer will result in compilation errors.
type UpdateStudentRequest ¶
type UpdateStudentRequest struct { StudentFname string `protobuf:"bytes,1,opt,name=student_fname,json=studentFname,proto3" json:"student_fname,omitempty"` StudentLname string `protobuf:"bytes,2,opt,name=student_lname,json=studentLname,proto3" json:"student_lname,omitempty"` Phones []*StudentPhoneNumber `protobuf:"bytes,3,rep,name=phones,proto3" json:"phones,omitempty"` // contains filtered or unexported fields }
func (*UpdateStudentRequest) Descriptor
deprecated
func (*UpdateStudentRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateStudentRequest.ProtoReflect.Descriptor instead.
func (*UpdateStudentRequest) GetPhones ¶
func (x *UpdateStudentRequest) GetPhones() []*StudentPhoneNumber
func (*UpdateStudentRequest) GetStudentFname ¶
func (x *UpdateStudentRequest) GetStudentFname() string
func (*UpdateStudentRequest) GetStudentLname ¶
func (x *UpdateStudentRequest) GetStudentLname() string
func (*UpdateStudentRequest) ProtoMessage ¶
func (*UpdateStudentRequest) ProtoMessage()
func (*UpdateStudentRequest) ProtoReflect ¶
func (x *UpdateStudentRequest) ProtoReflect() protoreflect.Message
func (*UpdateStudentRequest) Reset ¶
func (x *UpdateStudentRequest) Reset()
func (*UpdateStudentRequest) String ¶
func (x *UpdateStudentRequest) String() string