Documentation ¶
Index ¶
Constants ¶
View Source
const (
MainConfigLock = "main"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigLock ¶ added in v0.1.16
type ConfigLock struct {
// contains filtered or unexported fields
}
func (*ConfigLock) IsActive ¶ added in v0.1.16
func (l *ConfigLock) IsActive() bool
type Database ¶
type Database interface { LockDatabase GetUserId(ctx context.Context, apiKey string) (string, error) CreateUser(ctx context.Context, emailAddress string) (apiKey string, err error) StoreUserConfig(config *configpb.Config, lock *ConfigLock) error LoadUserConfig(userId string, lock *ConfigLock) (*configpb.Config, error) Close() error }
func NewDatabase ¶
func NewDatabase(awsClient aws_client.AwsClient) (Database, error)
type LocalLockDatabase ¶ added in v0.1.36
type LocalLockDatabase struct {
// contains filtered or unexported fields
}
func (*LocalLockDatabase) LockConfig ¶ added in v0.1.36
func (d *LocalLockDatabase) LockConfig(_ context.Context, userId string) (lock *ConfigLock, err error)
func (*LocalLockDatabase) UnlockConfig ¶ added in v0.1.36
func (d *LocalLockDatabase) UnlockConfig(_ context.Context, lock *ConfigLock) error
type LockDatabase ¶ added in v0.1.36
type LockDatabase interface { LockConfig(ctx context.Context, userId string) (lock *ConfigLock, err error) UnlockConfig(ctx context.Context, lock *ConfigLock) error }
type RemoteLockDatabase ¶ added in v0.1.36
type RemoteLockDatabase struct {
// contains filtered or unexported fields
}
func NewLockDatabase ¶ added in v0.1.36
func NewLockDatabase(dbConnection *sql.DB) (*RemoteLockDatabase, error)
func (*RemoteLockDatabase) LockConfig ¶ added in v0.1.36
func (d *RemoteLockDatabase) LockConfig(ctx context.Context, userId string) (lock *ConfigLock, err error)
func (*RemoteLockDatabase) UnlockConfig ¶ added in v0.1.36
func (d *RemoteLockDatabase) UnlockConfig(ctx context.Context, lock *ConfigLock) error
Click to show internal directories.
Click to hide internal directories.