manager

package
v0.13.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// Review will evaluate whether the incoming CertificateRequest should be
	// approved, denied, or if the review was unprocessed.
	// - Consumers should consider a ResultApproved response to mean the
	//   CertificateRequest is **approved**.
	// - Consumers should consider a ResultDenied response to mean
	//   the CertificateRequest is **denied**.
	// - Consumers should consider a ResultUnprocessed response to mean the
	//   manager doesn't consider the request to be appropriate for any evaluator
	//   and so no review was run. The request is neither approved or denied.
	// - Consumers should treat any error response as marking the
	//   CertificateRequest as neither approved nor denied, and may consider
	//   re-evaluation at a later time.
	Review(ctx context.Context, cr *cmapi.CertificateRequest) (ReviewResponse, error)
}

Interface is an Approver Manager that responsible for evaluating whether incoming CertificateRequests should be approved or denied, checking CertificateRequestPolicies against approvers that have been registered. Policies will be chosen based on their suitability for a particular request.

type ReviewResponse

type ReviewResponse struct {
	// Result is the actionable result code from running the review.
	Result ReviewResult

	// Message is optional context as to why the manager has given the result it
	// has.
	Message string
}

ReviewResponse is the response to an approver manager request review.

type ReviewResult

type ReviewResult int

ReviewResult is the result from an approver manager reviewing a CertificateRequest.

const (
	// ResultApproved is the result of a review where the manager approves the
	// request.
	ResultApproved ReviewResult = iota + 1

	// ResultDenied is the result of a review where the manager denies the
	// request.
	ResultDenied

	// ResultUnprocessed is the result of a review where the manager has deemed
	// that the request is not appropriate for any evaluators given the current
	// policy. It is neither approved or denied by the manager.
	ResultUnprocessed
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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