Documentation ¶
Index ¶
- Variables
- func ErrorContentMissing(format string, args ...interface{}) *errors.Error
- func ErrorUserNotFound(format string, args ...interface{}) *errors.Error
- func IsContentMissing(err error) bool
- func IsUserNotFound(err error) bool
- func RegisterJobHTTPServer(s *http.Server, srv JobHTTPServer)
- func RegisterJobServer(s grpc.ServiceRegistrar, srv JobServer)
- type CreateJobReply
- type CreateJobRequest
- type DeleteJobReply
- type DeleteJobRequest
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type GetJobReply
- func (*GetJobReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetJobReply) GetId() int64
- func (x *GetJobReply) GetIntro() string
- func (x *GetJobReply) GetTitle() string
- func (*GetJobReply) ProtoMessage()
- func (x *GetJobReply) ProtoReflect() protoreflect.Message
- func (x *GetJobReply) Reset()
- func (x *GetJobReply) String() string
- type GetJobRequest
- type HelloReply
- type HelloRequest
- type JobClient
- type JobHTTPClient
- type JobHTTPClientImpl
- type JobHTTPServer
- type JobServer
- type ListJobReply
- type ListJobRequest
- type UnimplementedJobServer
- func (UnimplementedJobServer) CreateJob(context.Context, *CreateJobRequest) (*CreateJobReply, error)
- func (UnimplementedJobServer) DeleteJob(context.Context, *DeleteJobRequest) (*DeleteJobReply, error)
- func (UnimplementedJobServer) GetJob(context.Context, *GetJobRequest) (*GetJobReply, error)
- func (UnimplementedJobServer) ListJob(context.Context, *ListJobRequest) (*ListJobReply, error)
- func (UnimplementedJobServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
- func (UnimplementedJobServer) UpdateJob(context.Context, *UpdateJobRequest) (*UpdateJobReply, error)
- type UnsafeJobServer
- type UpdateJobReply
- type UpdateJobRequest
Constants ¶
This section is empty.
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "USER_NOT_FOUND", 1: "CONTENT_MISSING", } ErrorReason_value = map[string]int32{ "USER_NOT_FOUND": 0, "CONTENT_MISSING": 1, } )
Enum value maps for ErrorReason.
var File_v1_error_reason_proto protoreflect.FileDescriptor
var File_v1_job_proto protoreflect.FileDescriptor
var Job_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.job.service.v1.Job", HandlerType: (*JobServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateJob", Handler: _Job_CreateJob_Handler, }, { MethodName: "UpdateJob", Handler: _Job_UpdateJob_Handler, }, { MethodName: "DeleteJob", Handler: _Job_DeleteJob_Handler, }, { MethodName: "GetJob", Handler: _Job_GetJob_Handler, }, { MethodName: "ListJob", Handler: _Job_ListJob_Handler, }, { MethodName: "SayHello", Handler: _Job_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/job.proto", }
Job_ServiceDesc is the grpc.ServiceDesc for Job service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrorContentMissing ¶
func ErrorUserNotFound ¶
func IsContentMissing ¶
func IsUserNotFound ¶
func RegisterJobHTTPServer ¶
func RegisterJobHTTPServer(s *http.Server, srv JobHTTPServer)
func RegisterJobServer ¶
func RegisterJobServer(s grpc.ServiceRegistrar, srv JobServer)
Types ¶
type CreateJobReply ¶
type CreateJobReply struct {
// contains filtered or unexported fields
}
func (*CreateJobReply) Descriptor
deprecated
func (*CreateJobReply) Descriptor() ([]byte, []int)
Deprecated: Use CreateJobReply.ProtoReflect.Descriptor instead.
func (*CreateJobReply) ProtoMessage ¶
func (*CreateJobReply) ProtoMessage()
func (*CreateJobReply) ProtoReflect ¶
func (x *CreateJobReply) ProtoReflect() protoreflect.Message
func (*CreateJobReply) Reset ¶
func (x *CreateJobReply) Reset()
func (*CreateJobReply) String ¶
func (x *CreateJobReply) String() string
type CreateJobRequest ¶
type CreateJobRequest struct {
// contains filtered or unexported fields
}
func (*CreateJobRequest) Descriptor
deprecated
func (*CreateJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateJobRequest.ProtoReflect.Descriptor instead.
func (*CreateJobRequest) ProtoMessage ¶
func (*CreateJobRequest) ProtoMessage()
func (*CreateJobRequest) ProtoReflect ¶
func (x *CreateJobRequest) ProtoReflect() protoreflect.Message
func (*CreateJobRequest) Reset ¶
func (x *CreateJobRequest) Reset()
func (*CreateJobRequest) String ¶
func (x *CreateJobRequest) String() string
type DeleteJobReply ¶
type DeleteJobReply struct {
// contains filtered or unexported fields
}
func (*DeleteJobReply) Descriptor
deprecated
func (*DeleteJobReply) Descriptor() ([]byte, []int)
Deprecated: Use DeleteJobReply.ProtoReflect.Descriptor instead.
func (*DeleteJobReply) ProtoMessage ¶
func (*DeleteJobReply) ProtoMessage()
func (*DeleteJobReply) ProtoReflect ¶
func (x *DeleteJobReply) ProtoReflect() protoreflect.Message
func (*DeleteJobReply) Reset ¶
func (x *DeleteJobReply) Reset()
func (*DeleteJobReply) String ¶
func (x *DeleteJobReply) String() string
type DeleteJobRequest ¶
type DeleteJobRequest struct {
// contains filtered or unexported fields
}
func (*DeleteJobRequest) Descriptor
deprecated
func (*DeleteJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteJobRequest.ProtoReflect.Descriptor instead.
func (*DeleteJobRequest) ProtoMessage ¶
func (*DeleteJobRequest) ProtoMessage()
func (*DeleteJobRequest) ProtoReflect ¶
func (x *DeleteJobRequest) ProtoReflect() protoreflect.Message
func (*DeleteJobRequest) Reset ¶
func (x *DeleteJobRequest) Reset()
func (*DeleteJobRequest) String ¶
func (x *DeleteJobRequest) String() string
type ErrorReason ¶
type ErrorReason int32
const ( ErrorReason_USER_NOT_FOUND ErrorReason = 0 ErrorReason_CONTENT_MISSING ErrorReason = 1 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type GetJobReply ¶
type GetJobReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Intro string `protobuf:"bytes,3,opt,name=intro,proto3" json:"intro,omitempty"` // contains filtered or unexported fields }
func (*GetJobReply) Descriptor
deprecated
func (*GetJobReply) Descriptor() ([]byte, []int)
Deprecated: Use GetJobReply.ProtoReflect.Descriptor instead.
func (*GetJobReply) GetId ¶
func (x *GetJobReply) GetId() int64
func (*GetJobReply) GetIntro ¶
func (x *GetJobReply) GetIntro() string
func (*GetJobReply) GetTitle ¶
func (x *GetJobReply) GetTitle() string
func (*GetJobReply) ProtoMessage ¶
func (*GetJobReply) ProtoMessage()
func (*GetJobReply) ProtoReflect ¶
func (x *GetJobReply) ProtoReflect() protoreflect.Message
func (*GetJobReply) Reset ¶
func (x *GetJobReply) Reset()
func (*GetJobReply) String ¶
func (x *GetJobReply) String() string
type GetJobRequest ¶
type GetJobRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetJobRequest) Descriptor
deprecated
func (*GetJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetJobRequest.ProtoReflect.Descriptor instead.
func (*GetJobRequest) GetId ¶
func (x *GetJobRequest) GetId() int64
func (*GetJobRequest) ProtoMessage ¶
func (*GetJobRequest) ProtoMessage()
func (*GetJobRequest) ProtoReflect ¶
func (x *GetJobRequest) ProtoReflect() protoreflect.Message
func (*GetJobRequest) Reset ¶
func (x *GetJobRequest) Reset()
func (*GetJobRequest) String ¶
func (x *GetJobRequest) String() string
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the greetings
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
The request message containing the user's name.
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type JobClient ¶
type JobClient interface { CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*CreateJobReply, error) UpdateJob(ctx context.Context, in *UpdateJobRequest, opts ...grpc.CallOption) (*UpdateJobReply, error) DeleteJob(ctx context.Context, in *DeleteJobRequest, opts ...grpc.CallOption) (*DeleteJobReply, error) GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobReply, error) ListJob(ctx context.Context, in *ListJobRequest, opts ...grpc.CallOption) (*ListJobReply, error) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) }
JobClient is the client API for Job 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 NewJobClient ¶
func NewJobClient(cc grpc.ClientConnInterface) JobClient
type JobHTTPClient ¶
type JobHTTPClient interface { GetJob(ctx context.Context, req *GetJobRequest, opts ...http.CallOption) (rsp *GetJobReply, err error) SayHello(ctx context.Context, req *HelloRequest, opts ...http.CallOption) (rsp *HelloReply, err error) }
func NewJobHTTPClient ¶
func NewJobHTTPClient(client *http.Client) JobHTTPClient
type JobHTTPClientImpl ¶
type JobHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*JobHTTPClientImpl) GetJob ¶
func (c *JobHTTPClientImpl) GetJob(ctx context.Context, in *GetJobRequest, opts ...http.CallOption) (*GetJobReply, error)
func (*JobHTTPClientImpl) SayHello ¶
func (c *JobHTTPClientImpl) SayHello(ctx context.Context, in *HelloRequest, opts ...http.CallOption) (*HelloReply, error)
type JobHTTPServer ¶
type JobHTTPServer interface { GetJob(context.Context, *GetJobRequest) (*GetJobReply, error) SayHello(context.Context, *HelloRequest) (*HelloReply, error) }
type JobServer ¶
type JobServer interface { CreateJob(context.Context, *CreateJobRequest) (*CreateJobReply, error) UpdateJob(context.Context, *UpdateJobRequest) (*UpdateJobReply, error) DeleteJob(context.Context, *DeleteJobRequest) (*DeleteJobReply, error) GetJob(context.Context, *GetJobRequest) (*GetJobReply, error) ListJob(context.Context, *ListJobRequest) (*ListJobReply, error) SayHello(context.Context, *HelloRequest) (*HelloReply, error) // contains filtered or unexported methods }
JobServer is the server API for Job service. All implementations must embed UnimplementedJobServer for forward compatibility
type ListJobReply ¶
type ListJobReply struct {
// contains filtered or unexported fields
}
func (*ListJobReply) Descriptor
deprecated
func (*ListJobReply) Descriptor() ([]byte, []int)
Deprecated: Use ListJobReply.ProtoReflect.Descriptor instead.
func (*ListJobReply) ProtoMessage ¶
func (*ListJobReply) ProtoMessage()
func (*ListJobReply) ProtoReflect ¶
func (x *ListJobReply) ProtoReflect() protoreflect.Message
func (*ListJobReply) Reset ¶
func (x *ListJobReply) Reset()
func (*ListJobReply) String ¶
func (x *ListJobReply) String() string
type ListJobRequest ¶
type ListJobRequest struct {
// contains filtered or unexported fields
}
func (*ListJobRequest) Descriptor
deprecated
func (*ListJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListJobRequest.ProtoReflect.Descriptor instead.
func (*ListJobRequest) ProtoMessage ¶
func (*ListJobRequest) ProtoMessage()
func (*ListJobRequest) ProtoReflect ¶
func (x *ListJobRequest) ProtoReflect() protoreflect.Message
func (*ListJobRequest) Reset ¶
func (x *ListJobRequest) Reset()
func (*ListJobRequest) String ¶
func (x *ListJobRequest) String() string
type UnimplementedJobServer ¶
type UnimplementedJobServer struct { }
UnimplementedJobServer must be embedded to have forward compatible implementations.
func (UnimplementedJobServer) CreateJob ¶
func (UnimplementedJobServer) CreateJob(context.Context, *CreateJobRequest) (*CreateJobReply, error)
func (UnimplementedJobServer) DeleteJob ¶
func (UnimplementedJobServer) DeleteJob(context.Context, *DeleteJobRequest) (*DeleteJobReply, error)
func (UnimplementedJobServer) GetJob ¶
func (UnimplementedJobServer) GetJob(context.Context, *GetJobRequest) (*GetJobReply, error)
func (UnimplementedJobServer) ListJob ¶
func (UnimplementedJobServer) ListJob(context.Context, *ListJobRequest) (*ListJobReply, error)
func (UnimplementedJobServer) SayHello ¶
func (UnimplementedJobServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)
func (UnimplementedJobServer) UpdateJob ¶
func (UnimplementedJobServer) UpdateJob(context.Context, *UpdateJobRequest) (*UpdateJobReply, error)
type UnsafeJobServer ¶
type UnsafeJobServer interface {
// contains filtered or unexported methods
}
UnsafeJobServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to JobServer will result in compilation errors.
type UpdateJobReply ¶
type UpdateJobReply struct {
// contains filtered or unexported fields
}
func (*UpdateJobReply) Descriptor
deprecated
func (*UpdateJobReply) Descriptor() ([]byte, []int)
Deprecated: Use UpdateJobReply.ProtoReflect.Descriptor instead.
func (*UpdateJobReply) ProtoMessage ¶
func (*UpdateJobReply) ProtoMessage()
func (*UpdateJobReply) ProtoReflect ¶
func (x *UpdateJobReply) ProtoReflect() protoreflect.Message
func (*UpdateJobReply) Reset ¶
func (x *UpdateJobReply) Reset()
func (*UpdateJobReply) String ¶
func (x *UpdateJobReply) String() string
type UpdateJobRequest ¶
type UpdateJobRequest struct {
// contains filtered or unexported fields
}
func (*UpdateJobRequest) Descriptor
deprecated
func (*UpdateJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateJobRequest.ProtoReflect.Descriptor instead.
func (*UpdateJobRequest) ProtoMessage ¶
func (*UpdateJobRequest) ProtoMessage()
func (*UpdateJobRequest) ProtoReflect ¶
func (x *UpdateJobRequest) ProtoReflect() protoreflect.Message
func (*UpdateJobRequest) Reset ¶
func (x *UpdateJobRequest) Reset()
func (*UpdateJobRequest) String ¶
func (x *UpdateJobRequest) String() string