Documentation ¶
Index ¶
- Constants
- func CreateDataDir(dir string) error
- 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 GetDevicePushKeyForPath(filePath string, createIfMissing bool) (pk *[cryptoutil.KeySize]byte, sk *[cryptoutil.KeySize]byte, err error)
- func GetDirectoryServiceDBForPath(dir string, logger *zap.Logger) (*gorm.DB, func(), error)
- func GetGlobalAppStorage(rootDir string, ks NativeKeystore) (datastore.Batching, func() error, error)
- func GetGormDBForPath(dbPath string, key []byte, salt []byte, logger *zap.Logger) (*gorm.DB, func(), error)
- func GetMessengerDBForPath(dir string, key []byte, salt []byte, logger *zap.Logger) (*gorm.DB, func(), error)
- func GetOrCreateAppStorageSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
- func GetOrCreateGlobalAppStorageSalt(ks NativeKeystore) ([]byte, error)
- func GetOrCreateGlobalSalt(ks NativeKeystore, name string) ([]byte, error)
- func GetOrCreateIPFSDatastoreSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
- func GetOrCreateMasterStorageKey(ks NativeKeystore) ([]byte, error)
- func GetOrCreateMessengerDBSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
- func GetOrCreateRootDatastoreSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
- func GetOrCreateSaltForAccount(ks NativeKeystore, accountID string, name string) ([]byte, error)
- func GetOrCreateStorageKeyForAccount(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 MemNativeKeystore
- type NativeKeystore
Constants ¶
View Source
const ( InMemoryDir = ":memory:" DefaultPushKeyFilename = "push.key" AccountMetafileName = "account_meta" AccountNetConfFileName = "account_net_conf" MessengerDatabaseFilename = "messenger.sqlite" ReplicationDatabaseFilename = "replication.sqlite" DirectoryServiceDatabaseFilename = "directoryservice.sqlite" StorageKeyName = "storage" StorageKeySize = 32 StorageSaltSize = 16 )
Variables ¶
This section is empty.
Functions ¶
func GetAccountAppStorage ¶ added in v2.331.0
func GetAccountMetaForName ¶
func GetDevicePushKeyForPath ¶
func GetDevicePushKeyForPath(filePath string, createIfMissing bool) (pk *[cryptoutil.KeySize]byte, sk *[cryptoutil.KeySize]byte, err error)
func GetDirectoryServiceDBForPath ¶ added in v2.452.0
func GetGlobalAppStorage ¶ added in v2.431.0
func GetGlobalAppStorage(rootDir string, ks NativeKeystore) (datastore.Batching, func() error, error)
func GetGormDBForPath ¶ added in v2.311.2
func GetMessengerDBForPath ¶
func GetOrCreateAppStorageSaltForAccount ¶ added in v2.431.0
func GetOrCreateAppStorageSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
func GetOrCreateGlobalAppStorageSalt ¶ added in v2.431.0
func GetOrCreateGlobalAppStorageSalt(ks NativeKeystore) ([]byte, error)
func GetOrCreateGlobalSalt ¶ added in v2.431.0
func GetOrCreateGlobalSalt(ks NativeKeystore, name string) ([]byte, error)
func GetOrCreateIPFSDatastoreSaltForAccount ¶ added in v2.431.0
func GetOrCreateIPFSDatastoreSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
func GetOrCreateMasterStorageKey ¶ added in v2.331.0
func GetOrCreateMasterStorageKey(ks NativeKeystore) ([]byte, error)
func GetOrCreateMessengerDBSaltForAccount ¶ added in v2.431.0
func GetOrCreateMessengerDBSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
func GetOrCreateRootDatastoreSaltForAccount ¶ added in v2.431.0
func GetOrCreateRootDatastoreSaltForAccount(ks NativeKeystore, accountID string) ([]byte, error)
func GetOrCreateSaltForAccount ¶ added in v2.431.0
func GetOrCreateSaltForAccount(ks NativeKeystore, accountID string, name string) ([]byte, error)
func GetOrCreateStorageKeyForAccount ¶ added in v2.331.0
func GetOrCreateStorageKeyForAccount(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 ¶
type MemNativeKeystore ¶ added in v2.431.0
type MemNativeKeystore struct {
// contains filtered or unexported fields
}
func (*MemNativeKeystore) Get ¶ added in v2.431.0
func (ks *MemNativeKeystore) Get(key string) ([]byte, error)
func (*MemNativeKeystore) Put ¶ added in v2.431.0
func (ks *MemNativeKeystore) Put(key string, value []byte) error
Click to show internal directories.
Click to hide internal directories.