models

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exec

type Exec interface {
	LookPath(file string) (string, error)
	CombinedOutput(args []string, envs map[string]string, workdir string) (string, error)
}

type FilePath

type FilePath interface {
	NotExists() bool
	Join(elem ...string) FilePath
	Symlink(newname string) (FilePath, error)
	Resolve() string
}

type LocalExec

type LocalExec struct{}

func (LocalExec) CombinedOutput

func (e LocalExec) CombinedOutput(args []string, envs map[string]string, workdir string) (string, error)

CombinedOutput encapsulates creating a command and running it. We should think about how to flexibly add parameters here as this is meant to satisfy very simple usecases for more complex usecases we can add a Command function to this method which will allow us to edit a Cmd directly.

func (LocalExec) LookPath

func (e LocalExec) LookPath(file string) (string, error)

type LocalFilePath

type LocalFilePath string

func (LocalFilePath) Join

func (fp LocalFilePath) Join(elem ...string) FilePath

func (LocalFilePath) NotExists

func (fp LocalFilePath) NotExists() bool

func (LocalFilePath) Resolve

func (fp LocalFilePath) Resolve() string
func (fp LocalFilePath) Symlink(newname string) (FilePath, error)

Directories

Path Synopsis
matchers
Code generated by pegomock.
Code generated by pegomock.

Jump to

Keyboard shortcuts

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