oc-discovery/models/identity.go

30 lines
381 B
Go
Raw Normal View History

2023-03-07 13:29:08 +01:00
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
}