Skip to content

Commit

Permalink
chore: align top level attestation objects to naming scheme as seen i…
Browse files Browse the repository at this point in the history
…n other attestors

Signed-off-by: Frederick Kautz <[email protected]>
  • Loading branch information
fkautz committed May 21, 2024
1 parent c04b3d3 commit 14ee3c3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions attestation/omnitrail/omnitrail.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ func init() {
})
}

func NewOmnitrailAttestor() *OmnitrailAttestor {
return &OmnitrailAttestor{}
type Attestor struct {
Envelope *ot.Envelope `json:"Envelope"`
}

type OmnitrailAttestor struct {
Envelope *ot.Envelope `json:"trail"`
func NewOmnitrailAttestor() *Attestor {
return &Attestor{}
}

// Attest implements attestation.Attestor.
func (o *OmnitrailAttestor) Attest(ctx *attestation.AttestationContext) error {
func (o *Attestor) Attest(ctx *attestation.AttestationContext) error {
trail := ot.NewTrail()
err := trail.Add(ctx.WorkingDir())
if err != nil {
Expand All @@ -38,21 +38,21 @@ func (o *OmnitrailAttestor) Attest(ctx *attestation.AttestationContext) error {
}

// Name implements attestation.Attestor.
func (o *OmnitrailAttestor) Name() string {
func (o *Attestor) Name() string {
return Name
}

// RunType implements attestation.Attestor.
func (o *OmnitrailAttestor) RunType() attestation.RunType {
func (o *Attestor) RunType() attestation.RunType {
return RunType
}

// // Schema implements attestation.Attestor.
func (o *OmnitrailAttestor) Schema() *jsonschema.Schema {
func (o *Attestor) Schema() *jsonschema.Schema {
return jsonschema.Reflect(&o)
}

// Type implements attestation.Attestor.
func (o *OmnitrailAttestor) Type() string {
func (o *Attestor) Type() string {
return Type
}

0 comments on commit 14ee3c3

Please sign in to comment.