seed: github.com/qlova/seed/manifest Index | Files

package manifest

import "github.com/qlova/seed/manifest"

Index

Package Files

manifest.go

type Icon Uses

type Icon struct {
    Source string `json:"src"`
    Sizes  string `json:"sizes"`
    Type   string `json:"type,omitempty"`
}

Icon is an app-manifest icon.

type Manifest Uses

type Manifest struct {
    Name            string `json:"name"`
    ShortName       string `json:"short_name"`
    StartURL        string `json:"start_url"`
    Display         string `json:"display"`
    BackgroundColor string `json:"background_color"`
    Description     string `json:"description"`
    ThemeColor      string `json:"theme_color"`

    Icons []Icon `json:"icons"`
}

Manifest is a webapp manifest.

func New Uses

func New() Manifest

New returns a new webapp manifest.

func (Manifest) Render Uses

func (manifest Manifest) Render() []byte

Render returns a manifest as json encoded bytes.

func (*Manifest) SetDescription Uses

func (manifest *Manifest) SetDescription(description string)

SetDescription sets the description of the application.

func (*Manifest) SetIcon Uses

func (manifest *Manifest) SetIcon(path string)

SetIcon sets the icon for the application to be the image at the given path.

func (*Manifest) SetName Uses

func (manifest *Manifest) SetName(name string)

SetName sets the name of this application.

func (*Manifest) SetShortName Uses

func (manifest *Manifest) SetShortName(name string)

SetShortName set the short name of the application.

func (*Manifest) SetThemeColor Uses

func (manifest *Manifest) SetThemeColor(c color.Color)

SetThemeColor sets the theme color of the application.

Package manifest imports 7 packages (graph) and is imported by 2 packages. Updated 2020-03-26. Refresh now. Tools for package owners.