pb

package
v2.7.1 Latest Latest
Warning

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

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

Documentation

Overview

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var CertificateAuthority_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "certificateauthority.pb.CertificateAuthority",
	HandlerType: (*CertificateAuthorityServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SignIdentityCertificate",
			Handler:    _CertificateAuthority_SignIdentityCertificate_Handler,
		},
		{
			MethodName: "SignCertificate",
			Handler:    _CertificateAuthority_SignCertificate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "certificate-authority/pb/service.proto",
}

CertificateAuthority_ServiceDesc is the grpc.ServiceDesc for CertificateAuthority 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_certificate_authority_pb_cert_proto protoreflect.FileDescriptor

Functions

func RegisterCertificateAuthorityHandler added in v2.5.0

func RegisterCertificateAuthorityHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCertificateAuthorityHandler registers the http handlers for service CertificateAuthority to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCertificateAuthorityHandlerClient added in v2.5.0

func RegisterCertificateAuthorityHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CertificateAuthorityClient) error

RegisterCertificateAuthorityHandlerClient registers the http handlers for service CertificateAuthority to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CertificateAuthorityClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CertificateAuthorityClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CertificateAuthorityClient" to call the correct interceptors.

func RegisterCertificateAuthorityHandlerFromEndpoint added in v2.5.0

func RegisterCertificateAuthorityHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCertificateAuthorityHandlerFromEndpoint is same as RegisterCertificateAuthorityHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCertificateAuthorityHandlerServer added in v2.5.0

func RegisterCertificateAuthorityHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CertificateAuthorityServer) error

RegisterCertificateAuthorityHandlerServer registers the http handlers for service CertificateAuthority to "mux". UnaryRPC :call CertificateAuthorityServer 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 RegisterCertificateAuthorityHandlerFromEndpoint instead.

func RegisterCertificateAuthorityServer

func RegisterCertificateAuthorityServer(s grpc.ServiceRegistrar, srv CertificateAuthorityServer)

Types

type CertificateAuthorityClient

type CertificateAuthorityClient interface {
	// SignIdentityCertificate sends a Identity Certificate Signing Request to the certificate authority
	// and obtains a signed certificate. Both in the PEM format. It adds EKU: '1.3.6.1.4.1.44924.1.6' .
	SignIdentityCertificate(ctx context.Context, in *SignCertificateRequest, opts ...grpc.CallOption) (*SignCertificateResponse, error)
	// SignCertificate sends a Certificate Signing Request to the certificate authority
	// and obtains a signed certificate. Both in the PEM format.
	SignCertificate(ctx context.Context, in *SignCertificateRequest, opts ...grpc.CallOption) (*SignCertificateResponse, error)
}

CertificateAuthorityClient is the client API for CertificateAuthority 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 CertificateAuthorityServer

type CertificateAuthorityServer interface {
	// SignIdentityCertificate sends a Identity Certificate Signing Request to the certificate authority
	// and obtains a signed certificate. Both in the PEM format. It adds EKU: '1.3.6.1.4.1.44924.1.6' .
	SignIdentityCertificate(context.Context, *SignCertificateRequest) (*SignCertificateResponse, error)
	// SignCertificate sends a Certificate Signing Request to the certificate authority
	// and obtains a signed certificate. Both in the PEM format.
	SignCertificate(context.Context, *SignCertificateRequest) (*SignCertificateResponse, error)
	// contains filtered or unexported methods
}

CertificateAuthorityServer is the server API for CertificateAuthority service. All implementations must embed UnimplementedCertificateAuthorityServer for forward compatibility

type SignCertificateRequest

type SignCertificateRequest struct {
	CertificateSigningRequest []byte `` // PEM format
	/* 138-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SignCertificateRequest) Descriptor deprecated

func (*SignCertificateRequest) Descriptor() ([]byte, []int)

Deprecated: Use SignCertificateRequest.ProtoReflect.Descriptor instead.

func (*SignCertificateRequest) GetCertificateSigningRequest

func (x *SignCertificateRequest) GetCertificateSigningRequest() []byte

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 {
	Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"` // PEM format
	// contains filtered or unexported fields
}

func (*SignCertificateResponse) Descriptor deprecated

func (*SignCertificateResponse) Descriptor() ([]byte, []int)

Deprecated: Use SignCertificateResponse.ProtoReflect.Descriptor instead.

func (*SignCertificateResponse) GetCertificate

func (x *SignCertificateResponse) GetCertificate() []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 UnimplementedCertificateAuthorityServer

type UnimplementedCertificateAuthorityServer struct {
}

UnimplementedCertificateAuthorityServer must be embedded to have forward compatible implementations.

func (UnimplementedCertificateAuthorityServer) SignCertificate

func (UnimplementedCertificateAuthorityServer) SignIdentityCertificate

type UnsafeCertificateAuthorityServer

type UnsafeCertificateAuthorityServer interface {
	// contains filtered or unexported methods
}

UnsafeCertificateAuthorityServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CertificateAuthorityServer will result in compilation errors.

Jump to

Keyboard shortcuts

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