intoto

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PayloadType   = "application/vnd.in-toto+json"
	StatementType = "https://in-toto.io/Statement/v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Digest

type Digest struct {
	Sha256 string `json:"sha256"`
}

type ResourceDescriptor

type ResourceDescriptor struct {
	Digest Digest `json:"digest"`
}

type Statement

type Statement struct {
	Type          string               `json:"_type"`
	Subject       []ResourceDescriptor `json:"subject"`
	PredicateType string               `json:"predicateType"`
	Predicate     json.RawMessage      `json:"predicate"`
	CreatedAt     string               `json:"createdAt"`
	CreatedBy     string               `json:"createdBy"`
}

func NewStatement

func NewStatement(predicate []byte, predicateType string, user string) *Statement

func (*Statement) Marshal

func (s *Statement) Marshal() ([]byte, error)

func (*Statement) SetSubject

func (s *Statement) SetSubject(servicesManager artifactory.ArtifactoryServicesManager, subject, subjectSha256 string) error

Jump to

Keyboard shortcuts

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