mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-11 16:38:27 +01:00
0b8387bd2c
* Added Domain Category field and fix store tests * Add GetAccountByDomain method * Add Domain Category to authorization claims * Initial GetAccountWithAuthorizationClaims test cases * Renamed Private Domain map and index it on saving account * New Go build tags * Added NewRegularUser function * Updated restore to account for primary domain account Also, added another test case * Added grouping user of private domains Also added auxiliary methods for update metadata and domain attributes * Update http handles get account method and tests * Fix lint and document another case * Removed unnecessary log * Move use cases to method and add flow comments * Split the new user and existing logic from GetAccountWithAuthorizationClaims * Review: minor corrections Co-authored-by: braginini <bangvalo@gmail.com>
15 lines
541 B
Go
15 lines
541 B
Go
package server
|
|
|
|
type Store interface {
|
|
GetPeer(peerKey string) (*Peer, error)
|
|
DeletePeer(accountId string, peerKey string) (*Peer, error)
|
|
SavePeer(accountId string, peer *Peer) error
|
|
GetAccount(accountId string) (*Account, error)
|
|
GetUserAccount(userId string) (*Account, error)
|
|
GetAccountPeers(accountId string) ([]*Peer, error)
|
|
GetPeerAccount(peerKey string) (*Account, error)
|
|
GetAccountBySetupKey(setupKey string) (*Account, error)
|
|
GetAccountByPrivateDomain(domain string) (*Account, error)
|
|
SaveAccount(account *Account) error
|
|
}
|