cargo

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlanEntryRustCargo = "rust-cargo"
	PlanEntrySyft      = "syft"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	CargoService runner.CargoService
	Logger       bard.Logger
}

func (Build) Build

func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error)

type Cache

type Cache struct {
	Logger  bard.Logger
	AppPath string
}

func (Cache) Contribute

func (c Cache) Contribute(layer libcnb.Layer) (libcnb.Layer, error)

func (Cache) Name

func (Cache) Name() string

type Cargo

type Cargo struct {
	AdditionalMetadata map[string]interface{}
	ApplicationPath    string
	Cache              Cache
	CargoService       runner.CargoService
	IncludeFolders     string
	ExcludeFolders     string
	InstallArgs        string
	LayerContributor   libpak.LayerContributor
	Logger             bard.Logger
	RunSBOMScan        bool
	SBOMScanner        sbom.SBOMScanner
	Stack              string
	Tools              []string
	ToolsArgs          []string
	WorkspaceMembers   string
}

func NewCargo

func NewCargo(options ...Option) (Cargo, error)

NewCargo creates a new cargo with the given options

func (Cargo) BuildProcessTypes added in v0.1.0

func (c Cargo) BuildProcessTypes(tiniEnabled bool) ([]libcnb.Process, error)

func (Cargo) Contribute

func (c Cargo) Contribute(layer libcnb.Layer) (libcnb.Layer, error)

func (Cargo) IsPathSet

func (c Cargo) IsPathSet() (bool, error)

func (Cargo) Name

func (c Cargo) Name() string

type Detect

type Detect struct {
}

func (Detect) Detect

func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error)

type Option added in v0.1.0

type Option func(cargo Cargo) Cargo

Option is a function for configuring a Cargo

func WithAdditionalMetadata added in v0.1.0

func WithAdditionalMetadata(metadata map[string]interface{}) Option

WithAdditionalMetadata sets additional metadata to include

func WithApplicationPath added in v0.1.0

func WithApplicationPath(ap string) Option

WithApplicationPath sets app path

func WithCargoService added in v0.1.0

func WithCargoService(s runner.CargoService) Option

WithCargoService sets cargo service

func WithExcludeFolders added in v0.2.0

func WithExcludeFolders(f string) Option

WithExcludeFolders sets logger

func WithIncludeFolders added in v0.6.0

func WithIncludeFolders(f string) Option

WithIncludeFolders sets logger

func WithInstallArgs added in v0.1.0

func WithInstallArgs(args string) Option

WithInstallArgs sets install args

func WithLogger added in v0.1.0

func WithLogger(l bard.Logger) Option

WithLogger sets logger

func WithRunSBOMScan added in v0.5.0

func WithRunSBOMScan(sc bool) Option

WithRunSBOMScan sets workspace members

func WithSBOMScanner added in v0.5.0

func WithSBOMScanner(sc sbom.SBOMScanner) Option

WithSBOMScanner sets workspace members

func WithStack added in v0.4.0

func WithStack(stack string) Option

WithStack sets logger

func WithTools added in v0.6.0

func WithTools(tools []string) Option

WithTools sets logger

func WithToolsArgs added in v0.6.0

func WithToolsArgs(toolsArgs []string) Option

WithToolsArgs sets logger

func WithWorkspaceMembers added in v0.1.0

func WithWorkspaceMembers(ap string) Option

WithWorkspaceMembers sets workspace members

Jump to

Keyboard shortcuts

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