store

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: GPL-3.0 Imports: 5 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 models.Room, owner_id string)

func (*RoomStore) FindRoomByName

func (rs *RoomStore) FindRoomByName(name string) models.Room

func (*RoomStore) FindRoomByXid

func (rs *RoomStore) FindRoomByXid(xid string) models.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 models.User) models.User

func (*UserStore) FindUserByXid

func (us *UserStore) FindUserByXid(xid string) models.User

func (*UserStore) GetAllUsers

func (us *UserStore) GetAllUsers() []models.User

func (*UserStore) RemoveUser

func (us *UserStore) RemoveUser(client models.User)

Jump to

Keyboard shortcuts

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