feat: add DID to vault genesis schema

This commit is contained in:
Prad Nukala
2024-10-01 18:55:02 -04:00
parent f5f0578dcc
commit fa6bb93c78
8 changed files with 259 additions and 88 deletions
+28
View File
@@ -0,0 +1,28 @@
// Code generated from Pkl module `orm`. DO NOT EDIT.
package orm
import (
"github.com/onsonr/sonr/pkg/orm/keyalgorithm"
"github.com/onsonr/sonr/pkg/orm/keycurve"
"github.com/onsonr/sonr/pkg/orm/keyencoding"
"github.com/onsonr/sonr/pkg/orm/keyrole"
"github.com/onsonr/sonr/pkg/orm/keytype"
)
type DID struct {
Id string `pkl:"id" json:"id,omitempty" query:"id"`
Role keyrole.KeyRole `pkl:"role"`
Algorithm keyalgorithm.KeyAlgorithm `pkl:"algorithm"`
Encoding keyencoding.KeyEncoding `pkl:"encoding"`
Curve keycurve.KeyCurve `pkl:"curve"`
KeyType keytype.KeyType `pkl:"key_type"`
Raw string `pkl:"raw"`
Jwk *JWK `pkl:"jwk"`
}
+16
View File
@@ -0,0 +1,16 @@
// Code generated from Pkl module `orm`. DO NOT EDIT.
package orm
type Session struct {
Id string `pkl:"id" json:"id,omitempty" query:"id"`
Subject string `pkl:"subject" json:"subject,omitempty"`
Controller string `pkl:"controller" json:"controller,omitempty"`
Origin string `pkl:"origin" json:"origin,omitempty"`
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty"`
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty"`
}
+2 -1
View File
@@ -9,9 +9,10 @@ func init() {
pkl.RegisterMapping("orm#Asset", Asset{})
pkl.RegisterMapping("orm#Chain", Chain{})
pkl.RegisterMapping("orm#Credential", Credential{})
pkl.RegisterMapping("orm#DID", DID{})
pkl.RegisterMapping("orm#JWK", JWK{})
pkl.RegisterMapping("orm#Grant", Grant{})
pkl.RegisterMapping("orm#Keyshare", Keyshare{})
pkl.RegisterMapping("orm#PublicKey", PublicKey{})
pkl.RegisterMapping("orm#Profile", Profile{})
pkl.RegisterMapping("orm#Session", Session{})
}
+1
View File
@@ -0,0 +1 @@
package orm