Versions in this module Expand all Collapse all v1 v1.0.0 Jan 31, 2024 Changes in this version + const BinaryPrefix + const ContractVersion + const ErrorMsgMalformedInput + const ErrorMsgMalformedOutputFmt + type Capability string + const CapabilityEnvelopeGenerator + const CapabilityRevocationCheckVerifier + const CapabilitySignatureGenerator + const CapabilityTrustedIdentityVerifier + type Command string + const CommandDescribeKey + const CommandGenerateEnvelope + const CommandGenerateSignature + const CommandGetMetadata + const CommandVerifySignature + const Version + type CriticalAttributes struct + AuthenticSigningTime *time.Time + ContentType string + Expiry *time.Time + ExtendedAttributes map[string]interface{} + SigningScheme string + type DescribeKeyRequest struct + ContractVersion string + KeyID string + PluginConfig map[string]string + func (DescribeKeyRequest) Command() Command + func (r DescribeKeyRequest) Validate() error + type DescribeKeyResponse struct + KeyID string + KeySpec KeySpec + type Error struct + ErrCode ErrorCode + Message string + Metadata map[string]string + func NewError(code ErrorCode, msg string) *Error + func NewGenericError(msg string) *Error + func NewGenericErrorf(format string, msg ...any) *Error + func NewJSONParsingError(msg string) *Error + func NewUnsupportedContractVersionError(version string) *Error + func NewUnsupportedError(msg string) *Error + func NewValidationError(msg string) *Error + func NewValidationErrorf(format string, msg ...any) *Error + func (e *Error) Error() string + type ErrorCode string + const ErrorCodeAccessDenied + const ErrorCodeGeneric + const ErrorCodeThrottled + const ErrorCodeTimeout + const ErrorCodeUnsupportedContractVersion + const ErrorCodeValidation + type GenerateEnvelopeRequest struct + ContractVersion string + ExpiryDurationInSeconds uint64 + KeyID string + Payload []byte + PayloadType string + PluginConfig map[string]string + SignatureEnvelopeType string + func (GenerateEnvelopeRequest) Command() Command + func (r GenerateEnvelopeRequest) Validate() error + type GenerateEnvelopeResponse struct + Annotations map[string]string + SignatureEnvelope []byte + SignatureEnvelopeType string + type GenerateSignatureRequest struct + ContractVersion string + Hash HashAlgorithm + KeyID string + KeySpec KeySpec + Payload []byte + PluginConfig map[string]string + func (GenerateSignatureRequest) Command() Command + func (r GenerateSignatureRequest) Validate() error + type GenerateSignatureResponse struct + CertificateChain [][]byte + KeyID string + Signature []byte + SigningAlgorithm SignatureAlgorithm + type GenericPlugin interface + GetMetadata func(ctx context.Context, req *GetMetadataRequest) (*GetMetadataResponse, error) + type GetMetadataRequest struct + PluginConfig map[string]string + func (GetMetadataRequest) Command() Command + func (GetMetadataRequest) Validate() error + type GetMetadataResponse struct + Capabilities []Capability + Description string + Name string + SupportedContractVersions []string + URL string + Version string + func (resp *GetMetadataResponse) HasCapability(capability Capability) bool + type HashAlgorithm string + const HashAlgorithmSHA256 + const HashAlgorithmSHA384 + const HashAlgorithmSHA512 + type KeySpec string + const KeySpecEC256 + const KeySpecEC384 + const KeySpecEC521 + const KeySpecRSA2048 + const KeySpecRSA3072 + const KeySpecRSA4096 + type Plugin interface + type Request interface + Command func() Command + Validate func() error + type SignPlugin interface + DescribeKey func(ctx context.Context, req *DescribeKeyRequest) (*DescribeKeyResponse, error) + GenerateEnvelope func(ctx context.Context, req *GenerateEnvelopeRequest) (*GenerateEnvelopeResponse, error) + GenerateSignature func(ctx context.Context, req *GenerateSignatureRequest) (*GenerateSignatureResponse, error) + type Signature struct + CertificateChain [][]byte + CriticalAttributes CriticalAttributes + UnprocessedAttributes []string + type SignatureAlgorithm string + const SignatureAlgorithmECDSA_SHA256 + const SignatureAlgorithmECDSA_SHA384 + const SignatureAlgorithmECDSA_SHA512 + const SignatureAlgorithmRSASSA_PSS_SHA256 + const SignatureAlgorithmRSASSA_PSS_SHA384 + const SignatureAlgorithmRSASSA_PSS_SHA512 + type TrustPolicy struct + SignatureVerification []Capability + TrustedIdentities []string + type VerificationResult struct + Reason string + Success bool + type VerifyPlugin interface + VerifySignature func(ctx context.Context, req *VerifySignatureRequest) (*VerifySignatureResponse, error) + type VerifySignatureRequest struct + ContractVersion string + PluginConfig map[string]string + Signature Signature + TrustPolicy TrustPolicy + func (VerifySignatureRequest) Command() Command + func (r VerifySignatureRequest) Validate() error + type VerifySignatureResponse struct + ProcessedAttributes []interface{} + VerificationResults map[Capability]*VerificationResult