content

package
v0.0.0-...-552dcf1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	*io.Container
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(parentContainer *io.Container, httpClient *http.Client) *Container

func (*Container) ContentReader

func (container *Container) ContentReader() *Reader

func (*Container) ContentWriter

func (container *Container) ContentWriter() *Writer

func (*Container) HttpClient

func (container *Container) HttpClient() *http.Client

func (*Container) RepoManager

func (container *Container) RepoManager() *RepoManager

type GitRepo

type GitRepo struct {
	Repository string
	LocalDir   string
}

GitRepo - a git repository

type Reader

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

Reader - reads files that are either local or remote

func NewReader

func NewReader(fs *afero.Afero, httpClient *http.Client) *Reader

func (*Reader) ReadContent

func (reader *Reader) ReadContent(path string) (string, error)

type RepoManager

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

func NewRepoManager

func NewRepoManager(gitAdapter io.GitAdapter, fs *afero.Afero, logger *io.Logger) *RepoManager

func (*RepoManager) CleanUp

func (manager *RepoManager) CleanUp()

func (*RepoManager) GetRepo

func (manager *RepoManager) GetRepo(url string) (*GitRepo, error)

type WorkflowGenerator

type WorkflowGenerator struct {
	Name         string
	Sources      []WorkflowSource
	TemplateVars map[string]string
}

type WorkflowSource

type WorkflowSource struct {
	Source      string
	Destination string
}

func NewWorkflowSource

func NewWorkflowSource(source string, destination string) WorkflowSource

type Writer

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

func NewWriter

func NewWriter(fs *afero.Afero, logger *io.Logger) *Writer

func (*Writer) ApplyGenerator

func (writer *Writer) ApplyGenerator(sourceFs http.FileSystem, contextDir string, generator WorkflowGenerator) error

func (*Writer) LogErrors

func (writer *Writer) LogErrors(destination string, message string, errors []string)

LogErrors - prints an error message for the given destination file, together with any additional

func (*Writer) SafelyWriteFile

func (writer *Writer) SafelyWriteFile(destination string, content string) error

func (*Writer) UpdateFileContent

func (writer *Writer) UpdateFileContent(destination string, content string, details string)

Jump to

Keyboard shortcuts

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