legacy

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package legacy is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	CA_CreateSigningCertificate_FullMethodName = "/dev.sigstore.fulcio.v1beta.CA/CreateSigningCertificate"
	CA_GetRootCertificate_FullMethodName       = "/dev.sigstore.fulcio.v1beta.CA/GetRootCertificate"
)

Variables

View Source
var CA_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dev.sigstore.fulcio.v1beta.CA",
	HandlerType: (*CAServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSigningCertificate",
			Handler:    _CA_CreateSigningCertificate_Handler,
		},
		{
			MethodName: "GetRootCertificate",
			Handler:    _CA_GetRootCertificate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "fulcio_legacy.proto",
}

CA_ServiceDesc is the grpc.ServiceDesc for CA 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_fulcio_legacy_proto protoreflect.FileDescriptor

Functions

func RegisterCAHandler

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

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

func RegisterCAHandlerClient

func RegisterCAHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CAClient) error

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

func RegisterCAHandlerFromEndpoint

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

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

func RegisterCAHandlerServer

func RegisterCAHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CAServer) error

RegisterCAHandlerServer registers the http handlers for service CA to "mux". UnaryRPC :call CAServer 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 RegisterCAHandlerFromEndpoint instead.

func RegisterCAServer

func RegisterCAServer(s grpc.ServiceRegistrar, srv CAServer)

Types

type CAClient

type CAClient interface {
	// Deprecated: Do not use.
	//
	// Returns an X509 certificate created by the Fulcio certificate authority for the given request parameters
	CreateSigningCertificate(ctx context.Context, in *CreateSigningCertificateRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
	// Deprecated: Do not use.
	//
	// Returns the public key that can be used to validate the signed tree head
	GetRootCertificate(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
}

CAClient is the client API for CA 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 NewCAClient

func NewCAClient(cc grpc.ClientConnInterface) CAClient

type CAServer

type CAServer interface {
	// Deprecated: Do not use.
	//
	// Returns an X509 certificate created by the Fulcio certificate authority for the given request parameters
	CreateSigningCertificate(context.Context, *CreateSigningCertificateRequest) (*httpbody.HttpBody, error)
	// Deprecated: Do not use.
	//
	// Returns the public key that can be used to validate the signed tree head
	GetRootCertificate(context.Context, *emptypb.Empty) (*httpbody.HttpBody, error)
	// contains filtered or unexported methods
}

CAServer is the server API for CA service. All implementations must embed UnimplementedCAServer for forward compatibility

type CreateSigningCertificateRequest

type CreateSigningCertificateRequest struct {

	// The public key to be stored in the requested certificate
	//
	// Deprecated: Marked as deprecated in fulcio_legacy.proto.
	PublicKey *PublicKey `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
	// Proof that the client possesses the private key
	//
	// Deprecated: Marked as deprecated in fulcio_legacy.proto.
	SignedEmailAddress []byte `protobuf:"bytes,2,opt,name=signedEmailAddress,proto3" json:"signedEmailAddress,omitempty"`
	// Optional: PKCS#10 PEM-encoded certificate signing request
	// Contains the public key to be stored in the requested
	// certificate. All other CSR fields are ignored. Since
	// the CSR is self-signed, it also acts as a proof of
	// possession of the private key.
	//
	// In particular, the CSR's subject name is not verified, or tested for
	// compatibility with its specified X.509 name type (e.g. email address).
	//
	// Deprecated: Marked as deprecated in fulcio_legacy.proto.
	CertificateSigningRequest []byte `protobuf:"bytes,3,opt,name=certificateSigningRequest,proto3" json:"certificateSigningRequest,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSigningCertificateRequest) Descriptor deprecated

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

Deprecated: Use CreateSigningCertificateRequest.ProtoReflect.Descriptor instead.

func (*CreateSigningCertificateRequest) GetCertificateSigningRequest deprecated

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

Deprecated: Marked as deprecated in fulcio_legacy.proto.

func (*CreateSigningCertificateRequest) GetPublicKey deprecated

func (x *CreateSigningCertificateRequest) GetPublicKey() *PublicKey

Deprecated: Marked as deprecated in fulcio_legacy.proto.

func (*CreateSigningCertificateRequest) GetSignedEmailAddress deprecated

func (x *CreateSigningCertificateRequest) GetSignedEmailAddress() []byte

Deprecated: Marked as deprecated in fulcio_legacy.proto.

func (*CreateSigningCertificateRequest) ProtoMessage

func (*CreateSigningCertificateRequest) ProtoMessage()

func (*CreateSigningCertificateRequest) ProtoReflect

func (*CreateSigningCertificateRequest) Reset

func (*CreateSigningCertificateRequest) String

type PublicKey

type PublicKey struct {

	// The cryptographic algorithm to use with the key material
	//
	// Deprecated: Marked as deprecated in fulcio_legacy.proto.
	Algorithm string `protobuf:"bytes,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"`
	// PKIX, ASN.1 DER or PEM-encoded public key. PEM is typically
	// of type PUBLIC KEY.
	//
	// Deprecated: Marked as deprecated in fulcio_legacy.proto.
	Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*PublicKey) Descriptor deprecated

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

Deprecated: Use PublicKey.ProtoReflect.Descriptor instead.

func (*PublicKey) GetAlgorithm deprecated

func (x *PublicKey) GetAlgorithm() string

Deprecated: Marked as deprecated in fulcio_legacy.proto.

func (*PublicKey) GetContent deprecated

func (x *PublicKey) GetContent() []byte

Deprecated: Marked as deprecated in fulcio_legacy.proto.

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) ProtoReflect

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

func (*PublicKey) Reset

func (x *PublicKey) Reset()

func (*PublicKey) String

func (x *PublicKey) String() string

type UnimplementedCAServer

type UnimplementedCAServer struct {
}

UnimplementedCAServer must be embedded to have forward compatible implementations.

func (UnimplementedCAServer) CreateSigningCertificate

func (UnimplementedCAServer) GetRootCertificate

type UnsafeCAServer

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

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

Jump to

Keyboard shortcuts

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