Documentation ¶
Overview ¶
Package capb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCSRHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCSRHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CSRClient) error
- func RegisterCSRHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCSRHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CSRServer) error
- func RegisterCSRServer(s grpc.ServiceRegistrar, srv CSRServer)
- type CSRClient
- type CSRData
- func (*CSRData) Descriptor() ([]byte, []int)deprecated
- func (x *CSRData) GetAddresses() []string
- func (x *CSRData) GetDomains() []string
- func (x *CSRData) GetPublicKey() []byte
- func (x *CSRData) GetSubject() string
- func (*CSRData) ProtoMessage()
- func (x *CSRData) ProtoReflect() protoreflect.Message
- func (x *CSRData) Reset()
- func (x *CSRData) String() string
- type CSRServer
- type SignCertificateRequest
- func (*SignCertificateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignCertificateRequest) GetCsr() *CSRData
- func (*SignCertificateRequest) ProtoMessage()
- func (x *SignCertificateRequest) ProtoReflect() protoreflect.Message
- func (x *SignCertificateRequest) Reset()
- func (x *SignCertificateRequest) String() string
- type SignCertificateResponse
- func (*SignCertificateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SignCertificateResponse) GetRawCertificate() []byte
- func (*SignCertificateResponse) ProtoMessage()
- func (x *SignCertificateResponse) ProtoReflect() protoreflect.Message
- func (x *SignCertificateResponse) Reset()
- func (x *SignCertificateResponse) String() string
- type UnimplementedCSRServer
- type UnsafeCSRServer
Constants ¶
This section is empty.
Variables ¶
var File_ca_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCSRHandler ¶
RegisterCSRHandler registers the http handlers for service CSR to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCSRHandlerClient ¶
RegisterCSRHandlerClient registers the http handlers for service CSR to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CSRClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CSRClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CSRClient" to call the correct interceptors.
func RegisterCSRHandlerFromEndpoint ¶
func RegisterCSRHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCSRHandlerFromEndpoint is same as RegisterCSRHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCSRHandlerServer ¶
RegisterCSRHandlerServer registers the http handlers for service CSR to "mux". UnaryRPC :call CSRServer 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 RegisterCSRHandlerFromEndpoint instead.
func RegisterCSRServer ¶
func RegisterCSRServer(s grpc.ServiceRegistrar, srv CSRServer)
Types ¶
type CSRClient ¶
type CSRClient interface {
SignCertificate(ctx context.Context, in *SignCertificateRequest, opts ...grpc.CallOption) (*SignCertificateResponse, error)
}
CSRClient is the client API for CSR 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 NewCSRClient ¶
func NewCSRClient(cc grpc.ClientConnInterface) CSRClient
type CSRData ¶
type CSRData struct { Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` Domains []string `protobuf:"bytes,2,rep,name=domains,proto3" json:"domains,omitempty"` PublicKey []byte `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` Subject string `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // contains filtered or unexported fields }
func (*CSRData) Descriptor
deprecated
func (*CSRData) GetAddresses ¶
func (*CSRData) GetDomains ¶
func (*CSRData) GetPublicKey ¶
func (*CSRData) GetSubject ¶
func (*CSRData) ProtoMessage ¶
func (*CSRData) ProtoMessage()
func (*CSRData) ProtoReflect ¶
func (x *CSRData) ProtoReflect() protoreflect.Message
type CSRServer ¶
type CSRServer interface { SignCertificate(context.Context, *SignCertificateRequest) (*SignCertificateResponse, error) // contains filtered or unexported methods }
CSRServer is the server API for CSR service. All implementations must embed UnimplementedCSRServer for forward compatibility
type SignCertificateRequest ¶
type SignCertificateRequest struct { Csr *CSRData `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"` // contains filtered or unexported fields }
func (*SignCertificateRequest) Descriptor
deprecated
func (*SignCertificateRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignCertificateRequest.ProtoReflect.Descriptor instead.
func (*SignCertificateRequest) GetCsr ¶
func (x *SignCertificateRequest) GetCsr() *CSRData
func (*SignCertificateRequest) ProtoMessage ¶
func (*SignCertificateRequest) ProtoMessage()
func (*SignCertificateRequest) ProtoReflect ¶
func (x *SignCertificateRequest) ProtoReflect() protoreflect.Message
func (*SignCertificateRequest) Reset ¶
func (x *SignCertificateRequest) Reset()
func (*SignCertificateRequest) String ¶
func (x *SignCertificateRequest) String() string
type SignCertificateResponse ¶
type SignCertificateResponse struct { RawCertificate []byte `protobuf:"bytes,1,opt,name=raw_certificate,json=rawCertificate,proto3" json:"raw_certificate,omitempty"` // contains filtered or unexported fields }
func (*SignCertificateResponse) Descriptor
deprecated
func (*SignCertificateResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignCertificateResponse.ProtoReflect.Descriptor instead.
func (*SignCertificateResponse) GetRawCertificate ¶
func (x *SignCertificateResponse) GetRawCertificate() []byte
func (*SignCertificateResponse) ProtoMessage ¶
func (*SignCertificateResponse) ProtoMessage()
func (*SignCertificateResponse) ProtoReflect ¶
func (x *SignCertificateResponse) ProtoReflect() protoreflect.Message
func (*SignCertificateResponse) Reset ¶
func (x *SignCertificateResponse) Reset()
func (*SignCertificateResponse) String ¶
func (x *SignCertificateResponse) String() string
type UnimplementedCSRServer ¶
type UnimplementedCSRServer struct { }
UnimplementedCSRServer must be embedded to have forward compatible implementations.
func (UnimplementedCSRServer) SignCertificate ¶
func (UnimplementedCSRServer) SignCertificate(context.Context, *SignCertificateRequest) (*SignCertificateResponse, error)
type UnsafeCSRServer ¶
type UnsafeCSRServer interface {
// contains filtered or unexported methods
}
UnsafeCSRServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CSRServer will result in compilation errors.