juju: github.com/juju/juju/api/charmhub Index | Files

package charmhub

import "github.com/juju/juju/api/charmhub"


Package Files

client.go data.go

type Bundle Uses

type Bundle struct {
    Charms []BundleCharm `json:"charms,omitempty"`

type BundleCharm Uses

type BundleCharm struct {
    Name      string `json:"name"`
    PackageID string `json:"package-id"`

type Channel Uses

type Channel struct {
    ReleasedAt string     `json:"released-at"`
    Track      string     `json:"track"`
    Risk       string     `json:"risk"`
    Revision   int        `json:"revision"`
    Size       int        `json:"size"`
    Version    string     `json:"version"`
    Platforms  []Platform `json:"platforms"`
    Resources  []Resource `json:"resources"`

type Charm Uses

type Charm struct {
    Config      *charm.Config                `json:"config,omitempty"`
    Relations   map[string]map[string]string `json:"relations,omitempty"`
    Subordinate bool                         `json:"subordinate,omitempty"`
    UsedBy      []string                     `json:"used-by,omitempty"` // bundles which use the charm

Charm matches a params.CharmHubCharm

type Client Uses

type Client struct {
    // contains filtered or unexported fields

Client allows access to the CharmHub API end point.

func NewClient Uses

func NewClient(callCloser base.APICallCloser) *Client

NewClient creates a new client for accessing the CharmHub API.

func (*Client) Find Uses

func (c *Client) Find(query string) ([]FindResponse, error)

Find queries the CharmHub API finding potential charms or bundles for the given query.

func (*Client) Info Uses

func (c *Client) Info(name, channel string) (InfoResponse, error)

Info queries the CharmHub API for information for a given name.

type FindResponse Uses

type FindResponse struct {
    Type      string   `json:"type"`
    ID        string   `json:"id"`
    Name      string   `json:"name"`
    Publisher string   `json:"publisher"`
    Summary   string   `json:"summary"`
    Version   string   `json:"version"`
    Arches    []string `json:"architectures,omitempty"`
    OS        []string `json:"os,omitempty"`
    Series    []string `json:"series,omitempty"`
    StoreURL  string   `json:"store-url"`

type InfoResponse Uses

type InfoResponse struct {
    Type        string             `json:"type"`
    ID          string             `json:"id"`
    Name        string             `json:"name"`
    Description string             `json:"description"`
    Publisher   string             `json:"publisher"`
    Summary     string             `json:"summary"`
    Series      []string           `json:"series,omitempty"`
    StoreURL    string             `json:"store-url"`
    Tags        []string           `json:"tags,omitempty"`
    Charm       *Charm             `json:"charm,omitempty"`
    Bundle      *Bundle            `json:"bundle,omitempty"`
    Channels    map[string]Channel `json:"channel-map"`
    Tracks      []string           `json:"tracks"`

type Platform Uses

type Platform struct {
    Architecture string `json:"architecture"`
    OS           string `json:"os"`
    Series       string `json:"series"`

type Resource Uses

type Resource struct {
    Name     string `json:"name"`
    Revision int    `json:"revision"`
    Type     string `json:"type"`
    Size     int    `json:"size"`
    URL      string `json:"url"`

Package charmhub imports 6 packages (graph) and is imported by 4 packages. Updated 2021-01-09. Refresh now. Tools for package owners.