-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs.go
36 lines (31 loc) · 1.02 KB
/
structs.go
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
34
35
36
package apod
import "time"
// APOD is the main struct of our package
type APOD struct {
apiUrl string
}
// NewAPODInput is the input for the NewAPOD function
type NewAPODInput struct {
APIKey string
APODDomain string
}
// ApodQueryInput is the input for an Apod Query
type ApodQueryInput struct {
Date time.Time `json:"date"`
StartDate time.Time `json:"start_date"`
EndDate time.Time `json:"end_date"`
Count int `json:"count"`
Thumbs bool `json:"thumbs"`
}
// ApodQueryOutput is the output from an Apod Query
type ApodQueryOutput struct {
Title string `json:"title,omitempty"`
Explanation string `json:"explanation,omitempty"`
Date string `json:"date,omitempty"`
MediaType string `json:"media_type,omitempty"`
Url string `json:"url,omitempty"`
HdUrl string `json:"hdurl,omitempty"`
ThumbnailUrl string `json:"thumbnail_url,omitempty"`
Copyright string `json:"Copyright,omitempty"`
ServiceVersion string `json:"service_version,omitempty"`
}