Documentation ¶
Index ¶
- Constants
- Variables
- func AddBook(jar *cookiejar.Jar) error
- func AddUser(jar *cookiejar.Jar) error
- func BorrowBook(jar *cookiejar.Jar) error
- func ExtendDeadline(jar *cookiejar.Jar) error
- func FindBooks(jar *cookiejar.Jar) error
- func Login(jar *cookiejar.Jar) error
- func Logout(jar *cookiejar.Jar) error
- func Me(jar *cookiejar.Jar) error
- func RemoveBook(jar *cookiejar.Jar) error
- func RemoveUser(jar *cookiejar.Jar) error
- func ReturnBook(jar *cookiejar.Jar) error
- func ShowBook() error
- func ShowBookList(jar *cookiejar.Jar) error
- func ShowBooks() error
- func ShowBorrowed(jar *cookiejar.Jar) error
- func ShowHelp() error
- func ShowHistory(jar *cookiejar.Jar) error
- func ShowOverdueList(jar *cookiejar.Jar) error
- func ShowUser(jar *cookiejar.Jar) error
- func ShowUsers(jar *cookiejar.Jar) error
- func Status(jar *cookiejar.Jar) error
- func UpdateBook(jar *cookiejar.Jar) error
- func UpdateUser(jar *cookiejar.Jar) error
Constants ¶
const (
// URL is where the CLI makes http requests to
URL = "http://localhost:7274"
)
Variables ¶
var ErrInvalidInput = errors.New("cli: invalid input")
ErrInvalidInput occurs when the user's input is invalid
var ErrInvalidResponse = errors.New("cli: failed to parse the http response")
ErrInvalidResponse occurs when the http response is invalid
var ErrReadResponseFailed = errors.New("cli: failed to read the http response")
ErrReadResponseFailed occurs when failed to read the http response
var ErrRequestFailed = errors.New("cli: failed to make an http request, did you start realmsd?")
ErrRequestFailed occurs when failed to make an http request
Functions ¶
func BorrowBook ¶
BorrowBook borrows a book from the library
func ExtendDeadline ¶
ExtendDeadline extends the deadline to return a book
func RemoveBook ¶
RemoveBook removes a book from the library
func RemoveUser ¶
RemoveUser removes a user from the database
func ReturnBook ¶
ReturnBook returns a book to the library
func ShowBookList ¶
ShowBookList shows all books that the user has borrowed
func ShowBorrowed ¶
ShowBorrowed shows a book that the user has borrowed
func ShowHistory ¶
ShowHistory shows all records of the user
func ShowOverdueList ¶
ShowOverdueList shows all overdue books that the user has borrowed
Types ¶
This section is empty.