mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feat: add PKL schema for message formats
This commit is contained in:
@@ -72,9 +72,6 @@ class Schema {
|
||||
@JsonField
|
||||
keyshare: String
|
||||
|
||||
@JsonField
|
||||
publicKey: String
|
||||
|
||||
@JsonField
|
||||
profile: String
|
||||
}
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/format" }
|
||||
|
||||
module format
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
}
|
||||
}
|
||||
|
||||
typealias DID = String
|
||||
|
||||
typealias DIDMethod = "ipfs"|"sonr"|"bitcoin"|"ethereum"|"ibc"|"webauthn"|"dwn"|"service"
|
||||
|
||||
class Macaroon {
|
||||
@JsonField
|
||||
location: String
|
||||
|
||||
@JsonField
|
||||
originator: String
|
||||
|
||||
@JsonField
|
||||
identifier: String
|
||||
|
||||
@JsonField
|
||||
first_party: List<String>
|
||||
|
||||
@JsonField
|
||||
third_party: List<String>
|
||||
|
||||
@JsonField
|
||||
expiration: Int
|
||||
}
|
||||
|
||||
typealias MacaroonToken = String
|
||||
+1
-2
@@ -1,6 +1,6 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/orm" }
|
||||
|
||||
module models
|
||||
module orm
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
@@ -273,4 +273,3 @@ class Profile {
|
||||
|
||||
db_name: String = "vault"
|
||||
db_version: Int = 1
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/internal/orm/transactions" }
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/orm/transactions" }
|
||||
|
||||
module transactions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user