datav1alpha1

package
v0.0.0-...-0310e4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2022 License: MPL-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package datav1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetValue

func (x *Data) GetValue() int32

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

func (x *Data) ProtoReflect() protoreflect.Message

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

func (*Data) Validate

func (m *Data) Validate() error

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

func (m *Data) ValidateAll() error

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.

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

Cause function returns cause value.

func (SetDataRequestValidationError) Error

Error satisfies the builtin error interface

func (SetDataRequestValidationError) ErrorName

func (e SetDataRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SetDataRequestValidationError) Field

Field function returns field value.

func (SetDataRequestValidationError) Key

Key function returns key value.

func (SetDataRequestValidationError) Reason

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

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

Cause function returns cause value.

func (SetDataResponseValidationError) Error

Error satisfies the builtin error interface

func (SetDataResponseValidationError) ErrorName

func (e SetDataResponseValidationError) ErrorName() string

ErrorName returns error name.

func (SetDataResponseValidationError) Field

Field function returns field value.

func (SetDataResponseValidationError) Key

Key function returns key value.

func (SetDataResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedDataServiceServer

type UnimplementedDataServiceServer struct {
}

UnimplementedDataServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedDataServiceServer) SetData

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL