From c0a3ad7e2bd735343e7a8703459ad333c80b2258 Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 10 Sep 2024 11:23:41 +0300 Subject: [PATCH] delete deprecated code --- internal/utils/account_utils.go | 44 --------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 internal/utils/account_utils.go diff --git a/internal/utils/account_utils.go b/internal/utils/account_utils.go deleted file mode 100644 index b9fd1e3..0000000 --- a/internal/utils/account_utils.go +++ /dev/null @@ -1,44 +0,0 @@ -package utils - -import ( - "context" - "encoding/json" - - "git.defalsify.org/vise.git/db" -) - -type AccountFileHandler struct { - store db.Db -} - -func NewAccountFileHandler(store db.Db) *AccountFileHandler { - return &AccountFileHandler{ - store: store, - } -} - -func (afh *AccountFileHandler) ReadAccountData(ctx context.Context, sessionId string) (map[string]string, error) { - var accountData map[string]string - jsonData, err := ReadEntry(ctx, afh.store, sessionId, DATA_ACCOUNT) - if err != nil { - return nil,err - } - err = json.Unmarshal(jsonData, &accountData) - if err != nil { - return nil, err - } - return accountData, nil -} - -func (afh *AccountFileHandler) WriteAccountData(ctx context.Context, sessionId string, accountData map[string]string) error { - _, err := json.Marshal(accountData) - if err != nil { - return err - } - - return nil -} - -func (afh *AccountFileHandler) EnsureFileExists() error { - return nil -}