project

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PipeStdout = "Stdout"
	PipeStderr = "Stderr"
)

Variables

This section is empty.

Functions

func FindMainDir

func FindMainDir(info devcard.DevcardInfo) string

func GenerateMain

func GenerateMain(projectDir string, info devcard.DevcardInfo) error

Types

type MsgCell

type MsgCell struct {
	Id   string
	Cell devcard.Cell
}

type MsgError

type MsgError struct {
	Title string
	Err   error
}

type MsgInfo

type MsgInfo struct {
	Title string
}

type MsgPipeOut

type MsgPipeOut struct {
	Pipe string
	Line string
}

type MsgReady

type MsgReady struct{}

type Project

type Project struct {
	Name   string
	Dir    string
	Module string

	Err    error
	Update chan struct{}
	// contains filtered or unexported fields
}

func NewProject

func NewProject(name, dir string) *Project

func (*Project) CreateRepo

func (p *Project) CreateRepo(devcardName string) (*Repo, error)

func (*Project) DevcardInfo

func (p *Project) DevcardInfo(devcardName string) devcard.DevcardInfo

func (*Project) DevcardsInfo

func (p *Project) DevcardsInfo() []devcard.DevcardInfo

func (*Project) RemoveRepo

func (p *Project) RemoveRepo(repo *Repo)

func (*Project) Shutdown

func (p *Project) Shutdown()

func (*Project) Source

func (p *Project) Source(decl string) (string, error)

type Repo

type Repo struct {
	Dir          string
	TransientDir string

	DevcardInfo devcard.DevcardInfo
	// contains filtered or unexported fields
}

func (*Repo) Delete

func (r *Repo) Delete() error

func (*Repo) Prepare

func (r *Repo) Prepare() error

Prepare creates files and directories required for building/running the project.

func (*Repo) Run

func (r *Repo) Run(ctx context.Context, control <-chan string, updates chan<- UpdateMessage)

Run uses "go run" to produce and return a devcard.

If errors occur, they're written into devcard.Error field of the devcard.

func (*Repo) Test

func (r *Repo) Test(ctx context.Context) int

type UpdateMessage

type UpdateMessage interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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