Documentation ¶
Index ¶
- Constants
- func GetAccountAppStorage(rootDir string, accountID string, key []byte, salt []byte) (datastore.Datastore, error)
- func GetAccountDir(rootDir, accountID string) string
- func GetAccountMetaForName(ctx context.Context, rootDir string, accountID string, storageKey []byte, ...) (*accounttypes.AccountMetadata, error)
- func GetAccountsDir(rootDir string) string
- func GetDatastoreDir(dir string) (string, error)
- func GetDevicePushKeyForPath(filePath string, createIfMissing bool) (pk *[cryptoutil.KeySize]byte, sk *[cryptoutil.KeySize]byte, err error)
- func GetGormDBForPath(dbPath string, key []byte, logger *zap.Logger) (*gorm.DB, func(), error)
- func GetMessengerDBForPath(dir string, key []byte, logger *zap.Logger) (*gorm.DB, func(), error)
- func GetOrCreateMasterStorageKey(ks NativeKeystore) ([]byte, error)
- func GetOrCreateMasterStorageSalt(ks NativeKeystore) ([]byte, error)
- func GetOrCreateStorageKeyForAccount(ks NativeKeystore, accountID string) ([]byte, error)
- func GetOrCreateStorageSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
- func GetReplicationDBForPath(dir string, logger *zap.Logger) (*gorm.DB, func(), error)
- func GetRootDatastoreForPath(dir string, key []byte, salt []byte, logger *zap.Logger) (datastore.Batching, error)
- func ListAccounts(ctx context.Context, rootDir string, ks NativeKeystore, logger *zap.Logger) ([]*accounttypes.AccountMetadata, error)
- type NativeKeystore
Constants ¶
View Source
const ( InMemoryDir = ":memory:" DefaultPushKeyFilename = "push.key" AccountMetafileName = "account_meta" AccountNetConfFileName = "account_net_conf" MessengerDatabaseFilename = "messenger.sqlite" ReplicationDatabaseFilename = "replication.sqlite" StorageKeyName = "storage" StorageKeySize = 32 StorageSaltName = "storage_salt" StorageSaltSize = 16 )
Variables ¶
This section is empty.
Functions ¶
func GetAccountAppStorage ¶ added in v2.331.0
func GetAccountDir ¶ added in v2.315.0
func GetAccountMetaForName ¶
func GetAccountsDir ¶ added in v2.315.0
func GetDatastoreDir ¶
func GetDevicePushKeyForPath ¶
func GetDevicePushKeyForPath(filePath string, createIfMissing bool) (pk *[cryptoutil.KeySize]byte, sk *[cryptoutil.KeySize]byte, err error)
func GetGormDBForPath ¶ added in v2.311.2
func GetMessengerDBForPath ¶
func GetOrCreateMasterStorageKey ¶ added in v2.331.0
func GetOrCreateMasterStorageKey(ks NativeKeystore) ([]byte, error)
func GetOrCreateMasterStorageSalt ¶ added in v2.357.2
func GetOrCreateMasterStorageSalt(ks NativeKeystore) ([]byte, error)
func GetOrCreateStorageKeyForAccount ¶ added in v2.331.0
func GetOrCreateStorageKeyForAccount(ks NativeKeystore, accountID string) ([]byte, error)
func GetOrCreateStorageSaltForAccount ¶ added in v2.357.2
func GetOrCreateStorageSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
func GetReplicationDBForPath ¶ added in v2.311.2
func GetRootDatastoreForPath ¶
func ListAccounts ¶
func ListAccounts(ctx context.Context, rootDir string, ks NativeKeystore, logger *zap.Logger) ([]*accounttypes.AccountMetadata, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.