models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Date     time.Time `json:"creationDate"`
	Text     string    `json:"text"`
	Photos   []Moment  `json:"photos"`
	Videos   []Moment  `json:"videos"`
	Location Location  `json:"location"`
	Weather  Weather   `json:"weather"`
}

type HugoContent

type HugoContent struct {
	Posts []Post
	Media []Media
}

type Journal

type Journal struct {
	Entries []Entry `json:"entries"`
}

type JournalPack

type JournalPack struct {
	Journal Journal
	Media   []Media
}

type Location

type Location struct {
	PlaceName string  `json:"placeName"`
	Locality  string  `json:"localityName"`
	Country   string  `json:"country"`
	Lat       float64 `json:"latitude"`
	Long      float64 `json:"longitude"`
}

type Media

type Media struct {
	Filename string
}

type Moment

type Moment struct {
	ID     string `json:"identifier"`
	Type   string `json:"type"`
	MD5    string `json:"md5"`
	Width  int    `json:"width"`
	Height int    `json:"height"`

	Video bool `json:"-"`
}

func (Moment) BaseName

func (m Moment) BaseName() string

func (Moment) CanStripExif

func (m Moment) CanStripExif() bool

type Post

type Post struct {
	Date       time.Time
	Title      string
	BlankTitle string
	Content    string
	Location   Location
	Weather    Weather
	Moments    []Moment
}

type Posts

type Posts []Post

func (Posts) InterestedMoments

func (p Posts) InterestedMoments() map[string]Moment

type Site

type Site struct {
	Dir         string
	PostBaseDir string
}

type Weather

type Weather struct {
	Code string  `json:"weatherCode"`
	Temp float64 `json:"temperatureCelsius"`
}

Jump to

Keyboard shortcuts

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