dao

package
v0.0.0-...-e5a96dd Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ALLKEY = "ALL_KEYS"
)

Variables

This section is empty.

Functions

func LoadStoredKeys

func LoadStoredKeys(keyDetails string) *[]string

Fetch all the stored keys ...

Types

type CurrentDate

type CurrentDate struct {
	Month         string
	Day           int
	Year          int
	FormattedDate string
}

func (*CurrentDate) GetCurrentDate

func (cd *CurrentDate) GetCurrentDate() string

Get the current date ...

func (*CurrentDate) SetDate

func (cd *CurrentDate) SetDate()

Set the current date ...

func (*CurrentDate) SetGivenDate

func (cd *CurrentDate) SetGivenDate(fmtDt string)

Set the given date as current date ...

type Diary

type Diary struct {
	Title   string
	Date    string
	Content string
}

func (*Diary) ConvertDiaryToString

func (d *Diary) ConvertDiaryToString() string

Convert diary struct to JSON string ...

type DiaryList

type DiaryList struct {
	List    []*Diary
	Allkeys []string
	Prefs   fyne.Preferences
}

func (*DiaryList) GetSpecificDateContent

func (dl *DiaryList) GetSpecificDateContent(dt string) *Diary

Fetch the content for a given date ...

func (*DiaryList) LoadDiary

func (dl *DiaryList) LoadDiary(selectedMonth string)

Load the diary contents ...

func (*DiaryList) LoadSelectedKeys

func (dl *DiaryList) LoadSelectedKeys(givenMonth string) []string

Fetch the stored keys for selected month ...

func (*DiaryList) SaveDiary

func (dl *DiaryList) SaveDiary(d *Diary)

Save the diary contents (title, content) in app preferences ...

func (*DiaryList) SeedDiary

func (dl *DiaryList) SeedDiary()

Seed the test data ...

type UI

type UI struct {
	Content     *widget.Entry
	Title       *widget.Entry
	DropDown    *widget.Select
	ThemeButton *widget.Button
	BarLayout   *widget.SplitContainer
	DateLabel   *widget.Label
	BtnList     *widget.Box
	AppDate     *CurrentDate
	Current     *Diary
	DiaryList   *DiaryList
}

Jump to

Keyboard shortcuts

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