types

package
v0.0.0-...-b35021f Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Unlicense Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptAdmins

type AcceptAdmins struct {
	UserName string `json:"username"`
	Accepted bool   `json:"accepted"`
}

type AdminBookView

type AdminBookView struct {
	Book         Book                                      `json:"book"`
	Transactions []ClientBookViewTransactionsInterpretable `json:"transactions"`
}

type AdminData

type AdminData struct {
	ConvertRequestClients []string       `json:"convertrequestclients"`
	CheckInApprovals      []Transactions `json:"checkinapprovals"`
	CheckOutApprovals     []Transactions `json:"checkoutapprovals"`
}

type Book

type Book struct {
	B_Id                    int    `json:"b_id"`
	Title                   string `json:"title"`
	Author                  string `json:"author"`
	Genre                   string `json:"genre"`
	DueTime                 int    `json:"duetime"`
	Quantity                int    `json:"quantity"`
	NumberofCopies          int    `json:"numberofcopies"`
	NumberofCopiesAvailable int    `json:"numberofcopiesavailable"`
	NumberofCopiesBorrowed  int    `json:"numberofcopiesborrowed"`
}

type BookTemp

type BookTemp struct {
	Title    string `json:"title"`
	Author   string `json:"author"`
	Genre    string `json:"genre"`
	DueTime  string `json:"duetime"`
	Quantity string `json:"quantity"`
	B_Id     string `json:"bookID"`
}

TODO: Try eliminating this struct

type CheckIn

type CheckIn struct {
	T_Id     int  `json:"t_id"`
	Accepted bool `json:"accepted"`
}

type CheckOut

type CheckOut struct {
	T_Id     int  `json:"t_id"`
	Accepted bool `json:"accepted"`
}

type ClientBookView

type ClientBookView struct {
	Book         Book                                      `json:"book"`
	Transactions []ClientBookViewTransactionsInterpretable `json:"transactions"`
}

type ClientBookViewTransactions

type ClientBookViewTransactions struct {
	Title            string       `json:"title"`
	UserName         string       `json:"username"`
	CheckInAccepted  sql.NullBool `json:"checkinaccepted"`
	CheckOutAccepted sql.NullBool `json:"checkoutaccepted"`
	DateBorrowed     []uint8      `json:"dateborrowed"`
	DateReturned     []uint8      `json:"datereturned"`
	DueTime          int          `json:"duetime"`
	OverdueFine      int          `json:"overduefine"`
	Author           string       `json:"author"`
}

type ClientBookViewTransactionsInterpretable

type ClientBookViewTransactionsInterpretable struct {
	Title            string `json:"title"`
	UserName         string `json:"username"`
	CheckInAccepted  string `json:"checkinaccepted"`
	CheckOutAccepted string `json:"checkoutaccepted"`
	DateBorrowed     string `json:"dateborrowed"`
	DateReturned     string `json:"datereturned"`
	DueTime          string `json:"duetime"`
	OverdueFine      string `json:"overduefine"`
	Author           string `json:"author"`
}

type CookieUser

type CookieUser struct {
	UserName string `json:"username"`
	IsAdmin  bool   `json:"isadmin"`
}

type LibraryData

type LibraryData struct {
	Books                   []string `json:"books"`
	NumberofCopies          int      `json:"numberofcopies"`
	NumberofCopiesAvailable int      `json:"numberofcopiesavailable"`
	NumberofCopiesBorrowed  int      `json:"numberofcopiesborrowed"`
}

type Message

type Message struct {
	Message string `json:"message"`
}

type PageDataAdmin

type PageDataAdmin struct {
	LibraryData LibraryData
	AdminData   AdminData
}

type PageDataClient

type PageDataClient struct {
	LibraryData  LibraryData
	Books        []Book
	Transactions []ClientBookViewTransactionsInterpretable
}

type Transactions

type Transactions struct {
	Title            string       `json:"title"`
	T_Id             int          `json:"t_id"`
	B_Id             int          `json:"b_id"`
	UserName         string       `json:"username"`
	CheckInAccepted  sql.NullBool `json:"checkinaccepted"`
	CheckOutAccepted sql.NullBool `json:"checkoutaccepted"`
	DateBorrowed     []uint8      `json:"dateborrowed"`
	DateReturned     []uint8      `json:"datereturned"`
	DueTime          int          `json:"duetime"`
	OverdueFine      int          `json:"overduefine"`
}

made changes to nullint16

type User

type User struct {
	UserName       string `json:"username"`
	HashedPassword string `json:"hashedpassword"`
	Salt           string `json:"salt"`
	IsAdmin        bool   `json:"isadmin"`
}

type UserLogin

type UserLogin struct {
	UserName string `json:"username"`
	Password string `json:"password"`
	IsAdmin  bool   `json:"isadmin"`
}

type UserRegister

type UserRegister struct {
	UserName       string `json:"username"`
	HashedPassword string `json:"hashedpassword"`
	Salt           string `json:"salt"`
	IsAdmin        bool   `json:"isadmin"`
}

Jump to

Keyboard shortcuts

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