wgen

package
v0.1.4-alpha-deployment1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForecastData

type ForecastData struct {
	Location string
	Forecast []ForecastRow
}

type ForecastRow

type ForecastRow struct {
	IconCode    string
	Temperature float64
	Humidity    int
	Clouds      int
	Max         float64
	Min         float64
	Time        time.Time
}

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator is a weather picture generator

func NewGenerator

func NewGenerator(fontPath, iconsPath, bindings string) (*Generator, error)

func (*Generator) Generate

func (g *Generator) Generate(data *ForecastData) (*bytes.Buffer, error)

Generate creates a weather forecast picture TODO: Hardcoded generator isn't good. Need to create a template engine. It will also allow users to modify the template

func (*Generator) GenerateDaily

func (g *Generator) GenerateDaily(data *ForecastData) (*bytes.Buffer, error)

type UnicodeBindings

type UnicodeBindings struct {
	// contains filtered or unexported fields
}

func LoadBindings

func LoadBindings(path string) (*UnicodeBindings, error)

func (*UnicodeBindings) Get

func (b *UnicodeBindings) Get(s string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL