// Code generated by ndpgen. DO NOT EDIT. // // This file contains mock implementations for non-WASM builds. // These mocks allow IDE support, compilation, and unit testing on non-WASM platforms. // Plugin authors can use the exported mock instances to set expectations in tests. // //go:build !wasip1 package host import "github.com/stretchr/testify/mock" // Library represents the Library data structure. // Library represents a music library with metadata. type Library struct { ID int32 `json:"id"` Name string `json:"name"` Path string `json:"path"` MountPoint string `json:"mountPoint"` LastScanAt int64 `json:"lastScanAt"` TotalSongs int32 `json:"totalSongs"` TotalAlbums int32 `json:"totalAlbums"` TotalArtists int32 `json:"totalArtists"` TotalSize int64 `json:"totalSize"` TotalDuration float64 `json:"totalDuration"` } // mockLibraryService is the mock implementation for testing. type mockLibraryService struct { mock.Mock } // LibraryMock is the auto-instantiated mock instance for testing. // Use this to set expectations: host.LibraryMock.On("MethodName", args...).Return(values...) var LibraryMock = &mockLibraryService{} // GetLibrary is the mock method for LibraryGetLibrary. func (m *mockLibraryService) GetLibrary(id int32) (*Library, error) { args := m.Called(id) return args.Get(0).(*Library), args.Error(1) } // LibraryGetLibrary delegates to the mock instance. // GetLibrary retrieves metadata for a specific library by ID. // // Parameters: // - id: The library's unique identifier // // Returns the library metadata, or an error if the library is not found. func LibraryGetLibrary(id int32) (*Library, error) { return LibraryMock.GetLibrary(id) } // GetAllLibraries is the mock method for LibraryGetAllLibraries. func (m *mockLibraryService) GetAllLibraries() ([]Library, error) { args := m.Called() return args.Get(0).([]Library), args.Error(1) } // LibraryGetAllLibraries delegates to the mock instance. // GetAllLibraries retrieves metadata for all configured libraries. // // Returns a slice of all libraries with their metadata. func LibraryGetAllLibraries() ([]Library, error) { return LibraryMock.GetAllLibraries() }