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"`
    Revision int    `json:"revision"`

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"`

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 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"`
    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"`

Package charmhub imports 6 packages (graph) and is imported by 3 packages. Updated 2020-07-19. Refresh now. Tools for package owners.