Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterValidateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterValidateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ValidateServiceClient) error
- func RegisterValidateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterValidateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ValidateServiceServer) error
- func RegisterValidateServiceServer(s grpc.ServiceRegistrar, srv ValidateServiceServer)
- type CheckRequest
- type CheckResponse
- type UnimplementedValidateServiceServer
- type UnsafeValidateServiceServer
- type ValidateServiceClient
- type ValidateServiceServer
- type Validation
- func (*Validation) Descriptor() ([]byte, []int)deprecated
- func (x *Validation) GetId() string
- func (x *Validation) GetVariables() map[string]*anypb.Any
- func (*Validation) ProtoMessage()
- func (x *Validation) ProtoReflect() protoreflect.Message
- func (x *Validation) Reset()
- func (x *Validation) String() string
- type ValidationResult
- func (*ValidationResult) Descriptor() ([]byte, []int)deprecated
- func (x *ValidationResult) GetId() string
- func (x *ValidationResult) GetIsValid() bool
- func (x *ValidationResult) GetMessage() string
- func (*ValidationResult) ProtoMessage()
- func (x *ValidationResult) ProtoReflect() protoreflect.Message
- func (x *ValidationResult) Reset()
- func (x *ValidationResult) String() string
Constants ¶
const (
ValidateService_Check_FullMethodName = "/validate.v1.ValidateService/Check"
)
Variables ¶
var File_proto_validate_v1_validate_proto protoreflect.FileDescriptor
var ValidateService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "validate.v1.ValidateService", HandlerType: (*ValidateServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Check", Handler: _ValidateService_Check_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/validate/v1/validate.proto", }
ValidateService_ServiceDesc is the grpc.ServiceDesc for ValidateService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterValidateServiceHandler ¶
func RegisterValidateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterValidateServiceHandler registers the http handlers for service ValidateService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterValidateServiceHandlerClient ¶
func RegisterValidateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ValidateServiceClient) error
RegisterValidateServiceHandlerClient registers the http handlers for service ValidateService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ValidateServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ValidateServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ValidateServiceClient" to call the correct interceptors.
func RegisterValidateServiceHandlerFromEndpoint ¶
func RegisterValidateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterValidateServiceHandlerFromEndpoint is same as RegisterValidateServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterValidateServiceHandlerServer ¶
func RegisterValidateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ValidateServiceServer) error
RegisterValidateServiceHandlerServer registers the http handlers for service ValidateService to "mux". UnaryRPC :call ValidateServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterValidateServiceHandlerFromEndpoint instead.
func RegisterValidateServiceServer ¶
func RegisterValidateServiceServer(s grpc.ServiceRegistrar, srv ValidateServiceServer)
Types ¶
type CheckRequest ¶
type CheckRequest struct { Validations []*Validation `protobuf:"bytes,1,rep,name=validations,proto3" json:"validations,omitempty"` // contains filtered or unexported fields }
func (*CheckRequest) Descriptor
deprecated
func (*CheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
func (*CheckRequest) GetValidations ¶
func (x *CheckRequest) GetValidations() []*Validation
func (*CheckRequest) ProtoMessage ¶
func (*CheckRequest) ProtoMessage()
func (*CheckRequest) ProtoReflect ¶
func (x *CheckRequest) ProtoReflect() protoreflect.Message
func (*CheckRequest) Reset ¶
func (x *CheckRequest) Reset()
func (*CheckRequest) String ¶
func (x *CheckRequest) String() string
type CheckResponse ¶
type CheckResponse struct { Results []*ValidationResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*CheckResponse) Descriptor
deprecated
func (*CheckResponse) Descriptor() ([]byte, []int)
Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.
func (*CheckResponse) GetResults ¶
func (x *CheckResponse) GetResults() []*ValidationResult
func (*CheckResponse) ProtoMessage ¶
func (*CheckResponse) ProtoMessage()
func (*CheckResponse) ProtoReflect ¶
func (x *CheckResponse) ProtoReflect() protoreflect.Message
func (*CheckResponse) Reset ¶
func (x *CheckResponse) Reset()
func (*CheckResponse) String ¶
func (x *CheckResponse) String() string
type UnimplementedValidateServiceServer ¶
type UnimplementedValidateServiceServer struct { }
UnimplementedValidateServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedValidateServiceServer) Check ¶
func (UnimplementedValidateServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error)
type UnsafeValidateServiceServer ¶
type UnsafeValidateServiceServer interface {
// contains filtered or unexported methods
}
UnsafeValidateServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ValidateServiceServer will result in compilation errors.
type ValidateServiceClient ¶
type ValidateServiceClient interface {
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
}
ValidateServiceClient is the client API for ValidateService 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 NewValidateServiceClient ¶
func NewValidateServiceClient(cc grpc.ClientConnInterface) ValidateServiceClient
type ValidateServiceServer ¶
type ValidateServiceServer interface { Check(context.Context, *CheckRequest) (*CheckResponse, error) // contains filtered or unexported methods }
ValidateServiceServer is the server API for ValidateService service. All implementations must embed UnimplementedValidateServiceServer for forward compatibility
type Validation ¶
type Validation struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Variables map[string]*anypb.Any `` /* 159-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Validation) Descriptor
deprecated
func (*Validation) Descriptor() ([]byte, []int)
Deprecated: Use Validation.ProtoReflect.Descriptor instead.
func (*Validation) GetId ¶
func (x *Validation) GetId() string
func (*Validation) GetVariables ¶
func (x *Validation) GetVariables() map[string]*anypb.Any
func (*Validation) ProtoMessage ¶
func (*Validation) ProtoMessage()
func (*Validation) ProtoReflect ¶
func (x *Validation) ProtoReflect() protoreflect.Message
func (*Validation) Reset ¶
func (x *Validation) Reset()
func (*Validation) String ¶
func (x *Validation) String() string
type ValidationResult ¶
type ValidationResult struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` IsValid bool `protobuf:"varint,2,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ValidationResult) Descriptor
deprecated
func (*ValidationResult) Descriptor() ([]byte, []int)
Deprecated: Use ValidationResult.ProtoReflect.Descriptor instead.
func (*ValidationResult) GetId ¶
func (x *ValidationResult) GetId() string
func (*ValidationResult) GetIsValid ¶
func (x *ValidationResult) GetIsValid() bool
func (*ValidationResult) GetMessage ¶
func (x *ValidationResult) GetMessage() string
func (*ValidationResult) ProtoMessage ¶
func (*ValidationResult) ProtoMessage()
func (*ValidationResult) ProtoReflect ¶
func (x *ValidationResult) ProtoReflect() protoreflect.Message
func (*ValidationResult) Reset ¶
func (x *ValidationResult) Reset()
func (*ValidationResult) String ¶
func (x *ValidationResult) String() string