Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶ added in v0.0.2
type Manifest struct {
Name string `json:"name"`
ShortName string `json:"short_name"`
StartURL string `json:"start_url"`
Scope string `json:"scope"`
Display string `json:"display"`
BackgroundColor string `json:"background_color"`
ThemeColor string `json:"theme_color"`
Description string `json:"description"`
Icons []struct {
Src string `json:"src"`
Sizes string `json:"sizes"`
Type string `json:"type"`
} `json:"icons"`
Screenshots []struct {
Src string `json:"src"`
Sizes string `json:"sizes"`
Type string `json:"type"`
} `json:"screenshots"`
Shortcuts []struct {
Name string `json:"name"`
URL string `json:"url"`
Icons []struct {
Src string `json:"src"`
} `json:"icons"`
} `json:"shortcuts"`
RelatedApplications []struct {
Platform string `json:"platform"`
URL string `json:"url"`
ID string `json:"id"`
} `json:"related_applications"`
ServiceWorker struct {
Src string `json:"src"`
Scope string `json:"scope"`
} `json:"serviceworker"`
}
Manifest represents a PWA manifest with all common fields.
type MockPWAClient ¶
MockPWAClient is a mock implementation of the PWAClient interface.
func (*MockPWAClient) DownloadAndPackagePWA ¶
func (m *MockPWAClient) DownloadAndPackagePWA(pwaURL, manifestURL string, bar *progressbar.ProgressBar) (*datanode.DataNode, error)
DownloadAndPackagePWA mocks the downloading and packaging of a PWA.
func (*MockPWAClient) FindManifest ¶
func (m *MockPWAClient) FindManifest(pwaURL string) (string, error)
FindManifest mocks the finding of a PWA manifest.
type PWAClient ¶
type PWAClient interface {
FindManifest(pwaURL string) (string, error)
DownloadAndPackagePWA(pwaURL, manifestURL string, bar *progressbar.ProgressBar) (*datanode.DataNode, error)
}
PWAClient is an interface for interacting with PWAs.
func NewMockPWAClient ¶
NewMockPWAClient creates a new MockPWAClient.
Click to show internal directories.
Click to hide internal directories.