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 IsValidCollectionName(name string) bool
- 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
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 IsValidCollectionName ¶
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)
Click to show internal directories.
Click to hide internal directories.