Add export and import for profiles

This commit is contained in:
Daniel
2023-11-15 15:12:00 +01:00
parent beed574fa3
commit 602db080c5
13 changed files with 668 additions and 85 deletions

View File

@@ -24,11 +24,13 @@ var profileDB = database.NewInterface(&database.Options{
Internal: true,
})
func makeScopedID(source profileSource, id string) string {
// MakeScopedID returns a scoped profile ID.
func MakeScopedID(source ProfileSource, id string) string {
return string(source) + "/" + id
}
func makeProfileKey(source profileSource, id string) string {
// MakeProfileKey returns a profile key.
func MakeProfileKey(source ProfileSource, id string) string {
return ProfilesDBPath + string(source) + "/" + id
}