Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateBot ¶
ActivateBot は、botを活動させる。
func Initialize ¶
Initialize は、config.ymlに従ってbotとデータベース接続を初期化する。
Types ¶
type Item ¶
type Item struct {
ID int
Title string
URL string
Content string
Summary string
Songs string
Updated time.Time
}
Item は、itemsテーブルの行データを格納する。
type Notifications ¶
type Notifications []*mastodon.Notification
func (Notifications) Len ¶
func (ns Notifications) Len() int
func (Notifications) Less ¶
func (ns Notifications) Less(i, j int) bool
func (Notifications) Swap ¶
func (ns Notifications) Swap(i, j int)
type Persona ¶
type Persona struct {
Name string
Instance string
Client *mastodon.Client
AccessToken string
MyID mastodon.ID
Title string
Starter string
Assertion string
ItemPool int
MorningComments []string
EveningComments []string
DBID int
WakeHour int
WakeMin int
SleepHour int
SleepMin int
LivesWithSun bool
Latitude float64
Longitude float64
PlaceName string
TimeZone string
RandomFrequency int
Awake time.Duration
// contains filtered or unexported fields
}
Persona は、botの属性を格納する。
type SunInfo ¶
type SunInfo struct {
Results struct {
Rise string `json:"civil_twilight_begin"`
Set string `json:"civil_twilight_end"`
Noon string `json:"solar_noon"`
} `json:"results"`
}
SunInfo は、日の入りと日の出時刻を格納する
type YahooContentsGeoCoderResults ¶
type YahooContentsGeoCoderResults struct {
ResultInfo struct {
Count int `json:"Count"`
} `json:"ResultInfo"`
Feature []struct {
Name string `json:"Name"`
Geometry struct {
Coordinates string `json:"Coordinates"`
} `json:"Geometry"`
Property struct {
Address string `json:"Address"`
} `json:"Property"`
}
}
YahooContentsGeoCoderResults は、YahooコンテンツジオコーダAPIからのデータを格納する
type YahooPlaceInfoResults ¶
type YahooPlaceInfoResults struct {
ResultSet struct {
Result []struct {
Name string `json:"Name"`
Where string `json:"Where"`
Combined string `json:"Combined"`
} `json:"Result"`
} `json:"ResultSet"`
}
YahooPlaceInfoResults は、Yahoo場所情報APIからのデータを格納する
Source Files
¶
Click to show internal directories.
Click to hide internal directories.