Files
tg-holy-bot/internal/holy/types.go

38 lines
1.2 KiB
Go

package holy
type (
// Holy структура, описывающая искомый json-чик с праздниками.
Holy struct {
AtContext string `json:"@context"`
AtType string `json:"@type"`
MainEntity []struct {
AtType string `json:"@type"`
Name string `json:"name"`
AcceptedAnswer struct {
AtType string `json:"@type"`
Text string `json:"text"`
UpVoteCount int `json:"upvoteCount"`
URL string `json:"url,omitempty"`
} `json:"acceptedAnswer"`
SuggestedAnswer []struct {
AtType string `json:"@type"`
Text string `json:"text"`
UpVoteCount int `json:"upvoteCount"`
URL string `json:"url,omitempty"`
} `json:"suggestedAnswer"`
} `json:"mainEntity"`
}
// MyConfig структурка, описывающая конфиг.
MyConfig struct {
Token string `json:"token,omitempty"`
ChannelID int64 `json:"channel_id,omitempty"`
When string `json:"when,omitempty"`
Loglevel string `json:"loglevel,omitempty"`
Log string `json:"log,omitempty"`
UserAgents []string `json:"user_agents,omitempty"`
}
)
/* vim: set ft=go noet ai ts=4 sw=4 sts=4: */