Documentation
¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterDSLServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterDSLServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DSLServiceClient) error
- func RegisterDSLServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterDSLServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DSLServiceServer) error
- func RegisterDSLServiceServer(s grpc.ServiceRegistrar, srv DSLServiceServer)
- type DSLServiceClient
- type DSLServiceServer
- type ReadRequest
- type ReadResponse
- type RegisterRequest
- type RegisterResponse
- type UnimplementedDSLServiceServer
- type UnsafeDSLServiceServer
- type Validation
- func (*Validation) Descriptor() ([]byte, []int)deprecated
- func (x *Validation) GetCels() []string
- func (x *Validation) GetId() string
- func (x *Validation) GetVariables() []*Variable
- func (*Validation) ProtoMessage()
- func (x *Validation) ProtoReflect() protoreflect.Message
- func (x *Validation) Reset()
- func (x *Validation) String() string
- type Variable
Constants ¶
const ( DSLService_Register_FullMethodName = "/dsl.v1.DSLService/Register" DSLService_Read_FullMethodName = "/dsl.v1.DSLService/Read" )
Variables ¶
var DSLService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dsl.v1.DSLService", HandlerType: (*DSLServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _DSLService_Register_Handler, }, { MethodName: "Read", Handler: _DSLService_Read_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/dsl/v1/dsl.proto", }
DSLService_ServiceDesc is the grpc.ServiceDesc for DSLService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_dsl_v1_dsl_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDSLServiceHandler ¶
func RegisterDSLServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterDSLServiceHandler registers the http handlers for service DSLService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterDSLServiceHandlerClient ¶
func RegisterDSLServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DSLServiceClient) error
RegisterDSLServiceHandlerClient registers the http handlers for service DSLService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DSLServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DSLServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DSLServiceClient" to call the correct interceptors.
func RegisterDSLServiceHandlerFromEndpoint ¶
func RegisterDSLServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterDSLServiceHandlerFromEndpoint is same as RegisterDSLServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterDSLServiceHandlerServer ¶
func RegisterDSLServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DSLServiceServer) error
RegisterDSLServiceHandlerServer registers the http handlers for service DSLService to "mux". UnaryRPC :call DSLServiceServer 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 RegisterDSLServiceHandlerFromEndpoint instead.
func RegisterDSLServiceServer ¶
func RegisterDSLServiceServer(s grpc.ServiceRegistrar, srv DSLServiceServer)
Types ¶
type DSLServiceClient ¶
type DSLServiceClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) }
DSLServiceClient is the client API for DSLService 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 NewDSLServiceClient ¶
func NewDSLServiceClient(cc grpc.ClientConnInterface) DSLServiceClient
type DSLServiceServer ¶
type DSLServiceServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Read(context.Context, *ReadRequest) (*ReadResponse, error) // contains filtered or unexported methods }
DSLServiceServer is the server API for DSLService service. All implementations must embed UnimplementedDSLServiceServer for forward compatibility
type ReadRequest ¶
type ReadRequest struct {
// contains filtered or unexported fields
}
func (*ReadRequest) Descriptor
deprecated
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (x *ReadRequest) String() string
type ReadResponse ¶
type ReadResponse struct { Validations []*Validation `protobuf:"bytes,1,rep,name=validations,proto3" json:"validations,omitempty"` // contains filtered or unexported fields }
func (*ReadResponse) Descriptor
deprecated
func (*ReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) GetValidations ¶
func (x *ReadResponse) GetValidations() []*Validation
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) ProtoReflect ¶
func (x *ReadResponse) ProtoReflect() protoreflect.Message
func (*ReadResponse) Reset ¶
func (x *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (x *ReadResponse) String() string
type RegisterRequest ¶
type RegisterRequest struct { Validations []*Validation `protobuf:"bytes,1,rep,name=validations,proto3" json:"validations,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetValidations ¶
func (x *RegisterRequest) GetValidations() []*Validation
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct {
// contains filtered or unexported fields
}
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type UnimplementedDSLServiceServer ¶
type UnimplementedDSLServiceServer struct { }
UnimplementedDSLServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedDSLServiceServer) Read ¶
func (UnimplementedDSLServiceServer) Read(context.Context, *ReadRequest) (*ReadResponse, error)
func (UnimplementedDSLServiceServer) Register ¶
func (UnimplementedDSLServiceServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
type UnsafeDSLServiceServer ¶
type UnsafeDSLServiceServer interface {
// contains filtered or unexported methods
}
UnsafeDSLServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DSLServiceServer will result in compilation errors.
type Validation ¶
type Validation struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Cels []string `protobuf:"bytes,2,rep,name=cels,proto3" json:"cels,omitempty"` Variables []*Variable `protobuf:"bytes,3,rep,name=variables,proto3" json:"variables,omitempty"` // contains filtered or unexported fields }
func (*Validation) Descriptor
deprecated
func (*Validation) Descriptor() ([]byte, []int)
Deprecated: Use Validation.ProtoReflect.Descriptor instead.
func (*Validation) GetCels ¶
func (x *Validation) GetCels() []string
func (*Validation) GetId ¶
func (x *Validation) GetId() string
func (*Validation) GetVariables ¶
func (x *Validation) GetVariables() []*Variable
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 Variable ¶
type Variable struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Variable) Descriptor
deprecated
func (*Variable) ProtoMessage ¶
func (*Variable) ProtoMessage()
func (*Variable) ProtoReflect ¶
func (x *Variable) ProtoReflect() protoreflect.Message