users

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID                      string
	Timezone                *string
	VisualNovelReadingSpeed float32
	BookReadingSpeed        float32
	MangaReadingSpeed       float32
	DailyGoal               int
}

func NewUser

func NewUser(id string) *User

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

func NewUserRepository

func NewUserRepository(pool *pgxpool.Pool) *UserRepository

func (*UserRepository) Create

func (r *UserRepository) Create(ctx context.Context, user *User) error

func (*UserRepository) FindByID

func (r *UserRepository) FindByID(ctx context.Context, id string) (*User, error)

func (*UserRepository) FindOrCreate

func (r *UserRepository) FindOrCreate(ctx context.Context, id string) (*User, error)

func (*UserRepository) SetBookReadingSpeed

func (r *UserRepository) SetBookReadingSpeed(ctx context.Context, userID string, speed float32) error

func (*UserRepository) SetDailyGoal

func (r *UserRepository) SetDailyGoal(ctx context.Context, userID string, goal int) error

func (*UserRepository) SetMangaReadingSpeed

func (r *UserRepository) SetMangaReadingSpeed(ctx context.Context, userID string, speed float32) error

func (*UserRepository) SetUserTimezone

func (r *UserRepository) SetUserTimezone(ctx context.Context, userID, timezone string) error

func (*UserRepository) SetVisualNovelReadingSpeed

func (r *UserRepository) SetVisualNovelReadingSpeed(ctx context.Context, userID string, speed float32) error

type UserTimeService

type UserTimeService struct {
	Default string
	// contains filtered or unexported fields
}

func (*UserTimeService) GetTime

func (s *UserTimeService) GetTime(ctx context.Context, userID, guildID string) (time.Time, error)

func (*UserTimeService) GetTimeLocation

func (s *UserTimeService) GetTimeLocation(ctx context.Context, userID, guildID string) (*time.Location, error)

func (*UserTimeService) GetTimezone

func (s *UserTimeService) GetTimezone(ctx context.Context, userID, guildID string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL