now passes linting
This commit is contained in:
@@ -4,6 +4,9 @@ import "time"
|
||||
|
||||
// thank fuck for https://mholt.github.io/json-to-go/ otherwise
|
||||
// this would have been a giant pain in the dick
|
||||
|
||||
// MastodonIndexResponse is the json api shape from the mastodon instance
|
||||
// indexer
|
||||
type MastodonIndexResponse struct {
|
||||
Instances []struct {
|
||||
ID string `json:"_id"`
|
||||
@@ -48,6 +51,8 @@ type MastodonIndexResponse struct {
|
||||
} `json:"instances"`
|
||||
}
|
||||
|
||||
// PleromaIndexResponse is the json api shape from the pleroma instance
|
||||
// indexer
|
||||
type PleromaIndexResponse []struct {
|
||||
Domain string `json:"domain"`
|
||||
Title string `json:"title"`
|
||||
@@ -62,6 +67,7 @@ type PleromaIndexResponse []struct {
|
||||
TextLimit int `json:"text_limit"`
|
||||
}
|
||||
|
||||
// NodeInfoVersionTwoSchema is the json format of nodeinfo 2.0
|
||||
type NodeInfoVersionTwoSchema struct {
|
||||
Version string `json:"version"`
|
||||
Software struct {
|
||||
@@ -80,6 +86,7 @@ type NodeInfoVersionTwoSchema struct {
|
||||
OpenRegistrations bool `json:"openRegistrations"`
|
||||
}
|
||||
|
||||
// NodeInfoWellKnownResponse is the json format of the nodeinfo schema
|
||||
type NodeInfoWellKnownResponse struct {
|
||||
Links []struct {
|
||||
Rel string `json:"rel"`
|
||||
@@ -87,6 +94,10 @@ type NodeInfoWellKnownResponse struct {
|
||||
} `json:"links"`
|
||||
}
|
||||
|
||||
// APISerializedToot is a partial shape of the json serialized form of a
|
||||
// toot from the mastodon api (also used by pleroma). We save the original
|
||||
// json from the server though so this is just a minimal subset that we need
|
||||
// to deserialize for purposes of this indexer app.
|
||||
type APISerializedToot struct {
|
||||
Account struct {
|
||||
Acct string `json:"acct"`
|
||||
|
||||
Reference in New Issue
Block a user