Documentation
¶
Index ¶
- Constants
- Variables
- func ActorID(ctx context.Context) (actorID []byte, ok bool)
- func ActorType(ctx context.Context) (actorType enum.Actor, ok bool)
- func Sign(log *models.ComplianceAuditLog) (err error)
- func UseKeyChain(keychain keychain.KeyChain)
- func Verify(log *models.ComplianceAuditLog) (err error)
- func WithActor(parent context.Context, actorID []byte, actorType enum.Actor) (ctx context.Context)
Constants ¶
View Source
const ( KeyUnknown contextKey = iota KeyActorID KeyActorType )
Variables ¶
View Source
var ( ErrSigningKeyMissing = errors.New("could not get a signing key") ErrVerificationKeyMissing = errors.New("could not get a verification key") )
Functions ¶
func ActorID ¶
Returns the context's actor ID and true, if present, otherwise returns false for the second value (first value not useful).
func ActorType ¶
Returns the context's actor type and true, if present, otherwise returns false for the second value (first value not useful).
func Sign ¶
func Sign(log *models.ComplianceAuditLog) (err error)
Signs the given ComplianceAuditLog, replacing any signature and metadata currently present.
func UseKeyChain ¶
The package will use the given keychain.KeyChain for signing and verification of ComplianceAuditLog entries.
func Verify ¶
func Verify(log *models.ComplianceAuditLog) (err error)
Verifies the given ComplianceAuditLog's signature versus the data. If no error is returned, then the log is valid.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.