db

package
v0.0.0-...-2e8f385 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTablesExists

func CheckTablesExists(db *sql.DB) (bool, error)

func CreateDb

func CreateDb(path string) *sql.DB

Types

type Store

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

func NewStore

func NewStore(arg any) *Store

func (*Store) CheckMessagesBetweenUsersExists

func (s *Store) CheckMessagesBetweenUsersExists(sender string) ([]int, error)

func (*Store) CheckPasswordIsCorrect

func (s *Store) CheckPasswordIsCorrect(user *types.User) (bool, error)

func (*Store) GetPassword

func (s *Store) GetPassword(user *types.User) (string, error)

func (*Store) GetUserByUsername

func (s *Store) GetUserByUsername(username string) (*types.User, error)

func (*Store) GetUserId

func (s *Store) GetUserId(username string) (int, error)

func (*Store) GetUserMessagesBy

func (s *Store) GetUserMessagesBy(sender, recipient string) (string, error)

func (*Store) GetUsername

func (s *Store) GetUsername(username string) (bool, error)

func (*Store) GetUsernameById

func (s *Store) GetUsernameById(id int) (string, error)

func (*Store) InsertMessage

func (s *Store) InsertMessage(msg *types.ChatMessage) error

func (*Store) InsertUser

func (s *Store) InsertUser(user *types.User) error

func (*Store) UserExists

func (s *Store) UserExists(username string) (bool, error)

Jump to

Keyboard shortcuts

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