mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
feature/dwn sw js (#1103)
- **feat(macaroon): add and to macaroon genesis** - **refactor: move schema definitions to dedicated file** - **feat: remove Session model** - **refactor: move session middleware to internal package**
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
// 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 PublicKey struct {
|
||||
Role keyrole.KeyRole `pkl:"role" json:"role,omitempty" query:"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"`
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
// 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"`
|
||||
}
|
||||
@@ -14,5 +14,4 @@ func init() {
|
||||
pkl.RegisterMapping("orm#Grant", Grant{})
|
||||
pkl.RegisterMapping("orm#Keyshare", Keyshare{})
|
||||
pkl.RegisterMapping("orm#Profile", Profile{})
|
||||
pkl.RegisterMapping("orm#Session", Session{})
|
||||
}
|
||||
|
||||
@@ -1 +1,39 @@
|
||||
package orm
|
||||
|
||||
const SCHEMA_VERSION = 1
|
||||
|
||||
func AccountSchema() string {
|
||||
return "++, id, name, address, publicKey, chainCode, index, controller, createdAt"
|
||||
}
|
||||
|
||||
func AssetSchema() string {
|
||||
return "++, id, name, symbol, decimals, chainCode, createdAt"
|
||||
}
|
||||
|
||||
func ChainSchema() string {
|
||||
return "++, id, name, networkId, chainCode, createdAt"
|
||||
}
|
||||
|
||||
func CredentialSchema() string {
|
||||
return "++, id, subject, controller, attestationType, origin, label, deviceId, credentialId, publicKey, transport, signCount, userPresent, userVerified, backupEligible, backupState, cloneWarning, createdAt, updatedAt"
|
||||
}
|
||||
|
||||
func DIDSchema() string {
|
||||
return "++, id, role, algorithm, encoding, curve, key_type, raw, jwk"
|
||||
}
|
||||
|
||||
func JwkSchema() string {
|
||||
return "++, kty, crv, x, y, n, e"
|
||||
}
|
||||
|
||||
func GrantSchema() string {
|
||||
return "++, subject, controller, origin, token, scopes, createdAt, updatedAt"
|
||||
}
|
||||
|
||||
func KeyshareSchema() string {
|
||||
return "++, id, data, role, createdAt, lastRefreshed"
|
||||
}
|
||||
|
||||
func ProfileSchema() string {
|
||||
return "++, id, subject, controller, originUri, publicMetadata, privateMetadata, createdAt, updatedAt"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user