project

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCachePath = ".goac/cache/"
View Source
var DefaultFilesToExclude = map[Target][]string{
	TargetBuild:      {".goacproject.yaml", "*_test.go"},
	TargetBuildImage: {".goacproject.yaml", "*_test.go"},
}
View Source
var DefaultFilesToInclude = map[Target][]string{
	TargetBuild:      {"*.go"},
	TargetBuildImage: {},
}
View Source
var PahToSearch = "."
View Source
var RootPath = "."

Functions

func Discover

func Discover(opts *DiscoverOptions) error

Types

type Cache

type Cache struct {
	Target map[Target]*Metadata
	Path   string
}

type DiscoverOptions

type DiscoverOptions struct {
	Force  bool
	Create bool
}

type Env

type Env struct {
	Key   string `yaml:",omitempty"`
	Value string `yaml:",omitempty"`
}

type Exec

type Exec struct {
	CMD    string
	Params []string `yaml:",omitempty"`
}

type IList

type IList interface {
	List()
	Affected() error
}

func NewProjectsList

func NewProjectsList(opt *Options) (IList, error)

type List

type List struct {
	Projects []*Project
	Options  *Options
}

func (*List) Affected

func (l *List) Affected() error

func (*List) List

func (l *List) List()

type Metadata

type Metadata struct {
	DependenciesHash string
	DirHash          string
	Date             string
}

type Module

type Module struct {
	LocalDirs      []string
	ExternalDeps   []string
	IgnoredGoFiles []string
}

type Options

type Options struct {
	Target         Target
	DryRun         bool
	MaxConcurrency int
	BinaryCheck    bool
	Force          bool
	DockerIgnore   bool
	ProjectsName   []string
	Debug          []string
	PrintStdout    bool
}

type Project

type Project struct {
	Version    string
	Name       string
	Path       string `yaml:",omitempty"`
	CleanPath  string `yaml:",omitempty"`
	Target     map[Target]*TargetConfig
	HashPath   string     `yaml:",omitempty"`
	Module     *Module    `yaml:",omitempty"`
	HashPool   *sync.Pool `yaml:",omitempty"`
	Metadata   *Metadata  `yaml:",omitempty"`
	Cache      *Cache     `yaml:",omitempty"`
	Rule       *scan.Rule `yaml:",omitempty"`
	CMDOptions *Options   `yaml:",omitempty"`
}

func (*Project) LoadCache

func (p *Project) LoadCache() error

func (*Project) LoadGOModules

func (p *Project) LoadGOModules(gomod *modfile.File) error

func (*Project) LoadHashs

func (p *Project) LoadHashs() error

func (*Project) LoadRule

func (p *Project) LoadRule(target Target)

type Target

type Target string
const (
	TargetNone       Target = "none"
	TargetBuild      Target = "build"
	TargetBuildImage Target = "build-image"
)

func StringToTarget

func StringToTarget(s string) Target

func (Target) String

func (t Target) String() string

type TargetConfig

type TargetConfig struct {
	Envs []Env `yaml:",omitempty"`
	Exec *Exec
}

Jump to

Keyboard shortcuts

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