model

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calender

type Calender struct {
	YearMonth CalenderYearMonth
	Weeks     [][7]CalenderDay
}

func NewCalender added in v0.6.0

func NewCalender(ym CalenderYearMonth, nippoList []Nippo) (*Calender, error)

type CalenderDay

type CalenderDay struct {
	HasContent bool
	Date       NippoDate
}

func (CalenderDay) String added in v0.6.0

func (cday CalenderDay) String() string

type CalenderYearMonth

type CalenderYearMonth struct {
	Year  int
	Month time.Month
	// contains filtered or unexported fields
}

func NewCalenderYearMonth added in v0.10.1

func NewCalenderYearMonth(fileName string) (CalenderYearMonth, error)

func (CalenderYearMonth) FileString added in v0.10.1

func (ym CalenderYearMonth) FileString() string

func (CalenderYearMonth) PathString added in v0.6.0

func (ym CalenderYearMonth) PathString() string

func (CalenderYearMonth) String added in v0.6.0

func (ym CalenderYearMonth) String() string

func (CalenderYearMonth) Time added in v0.10.1

func (ym CalenderYearMonth) Time() time.Time

func (CalenderYearMonth) TitleString added in v0.6.0

func (ym CalenderYearMonth) TitleString() string

type Index

type Index struct {
	Nippo
}

type Nippo

type Nippo struct {
	Date       NippoDate
	FilePath   string
	Content    []byte
	RemoteFile *drive.File
}

func NewNippo

func NewNippo(filePath string) (*Nippo, error)

func (*Nippo) GetHtml

func (n *Nippo) GetHtml() ([]byte, error)

func (*Nippo) GetMarkdown

func (n *Nippo) GetMarkdown() ([]byte, error)

type NippoDate

type NippoDate interface {
	PathString() string
	FileString() string
	TitleString() string

	Year() int
	Month() time.Month
	Day() int
	Weekday() time.Weekday
}

func NewNippoDate

func NewNippoDate(filePath string) NippoDate

Jump to

Keyboard shortcuts

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