mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-08 01:04:47 +01:00
d0c6d88971
This PR simplifies Store and FileStore by keeping just the Get and Save account methods. The AccountManager operates mostly around a single account, so it makes sense to fetch the whole account object from the store.
14 lines
472 B
Go
14 lines
472 B
Go
package server
|
|
|
|
type Store interface {
|
|
GetAllAccounts() []*Account
|
|
GetAccount(accountID string) (*Account, error)
|
|
GetAccountByUser(userID string) (*Account, error)
|
|
GetAccountByPeerPubKey(peerKey string) (*Account, error)
|
|
GetAccountBySetupKey(setupKey string) (*Account, error) //todo use key hash later
|
|
GetAccountByPrivateDomain(domain string) (*Account, error)
|
|
SaveAccount(account *Account) error
|
|
GetInstallationID() string
|
|
SaveInstallationID(id string) error
|
|
}
|