juju: github.com/juju/juju/api/common/charm Index | Files

package charm

import "github.com/juju/juju/api/common/charm"


Package Files


type Origin Uses

type Origin struct {
    // Source is where the charm came from, Local, CharmStore or CharmHub.
    Source OriginSource
    // ID is the CharmHub ID for this charm.
    ID   string
    Hash string
    // Risk is the CharmHub channel risk, or the CharmStore channel value.
    Risk string
    // Revision is the charm revision number.
    Revision *int
    // Track is a CharmHub channel track.
    Track *string

Origin holds the information about where the charm originates.

func APICharmOrigin Uses

func APICharmOrigin(origin params.CharmOrigin) Origin

APICharmOrigin is a helper function to convert params.CharmOrigin to an Origin.

func (Origin) CoreCharmOrigin Uses

func (o Origin) CoreCharmOrigin() corecharm.Origin

CoreCharmOrigin is a help method to get a core version of this structure.

func (Origin) ParamsCharmOrigin Uses

func (o Origin) ParamsCharmOrigin() params.CharmOrigin

ParamsCharmOrigin is a helper method to get a params version of this structure.

type OriginSource Uses

type OriginSource string

OriginSource represents the source of the charm.

const (
    // OriginLocal represents a local charm.
    OriginLocal OriginSource = "local"
    // OriginCharmStore represents a charm from the now old charm-store.
    OriginCharmStore OriginSource = "charm-store"
    // OriginCharmHub represents a charm from the new charm-hub.
    OriginCharmHub OriginSource = "charm-hub"

func (OriginSource) String Uses

func (c OriginSource) String() string

Package charm imports 2 packages (graph) and is imported by 7 packages. Updated 2020-09-30. Refresh now. Tools for package owners.