- Add LibraryTestData struct to TestDeviceSetup - Implement CreateLibrary() for proper library creation in tests - Implement CreateCollection() for test collection support - Improve test isolation with dedicated library creation This provides a more robust foundation for integration tests that need proper library management support.
34 lines
997 B
Go
34 lines
997 B
Go
package handlers
|
|
|
|
// SearchBookResponse represents a single book in search results
|
|
type SearchBookResponse struct {
|
|
ID string `json:"id"`
|
|
Title string `json:"title"`
|
|
Authors []SearchAuthor `json:"authors"`
|
|
}
|
|
|
|
// SearchAuthor represents an author in search results
|
|
type SearchAuthor struct {
|
|
FirstName string `json:"first_name"`
|
|
LastName string `json:"last_name"`
|
|
}
|
|
|
|
// SearchResponse represents the complete search response
|
|
type SearchResponse struct {
|
|
Results []SearchBookResponse `json:"results"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// SearchMediaItemsResponse represents search response with media items
|
|
type SearchMediaItemsResponse struct {
|
|
Results []MediaItemSummary `json:"results"`
|
|
Total int `json:"total"`
|
|
}
|
|
|
|
// MediaItemSummary represents a single media item in search results
|
|
type MediaItemSummary struct {
|
|
ID string `json:"id"`
|
|
Title string `json:"title"`
|
|
Authors []SearchAuthor `json:"authors"`
|
|
}
|