audit

package
v7.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(aconf *config.AmqpConfig) (*amqp.Connection, error)

Connect to the configured AMQP broker

Types

type Info

type Info struct {
	Attributes map[string]interface{}
	StartTime  time.Time
}

func New

func New(keyName, sigType string, hash crypto.Hash) *Info

Create a new audit record, starting with the given key name, signature type, and digest

func Parse

func Parse(blob []byte) (*Info, error)

Parse audit data from a JSON blob

func (*Info) GetMimeType

func (info *Info) GetMimeType() string

Get the MIME type that the server will use when returning a result to the client. This is not the MIME type of the package being signed.

func (*Info) Marshal

func (info *Info) Marshal() ([]byte, error)

Marshal the audit record to JSON

func (*Info) Publish

func (info *Info) Publish(aconf *config.AmqpConfig) error

Publish audit record to a AMQP exchange

func (*Info) SetCounterSignature

func (info *Info) SetCounterSignature(cs *pkcs9.CounterSignature)

Add a PKCS#9 timestamp (counter-signature) to this audit record

func (*Info) SetMimeType

func (info *Info) SetMimeType(mimeType string)

Set the MIME type (Content-Type) that the server will use when returning a result to the client. This is not the MIME type of the package being signed.

func (*Info) SetPgpCert

func (info *Info) SetPgpCert(entity *openpgp.Entity)

Set a PGP certificate for this audit record

func (*Info) SetTimestamp

func (info *Info) SetTimestamp(t time.Time)

Override the default timestamp for this audit record

func (*Info) SetX509Cert

func (info *Info) SetX509Cert(cert *x509.Certificate)

Set a X509 certificate for this audit record

Jump to

Keyboard shortcuts

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