Versions in this module Expand all Collapse all v7 v7.0.3 Mar 12, 2021 Changes in this version + type Format int + const FormatUnknown + const FormatV1 + const FormatV2 v7.0.2 Mar 2, 2021 Changes in this version + var ErrUnresolvedUrl error = fmt.Errorf("charm or bundle url series is not resolved") + func GetActionNameRule() *regexp.Regexp + func IsBuiltinMetric(key string) bool + func IsCharmDir(path string) bool + func IsMissingSeriesError(err error) bool + func IsUnsupportedSeriesError(err error) bool + func IsValidLocalCharmOrBundlePath(path string) bool + func IsValidName(name string) bool + func IsValidOfferURL(urlStr string) bool + func IsValidSeries(series string) bool + func MakeURL(user, model, application, controller string) string + func NewUnsupportedSeriesError(requestedSeries string, supportedSeries []string) error + func Quote(unsafe string) string + func ReadVersion(r io.Reader) (string, error) + func SeriesForCharm(requestedSeries string, supportedSeries []string) (string, error) + func UsesGit(charmPath string, ctx context.Context, cancelFunc func()) bool + func ValidateName(name string) error + func ValidateSchema(schema string) error + func ValidateSeries(series string) error + func VerifyNoOverlayFieldsPresent(bd *BundleData) error + type ActionSpec struct + Description string + Params map[string]interface{} + func (spec *ActionSpec) InsertDefaults(target map[string]interface{}) (map[string]interface{}, error) + func (spec *ActionSpec) ValidateParams(params map[string]interface{}) error + type Actions struct + ActionSpecs map[string]ActionSpec + func NewActions() *Actions + func ReadActionsYaml(r io.Reader) (*Actions, error) + type ApplicationSpec struct + Annotations map[string]string + Channel string + Charm string + Constraints string + Devices map[string]string + EndpointBindings map[string]string + Expose bool + NumUnits int + Offers map[string]*OfferSpec + Options map[string]interface{} + Placement_ string + Plan string + RequiresTrust bool + Resources map[string]interface{} + Scale_ int + Series string + Storage map[string]string + To []string + type Bundle interface + ContainsOverlays func() bool + Data func() *BundleData + ReadMe func() string + func ReadBundle(path string) (Bundle, error) + type BundleArchive struct + Path string + func ReadBundleArchive(path string) (*BundleArchive, error) + func ReadBundleArchiveBytes(data []byte) (*BundleArchive, error) + func ReadBundleArchiveFromReader(r io.ReaderAt, size int64) (*BundleArchive, error) + func (a *BundleArchive) ContainsOverlays() bool + func (a *BundleArchive) Data() *BundleData + func (a *BundleArchive) ExpandTo(dir string) error + func (a *BundleArchive) ReadMe() string + type BundleData struct + Applications map[string]*ApplicationSpec + Description string + Machines map[string]*MachineSpec + Relations [][]string + Saas map[string]*SaasSpec + Series string + Tags []string + Type string + func ExtractBaseAndOverlayParts(bd *BundleData) (base, overlay *BundleData, err error) + func ReadAndMergeBundleData(sources ...BundleDataSource) (*BundleData, error) + func ReadBundleData(r io.Reader) (*BundleData, error) + func (bd *BundleData) RequiredCharms() []string + func (bd *BundleData) SetBSON(raw bson.Raw) error + func (bd *BundleData) UnmarshalJSON(b []byte) error + func (bd *BundleData) UnmarshalYAML(f func(interface{}) error) error + func (bd *BundleData) Verify(verifyConstraints func(c string) error, verifyStorage func(s string) error, ...) error + func (bd *BundleData) VerifyLocal(bundleDir string, verifyConstraints func(c string) error, ...) error + func (bd *BundleData) VerifyWithCharms(verifyConstraints func(c string) error, verifyStorage func(s string) error, ...) error + func (d *BundleData) UnmarshaledWithServices() bool + type BundleDataPart struct + Data *BundleData + PresenceMap FieldPresenceMap + type BundleDataSource interface + BasePath func() string + Parts func() []*BundleDataPart + ResolveInclude func(path string) ([]byte, error) + func LocalBundleDataSource(path string) (BundleDataSource, error) + func StreamBundleDataSource(r io.Reader, basePath string) (BundleDataSource, error) + type BundleDir struct + Path string + func ReadBundleDir(path string) (dir *BundleDir, err error) + func (dir *BundleDir) ArchiveTo(w io.Writer) error + func (dir *BundleDir) ContainsOverlays() bool + func (dir *BundleDir) Data() *BundleData + func (dir *BundleDir) ReadMe() string + type Charm interface + Actions func() *Actions + Config func() *Config + Meta func() *Meta + Metrics func() *Metrics + Revision func() int + func ReadCharm(path string) (charm Charm, err error) + type CharmArchive struct + Path string + func ReadCharmArchive(path string) (*CharmArchive, error) + func ReadCharmArchiveBytes(data []byte) (archive *CharmArchive, err error) + func ReadCharmArchiveFromReader(r io.ReaderAt, size int64) (archive *CharmArchive, err error) + func (a *CharmArchive) Actions() *Actions + func (a *CharmArchive) Config() *Config + func (a *CharmArchive) ExpandTo(dir string) error + func (a *CharmArchive) LXDProfile() *LXDProfile + func (a *CharmArchive) Manifest() (set.Strings, error) + func (a *CharmArchive) Meta() *Meta + func (a *CharmArchive) Metrics() *Metrics + func (a *CharmArchive) Revision() int + func (a *CharmArchive) SetRevision(revision int) + func (a *CharmArchive) Version() string + type CharmDir struct + Path string + func ReadCharmDir(path string) (dir *CharmDir, err error) + func (dir *CharmDir) Actions() *Actions + func (dir *CharmDir) ArchiveTo(w io.Writer) error + func (dir *CharmDir) Config() *Config + func (dir *CharmDir) LXDProfile() *LXDProfile + func (dir *CharmDir) MaybeGenerateVersionString(logger Logger) (string, string, error) + func (dir *CharmDir) Meta() *Meta + func (dir *CharmDir) Metrics() *Metrics + func (dir *CharmDir) Revision() int + func (dir *CharmDir) SetDiskRevision(revision int) error + func (dir *CharmDir) SetRevision(revision int) + func (dir *CharmDir) Version() string + type Config struct + Options map[string]Option + func NewConfig() *Config + func ReadConfig(r io.Reader) (*Config, error) + func (c *Config) DefaultSettings() Settings + func (c *Config) FilterSettings(settings Settings) Settings + func (c *Config) ParseSettingsStrings(values map[string]string) (Settings, error) + func (c *Config) ParseSettingsYAML(yamlData []byte, key string) (Settings, error) + func (c *Config) ValidateSettings(settings Settings) (Settings, error) + type Deployment struct + DeploymentMode DeploymentMode + DeploymentType DeploymentType + MinVersion string + ServiceType ServiceType + type DeploymentMode string + const ModeOperator + const ModeWorkload + type DeploymentType string + const DeploymentDaemon + const DeploymentStateful + const DeploymentStateless + type Device struct + CountMax int64 + CountMin int64 + Description string + Name string + Type DeviceType + type DeviceType string + type ExtraBinding struct + Name string + type FieldPresenceMap map[interface{}]interface + type LXDProfile struct + Config map[string]string + Description string + Devices map[string]map[string]string + func NewLXDProfile() *LXDProfile + func ReadLXDProfile(r io.Reader) (*LXDProfile, error) + func (profile *LXDProfile) Empty() bool + func (profile *LXDProfile) ValidateConfigDevices() error + type LXDProfiler interface + LXDProfile func() *LXDProfile + type Location interface + Path func() string + String func() string + type Logger interface + Debugf func(message string, args ...interface{}) + Errorf func(message string, args ...interface{}) + Infof func(message string, args ...interface{}) + Tracef func(message string, args ...interface{}) + Warningf func(message string, args ...interface{}) + type MachineSpec struct + Annotations map[string]string + Constraints string + Series string + type Meta struct + Categories []string + Deployment *Deployment + Description string + Devices map[string]Device + ExtraBindings map[string]ExtraBinding + MinJujuVersion version.Number + Name string + PayloadClasses map[string]PayloadClass + Peers map[string]Relation + Provides map[string]Relation + Requires map[string]Relation + Resources map[string]resource.Meta + Series []string + Storage map[string]Storage + Subordinate bool + Summary string + Tags []string + Terms []string + func ReadMeta(r io.Reader) (*Meta, error) + func (m Meta) CombinedRelations() map[string]Relation + func (m Meta) Hooks() map[string]bool + func (m Meta) MarshalYAML() (interface{}, error) + func (meta *Meta) UnmarshalYAML(f func(interface{}) error) error + func (meta Meta) Check() error + type Metric struct + Description string + Type MetricType + type MetricType string + const MetricTypeAbsolute + const MetricTypeGauge + type Metrics struct + Metrics map[string]Metric + Plan *Plan + func ReadMetrics(r io.Reader) (*Metrics, error) + func (m Metrics) PlanRequired() bool + func (m Metrics) ValidateMetric(name, value string) error + type NopLogger struct + func (m NopLogger) Debugf(message string, args ...interface{}) + func (m NopLogger) Errorf(message string, args ...interface{}) + func (m NopLogger) Infof(message string, args ...interface{}) + func (m NopLogger) Tracef(message string, args ...interface{}) + func (m NopLogger) Warningf(message string, args ...interface{}) + type OfferSpec struct + ACL map[string]string + Endpoints []string + type OfferURL struct + ApplicationName string + ModelName string + Source string + User string + func ParseOfferURL(urlStr string) (*OfferURL, error) + func (u *OfferURL) AsLocal() *OfferURL + func (u *OfferURL) HasEndpoint() bool + func (u *OfferURL) Path() string + func (u *OfferURL) String() string + type OfferURLParts OfferURL + func ParseOfferURLParts(urlStr string) (*OfferURLParts, error) + type Option struct + Default interface{} + Description string + Type string + type PayloadClass struct + Name string + Type string + func (pc PayloadClass) Validate() error + type Plan struct + Required bool + type Relation struct + Interface string + Limit int + Name string + Optional bool + Role RelationRole + Scope RelationScope + func (r Relation) ImplementedBy(ch Charm) bool + func (r Relation) IsImplicit() bool + type RelationRole string + const RolePeer + const RoleProvider + const RoleRequirer + type RelationScope string + const ScopeContainer + const ScopeGlobal + type SaasSpec struct + URL string + type ServiceType string + const ServiceCluster + const ServiceExternal + const ServiceLoadBalancer + const ServiceOmit + type Settings map[string]interface + type Storage struct + CountMax int + CountMin int + Description string + Location string + MinimumSize uint64 + Name string + Properties []string + ReadOnly bool + Shared bool + Type StorageType + type StorageType string + const StorageBlock + const StorageFilesystem + type TermsId struct + Name string + Owner string + Revision int + Tenant string + func MustParseTerm(s string) *TermsId + func ParseTerm(s string) (*TermsId, error) + func (t *TermsId) String() string + func (t *TermsId) Validate() error + type URL struct + Name string + Revision int + Schema string + Series string + User string + func InferURL(src, defaultSeries string) (*URL, error) + func MustParseURL(url string) *URL + func ParseURL(url string) (*URL, error) + func (r URL) Path() string + func (u *URL) GetBSON() (interface{}, error) + func (u *URL) MarshalJSON() ([]byte, error) + func (u *URL) MarshalText() ([]byte, error) + func (u *URL) SetBSON(raw bson.Raw) error + func (u *URL) UnmarshalJSON(b []byte) error + func (u *URL) UnmarshalText(data []byte) error + func (u URL) String() string + func (url *URL) WithRevision(revision int) *URL + type UnitPlacement struct + Application string + ContainerType string + Machine string + Unit int + func ParsePlacement(p string) (*UnitPlacement, error) + type VerificationError struct + Errors []error + func (err *VerificationError) Error() string Other modules containing this package github.com/juju/charm/v10 github.com/juju/charm/v11 github.com/juju/charm/v12 github.com/juju/charm/v13 github.com/juju/charm/v8 github.com/juju/charm/v9