proto

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Overview

Package proto defines the protocol layer for communication between notation and notation external plugin.

Index

Constants

View Source
const (
	KeySpecRSA2048 = plugin.KeySpecRSA2048
	KeySpecRSA3072 = plugin.KeySpecRSA3072
	KeySpecRSA4096 = plugin.KeySpecRSA4096
	KeySpecEC256   = plugin.KeySpecEC256
	KeySpecEC384   = plugin.KeySpecEC384
	KeySpecEC521   = plugin.KeySpecEC521
)

one of the following supported key spec names.

Deprecated: KeySpec exists for historical compatibility and should not be used. To access KeySpec, use the notation-plugin-framework-go's plugin.KeySpec.

View Source
const (
	HashAlgorithmSHA256 = plugin.HashAlgorithmSHA256
	HashAlgorithmSHA384 = plugin.HashAlgorithmSHA384
	HashAlgorithmSHA512 = plugin.HashAlgorithmSHA512
)

one of the following supported hash algorithm names.

Deprecated: HashAlgorithm exists for historical compatibility and should not be used. To access HashAlgorithm, use the notation-plugin-framework-go's plugin.HashAlgorithm type.

View Source
const (
	SignatureAlgorithmECDSA_SHA256      = plugin.SignatureAlgorithmECDSA_SHA256
	SignatureAlgorithmECDSA_SHA384      = plugin.SignatureAlgorithmECDSA_SHA384
	SignatureAlgorithmECDSA_SHA512      = plugin.SignatureAlgorithmECDSA_SHA512
	SignatureAlgorithmRSASSA_PSS_SHA256 = plugin.SignatureAlgorithmRSASSA_PSS_SHA256
	SignatureAlgorithmRSASSA_PSS_SHA384 = plugin.SignatureAlgorithmRSASSA_PSS_SHA384
	SignatureAlgorithmRSASSA_PSS_SHA512 = plugin.SignatureAlgorithmRSASSA_PSS_SHA512
)

one of the following supported signing algorithm names.

Deprecated: SignatureAlgorithm exists for historical compatibility and should not be used. To access SignatureAlgorithm, use the notation-plugin-framework-go's plugin.SignatureAlgorithm type.

View Source
const (
	// ErrorCodeValidation is used when any of the required request fields is empty ormalformed/invalid.
	//
	// Deprecated: ErrorCodeValidation exists for historical compatibility and should not be used.
	// To access ErrorCodeValidation, use the notation-plugin-framework-go's [plugin.ErrorCodeValidation].
	ErrorCodeValidation = plugin.ErrorCodeValidation

	// ErrorCodeUnsupportedContractVersion is used when when the contract version used in the request is unsupported.
	//
	// Deprecated: ErrorCodeUnsupportedContractVersion exists for historical compatibility and should not be used.
	// To access ErrorCodeUnsupportedContractVersion, use the notation-plugin-framework-go's [plugin.ErrorCodeUnsupportedContractVersion].
	ErrorCodeUnsupportedContractVersion = plugin.ErrorCodeUnsupportedContractVersion

	// ErrorCodeAccessDenied is used when user doesn't have required permission to access the key.
	//
	// Deprecated: ErrorCodeAccessDenied exists for historical compatibility and should not be used.
	// To access ErrorCodeAccessDenied, use the notation-plugin-framework-go's [plugin.ErrorCodeAccessDenied].
	ErrorCodeAccessDenied = plugin.ErrorCodeAccessDenied

	// ErrorCodeTimeout is used when an operation to generate signature timed out and can be retried by Notation.
	//
	// Deprecated: ErrorCodeTimeout exists for historical compatibility and should not be used.
	// To access ErrorCodeTimeout, use the notation-plugin-framework-go's [plugin.ErrorCodeTimeout].
	ErrorCodeTimeout = plugin.ErrorCodeTimeout

	// ErrorCodeThrottled is used when an operation to generate signature was throttles
	// and can be retried by Notation.
	//
	// Deprecated: ErrorCodeThrottled exists for historical compatibility and should not be used.
	// To access ErrorCodeThrottled, use the notation-plugin-framework-go's [plugin.ErrorCodeThrottled].
	ErrorCodeThrottled = plugin.ErrorCodeThrottled

	// ErrorCodeGeneric  is used when an general error occurred that does not fall into any categories.
	//
	// Deprecated: ErrorCodeGeneric exists for historical compatibility and should not be used.
	// To access ErrorCodeGeneric, use the notation-plugin-framework-go's [plugin.ErrorCodeGeneric].
	ErrorCodeGeneric = plugin.ErrorCodeGeneric
)
View Source
const (
	// CommandGetMetadata is the name of the plugin command
	// which must be supported by every plugin and returns the
	// plugin metadata.
	//
	// Deprecated: CommandGetMetadata exists for historical compatibility and should not be used.
	// To access CommandGetMetadata, use the notation-plugin-framework-go's [plugin.CommandGetMetadata].
	CommandGetMetadata = plugin.CommandGetMetadata

	// CommandDescribeKey is the name of the plugin command
	// which must be supported by every plugin that has the
	// SIGNATURE_GENERATOR.RAW capability.
	//
	// Deprecated: CommandDescribeKey exists for historical compatibility and should not be used.
	// To access CommandDescribeKey, use the notation-plugin-framework-go's [plugin.CommandDescribeKey].
	CommandDescribeKey = plugin.CommandDescribeKey

	// CommandGenerateSignature is the name of the plugin command
	// which must be supported by every plugin that has the
	// SIGNATURE_GENERATOR.RAW capability.
	//
	// Deprecated: CommandGenerateSignature exists for historical compatibility and should not be used.
	// To access CommandGenerateSignature, use the notation-plugin-framework-go's [plugin.CommandGenerateSignature].
	CommandGenerateSignature = plugin.CommandGenerateSignature

	// CommandGenerateEnvelope is the name of the plugin command
	// which must be supported by every plugin that has the
	// SIGNATURE_GENERATOR.ENVELOPE capability.
	//
	// Deprecated: CommandGenerateEnvelope exists for historical compatibility and should not be used.
	// To access CommandGenerateEnvelope, use the notation-plugin-framework-go's [plugin.CommandGenerateEnvelope].
	CommandGenerateEnvelope = plugin.CommandGenerateEnvelope

	// CommandVerifySignature is the name of the plugin command
	// which must be supported by every plugin that has
	// any SIGNATURE_VERIFIER.* capability
	//
	// Deprecated: CommandVerifySignature exists for historical compatibility and should not be used.
	// To access CommandVerifySignature, use the notation-plugin-framework-go's [plugin.CommandVerifySignature].
	CommandVerifySignature = plugin.CommandVerifySignature
)
View Source
const (
	// CapabilitySignatureGenerator is the name of the capability
	// for a plugin to support generating raw signatures.
	//
	// Deprecated: CapabilitySignatureGenerator exists for historical compatibility and should not be used.
	// To access CapabilitySignatureGenerator, use the notation-plugin-framework-go's [plugin.CapabilitySignatureGenerator].
	CapabilitySignatureGenerator = plugin.CapabilitySignatureGenerator

	// CapabilityEnvelopeGenerator is the name of the capability
	// for a plugin to support generating envelope signatures.
	//
	// Deprecated: CapabilityEnvelopeGenerator exists for historical compatibility and should not be used.
	// To access CapabilityEnvelopeGenerator, use the notation-plugin-framework-go's [plugin.CapabilityEnvelopeGenerator].
	CapabilityEnvelopeGenerator = plugin.CapabilityEnvelopeGenerator

	// CapabilityTrustedIdentityVerifier is the name of the
	// capability for a plugin to support verifying trusted identities.
	//
	// Deprecated: CapabilityTrustedIdentityVerifier exists for historical compatibility and should not be used.
	// To access CapabilityTrustedIdentityVerifier, use the notation-plugin-framework-go's [plugin.CapabilityTrustedIdentityVerifier].
	CapabilityTrustedIdentityVerifier = plugin.CapabilityTrustedIdentityVerifier

	// CapabilityRevocationCheckVerifier is the name of the
	// capability for a plugin to support verifying revocation checks.
	//
	// Deprecated: CapabilityRevocationCheckVerifier exists for historical compatibility and should not be used.
	// To access CapabilityRevocationCheckVerifier, use the notation-plugin-framework-go's [plugin.CapabilityRevocationCheckVerifier].
	CapabilityRevocationCheckVerifier = plugin.CapabilityRevocationCheckVerifier
)
View Source
const ContractVersion = plugin.ContractVersion

ContractVersion is the <major>.<minor> version of the plugin contract.

Deprecated: ContractVersion exists for historical compatibility and should not be used. To access ContractVersion, use the notation-plugin-framework-go's plugin.ContractVersion type.

Prefix is the prefix required on all plugin binary names.

Deprecated: Prefix exists for historical compatibility and should not be used. To access Prefix, use the notation-plugin-framework-go's plugin.BinaryPrefix type.

Variables

This section is empty.

Functions

func DecodeKeySpec

func DecodeKeySpec(k plugin.KeySpec) (keySpec signature.KeySpec, err error)

DecodeKeySpec parses keySpec name to a signature.keySpec type.

func DecodeSigningAlgorithm

func DecodeSigningAlgorithm(raw plugin.SignatureAlgorithm) (signature.Algorithm, error)

DecodeSigningAlgorithm parses the signing algorithm name from a given string.

func EncodeKeySpec

func EncodeKeySpec(k signature.KeySpec) (plugin.KeySpec, error)

EncodeKeySpec returns the name of a keySpec according to the spec.

func EncodeSigningAlgorithm

func EncodeSigningAlgorithm(alg signature.Algorithm) (plugin.SignatureAlgorithm, error)

EncodeSigningAlgorithm returns the signing algorithm name of an algorithm according to the spec.

func HashAlgorithmFromKeySpec

func HashAlgorithmFromKeySpec(k signature.KeySpec) (plugin.HashAlgorithm, error)

HashAlgorithmFromKeySpec returns the name of hash function according to the spec.

Types

type Capability deprecated

type Capability = plugin.Capability

Capability is a feature available in the plugin contract.

Deprecated: Capability exists for historical compatibility and should not be used. To access Capability, use the notation-plugin-framework-go's plugin.Capability type.

type Command deprecated

type Command = plugin.Command

Command is a CLI command available in the plugin contract.

Deprecated: Command exists for historical compatibility and should not be used. To access Command, use the notation-plugin-framework-go's plugin.Command type.

type CriticalAttributes deprecated

type CriticalAttributes = plugin.CriticalAttributes

CriticalAttributes contains all Notary Project defined critical attributes and their values in the signature envelope

Deprecated: CriticalAttributes exists for historical compatibility and should not be used. To access CriticalAttributes, use the notation-plugin-framework-go's plugin.CriticalAttributes type.

type DescribeKeyRequest deprecated

type DescribeKeyRequest = plugin.DescribeKeyRequest

DescribeKeyRequest contains the parameters passed in a describe-key request.

Deprecated: DescribeKeyRequest exists for historical compatibility and should not be used. To access DescribeKeyRequest, use the notation-plugin-framework-go's plugin.DescribeKeyRequest type.

type DescribeKeyResponse deprecated

type DescribeKeyResponse = plugin.DescribeKeyResponse

DescribeKeyResponse is the response of a describe-key request.

Deprecated: DescribeKeyResponse exists for historical compatibility and should not be used. To access DescribeKeyResponse, use the notation-plugin-framework-go's plugin.DescribeKeyResponse type.

type ErrorCode deprecated

type ErrorCode = plugin.ErrorCode

Deprecated: ErrorCode exists for historical compatibility and should not be used. To access ErrorCode, use the notation-plugin-framework-go's plugin.ErrorCode type.

type GenerateEnvelopeRequest deprecated

type GenerateEnvelopeRequest = plugin.GenerateEnvelopeRequest

GenerateEnvelopeRequest contains the parameters passed in a generate-envelope request.

Deprecated: GenerateEnvelopeRequest exists for historical compatibility and should not be used. To access GenerateEnvelopeRequest, use the notation-plugin-framework-go's plugin.GenerateEnvelopeRequest type.

type GenerateEnvelopeResponse deprecated

type GenerateEnvelopeResponse = plugin.GenerateEnvelopeResponse

GenerateEnvelopeResponse is the response of a generate-envelope request.

Deprecated: GenerateEnvelopeResponse exists for historical compatibility and should not be used. To access GenerateEnvelopeResponse, use the notation-plugin-framework-go's plugin.GenerateEnvelopeResponse type.

type GenerateSignatureRequest deprecated

type GenerateSignatureRequest = plugin.GenerateSignatureRequest

GenerateSignatureRequest contains the parameters passed in a generate-signature request.

Deprecated: GenerateSignatureRequest exists for historical compatibility and should not be used. To access GenerateSignatureRequest, use the notation-plugin-framework-go's plugin.GenerateSignatureRequest type.

type GenerateSignatureResponse deprecated

type GenerateSignatureResponse = plugin.GenerateSignatureResponse

GenerateSignatureResponse is the response of a generate-signature request.

Deprecated: GenerateSignatureResponse exists for historical compatibility and should not be used. To access GenerateSignatureResponse, use the notation-plugin-framework-go's plugin.GenerateSignatureResponse type.

type GetMetadataRequest deprecated

type GetMetadataRequest = plugin.GetMetadataRequest

GetMetadataRequest contains the parameters passed in a get-plugin-metadata request.

Deprecated: GetMetadataRequest exists for historical compatibility and should not be used. To access GetMetadataRequest, use the notation-plugin-framework-go's plugin.GetMetadataRequest type.

type GetMetadataResponse deprecated

type GetMetadataResponse = plugin.GetMetadataResponse

GetMetadataResponse provided by the plugin.

Deprecated: GetMetadataResponse exists for historical compatibility and should not be used. To access GetMetadataResponse, use the notation-plugin-framework-go's plugin.GetMetadataResponse type.

type HashAlgorithm deprecated

type HashAlgorithm = plugin.HashAlgorithm

HashAlgorithm is the type of hash algorithm.

Deprecated: HashAlgorithm exists for historical compatibility and should not be used. To access HashAlgorithm, use the notation-plugin-framework-go's plugin.HashAlgorithm type.

type KeySpec deprecated

type KeySpec = plugin.KeySpec

KeySpec is type of the signing algorithm, including algorithm and size.

Deprecated: KeySpec exists for historical compatibility and should not be used. To access KeySpec, use the notation-plugin-framework-go's plugin.KeySpec type.

type Request deprecated

type Request = plugin.Request

Request defines a plugin request, which is always associated to a command.

Deprecated: Request exists for historical compatibility and should not be used. To access Request, use the notation-plugin-framework-go's plugin.Request type.

type RequestError

type RequestError struct {
	Code     plugin.ErrorCode
	Err      error
	Metadata map[string]string
}

RequestError is the common error response for any request.

func (RequestError) Error

func (e RequestError) Error() string

func (RequestError) Is

func (e RequestError) Is(target error) bool

func (RequestError) MarshalJSON

func (e RequestError) MarshalJSON() ([]byte, error)

func (*RequestError) UnmarshalJSON

func (e *RequestError) UnmarshalJSON(data []byte) error

func (RequestError) Unwrap

func (e RequestError) Unwrap() error

type Signature deprecated

type Signature = plugin.Signature

Signature represents a signature pulled from the envelope

Deprecated: Signature exists for historical compatibility and should not be used. To access Signature, use the notation-plugin-framework-go's plugin.Signature type.

type SignatureAlgorithm deprecated

type SignatureAlgorithm = plugin.SignatureAlgorithm

SignatureAlgorithm is the type of signature algorithm

Deprecated: SignatureAlgorithm exists for historical compatibility and should not be used. To access SignatureAlgorithm, use the notation-plugin-framework-go's plugin.SignatureAlgorithm type.

type TrustPolicy deprecated

type TrustPolicy = plugin.TrustPolicy

TrustPolicy represents trusted identities that sign the artifacts

Deprecated: TrustPolicy exists for historical compatibility and should not be used. To access TrustPolicy, use the notation-plugin-framework-go's plugin.TrustPolicy type.

type VerificationResult deprecated

type VerificationResult = plugin.VerificationResult

VerificationResult is the result of a verification performed by the plugin.

Deprecated: VerificationResult exists for historical compatibility and should not be used. To access VerificationResult, use the notation-plugin-framework-go's plugin.VerificationResult type.

type VerifySignatureRequest deprecated

type VerifySignatureRequest = plugin.VerifySignatureRequest

VerifySignatureRequest contains the parameters passed in a verify-signature request.

Deprecated: VerifySignatureRequest exists for historical compatibility and should not be used. To access VerifySignatureRequest, use the notation-plugin-framework-go'[s plugin.VerifySignatureRequest] type.

type VerifySignatureResponse deprecated

type VerifySignatureResponse = plugin.VerifySignatureResponse

VerifySignatureResponse is the response of a verify-signature request.

Deprecated: VerifySignatureResponse exists for historical compatibility and should not be used. To access VerifySignatureResponse, use the notation-plugin-framework-go's plugin.VerifySignatureResponse type.

Jump to

Keyboard shortcuts

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