π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add model for storing albums locally
Neeraj Gupta564696e0ef94
diff --git a/pkg/log/debug_print.go b/pkg/log/debug_print.gonew file mode 100644index 0000000000..762e504fe3--- /dev/null+++ b/pkg/log/debug_print.go@@ -0,0 +1,25 @@+package log++import (+ "cli-go/pkg/model"+ "fmt"+)++// This file contains functions that are used to print debug information to the console.++func PrintAlbum(a *model.Album) {+ fmt.Printf("ID: %d\n", a.ID)+ fmt.Printf("OwnerID: %d\n", a.OwnerID)+ fmt.Printf("AlbumName: %s\n", a.AlbumName)+ fmt.Printf("AlbumKey: %s\n", a.AlbumKey.CipherText)+ if a.PrivateMeta != nil {+ fmt.Printf("PrivateMeta: %s\n", *a.PrivateMeta)+ }+ if a.PublicMeta != nil {+ fmt.Printf("PublicMeta: %s\n", *a.PublicMeta)+ }+ if a.SharedMeta != nil {+ fmt.Printf("SharedMeta: %s\n", *a.SharedMeta)+ }+ fmt.Printf("LastUpdatedAt: %d\n", a.LastUpdatedAt)+}diff --git a/pkg/mappers/album_mapper.go b/pkg/mappers/album_mapper.gonew file mode 100644index 0000000000..bff8365e00--- /dev/null+++ b/pkg/mappers/album_mapper.go@@ -0,0 +1,10 @@+package mappers++import (+ "cli-go/internal/api"+ "cli-go/pkg/model"+)++func MapCollectionToAlbum(collection *api.Collection, collectionKey, cliKey []byte) (*model.Album, error) {+ panic("not implemented")+}diff --git a/pkg/model/album.go b/pkg/model/album.gonew file mode 100644index 0000000000..0f7272d2b5--- /dev/null+++ b/pkg/model/album.go@@ -0,0 +1,12 @@+package model++type Album struct {+ ID int64 `json:"id"`+ OwnerID int64 `json:"ownerID"`+ AlbumName string `json:"albumName"`+ AlbumKey EncString `json:"albumKey"`+ PublicMeta *string `json:"publicMeta"`+ PrivateMeta *string `json:"privateMeta"`+ SharedMeta *string `json:"sharedMeta"`+ LastUpdatedAt int64 `json:"lastUpdatedAt"`+}