project

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectName string = "goproj"
)

ProjectName missing godoc.

Variables

View Source
var (
	// ErrFileNotFound project not found
	ErrFileNotFound = errors.New("File not found")
	// ErrNotFound project not found
	ErrNotFound = errors.New("Project not found")
	// ErrDuplicate project is already in list when it should not
	ErrDuplicate = errors.New("Project already found")
	// ErrListEmpty missing godoc.
	ErrListEmpty = errors.New("List is empty")
	// ErrListTooLong missing godoc.
	ErrListTooLong = errors.New("List is too long")
)

Functions

func Buffer2Slice

func Buffer2Slice(stream io.ReadCloser) []string

Buffer2Slice missing godoc.

func ExecNonFatal

func ExecNonFatal(f fn, args ...string)

ExecNonFatal missing godoc.

func FileExists

func FileExists(fpath string) (bool, os.FileInfo)

FileExists missing godoc.

func FileIsExecutable

func FileIsExecutable(fpath string) bool

FileIsExecutable missing godoc.

func MkdirAll

func MkdirAll(path string, mode int)

MkdirAll missing godoc.

func OneOrLess

func OneOrLess(args ...string) (string, error)

OneOrLess missing godoc.

func PanicOnError

func PanicOnError(fmtstr string, err error)

PanicOnError missing godoc.

func PrintError

func PrintError(fmtstr string, err error) error

PrintError missing godoc.

func PrintFatal

func PrintFatal(fmtstr string, err error) error

PrintFatal missing godoc.

func Reverse

func Reverse(input []string) []string

Reverse missing godoc.

Types

type BaseTemplate

type BaseTemplate struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

BaseTemplate template the project was originally based on

type EnvVar

type EnvVar struct {
	RootPath string   `json:"-"`
	Name     string   `json:"name"`
	Paths    []string `json:"paths"`
}

EnvVar missing godoc.

func (*EnvVar) Append

func (evar *EnvVar) Append(inputdir string)

Append missing godoc.

func (EnvVar) Has

func (evar EnvVar) Has(inputdir string) bool

Has missing godoc.

func (*EnvVar) Prepend

func (evar *EnvVar) Prepend(inputdir string)

Prepend missing godoc.

func (EnvVar) Write

func (evar EnvVar) Write(w io.Writer)

Write missing godoc. ExportString write the name and value to the buffer as a bash export string

type Environment

type Environment struct {
	RootDir string            `json:"-"`
	Vars    map[string]EnvVar `json:"vars"`
}

Environment missing godoc.

type Executable

type Executable struct {
	PathToScript string
	OS           string
	Extensions   []string
}

Executable missing godoc.

func NewExecutable

func NewExecutable(command string, extensions ...string) *Executable

NewExecutable missing godoc.

func (*Executable) AppendExt

func (e *Executable) AppendExt(extstr string)

AppendExt missing godoc.

func (Executable) LookupExt

func (e Executable) LookupExt() (string, error)

LookupExt missing godoc.

func (*Executable) PrependExt

func (e *Executable) PrependExt(extstr string)

PrependExt missing godoc.

type Functions

type Functions struct {
	Cwd       string
	ToolsPath string
	Locations Locations
}

Functions missing godoc.

func NewFunctions

func NewFunctions(locations Locations) *Functions

NewFunctions missing godoc.

func (Functions) Backup

func (f Functions) Backup(args ...string) ([]string, []string, error)

Backup missing godoc.

func (Functions) Build

func (f Functions) Build(args ...string) ([]string, []string, error)

Build missing godoc.

func (Functions) BuildProject

func (f Functions) BuildProject(args ...string)

BuildProject missing godoc.

func (Functions) Execute

func (f Functions) Execute(command string, args ...string) ([]string, []string, error)

Execute missing godoc.

func (Functions) LookupExt

func (f Functions) LookupExt(command string) (string, error)

LookupExt missing godoc.

func (Functions) Package

func (f Functions) Package(args ...string) ([]string, []string, error)

Package missing godoc.

func (Functions) Publish

func (f Functions) Publish(args ...string) ([]string, []string, error)

Publish missing godoc.

func (Functions) Setup

func (f Functions) Setup(args ...string) ([]string, []string, error)

Setup missing godoc.

func (Functions) SetupProject

func (f Functions) SetupProject(args ...string)

SetupProject missing godoc.

func (Functions) Status

func (f Functions) Status(args ...string) ([]string, []string, error)

Status missing godoc.

func (Functions) Teardown

func (f Functions) Teardown(args ...string) ([]string, []string, error)

Teardown missing godoc.

func (Functions) Test

func (f Functions) Test(args ...string) ([]string, []string, error)

Test missing godoc.

func (Functions) Which

func (f Functions) Which(command string) string

Which missing godoc.

type Locations

type Locations struct {
	RootDir string `json:"root"`
	// contains filtered or unexported fields
}

Locations the locations used in the object

func (Locations) BackupDir

func (L Locations) BackupDir(args ...string) string

BackupDir missing godoc.

func (Locations) BackupDirRotating

func (L Locations) BackupDirRotating(name string, max int) string

BackupDirRotating missing godoc.

func (Locations) BinPath

func (L Locations) BinPath() string

BinPath missing godoc.

func (Locations) ConfigDir

func (L Locations) ConfigDir() string

ConfigDir missing godoc.

func (Locations) ConfigFile

func (L Locations) ConfigFile() string

ConfigFile missing godoc.

func (Locations) ToolsPath

func (L Locations) ToolsPath() string

ToolsPath missing godoc.

type MetaData

type MetaData struct {
	Project      ProjectInfo  `json:"project"`
	BaseTemplate BaseTemplate `json:"basetemplate"`
}

MetaData references to other information

type Project

type Project struct {
	MetaData  MetaData  `json:"metadata"`
	Locations Locations `json:"locations"`
	Targets   Targets   `json:"targets"`
	Functions Functions `json:"-"`
}

Project the project object

proj := NewProject("/home/foo/project")

func NewProject

func NewProject(path string) *Project

NewProject missing godoc.

func (*Project) Description

func (p *Project) Description(args ...string) string

Description missing godoc.

func (Project) IsGoProj added in v0.4.0

func (p Project) IsGoProj() bool

func (*Project) Name

func (p *Project) Name(args ...string) string

Name missing godoc.

func (*Project) Read

func (p *Project) Read(reader io.Reader) error

File handling

Read

func (*Project) ReadFromFile

func (p *Project) ReadFromFile() error

ReadFromFile

func (Project) Save added in v0.4.0

func (p Project) Save()

func (*Project) SetDescription added in v0.4.0

func (p *Project) SetDescription(description string)

func (*Project) SetName added in v0.4.0

func (p *Project) SetName(name string)

func (Project) Write

func (p Project) Write(writer io.Writer) error

Write

func (Project) WriteTable added in v0.3.0

func (p Project) WriteTable(writer io.Writer)

func (Project) WriteToFile

func (p Project) WriteToFile() error

WriteToFile

type ProjectInfo

type ProjectInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

ProjectInfo basic project info

type Targets

type Targets struct {
	Files []os.FileInfo `json:"files"`
	Repos []VCSUrl      `json:"vcs"`
}

Targets missing godoc.

type VCSUrl

type VCSUrl struct {
	Url         string `json:"url"`
	Type        string `json:"type"`
	Branch      string `json:"branch"`
	Destination string `json:"destination"`
}

VCSUrl missing godoc. Version Constrol Service Url

Jump to

Keyboard shortcuts

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