mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
refactor: migrate to new configuration system and model definitions
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/pkg/config/motr" }
|
||||
|
||||
module sonr.conf.Motr
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
typealias JSON = String
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
}
|
||||
}
|
||||
|
||||
class Config {
|
||||
@JsonField
|
||||
ipfsGatewayUrl: String
|
||||
|
||||
@JsonField
|
||||
motrToken: String
|
||||
|
||||
@JsonField
|
||||
motrAddress: String
|
||||
|
||||
@JsonField
|
||||
sonrApiUrl: String
|
||||
|
||||
@JsonField
|
||||
sonrRpcUrl: String
|
||||
|
||||
@JsonField
|
||||
sonrChainId: String
|
||||
|
||||
@JsonField
|
||||
vaultSchema: Schema
|
||||
}
|
||||
|
||||
class Environment {
|
||||
@JsonField
|
||||
isDevelopment: Boolean
|
||||
|
||||
@JsonField
|
||||
cacheVersion: String
|
||||
|
||||
@JsonField
|
||||
httpserverPath: String
|
||||
|
||||
@JsonField
|
||||
wasmExecPath: String
|
||||
|
||||
@JsonField
|
||||
wasmPath: String
|
||||
}
|
||||
|
||||
class Schema {
|
||||
version: Int
|
||||
|
||||
@JsonField
|
||||
account: String
|
||||
|
||||
@JsonField
|
||||
asset: String
|
||||
|
||||
@JsonField
|
||||
chain: String
|
||||
|
||||
@JsonField
|
||||
credential: String
|
||||
|
||||
@JsonField
|
||||
jwk: String
|
||||
|
||||
@JsonField
|
||||
grant: String
|
||||
|
||||
@JsonField
|
||||
keyshare: String
|
||||
|
||||
@JsonField
|
||||
profile: String
|
||||
}
|
||||
Reference in New Issue
Block a user