Versions in this module Expand all Collapse all v10 v10.0.1 Aug 2, 2023 v10.0.0 Jan 4, 2023 Changes in this version + var Risks = []Risk + func CheckMeta(ch CharmMeta) error + func EnsureSchema(url string, defaultSchema Schema) (string, error) + 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 IsValidArchitecture(architecture string) 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 MetaFormatReasons(ch CharmMeta) (Format, []FormatSelectionReason) + 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 ValidateArchitecture(arch string) error + 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 + ExecutionGroup string + Parallel bool + 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(charmName string, 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 + ExposedEndpoints map[string]ExposedEndpointSpec + NumUnits int + Offers map[string]*OfferSpec + Options map[string]interface{} + Placement_ string + Plan string + RequiresTrust bool + Resources map[string]interface{} + Revision *int + Scale_ int + Series string + Storage map[string]string + To []string + type Base struct + Architectures []string + Channel Channel + Name string + func ParseBase(s string, archs ...string) (Base, error) + func (b Base) String() string + func (b Base) Validate() error + 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 + type BundleDataPart struct + Data *BundleData + PresenceMap FieldPresenceMap + UnmarshallError error + 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 Channel struct + Branch string + Risk Risk + Track string + func MakeChannel(track, risk, branch string) (Channel, error) + func MakePermissiveChannel(track, risk, branch string) Channel + func ParseChannel(s string) (Channel, error) + func ParseChannelNormalize(s string) (Channel, error) + func (ch Channel) Empty() bool + func (ch Channel) Normalize() Channel + func (ch Channel) String() string + type Charm interface + Actions func() *Actions + Config func() *Config + 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) ArchiveMembers() (set.Strings, error) + func (a *CharmArchive) ExpandTo(dir string) error + func (c CharmArchive) Actions() *Actions + func (c CharmArchive) Config() *Config + func (c CharmArchive) LXDProfile() *LXDProfile + func (c CharmArchive) Manifest() *Manifest + func (c CharmArchive) Meta() *Meta + func (c CharmArchive) Metrics() *Metrics + func (c CharmArchive) Revision() int + func (c CharmArchive) SetRevision(revision int) + func (c CharmArchive) Version() string + type CharmDir struct + Path string + func ReadCharmDir(path string) (*CharmDir, error) + func (c CharmDir) Actions() *Actions + func (c CharmDir) Config() *Config + func (c CharmDir) LXDProfile() *LXDProfile + func (c CharmDir) Manifest() *Manifest + func (c CharmDir) Meta() *Meta + func (c CharmDir) Metrics() *Metrics + func (c CharmDir) Revision() int + func (c CharmDir) SetRevision(revision int) + func (c CharmDir) Version() string + func (dir *CharmDir) ArchiveTo(w io.Writer) error + func (dir *CharmDir) MaybeGenerateVersionString(logger Logger) (string, string, error) + func (dir *CharmDir) SetDiskRevision(revision int) error + type CharmMeta interface + Manifest func() *Manifest + Meta func() *Meta + 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 Container struct + Mounts []Mount + Resource string + 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 ExposedEndpointSpec struct + ExposeToCIDRs []string + ExposeToSpaces []string + type ExtraBinding struct + Name string + type FieldPresenceMap map[interface{}]interface + type Format int + const FormatUnknown + const FormatV1 + const FormatV2 + func MetaFormat(ch CharmMeta) Format + type FormatSelectionReason = string + const SelectionBases + const SelectionContainers + const SelectionManifest + const SelectionSeries + 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 Manifest struct + Bases []Base + func ReadManifest(r io.Reader) (*Manifest, error) + func (m *Manifest) UnmarshalYAML(f func(interface{}) error) error + func (m *Manifest) Validate() error + type Meta struct + Assumes *assumes.ExpressionTree + Categories []string + Containers map[string]Container + 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) Check(format Format, reasons ...FormatSelectionReason) 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 + 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 Mount struct + Location string + Storage string + 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 Risk string + const Beta + const Candidate + const Edge + const Stable + type SaasSpec struct + URL string + type Schema string + const CharmHub + const Local + func (s Schema) Matches(other string) bool + func (s Schema) Prefix(url string) string + func (s Schema) String() 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 ParseTerm(s string) (*TermsId, error) + func (t *TermsId) String() string + func (t *TermsId) Validate() error + type URL struct + Architecture string + Name string + Revision int + Schema string + Series string + func MustParseURL(url string) *URL + func ParseURL(url string) (*URL, error) + func (u *URL) FullPath() string + func (u *URL) GetBSON() (interface{}, error) + func (u *URL) MarshalJSON() ([]byte, error) + func (u *URL) MarshalText() ([]byte, error) + func (u *URL) Path() string + func (u *URL) SetBSON(raw bson.Raw) error + func (u *URL) String() string + func (u *URL) UnmarshalJSON(b []byte) error + func (u *URL) UnmarshalText(data []byte) error + func (u *URL) WithArchitecture(arch string) *URL + func (u *URL) WithRevision(revision int) *URL + func (u *URL) WithSeries(series string) *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/v11 github.com/juju/charm/v12 github.com/juju/charm/v13 github.com/juju/charm/v7 github.com/juju/charm/v8 github.com/juju/charm/v9