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

Function EncodeCursor

app/controlplane/pkg/pagination/cursor.go:112–115  ·  view source on GitHub ↗

EncodeCursor generates a base64 encoded representation of a timestamp + identifier

(t time.Time, uuid uuid.UUID)

Source from the content-addressed store, hash-verified

110
111// EncodeCursor generates a base64 encoded representation of a timestamp + identifier
112func EncodeCursor(t time.Time, uuid uuid.UUID) string {
113 key := fmt.Sprintf("%s,%s", t.Format(time.RFC3339Nano), uuid)
114 return base64.StdEncoding.EncodeToString([]byte(key))
115}

Callers 3

doGetMethod · 0.92
ListMethod · 0.92

Calls

no outgoing calls

Tested by 1