Documentation ¶
Index ¶
- type Profile
- type ProfileRepo
- func (ur *ProfileRepo) CreateTable(ctx context.Context) (err error)
- func (ur *ProfileRepo) Delete(ctx context.Context, userID uint64) (err error)
- func (ur *ProfileRepo) Get(ctx context.Context, userID uint64) (u *Profile, err error)
- func (ur *ProfileRepo) Insert(ctx context.Context, u *Profile) (err error)
- func (ur *ProfileRepo) Upsert(ctx context.Context, u *Profile) (err error)
- type Subscription
- type SubscriptionRepo
- func (ur *SubscriptionRepo) CreateTable(ctx context.Context) (err error)
- func (ur *SubscriptionRepo) Delete(ctx context.Context, userID uint64, topic string) (err error)
- func (ur *SubscriptionRepo) DeleteByUserID(ctx context.Context, userID uint64) (err error)
- func (ur *SubscriptionRepo) Get(ctx context.Context, userID uint64, topic string) (u *Subscription, err error)
- func (ur *SubscriptionRepo) GetByUserID(ctx context.Context, userID uint64) (ss []*Subscription, err error)
- func (ur *SubscriptionRepo) Insert(ctx context.Context, u *Subscription) (err error)
- func (ur *SubscriptionRepo) Upsert(ctx context.Context, u *Subscription) (err error)
- type TelegramProfile
- type TelegramProfileRepo
- func (ur *TelegramProfileRepo) CreateTable(ctx context.Context) (err error)
- func (ur *TelegramProfileRepo) Delete(ctx context.Context, userID uint64) (err error)
- func (ur *TelegramProfileRepo) Get(ctx context.Context, userID uint64) (u *TelegramProfile, err error)
- func (ur *TelegramProfileRepo) Insert(ctx context.Context, u *TelegramProfile) (err error)
- func (ur *TelegramProfileRepo) Upsert(ctx context.Context, u *TelegramProfile) (err error)
- type User
- type UserRepo
- func (ur *UserRepo) CreateTable(ctx context.Context) (err error)
- func (ur *UserRepo) Delete(ctx context.Context, userID uint64) (err error)
- func (ur *UserRepo) Get(ctx context.Context, userID uint64) (u *User, err error)
- func (ur *UserRepo) Insert(ctx context.Context, u *User) (err error)
- func (ur *UserRepo) Upsert(ctx context.Context, u *User) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProfileRepo ¶
type ProfileRepo struct {
DB ydb.Connection
}
func (*ProfileRepo) CreateTable ¶
func (ur *ProfileRepo) CreateTable(ctx context.Context) (err error)
func (*ProfileRepo) Delete ¶
func (ur *ProfileRepo) Delete(ctx context.Context, userID uint64) (err error)
type Subscription ¶
type Subscription struct { UserID uint64 `ydb:"user_id,primary"` Topic string `ydb:"topic,primary"` Active bool `ydb:"active"` CreatedAt time.Time `ydb:"created_at"` LastAction time.Time `ydb:"last_action"` }
func (*Subscription) BeforeInsert ¶
func (u *Subscription) BeforeInsert()
func (*Subscription) BeforeUpdate ¶
func (u *Subscription) BeforeUpdate()
type SubscriptionRepo ¶
type SubscriptionRepo struct {
DB ydb.Connection
}
func (*SubscriptionRepo) CreateTable ¶
func (ur *SubscriptionRepo) CreateTable(ctx context.Context) (err error)
func (*SubscriptionRepo) DeleteByUserID ¶
func (ur *SubscriptionRepo) DeleteByUserID(ctx context.Context, userID uint64) (err error)
func (*SubscriptionRepo) Get ¶
func (ur *SubscriptionRepo) Get(ctx context.Context, userID uint64, topic string) (u *Subscription, err error)
func (*SubscriptionRepo) GetByUserID ¶
func (ur *SubscriptionRepo) GetByUserID(ctx context.Context, userID uint64) (ss []*Subscription, err error)
func (*SubscriptionRepo) Insert ¶
func (ur *SubscriptionRepo) Insert(ctx context.Context, u *Subscription) (err error)
func (*SubscriptionRepo) Upsert ¶
func (ur *SubscriptionRepo) Upsert(ctx context.Context, u *Subscription) (err error)
type TelegramProfile ¶
type TelegramProfileRepo ¶
type TelegramProfileRepo struct {
DB ydb.Connection
}
func (*TelegramProfileRepo) CreateTable ¶
func (ur *TelegramProfileRepo) CreateTable(ctx context.Context) (err error)
func (*TelegramProfileRepo) Delete ¶
func (ur *TelegramProfileRepo) Delete(ctx context.Context, userID uint64) (err error)
func (*TelegramProfileRepo) Get ¶
func (ur *TelegramProfileRepo) Get(ctx context.Context, userID uint64) (u *TelegramProfile, err error)
func (*TelegramProfileRepo) Insert ¶
func (ur *TelegramProfileRepo) Insert(ctx context.Context, u *TelegramProfile) (err error)
func (*TelegramProfileRepo) Upsert ¶
func (ur *TelegramProfileRepo) Upsert(ctx context.Context, u *TelegramProfile) (err error)
type User ¶
type User struct { UserID uint64 `ydb:"user_id,primary"` Role uint8 `ydb:"role"` State string `ydb:"state"` Context string `ydb:"context"` CreatedAt time.Time `ydb:"created_at"` LastAction time.Time `ydb:"last_action"` Version uint32 `ydb:"version"` }
func (*User) BeforeInsert ¶
func (u *User) BeforeInsert()
func (*User) BeforeUpdate ¶
func (u *User) BeforeUpdate()
Click to show internal directories.
Click to hide internal directories.