Initial commit

This commit is contained in:
ycc
2023-03-07 13:29:08 +01:00
parent 82b69faa5f
commit 590d655d58
32 changed files with 2114 additions and 4 deletions

29
models/identity.go Normal file
View File

@@ -0,0 +1,29 @@
package models
import (
"github.com/google/uuid"
)
var (
Me Identity
)
func init() {
Me = Identity{uuid.New().String(), "My name", "My key", "MyUrl"}
}
type Identity struct {
Id string
Name string
PublicKey string
Url string
}
func GetIdentity() (u *Identity) {
return &Me
}
func UpdateIdentity(uu *Identity) (a *Identity) {
Me = *uu
return &Me
}