Initial commit
This commit is contained in:
37
internal/holy/types.go
Normal file
37
internal/holy/types.go
Normal 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: */
|
||||
Reference in New Issue
Block a user