Skip to content

Commit

Permalink
[WIP] Add support for TUF roots
Browse files Browse the repository at this point in the history
  • Loading branch information
Cole committed Sep 2, 2023
1 parent 2a37555 commit e85e0f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ent/schema/tuf.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type Target struct {

func (Target) Fields() []ent.Field {
return []ent.Field{
//the trget file id
field.String("gitoid_sha256").NotEmpty().Unique(),
field.Int("length"),
field.String("version"),
Expand All @@ -23,9 +24,10 @@ func (Target) Fields() []ent.Field {
func (Target) Edges() []ent.Edge {
return []ent.Edge{
edge.To("signatures", Signature.Type),
//these are the digests of the target files such as a signed-policy.json
edge.To("payload_digests", PayloadDigest.Type),
edge.To("dsse", Dsse.Type),
edge.To("subjects", Subject.Type),
//subjects allow us to find policy targets for repos or artifacts
}
}

Expand Down

0 comments on commit e85e0f9

Please sign in to comment.