daggers
import "github.com/eunomie/dague/daggers"
Index
- Variables
- func ApplyFormatAndImports(ctx context.Context, c *Client, formatter string, locals []string) error
- func ApplyGoformatter(ctx context.Context, c *Client, formatter string) error
- func CheckGoDoc(ctx context.Context, c *Client) error
- func CrossBuild(ctx context.Context, c *Client, buildOpts types.CrossBuildOpts) error
- func ExportGoMod(ctx context.Context, c *Client) error
- func GoBase(c *Client) *dagger.Container
- func GoDeps(c *Client) *dagger.Container
- func GoDoc(ctx context.Context, c *Client) error
- func GoImports(ctx context.Context, c *Client, locals []string) error
- func GoMod(c *Client) *dagger.Container
- func GoVulnCheck(ctx context.Context, c *Client) error
- func GolangCILint(ctx context.Context, c *Client) error
- func GolangCILintBase(c *Client) *dagger.Container
- func LocalBuild(ctx context.Context, c *Client, buildOpts types.LocalBuildOpts) error
- func PrintGoformatter(ctx context.Context, c *Client, formatter string) error
- func RunGoTests(ctx context.Context, c *Client) error
- func RunInDagger(ctx context.Context, conf *config.Dague, do func(*Client) error) error
- func Sources(c *Client) *dagger.Container
- func SourcesNoDeps(c *Client) *dagger.Container
- func applyBase(cont *dagger.Container, c *dagger.Client, conf *config.Dague) *dagger.Container
- func formatPrint(formatter string) []string
- func formatWrite(formatter string) []string
- func goBuild(ctx context.Context, c *Client, src *dagger.Container, os, arch string, buildOpts types.BuildOpts, buildFile string) error
- func goImports(locals []string) []string
- func goModDownload() []string
- func goModFiles(c *Client) *dagger.Directory
- func goModTidy() []string
- func sources(c *Client, cont *dagger.Container) *dagger.Container
- type Client
Variables
var goModDefaulFiles = []string{"go.mod", "go.sum"}
func ApplyFormatAndImports(ctx context.Context, c *Client, formatter string, locals []string) error
func ApplyGoformatter(ctx context.Context, c *Client, formatter string) error
func CheckGoDoc
func CheckGoDoc(ctx context.Context, c *Client) error
func CrossBuild
func CrossBuild(ctx context.Context, c *Client, buildOpts types.CrossBuildOpts) error
func ExportGoMod
func ExportGoMod(ctx context.Context, c *Client) error
func GoBase
func GoBase(c *Client) *dagger.Container
GoBase is a default container based on a Golang build image (see config.BuildImage) on top of which is installed several packages and Go packages. The workdir is also set based on config.AppDir.
This container is used as the root of many other commands, allowing to share cache as much as possible.
func GoDeps
func GoDeps(c *Client) *dagger.Container
GoDeps mount the Go module files and download the needed dependencies.
func GoDoc
func GoDoc(ctx context.Context, c *Client) error
func GoImports
func GoImports(ctx context.Context, c *Client, locals []string) error
func GoMod
func GoMod(c *Client) *dagger.Container
func GoVulnCheck
func GoVulnCheck(ctx context.Context, c *Client) error
func GolangCILint
func GolangCILint(ctx context.Context, c *Client) error
func GolangCILintBase
func GolangCILintBase(c *Client) *dagger.Container
func LocalBuild
func LocalBuild(ctx context.Context, c *Client, buildOpts types.LocalBuildOpts) error
func PrintGoformatter(ctx context.Context, c *Client, formatter string) error
func RunGoTests
func RunGoTests(ctx context.Context, c *Client) error
func RunInDagger
func RunInDagger(ctx context.Context, conf *config.Dague, do func(*Client) error) error
func Sources
func Sources(c *Client) *dagger.Container
Sources is a container based on GoDeps. It contains the Go source code but also all the needed dependencies from Go modules.
func SourcesNoDeps
func SourcesNoDeps(c *Client) *dagger.Container
SourcesNoDeps is a container including all the source code, but without the Go modules downloaded. It can be helpful with projects where dependencies are vendored but also just minimise the number of steps when it's not required.
func applyBase
func applyBase(cont *dagger.Container, c *dagger.Client, conf *config.Dague) *dagger.Container
func formatPrint(formatter string) []string
func formatWrite(formatter string) []string
func goBuild
func goBuild(ctx context.Context, c *Client, src *dagger.Container, os, arch string, buildOpts types.BuildOpts, buildFile string) error
func goImports
func goImports(locals []string) []string
func goModDownload
func goModDownload() []string
GoModDownload runs the go mod download command.
func goModFiles
func goModFiles(c *Client) *dagger.Directory
GoModFiles creates a directory containing the default go mod files.
func goModTidy
func goModTidy() []string
GoModTidy runs the go mod tidy command.
func sources
func sources(c *Client, cont *dagger.Container) *dagger.Container
type Client
type Client struct {
Dagger *dagger.Client
Config *config.Dague
}
func NewClient
func NewClient(c *dagger.Client, conf *config.Dague) *Client
Generated by gomarkdoc