store

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Room

type Room struct {
	ID          int    `json:"id,omitempty"`
	Xid         string `json:"xid"`
	Private     bool   `json:"private"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Owner_ID    string `json:"owner_id"`
}

func (*Room) GetDescription

func (room *Room) GetDescription() string

func (*Room) GetId

func (room *Room) GetId() int

func (*Room) GetName

func (room *Room) GetName() string

func (*Room) GetOwnerId

func (room *Room) GetOwnerId() string

func (*Room) GetPrivate

func (room *Room) GetPrivate() bool

func (*Room) GetXid

func (room *Room) GetXid() string

type RoomStore

type RoomStore struct {
	DB *pgxpool.Pool
}

func (*RoomStore) AddRoom

func (rs *RoomStore) AddRoom(room room, owner_id string) error

func (*RoomStore) FindRoomByName

func (rs *RoomStore) FindRoomByName(name string) room

func (*RoomStore) FindRoomByXid

func (rs *RoomStore) FindRoomByXid(xid string) room

type User

type User struct {
	Id       int    `json:"id"`
	Xid      string `json:"xid"`
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

func (*User) GetEmail

func (user *User) GetEmail() string

func (*User) GetId

func (user *User) GetId() int

func (*User) GetName

func (user *User) GetName() string

func (*User) GetPassword

func (user *User) GetPassword() string

func (*User) GetXid

func (user *User) GetXid() string

type UserStore

type UserStore struct {
	DB *pgxpool.Pool
}

func (*UserStore) AddUser

func (us *UserStore) AddUser(client user) (*User, error)

func (*UserStore) FindUserByXid

func (us *UserStore) FindUserByXid(xid string) (*User, error)

func (*UserStore) GetAllUsers

func (us *UserStore) GetAllUsers() ([]User, error)

func (*UserStore) RemoveUser

func (us *UserStore) RemoveUser(client user) error

Jump to

Keyboard shortcuts

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