Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Festival ¶
type Festival struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Rest string `json:"rest"` Month int `json:"month"` Holidays HolidayList `json:"list"` // contains filtered or unexported fields }
func (*Festival) DecodeHolidayList ¶
func (info *Festival) DecodeHolidayList()
func (*Festival) EncodeHolidayList ¶
func (info *Festival) EncodeHolidayList()
type FestivalList ¶
type FestivalList []*Festival
func NewFestivalList ¶
func NewFestivalList(year, month int) (FestivalList, error)
func (FestivalList) Create ¶
func (list FestivalList) Create(year int) error
func (FestivalList) String ¶
func (list FestivalList) String() string
type Holiday ¶
type Holiday struct { Date string `json:"date"` Status HolidayStatus `json:"status"` }
type HolidayList ¶
type HolidayList []*Holiday
func (HolidayList) Contain ¶
func (list HolidayList) Contain(year, month int) bool
type HolidayStatus ¶
type HolidayStatus int
const ( HolidayStatusLeave HolidayStatus = iota + 1 HolidayStatusWork )
type HuangLi ¶
type HuangLi struct { ID int64 `json:"id"` // format: ("%s%02s%02s", year, month, day) Avoid string `json:"avoid"` Suit string `json:"suit"` }
HuangLi huang li info from baidu
type HuangLiList ¶
type HuangLiList []*HuangLi
HuangLiList huang li info list
func NewHuangLiList ¶
func NewHuangLiList(idList []int64) (HuangLiList, error)
NewHuangLiList query by id list
func (HuangLiList) Create ¶
func (list HuangLiList) Create() error
Create insert to sqlite, if exists, ignore
Click to show internal directories.
Click to hide internal directories.