Documentation ¶
Overview ¶
Package datav1alpha1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterDataServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDataServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataServiceClient) error
- func RegisterDataServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDataServiceServer(s grpc.ServiceRegistrar, srv DataServiceServer)
- type Data
- type DataMultiError
- type DataServiceClient
- type DataServiceServer
- type DataValidationError
- type SetDataRequest
- func (*SetDataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetDataRequest) GetData() *Data
- func (x *SetDataRequest) GetName() string
- func (*SetDataRequest) ProtoMessage()
- func (x *SetDataRequest) ProtoReflect() protoreflect.Message
- func (x *SetDataRequest) Reset()
- func (x *SetDataRequest) String() string
- func (m *SetDataRequest) Validate() error
- func (m *SetDataRequest) ValidateAll() error
- type SetDataRequestMultiError
- type SetDataRequestValidationError
- func (e SetDataRequestValidationError) Cause() error
- func (e SetDataRequestValidationError) Error() string
- func (e SetDataRequestValidationError) ErrorName() string
- func (e SetDataRequestValidationError) Field() string
- func (e SetDataRequestValidationError) Key() bool
- func (e SetDataRequestValidationError) Reason() string
- type SetDataResponse
- func (*SetDataResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetDataResponse) GetResource() *v1alpha1.Resource
- func (*SetDataResponse) ProtoMessage()
- func (x *SetDataResponse) ProtoReflect() protoreflect.Message
- func (x *SetDataResponse) Reset()
- func (x *SetDataResponse) String() string
- func (m *SetDataResponse) Validate() error
- func (m *SetDataResponse) ValidateAll() error
- type SetDataResponseMultiError
- type SetDataResponseValidationError
- func (e SetDataResponseValidationError) Cause() error
- func (e SetDataResponseValidationError) Error() string
- func (e SetDataResponseValidationError) ErrorName() string
- func (e SetDataResponseValidationError) Field() string
- func (e SetDataResponseValidationError) Key() bool
- func (e SetDataResponseValidationError) Reason() string
- type UnimplementedDataServiceServer
- type UnsafeDataServiceServer
Constants ¶
This section is empty.
Variables ¶
var DataService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "data.v1alpha1.DataService", HandlerType: (*DataServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetData", Handler: _DataService_SetData_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "data/v1alpha1/data.proto", }
DataService_ServiceDesc is the grpc.ServiceDesc for DataService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_data_v1alpha1_data_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDataServiceHandler ¶
func RegisterDataServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterDataServiceHandler registers the http handlers for service DataService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDataServiceHandlerClient ¶
func RegisterDataServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataServiceClient) error
RegisterDataServiceHandlerClient registers the http handlers for service DataService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DataServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DataServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DataServiceClient" to call the correct interceptors.
func RegisterDataServiceHandlerFromEndpoint ¶
func RegisterDataServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDataServiceHandlerFromEndpoint is same as RegisterDataServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDataServiceServer ¶
func RegisterDataServiceServer(s grpc.ServiceRegistrar, srv DataServiceServer)
Types ¶
type Data ¶
type Data struct { Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Data) Descriptor
deprecated
func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) ProtoReflect ¶
func (x *Data) ProtoReflect() protoreflect.Message
func (*Data) Validate ¶
Validate checks the field values on Data 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 (*Data) ValidateAll ¶
ValidateAll checks the field values on Data 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 DataMultiError, or nil if none found.
type DataMultiError ¶
type DataMultiError []error
DataMultiError is an error wrapping multiple validation errors returned by Data.ValidateAll() if the designated constraints aren't met.
func (DataMultiError) AllErrors ¶
func (m DataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DataMultiError) Error ¶
func (m DataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DataServiceClient ¶
type DataServiceClient interface {
SetData(ctx context.Context, in *SetDataRequest, opts ...grpc.CallOption) (*SetDataResponse, error)
}
DataServiceClient is the client API for DataService 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 NewDataServiceClient ¶
func NewDataServiceClient(cc grpc.ClientConnInterface) DataServiceClient
type DataServiceServer ¶
type DataServiceServer interface {
SetData(context.Context, *SetDataRequest) (*SetDataResponse, error)
}
DataServiceServer is the server API for DataService service. All implementations should embed UnimplementedDataServiceServer for forward compatibility
type DataValidationError ¶
type DataValidationError struct {
// contains filtered or unexported fields
}
DataValidationError is the validation error returned by Data.Validate if the designated constraints aren't met.
func (DataValidationError) Cause ¶
func (e DataValidationError) Cause() error
Cause function returns cause value.
func (DataValidationError) Error ¶
func (e DataValidationError) Error() string
Error satisfies the builtin error interface
func (DataValidationError) ErrorName ¶
func (e DataValidationError) ErrorName() string
ErrorName returns error name.
func (DataValidationError) Field ¶
func (e DataValidationError) Field() string
Field function returns field value.
func (DataValidationError) Key ¶
func (e DataValidationError) Key() bool
Key function returns key value.
func (DataValidationError) Reason ¶
func (e DataValidationError) Reason() string
Reason function returns reason value.
type SetDataRequest ¶
type SetDataRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Data *Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*SetDataRequest) Descriptor
deprecated
func (*SetDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetDataRequest.ProtoReflect.Descriptor instead.
func (*SetDataRequest) GetData ¶
func (x *SetDataRequest) GetData() *Data
func (*SetDataRequest) GetName ¶
func (x *SetDataRequest) GetName() string
func (*SetDataRequest) ProtoMessage ¶
func (*SetDataRequest) ProtoMessage()
func (*SetDataRequest) ProtoReflect ¶
func (x *SetDataRequest) ProtoReflect() protoreflect.Message
func (*SetDataRequest) Reset ¶
func (x *SetDataRequest) Reset()
func (*SetDataRequest) String ¶
func (x *SetDataRequest) String() string
func (*SetDataRequest) Validate ¶
func (m *SetDataRequest) Validate() error
Validate checks the field values on SetDataRequest 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 (*SetDataRequest) ValidateAll ¶
func (m *SetDataRequest) ValidateAll() error
ValidateAll checks the field values on SetDataRequest 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 SetDataRequestMultiError, or nil if none found.
type SetDataRequestMultiError ¶
type SetDataRequestMultiError []error
SetDataRequestMultiError is an error wrapping multiple validation errors returned by SetDataRequest.ValidateAll() if the designated constraints aren't met.
func (SetDataRequestMultiError) AllErrors ¶
func (m SetDataRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SetDataRequestMultiError) Error ¶
func (m SetDataRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SetDataRequestValidationError ¶
type SetDataRequestValidationError struct {
// contains filtered or unexported fields
}
SetDataRequestValidationError is the validation error returned by SetDataRequest.Validate if the designated constraints aren't met.
func (SetDataRequestValidationError) Cause ¶
func (e SetDataRequestValidationError) Cause() error
Cause function returns cause value.
func (SetDataRequestValidationError) Error ¶
func (e SetDataRequestValidationError) Error() string
Error satisfies the builtin error interface
func (SetDataRequestValidationError) ErrorName ¶
func (e SetDataRequestValidationError) ErrorName() string
ErrorName returns error name.
func (SetDataRequestValidationError) Field ¶
func (e SetDataRequestValidationError) Field() string
Field function returns field value.
func (SetDataRequestValidationError) Key ¶
func (e SetDataRequestValidationError) Key() bool
Key function returns key value.
func (SetDataRequestValidationError) Reason ¶
func (e SetDataRequestValidationError) Reason() string
Reason function returns reason value.
type SetDataResponse ¶
type SetDataResponse struct { Resource *v1alpha1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` // contains filtered or unexported fields }
func (*SetDataResponse) Descriptor
deprecated
func (*SetDataResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetDataResponse.ProtoReflect.Descriptor instead.
func (*SetDataResponse) GetResource ¶
func (x *SetDataResponse) GetResource() *v1alpha1.Resource
func (*SetDataResponse) ProtoMessage ¶
func (*SetDataResponse) ProtoMessage()
func (*SetDataResponse) ProtoReflect ¶
func (x *SetDataResponse) ProtoReflect() protoreflect.Message
func (*SetDataResponse) Reset ¶
func (x *SetDataResponse) Reset()
func (*SetDataResponse) String ¶
func (x *SetDataResponse) String() string
func (*SetDataResponse) Validate ¶
func (m *SetDataResponse) Validate() error
Validate checks the field values on SetDataResponse 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 (*SetDataResponse) ValidateAll ¶
func (m *SetDataResponse) ValidateAll() error
ValidateAll checks the field values on SetDataResponse 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 SetDataResponseMultiError, or nil if none found.
type SetDataResponseMultiError ¶
type SetDataResponseMultiError []error
SetDataResponseMultiError is an error wrapping multiple validation errors returned by SetDataResponse.ValidateAll() if the designated constraints aren't met.
func (SetDataResponseMultiError) AllErrors ¶
func (m SetDataResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SetDataResponseMultiError) Error ¶
func (m SetDataResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SetDataResponseValidationError ¶
type SetDataResponseValidationError struct {
// contains filtered or unexported fields
}
SetDataResponseValidationError is the validation error returned by SetDataResponse.Validate if the designated constraints aren't met.
func (SetDataResponseValidationError) Cause ¶
func (e SetDataResponseValidationError) Cause() error
Cause function returns cause value.
func (SetDataResponseValidationError) Error ¶
func (e SetDataResponseValidationError) Error() string
Error satisfies the builtin error interface
func (SetDataResponseValidationError) ErrorName ¶
func (e SetDataResponseValidationError) ErrorName() string
ErrorName returns error name.
func (SetDataResponseValidationError) Field ¶
func (e SetDataResponseValidationError) Field() string
Field function returns field value.
func (SetDataResponseValidationError) Key ¶
func (e SetDataResponseValidationError) Key() bool
Key function returns key value.
func (SetDataResponseValidationError) Reason ¶
func (e SetDataResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedDataServiceServer ¶
type UnimplementedDataServiceServer struct { }
UnimplementedDataServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedDataServiceServer) SetData ¶
func (UnimplementedDataServiceServer) SetData(context.Context, *SetDataRequest) (*SetDataResponse, error)
type UnsafeDataServiceServer ¶
type UnsafeDataServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDataServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DataServiceServer will result in compilation errors.