storage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyExists = errors.New("already exists")
	ErrNotFound      = errors.New("not found")
)

Functions

This section is empty.

Types

type Storage

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

func New

func New(db *sql.DB) (*Storage, error)

func (*Storage) GetUserById

func (s *Storage) GetUserById(ctx context.Context, userId string) (*User, error)

func (*Storage) UpdateUser added in v0.0.4

func (s *Storage) UpdateUser(ctx context.Context, user *User) (*User, error)

func (*Storage) UpsertUser

func (s *Storage) UpsertUser(ctx context.Context, user *User) error

type User

type User struct {
	UserId    string
	Nickname  string
	Color     api.PlayerColor
	CreatedAt time.Time
}

Jump to

Keyboard shortcuts

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