record

package
v0.0.0-...-0fdc4c1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attestation

type Attestation interface {
}

type Body

type Body interface {
}

type DocDBRecord

type DocDBRecord struct {
	Attestation Attestation
}

func (*DocDBRecord) GetData

func (d *DocDBRecord) GetData() interface{}

func (*DocDBRecord) GetMaterials

func (d *DocDBRecord) GetMaterials() []Material

func (*DocDBRecord) GetType

func (d *DocDBRecord) GetType() string

type Manager

type Manager struct {
	Opts ManagerOpts
	// TODO: There should be a way to create a way to prioritize different backends for different types of records
	Clients []RecordClient
}

TODO: Should probably create some creator functions for this

func (*Manager) GetRecord

func (m *Manager) GetRecord(hash string) (Record, error)

type ManagerOpts

type ManagerOpts struct {
	IsTest bool
}

type Material

type Material struct {
	MediaType string
	Digest    string
	Uri       string
}

TODO: This shoould probably just use something like OCI Content descriptors

type MongoClient

type MongoClient struct {
	// contains filtered or unexported fields
}

func GetMongoClient

func GetMongoClient(uri string, db string, collection string) (*MongoClient, error)

func (*MongoClient) GetRecord

func (mc *MongoClient) GetRecord(hash string) (Record, error)

type OCIClient

type OCIClient struct {
	// contains filtered or unexported fields
}

TODO: Set up trusted keys for records This for now is intended to purely represent records related to a particular image

func (*OCIClient) GetRecord

func (o *OCIClient) GetRecord(hash string) (Record, error)

type OCIRecord

type OCIRecord struct {
	Attestation in_toto.ProvenanceStatement
}

Uses cosign to do most of the heavy lifting.

func (*OCIRecord) GetData

func (o *OCIRecord) GetData() interface{}

func (*OCIRecord) GetMaterials

func (o *OCIRecord) GetMaterials() []Material

func (*OCIRecord) GetType

func (o *OCIRecord) GetType() string

type Record

type Record interface {
	GetType() string
	GetMaterials() []Material
	GetData() interface{}
}

type RecordClient

type RecordClient interface {
	GetRecord(hash string) (Record, error)
}

type RekorClient

type RekorClient struct {
	// contains filtered or unexported fields
}

func GetRekorClient

func GetRekorClient() (*RekorClient, error)

TODO: Make customizable

func (*RekorClient) GetRecord

func (rc *RekorClient) GetRecord(hash string) (Record, error)

type RekorRecord

type RekorRecord struct {
	Body        Body
	Attestation Attestation
}

func (*RekorRecord) GetData

func (r *RekorRecord) GetData() interface{}

func (*RekorRecord) GetMaterials

func (r *RekorRecord) GetMaterials() []Material

func (*RekorRecord) GetType

func (r *RekorRecord) GetType() string

type URIFollowerClient

type URIFollowerClient struct{}

TODO: This client is intended to follow URIs found in records. This will require some consensus in the community

Jump to

Keyboard shortcuts

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