/
provider.go
36 lines (29 loc) · 1.05 KB
/
provider.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 response
import (
"time"
)
// Provider is the response structure with the data for a single provider
// version. This is just the metadata. A full provider response will be
// ProviderDetail.
type Provider struct {
ID string `json:"id"`
//---------------------------------------------------------------
// Metadata about the overall provider.
Owner string `json:"owner"`
Namespace string `json:"namespace"`
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Source string `json:"source"`
PublishedAt time.Time `json:"published_at"`
Downloads int `json:"downloads"`
}
// ProviderDetail represents a Provider with full detail.
type ProviderDetail struct {
Provider
//---------------------------------------------------------------
// The fields below are only set when requesting this specific
// module. They are available to easily know all available versions
// without multiple API calls.
Versions []string `json:"versions"` // All versions
}