Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶ added in v0.3.0
type Artifact struct { Name string `json:"name"` URL string `json:"url"` Releases []*Release `json:"releases"` Channels []string `json:"channels"` Tracks []string `json:"tracks"` }
Artifact holds information about an artifact in a Canonical store (e.g. a snap or charm).
func NewArtifact ¶ added in v0.3.0
func NewArtifact(name string, details *ArtifactDetails) *Artifact
NewArtifact returns a representation of an artifact with its releases/tracks/channels populated.
type ArtifactDetails ¶ added in v0.4.0
type ArtifactDetails struct { StoreURL string Tracks []gjson.Result Channels []gjson.Result ReleaseTimes []gjson.Result Revisions []gjson.Result Bases []gjson.Result }
ArtifactDetails is used for storing the raw info fetched about an artifact from the store.
func FetchCharmDetails ¶ added in v0.3.0
func FetchCharmDetails(ctx context.Context, name string) (*ArtifactDetails, error)
FetchCharmDetails fetches the Json representing charm information by querying the Charmhub API.
func FetchSnapDetails ¶ added in v0.3.0
func FetchSnapDetails(ctx context.Context, name string) (*ArtifactDetails, error)
FetchSnapDetails fetches the Json representing charm information by querying the Snapcraft API.
Click to show internal directories.
Click to hide internal directories.