module

package
v0.71.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package module provides a struct to represent an OpenTofu/Terraform module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc added in v0.54.2

type Doc struct {
	// contains filtered or unexported fields
}

func FindDoc added in v0.54.2

func FindDoc(dir string) (*Doc, error)

func NewDoc added in v0.66.7

func NewDoc(rawContent, fileExt string) *Doc

func (*Doc) Content added in v0.54.2

func (doc *Doc) Content(stripTags bool) string

func (*Doc) Description added in v0.54.2

func (doc *Doc) Description(maxLenght int) string

func (*Doc) IsMarkDown added in v0.54.2

func (doc *Doc) IsMarkDown() bool

func (*Doc) Title added in v0.54.2

func (doc *Doc) Title() string

type DocRegs added in v0.54.2

type DocRegs []*regexp.Regexp

func (DocRegs) Replace added in v0.54.2

func (regs DocRegs) Replace(str string) string

type Module

type Module struct {
	*Repo
	*Doc
	// contains filtered or unexported fields
}

func NewModule

func NewModule(repo *Repo, moduleDir string) (*Module, error)

NewModule returns a module instance if the given `moduleDir` path contains a Terraform module, otherwise returns nil.

func (*Module) Description

func (module *Module) Description() string

Description implements /github.com/charmbracelet/bubbles.list.DefaultItem.Description

func (*Module) FilterValue

func (module *Module) FilterValue() string

FilterValue implements /github.com/charmbracelet/bubbles.list.Item.FilterValue

func (*Module) Logger added in v0.67.5

func (module *Module) Logger() log.Logger

func (*Module) ModuleDir added in v0.66.7

func (module *Module) ModuleDir() string

func (*Module) TerraformSourcePath added in v0.54.1

func (module *Module) TerraformSourcePath() string

func (*Module) Title

func (module *Module) Title() string

Title implements /github.com/charmbracelet/bubbles.list.DefaultItem.Title

func (*Module) URL

func (module *Module) URL() string

type Modules

type Modules []*Module

type Repo

type Repo struct {
	RemoteURL  string
	BranchName string
	// contains filtered or unexported fields
}

func NewRepo

func NewRepo(ctx context.Context, logger log.Logger, cloneURL, tempDir string, walkWithSymlinks bool) (*Repo, error)

func (*Repo) FindModules

func (repo *Repo) FindModules(ctx context.Context) (Modules, error)

FindModules clones the repository if `repoPath` is a URL, searches for Terragrunt modules, indexes their README.* files, and returns module instances.

func (*Repo) ModuleURL added in v0.66.7

func (repo *Repo) ModuleURL(moduleDir string) (string, error)

ModuleURL returns the URL of the module in this repository. `moduleDir` is the path from the repository root.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL