mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 02:11:40 +00:00
Squash merge develop into master
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Account struct {
|
||||
Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty" param:"name"`
|
||||
|
||||
Address string `pkl:"address" json:"address,omitempty" param:"address"`
|
||||
|
||||
PublicKey string `pkl:"publicKey" json:"publicKey,omitempty" param:"publicKey"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"`
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Asset struct {
|
||||
Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty" param:"name"`
|
||||
|
||||
Symbol string `pkl:"symbol" json:"symbol,omitempty" param:"symbol"`
|
||||
|
||||
Decimals int `pkl:"decimals" json:"decimals,omitempty" param:"decimals"`
|
||||
|
||||
ChainId *int `pkl:"chainId" json:"chainId,omitempty" param:"chainId"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Chain struct {
|
||||
Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"`
|
||||
|
||||
Name string `pkl:"name" json:"name,omitempty" param:"name"`
|
||||
|
||||
NetworkId string `pkl:"networkId" json:"networkId,omitempty" param:"networkId"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"`
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Credential struct {
|
||||
Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"`
|
||||
|
||||
Subject string `pkl:"subject" json:"subject,omitempty" param:"subject"`
|
||||
|
||||
Controller string `pkl:"controller" json:"controller,omitempty" param:"controller"`
|
||||
|
||||
AttestationType string `pkl:"attestationType" json:"attestationType,omitempty" param:"attestationType"`
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty" param:"origin"`
|
||||
|
||||
CredentialId string `pkl:"credentialId" json:"credentialId,omitempty" param:"credentialId"`
|
||||
|
||||
PublicKey string `pkl:"publicKey" json:"publicKey,omitempty" param:"publicKey"`
|
||||
|
||||
Transport string `pkl:"transport" json:"transport,omitempty" param:"transport"`
|
||||
|
||||
SignCount uint `pkl:"signCount" json:"signCount,omitempty" param:"signCount"`
|
||||
|
||||
UserPresent bool `pkl:"userPresent" json:"userPresent,omitempty" param:"userPresent"`
|
||||
|
||||
UserVerified bool `pkl:"userVerified" json:"userVerified,omitempty" param:"userVerified"`
|
||||
|
||||
BackupEligible bool `pkl:"backupEligible" json:"backupEligible,omitempty" param:"backupEligible"`
|
||||
|
||||
BackupState bool `pkl:"backupState" json:"backupState,omitempty" param:"backupState"`
|
||||
|
||||
CloneWarning bool `pkl:"cloneWarning" json:"cloneWarning,omitempty" param:"cloneWarning"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty" param:"updatedAt"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Keyshare struct {
|
||||
Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"`
|
||||
|
||||
Data string `pkl:"data" json:"data,omitempty" param:"data"`
|
||||
|
||||
Role int `pkl:"role" json:"role,omitempty" param:"role"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"`
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Orm struct {
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Orm
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Orm, err error) {
|
||||
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
cerr := evaluator.Close()
|
||||
if err == nil {
|
||||
err = cerr
|
||||
}
|
||||
}()
|
||||
ret, err = Load(ctx, evaluator, pkl.FileSource(path))
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Orm
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Orm, error) {
|
||||
var ret Orm
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Permission struct {
|
||||
Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"`
|
||||
|
||||
ServiceId string `pkl:"serviceId" json:"serviceId,omitempty" param:"serviceId"`
|
||||
|
||||
Grants string `pkl:"grants" json:"grants,omitempty" param:"grants"`
|
||||
|
||||
Scopes string `pkl:"scopes" json:"scopes,omitempty" param:"scopes"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty" param:"updatedAt"`
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Profile struct {
|
||||
Id string `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"`
|
||||
|
||||
Subject string `pkl:"subject" json:"subject,omitempty" param:"subject"`
|
||||
|
||||
Controller string `pkl:"controller" json:"controller,omitempty" param:"controller"`
|
||||
|
||||
OriginUri *string `pkl:"originUri" json:"originUri,omitempty" param:"originUri"`
|
||||
|
||||
PublicMetadata *string `pkl:"publicMetadata" json:"publicMetadata,omitempty" param:"publicMetadata"`
|
||||
|
||||
PrivateMetadata *string `pkl:"privateMetadata" json:"privateMetadata,omitempty" param:"privateMetadata"`
|
||||
|
||||
CreatedAt *string `pkl:"createdAt" json:"createdAt,omitempty" param:"createdAt"`
|
||||
|
||||
UpdatedAt *string `pkl:"updatedAt" json:"updatedAt,omitempty" param:"updatedAt"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Property struct {
|
||||
Id uint `pkl:"id" gorm:"primaryKey,autoIncrement" json:"id,omitempty" query:"id"`
|
||||
|
||||
ProfileId string `pkl:"profileId" json:"profileId,omitempty" param:"profileId"`
|
||||
|
||||
Key string `pkl:"key" json:"key,omitempty" param:"key"`
|
||||
|
||||
Accumulator string `pkl:"accumulator" json:"accumulator,omitempty" param:"accumulator"`
|
||||
|
||||
PropertyKey string `pkl:"propertyKey" json:"propertyKey,omitempty" param:"propertyKey"`
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
func init() {
|
||||
pkl.RegisterMapping("orm", Orm{})
|
||||
pkl.RegisterMapping("orm#Account", Account{})
|
||||
pkl.RegisterMapping("orm#Asset", Asset{})
|
||||
pkl.RegisterMapping("orm#Chain", Chain{})
|
||||
pkl.RegisterMapping("orm#Credential", Credential{})
|
||||
pkl.RegisterMapping("orm#Profile", Profile{})
|
||||
pkl.RegisterMapping("orm#Property", Property{})
|
||||
pkl.RegisterMapping("orm#Keyshare", Keyshare{})
|
||||
pkl.RegisterMapping("orm#Permission", Permission{})
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package orm
|
||||
|
||||
func (a *Account) Table() string {
|
||||
return "accounts"
|
||||
}
|
||||
|
||||
func (a *Asset) Table() string {
|
||||
return "assets"
|
||||
}
|
||||
|
||||
func (a *Credential) Table() string {
|
||||
return "credentials"
|
||||
}
|
||||
|
||||
func (a *Keyshare) Table() string {
|
||||
return "keyshares"
|
||||
}
|
||||
|
||||
func (a *Permission) Table() string {
|
||||
return "permissions"
|
||||
}
|
||||
|
||||
func (a *Profile) Table() string {
|
||||
return "profiles"
|
||||
}
|
||||
|
||||
func (a *Property) Table() string {
|
||||
return "properties"
|
||||
}
|
||||
Reference in New Issue
Block a user