Back to

Package issuer

Latest Go to latest

The latest major version is .

Published: Aug 7, 2020 | License: Apache-2.0 | Module:


func RegisterIssuer

func RegisterIssuer(name string, c IssuerConstructor)

Register will register an issuer constructor so it can be used within the application. 'name' should be unique, and should be used to identify this issuer. TODO: move this method to be on Factory, and invent a way to obtain a SharedFactory. This will make testing easier.

type Factory

type Factory interface {
	IssuerFor(v1alpha2.GenericIssuer) (Interface, error)

Factory is an interface that can be used to obtain Issuer implementations. It determines which issuer implementation to use by introspecting the given Issuer resource.

func NewFactory

func NewFactory(ctx *controller.Context) Factory

NewFactory returns a new issuer factory with the given issuer context. The context will be injected into each Issuer upon creation.

type Helper

type Helper interface {
	GetGenericIssuer(ref cmmeta.ObjectReference, ns string) (cmapi.GenericIssuer, error)

func NewHelper

func NewHelper(issuerLister cmlisters.IssuerLister, clusterIssuerLister cmlisters.ClusterIssuerLister) Helper

NewHelper will construct a new instance of a Helper using values supplied on the provided controller context.

type Interface

type Interface interface {
	// Setup initialises the issuer. This may include registering accounts with
	// a service, creating a CA and storing it somewhere, or verifying
	// credentials and authorization with a remote server.
	Setup(ctx context.Context) error

type IssueResponse

type IssueResponse struct {
	// Certificate is the certificate resource that should be stored in the
	// target secret.
	// It will only be set if the corresponding private key is also set on the
	// IssuerResponse structure.
	Certificate []byte

	// PrivateKey is the private key that should be stored in the target secret.
	// If set, the certificate and CA field will also be overwritten with the
	// contents of the field.
	// If Certificate is not set, the existing Certificate will be overwritten.
	PrivateKey []byte

	// CA is the CA certificate that should be stored in the target secret.
	// This field should only be set if the private key field is set, similar
	// to the Certificate field.
	CA []byte

type IssuerConstructor

type IssuerConstructor func(*controller.Context, v1alpha2.GenericIssuer) (Interface, error)

issuerConstructor constructs an issuer given an Issuer resource and a Context. An error will be returned if the appropriate issuer is not registered.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier