targets

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(ctx context.Context)

Runs all generate and build targets

func Lint

func Lint(ctx context.Context)

Runs golangci-lint with the project config and custom linters

func None

func None()

Does nothing

Types

type Build

type Build mg.Namespace

func (Build) All

func (Build) All(ctx context.Context)

Builds the opni binary and plugins

func (Build) Archives

func (Build) Archives(ctx context.Context) error

Compiles all go packages except those named 'main'

func (Build) Linter

func (Build) Linter(ctx context.Context) error

Builds the custom linter plugin

func (Build) Opni

func (Build) Opni(ctx context.Context) error

Builds the opni binary

func (Build) OpniMinimal

func (Build) OpniMinimal(ctx context.Context) error

Builds the opni-minimal binary

func (Build) OpniReleaseCLI added in v0.11.2

func (Build) OpniReleaseCLI(ctx context.Context, fileSuffix string) error

Builds the opni release CLI binary, requires version as input

func (Build) Plugin

func (Build) Plugin(ctx context.Context, name string) error

Builds a single plugin by name

func (Build) Plugins

func (Build) Plugins(ctx context.Context)

Builds all plugins

func (Build) Testenv

func (Build) Testenv(ctx context.Context) error

Builds the test environment binary

func (Build) TypescriptServiceGenerator added in v0.12.0

func (Build) TypescriptServiceGenerator() error

Build the typescript service generator plugin

type CRD

type CRD mg.Namespace

func (CRD) All

func (CRD) All(ctx context.Context)

func (CRD) CRDGen

func (CRD) CRDGen(ctx context.Context) error

func (CRD) ReplaceCRDText

func (CRD) ReplaceCRDText(ctx context.Context) error

type Dagger

type Dagger mg.Namespace

func (Dagger) Help

func (ns Dagger) Help() error

Invokes 'go run ./dagger --help'

func (Dagger) Install added in v0.11.2

func (Dagger) Install() error

Installs or updates the Dagger CLI to ~/go/bin/dagger

func (Dagger) Run

func (ns Dagger) Run(arg0 string) error

Invokes 'go run ./dagger' with all arguments

func (Dagger) Setup

func (Dagger) Setup() error

Invokes 'go run ./dagger --setup'

type Generate

type Generate mg.Namespace

func (Generate) All

func (Generate) All(ctx context.Context)

Runs all generators (protobuf, mocks, controllers)

func (Generate) Controllers

func (Generate) Controllers(ctx context.Context) error

Generates code and CRDs for kubebuilder apis

func (Generate) Mocks

func (Generate) Mocks(ctx context.Context) error

Generates mocks using the config in pkg/test/mock/mockgen.yaml

func (Generate) Protobuf

func (Generate) Protobuf(ctx context.Context)

Generates all protobuf code

func (Generate) ProtobufCLI added in v0.12.0

func (Generate) ProtobufCLI() error

Can be used to "bootstrap" the cli generator when modifying cli.proto

func (Generate) ProtobufGo

func (Generate) ProtobufGo(ctx context.Context) error

Generates Go protobuf code

func (Generate) ProtobufPython

func (Generate) ProtobufPython(ctx context.Context) error

Generates Python protobuf code

func (Generate) ProtobufTypescript added in v0.12.0

func (Generate) ProtobufTypescript() error

type Mock

type Mock struct {
	Source string   `yaml:"source,omitempty"`
	Import string   `yaml:"import,omitempty"`
	Dest   string   `yaml:"dest"`
	Types  []string `yaml:"types"`
}

type Mocks

type Mocks struct {
	Mocks []Mock `yaml:"mocks"`
}

type NoopSpan

type NoopSpan struct{}

func (NoopSpan) End

func (NoopSpan) End()

type NoopTracer

type NoopTracer struct{}

func (NoopTracer) Start

func (NoopTracer) Start(ctx context.Context, _ string) (context.Context, Span)

type Span

type Span interface {
	End()
}

type Test

type Test mg.Namespace

func (Test) All

func (Test) All() error

Runs all tests

func (Test) Bin

func (Test) Bin() error

Creates or rebuilds the testbin directory

func (Test) BinConfig

func (Test) BinConfig()

Prints the testbin configuration to stdout

func (Test) Cover

func (Test) Cover() error

Runs all tests with coverage analysis

func (Test) Env

func (Test) Env()

Runs the test environment

func (Test) Short added in v0.12.0

func (Test) Short() error

Runs all tests in short mode

type TracerInterface

type TracerInterface interface {
	Start(ctx context.Context, name string) (context.Context, Span)
}
var Tracer TracerInterface = NoopTracer{}

Jump to

Keyboard shortcuts

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