Documentation
¶
Index ¶
- Constants
- type ConfigLock
- type Database
- func (d *Database) Close() error
- func (d *Database) GetUserId(ctx context.Context, apiKey string) (string, error)
- func (d *Database) LoadUserConfig(userId string, lock *ConfigLock) (*configpb.Config, error)
- func (d *Database) LockConfig(ctx context.Context, userId string) (*ConfigLock, error)
- func (d *Database) StoreUserConfig(config *configpb.Config, lock *ConfigLock) error
- func (d *Database) UnlockConfig(_ context.Context, lock *ConfigLock) error
- type LockType
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 struct {
// contains filtered or unexported fields
}
func NewDatabase ¶
func (*Database) LoadUserConfig ¶
func (*Database) LockConfig ¶ added in v0.1.16
func (*Database) StoreUserConfig ¶
func (d *Database) StoreUserConfig(config *configpb.Config, lock *ConfigLock) error
func (*Database) UnlockConfig ¶ added in v0.1.16
func (d *Database) UnlockConfig(_ context.Context, lock *ConfigLock) error
Click to show internal directories.
Click to hide internal directories.