Documentation ¶
Index ¶
Constants ¶
View Source
const ( CommitRef = "refs/attestations/commits" TreeRef = "refs/attestations/trees" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attestor ¶
type Attestor struct {
// contains filtered or unexported fields
}
func NewAttestor ¶
func NewAttestor(repo *git.Repository, sv *sign.SignerVerifier, rekorFn rekorUpload) *Attestor
func (*Attestor) WriteAttestation ¶
func (a *Attestor) WriteAttestation(ctx context.Context, refName string, sha plumbing.Hash, input Reader, attType string) (plumbing.Hash, error)
WriteAttestion writes the given content + a DSSE signed attestation to the corresponding attestation ref. The SHA of the created commit is returned.
repo: What repository to write to. refName: What ref to write to (e.g. refs/attestations/commits) sha: Commit SHA you are attesting to. input: Attestation file input. attType: Attestation type. See attestation.GenerateStatement for allowed values.
type Encoder ¶
type Encoder interface {
Encode(o plumbing.EncodedObject) error
}
type NamedReader ¶
func (NamedReader) Name ¶
func (r NamedReader) Name() string
Click to show internal directories.
Click to hide internal directories.