summaryrefslogtreecommitdiffstats
path: root/internal/models/usrsx.go
blob: f9264be09370cc75f390942f87da2d577b419289 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package models

type USRSXParams struct {
	Username string   `json:"username"`
	Sites    []string `json:"sites,omitempty"`
	Fuzzy    bool     `json:"fuzzy,omitempty"`
	MaxTasks int      `json:"max_tasks,omitempty"`
}

type USRSXResponse struct {
	Username string       `json:"username"`
	Results  []SiteResult `json:"results"`
	Credits  struct {
		Remaining int  `json:"remaining"`
		Unlimited bool `json:"unlimited"`
	} `json:"credits"`
	Message string `json:"message,omitempty"`
	Error   string `json:"error,omitempty"`
}

type SiteResult struct {
	SiteName     string                 `json:"site_name"`
	Username     string                 `json:"username"`
	URL          string                 `json:"url"`
	Status       string                 `json:"status"`
	ResponseCode int                    `json:"response_code"`
	Category     string                 `json:"category,omitempty"`
	Timestamp    string                 `json:"timestamp,omitempty"`
	Type         string                 `json:"type,omitempty"`
	Elapsed      float64                `json:"elapsed,omitempty"`
	Error        string                 `json:"error,omitempty"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
}