Documentation
¶
Index ¶
- Variables
- func CleanupTestDataAuthenticateEmployee(db *pgx.Conn, employeeMail string) error
- func CleanupTestDataBook(db *pgx.Conn) error
- func CleanupTestDataBookBorrow(db *pgx.Conn) error
- func CleanupTestDataCreateBook(db *pgx.Conn, bookID string) error
- func CleanupTestDataCreateEmployee(db *pgx.Conn, employeeMail string) error
- func CleanupTestDataDeleteBook(db *pgx.Conn, bookID string) error
- func CleanupTestDataDeleteEmployee(db *pgx.Conn, employeeID string) error
- func CleanupTestDataGetBook(db *pgx.Conn, bookID string) error
- func CleanupTestDataGetBooks(db *pgx.Conn, books []*entities.Book) error
- func CleanupTestDataStudent(db *pgx.Conn) error
- func CloseDatabase()
- func InitializeDatabase() (*pgx.Conn, error)
- func SetupTestDataAuthenticateEmployee(db *pgx.Conn, email, username, phoneNumber, position, password string) error
- func SetupTestDataBook(db *pgx.Conn, book *entities.Book) error
- func SetupTestDataBookBorrow(db *pgx.Conn, bookBorrow *entities.BorrowedBook) error
- func SetupTestDataCreateBook(db *pgx.Conn, book *entities.Book) error
- func SetupTestDataCreateEmployee(db *pgx.Conn, email string) error
- func SetupTestDataDeleteBook(db *pgx.Conn, bookID string) error
- func SetupTestDataDeleteEmployee(db *pgx.Conn, id string) error
- func SetupTestDataGetBook(db *pgx.Conn, bookID string) error
- func SetupTestDataGetBooks(db *pgx.Conn, books []*entities.Book) error
- func SetupTestDataStudent(db *pgx.Conn, student *entities.Student) error
- func TestMain(m *testing.M)
Constants ¶
This section is empty.
Variables ¶
View Source
var DbConnection *pgx.Conn
View Source
var ExampleBook = &entities.Book{
BookID: "book_id",
Title: "book_title",
Author: "book_Author",
Genre: "book_genre",
PublicationDate: "99.99.9999",
Publisher: "book_publisher",
ISBN: "book_isbn",
PageCount: 20,
ShelfNumber: "book_shelf",
Language: "book_language",
Donor: "book_donor",
}
View Source
var ExampleBorrowedBook = &entities.BorrowedBook{ BorrowID: "borrow_id", StudentID: "student_id", BookID: "book_id", BorrowDate: "borrow_date", DeliveryDate: "delivery_date", IsExtended: false, }
View Source
var ExampleStudent = &entities.Student{ StudentID: "student_id", StudentMail: "student_mail", StudentPassword: "student_password", Debit: 20, BookLimit: 20, IsBanned: false, }
Functions ¶
func CleanupTestDataBook ¶
func CleanupTestDataBook(db *pgx.Conn) error
func CleanupTestDataBookBorrow ¶
func CleanupTestDataBookBorrow(db *pgx.Conn) error
func CleanupTestDataGetBook ¶
func CleanupTestDataGetBooks ¶
func CleanupTestDataStudent ¶
func CleanupTestDataStudent(db *pgx.Conn) error
func CloseDatabase ¶
func CloseDatabase()
func InitializeDatabase ¶
func InitializeDatabase() (*pgx.Conn, error)
func SetupTestDataBook ¶
func SetupTestDataBookBorrow ¶
func SetupTestDataBookBorrow(db *pgx.Conn, bookBorrow *entities.BorrowedBook) error
func SetupTestDataCreateBook ¶
utils
func SetupTestDataDeleteBook ¶
func SetupTestDataGetBook ¶
func SetupTestDataGetBooks ¶
func SetupTestDataStudent ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.