MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Fields

Method Fields

app/controlplane/pkg/data/ent/schema/referrer.go:33–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31}
32
33func (Referrer) Fields() []ent.Field {
34 return []ent.Field{
35 field.UUID("id", uuid.UUID{}).Default(uuid.New).Unique(),
36 field.String("digest").Immutable(),
37 // referrer kind i.e CONTAINER
38 field.String("kind").Immutable(),
39 // wether it can be downloaded from CAS or not
40 field.Bool("downloadable").Immutable(),
41 field.Time("created_at").
42 Default(time.Now).
43 Immutable().
44 Annotations(&entsql.Annotation{Default: "CURRENT_TIMESTAMP"}),
45 field.JSON("metadata", map[string]string{}).Optional().Immutable(),
46 field.JSON("annotations", map[string]string{}).Optional().Immutable(),
47 }
48}
49
50func (Referrer) Edges() []ent.Edge {
51 return []ent.Edge{

Callers 1

IndexesMethod · 0.45

Calls 6

DefaultMethod · 0.80
BoolMethod · 0.80
AnnotationsMethod · 0.80
StringMethod · 0.65
UniqueMethod · 0.45
JSONMethod · 0.45

Tested by

no test coverage detected