Documentation
¶
Index ¶
- Constants
- Variables
- func AuditRules() map[string]*v1.AuditRule
- func RegisterWorkerServiceServer(s grpc.ServiceRegistrar, srv WorkerServiceServer)
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetGreeting() string
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- func (m *HelloRequest) Validate() error
- func (m *HelloRequest) ValidateAll() error
- type HelloRequestMultiError
- type HelloRequestValidationError
- func (e HelloRequestValidationError) Cause() error
- func (e HelloRequestValidationError) Error() string
- func (e HelloRequestValidationError) ErrorName() string
- func (e HelloRequestValidationError) Field() string
- func (e HelloRequestValidationError) Key() bool
- func (e HelloRequestValidationError) Reason() string
- type HelloResponse
- func (*HelloResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HelloResponse) GetReply() string
- func (*HelloResponse) ProtoMessage()
- func (x *HelloResponse) ProtoReflect() protoreflect.Message
- func (x *HelloResponse) Reset()
- func (x *HelloResponse) String() string
- func (m *HelloResponse) Validate() error
- func (m *HelloResponse) ValidateAll() error
- type HelloResponseMultiError
- type HelloResponseValidationError
- func (e HelloResponseValidationError) Cause() error
- func (e HelloResponseValidationError) Error() string
- func (e HelloResponseValidationError) ErrorName() string
- func (e HelloResponseValidationError) Field() string
- func (e HelloResponseValidationError) Key() bool
- func (e HelloResponseValidationError) Reason() string
- type UnimplementedWorkerServiceServer
- type UnsafeWorkerServiceServer
- type WorkerServiceClient
- type WorkerServiceServer
Constants ¶
const (
WorkerService_Hello_FullMethodName = "/worker.service.v1.WorkerService/Hello"
)
Variables ¶
var File_worker_service_v1_worker_doc_proto protoreflect.FileDescriptor
var File_worker_service_v1_worker_proto protoreflect.FileDescriptor
var WorkerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "worker.service.v1.WorkerService", HandlerType: (*WorkerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _WorkerService_Hello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "worker/service/v1/worker.proto", }
WorkerService_ServiceDesc is the grpc.ServiceDesc for WorkerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func AuditRules ¶ added in v0.5.0
AuditRules returns the audit rules for this package. Merge these with other packages' rules using audit.Middleware WithRulesFuncs.
func RegisterWorkerServiceServer ¶
func RegisterWorkerServiceServer(s grpc.ServiceRegistrar, srv WorkerServiceServer)
Types ¶
type HelloRequest ¶
type HelloRequest struct {
Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"`
// contains filtered or unexported fields
}
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetGreeting ¶
func (x *HelloRequest) GetGreeting() 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
func (*HelloRequest) Validate ¶
func (m *HelloRequest) Validate() error
Validate checks the field values on HelloRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HelloRequest) ValidateAll ¶
func (m *HelloRequest) ValidateAll() error
ValidateAll checks the field values on HelloRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HelloRequestMultiError, or nil if none found.
type HelloRequestMultiError ¶
type HelloRequestMultiError []error
HelloRequestMultiError is an error wrapping multiple validation errors returned by HelloRequest.ValidateAll() if the designated constraints aren't met.
func (HelloRequestMultiError) AllErrors ¶
func (m HelloRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HelloRequestMultiError) Error ¶
func (m HelloRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HelloRequestValidationError ¶
type HelloRequestValidationError struct {
// contains filtered or unexported fields
}
HelloRequestValidationError is the validation error returned by HelloRequest.Validate if the designated constraints aren't met.
func (HelloRequestValidationError) Cause ¶
func (e HelloRequestValidationError) Cause() error
Cause function returns cause value.
func (HelloRequestValidationError) Error ¶
func (e HelloRequestValidationError) Error() string
Error satisfies the builtin error interface
func (HelloRequestValidationError) ErrorName ¶
func (e HelloRequestValidationError) ErrorName() string
ErrorName returns error name.
func (HelloRequestValidationError) Field ¶
func (e HelloRequestValidationError) Field() string
Field function returns field value.
func (HelloRequestValidationError) Key ¶
func (e HelloRequestValidationError) Key() bool
Key function returns key value.
func (HelloRequestValidationError) Reason ¶
func (e HelloRequestValidationError) Reason() string
Reason function returns reason value.
type HelloResponse ¶
type HelloResponse struct {
Reply string `protobuf:"bytes,1,opt,name=reply,proto3" json:"reply,omitempty"`
// contains filtered or unexported fields
}
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetReply ¶
func (x *HelloResponse) GetReply() string
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) ProtoReflect ¶
func (x *HelloResponse) ProtoReflect() protoreflect.Message
func (*HelloResponse) Reset ¶
func (x *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (x *HelloResponse) String() string
func (*HelloResponse) Validate ¶
func (m *HelloResponse) Validate() error
Validate checks the field values on HelloResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*HelloResponse) ValidateAll ¶
func (m *HelloResponse) ValidateAll() error
ValidateAll checks the field values on HelloResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HelloResponseMultiError, or nil if none found.
type HelloResponseMultiError ¶
type HelloResponseMultiError []error
HelloResponseMultiError is an error wrapping multiple validation errors returned by HelloResponse.ValidateAll() if the designated constraints aren't met.
func (HelloResponseMultiError) AllErrors ¶
func (m HelloResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HelloResponseMultiError) Error ¶
func (m HelloResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HelloResponseValidationError ¶
type HelloResponseValidationError struct {
// contains filtered or unexported fields
}
HelloResponseValidationError is the validation error returned by HelloResponse.Validate if the designated constraints aren't met.
func (HelloResponseValidationError) Cause ¶
func (e HelloResponseValidationError) Cause() error
Cause function returns cause value.
func (HelloResponseValidationError) Error ¶
func (e HelloResponseValidationError) Error() string
Error satisfies the builtin error interface
func (HelloResponseValidationError) ErrorName ¶
func (e HelloResponseValidationError) ErrorName() string
ErrorName returns error name.
func (HelloResponseValidationError) Field ¶
func (e HelloResponseValidationError) Field() string
Field function returns field value.
func (HelloResponseValidationError) Key ¶
func (e HelloResponseValidationError) Key() bool
Key function returns key value.
func (HelloResponseValidationError) Reason ¶
func (e HelloResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedWorkerServiceServer ¶
type UnimplementedWorkerServiceServer struct{}
UnimplementedWorkerServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedWorkerServiceServer) Hello ¶
func (UnimplementedWorkerServiceServer) Hello(context.Context, *HelloRequest) (*HelloResponse, error)
type UnsafeWorkerServiceServer ¶
type UnsafeWorkerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeWorkerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WorkerServiceServer will result in compilation errors.
type WorkerServiceClient ¶
type WorkerServiceClient interface {
Hello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
}
WorkerServiceClient is the client API for WorkerService 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 NewWorkerServiceClient ¶
func NewWorkerServiceClient(cc grpc.ClientConnInterface) WorkerServiceClient
type WorkerServiceServer ¶
type WorkerServiceServer interface {
Hello(context.Context, *HelloRequest) (*HelloResponse, error)
// contains filtered or unexported methods
}
WorkerServiceServer is the server API for WorkerService service. All implementations must embed UnimplementedWorkerServiceServer for forward compatibility.