Documentation
¶
Index ¶
- func CheckValidCollectionName(name string) error
- func CreateFileStructure(ctx context.Context, path string, ...) error
- func CreateFileStructureInDir(ctx context.Context, dir filesinterfaces.Directory, ...) error
- func InstallGalaxyCollection(ctx context.Context, options *InstallCollectionOptions) error
- func IsValidCollectionName(name string) bool
- func ListInstalledCollections(ctx context.Context, options *ListInstalledCollectionsOptions) (map[string]string, error)
- func WriteGalaxyYaml(ctx context.Context, outFile filesinterfaces.File, data *GalaxyYaml) error
- func WriteGalaxyYamlFromCreateCollectionOptions(ctx context.Context, outFile filesinterfaces.File, ...) error
- func WriteInitialCollectionReadme(ctx context.Context, outFile filesinterfaces.File, name string, ...) error
- func WriteInitialCollectionReadmeFromCreateCollectionOptions(ctx context.Context, outFile filesinterfaces.File, ...) error
- type CreateCollectionFileStructureOptions
- func (c *CreateCollectionFileStructureOptions) GetAuthors() ([]string, error)
- func (c *CreateCollectionFileStructureOptions) GetCreateFileOptions() *filesoptions.CreateOptions
- func (c *CreateCollectionFileStructureOptions) GetName() (string, error)
- func (c *CreateCollectionFileStructureOptions) GetNamespace() (string, error)
- func (c *CreateCollectionFileStructureOptions) GetVersion() (versionutils.Version, error)
- func (c *CreateCollectionFileStructureOptions) GetVersionAsString() (string, error)
- type GalaxyYaml
- type InstallCollectionOptions
- type ListInstalledCollectionsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileStructure ¶
func CreateFileStructure(ctx context.Context, path string, options *CreateCollectionFileStructureOptions) error
Creates the files structure as documented on https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_structure.html .
func CreateFileStructureInDir ¶
func CreateFileStructureInDir(ctx context.Context, dir filesinterfaces.Directory, options *CreateCollectionFileStructureOptions) error
Creates the files structure as documented on https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_structure.html .
func InstallGalaxyCollection ¶ added in v0.461.0
func InstallGalaxyCollection(ctx context.Context, options *InstallCollectionOptions) error
func IsValidCollectionName ¶
func ListInstalledCollections ¶ added in v0.461.0
func WriteGalaxyYaml ¶
func WriteGalaxyYaml(ctx context.Context, outFile filesinterfaces.File, data *GalaxyYaml) error
func WriteGalaxyYamlFromCreateCollectionOptions ¶
func WriteGalaxyYamlFromCreateCollectionOptions(ctx context.Context, outFile filesinterfaces.File, options *CreateCollectionFileStructureOptions) error
func WriteInitialCollectionReadmeFromCreateCollectionOptions ¶
func WriteInitialCollectionReadmeFromCreateCollectionOptions(ctx context.Context, outFile filesinterfaces.File, options *CreateCollectionFileStructureOptions) error
Types ¶
type CreateCollectionFileStructureOptions ¶
type CreateCollectionFileStructureOptions struct {
// The namespace of the collection.
//
// This can be a company/brand/organization or product namespace under which all content lives.
//
// May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with underscores or numbers and cannot contain consecutive underscores.
Namespace string
// The name of the collection.
//
// Has the same character restrictions as namespace.
Name string
// The version of the collection.
//
// Must be compatible with semantic versioning.
Version string
// A list of the collection’s content authors.
//
// Can be just the name or in the format ‘Full Name <email> (url) @nicks:irc/im.site#channel’.
Authors []string
}
Options to create a collection file structure
Bases on:
https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html
func (*CreateCollectionFileStructureOptions) GetAuthors ¶
func (c *CreateCollectionFileStructureOptions) GetAuthors() ([]string, error)
func (*CreateCollectionFileStructureOptions) GetCreateFileOptions ¶ added in v0.423.0
func (c *CreateCollectionFileStructureOptions) GetCreateFileOptions() *filesoptions.CreateOptions
func (*CreateCollectionFileStructureOptions) GetName ¶
func (c *CreateCollectionFileStructureOptions) GetName() (string, error)
func (*CreateCollectionFileStructureOptions) GetNamespace ¶
func (c *CreateCollectionFileStructureOptions) GetNamespace() (string, error)
func (*CreateCollectionFileStructureOptions) GetVersion ¶
func (c *CreateCollectionFileStructureOptions) GetVersion() (versionutils.Version, error)
func (*CreateCollectionFileStructureOptions) GetVersionAsString ¶
func (c *CreateCollectionFileStructureOptions) GetVersionAsString() (string, error)
type GalaxyYaml ¶
type InstallCollectionOptions ¶ added in v0.461.0
type InstallCollectionOptions struct {
// Local path to the root directory of the ansible collection to install.
LocalCollectionPath string
// Local path to the root directory of the python virtualenv containing ansible.
AnsibleVirtualenvPath string
}
func (*InstallCollectionOptions) GetAnsibleGalaxyPath ¶ added in v0.461.0
func (i *InstallCollectionOptions) GetAnsibleGalaxyPath() (string, error)
func (*InstallCollectionOptions) GetAnsiblePath ¶ added in v0.461.0
func (i *InstallCollectionOptions) GetAnsiblePath() (string, error)
type ListInstalledCollectionsOptions ¶ added in v0.461.0
type ListInstalledCollectionsOptions struct {
// Local path to the root directory of the python virtualenv containing ansible.
AnsibleVirtualenvPath string
}
func (*ListInstalledCollectionsOptions) GetAnsibleGalaxyPath ¶ added in v0.461.0
func (l *ListInstalledCollectionsOptions) GetAnsibleGalaxyPath() (string, error)
func (*ListInstalledCollectionsOptions) GetAnsiblePath ¶ added in v0.461.0
func (l *ListInstalledCollectionsOptions) GetAnsiblePath() (string, error)
Click to show internal directories.
Click to hide internal directories.