Initial commit

This commit is contained in:
eleksir
2026-03-14 22:51:43 +03:00
commit 0a73bca056
105 changed files with 24685 additions and 0 deletions

37
internal/holy/types.go Normal file
View File

@@ -0,0 +1,37 @@
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: */