modules

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

View Source
const EngineVersionLatest string = "latest"

EngineVersionLatest is replaced by the current engine.Version during module init.

View Source
const Filename = "dagger.json"

Filename is the name of the module config file.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleCodegenConfig added in v0.10.3

type ModuleCodegenConfig struct {
	// Whether to automatically generate a .gitignore file for this module.
	AutomaticGitignore *bool `json:"automaticGitignore,omitempty"`
}

func (ModuleCodegenConfig) Clone added in v0.16.0

type ModuleConfig added in v0.9.8

type ModuleConfig struct {
	// The name of the module.
	Name string `json:"name"`

	// The version of the engine this module was last updated with.
	EngineVersion string `json:"engineVersion"`

	// The SDK this module uses
	SDK *SDK `json:"sdk,omitempty"`

	// Paths to explicitly include from the module, relative to the configuration file.
	Include []string `json:"include,omitempty"`

	// The modules this module depends on.
	Dependencies []*ModuleConfigDependency `json:"dependencies,omitempty"`

	// The path, relative to this config file, to the subdir containing the module's implementation source code.
	Source string `json:"source,omitempty"`

	// Codegen configuration for this module.
	Codegen *ModuleCodegenConfig `json:"codegen,omitempty"`

	// Paths to explicitly exclude from the module, relative to the configuration file.
	// Deprecated: Use !<pattern> in the include list instead.
	Exclude []string `json:"exclude,omitempty"`
}

ModuleConfig is the config for a single module as loaded from a dagger.json file. Only contains fields that are set/edited by dagger utilities.

func (*ModuleConfig) DependencyByName added in v0.9.8

func (modCfg *ModuleConfig) DependencyByName(name string) (*ModuleConfigDependency, bool)

func (*ModuleConfig) UnmarshalJSON added in v0.9.9

func (modCfg *ModuleConfig) UnmarshalJSON(data []byte) error

type ModuleConfigDependency added in v0.9.8

type ModuleConfigDependency struct {
	// The name to use for this dependency. By default, the same as the dependency module's name,
	// but can also be overridden to use a different name.
	Name string `json:"name"`

	// The source ref of the module dependency.
	Source string `json:"source"`

	// The pinned version of the module dependency.
	Pin string `json:"pin,omitempty"`
}

func (*ModuleConfigDependency) UnmarshalJSON added in v0.9.8

func (depCfg *ModuleConfigDependency) UnmarshalJSON(data []byte) error

type ModuleConfigUserFields added in v0.15.2

type ModuleConfigUserFields struct {
	// The self-describing json $schema
	Schema string `json:"$schema,omitempty"`
}

type ModuleConfigView added in v0.10.3

type ModuleConfigView struct {
	Name     string   `json:"name"`
	Patterns []string `json:"patterns,omitempty"`
}

type ModuleConfigWithUserFields added in v0.15.2

type ModuleConfigWithUserFields struct {
	ModuleConfigUserFields
	ModuleConfig
}

ModuleConfigWithUserFields is the config for a single module as loaded from a dagger.json file. Includes additional fields that should only be set by the user.

func (*ModuleConfigWithUserFields) UnmarshalJSON added in v0.15.2

func (modCfg *ModuleConfigWithUserFields) UnmarshalJSON(data []byte) error

type SDK added in v0.15.4

type SDK struct {
	Source string `json:"source"`
}

SDK represents the sdk field in dagger.json The source can be reference to a built-in sdk e.g. go, php, elixir or can be a reference to a git path e.g. github.com/username/reponame/sdk-name

func (*SDK) UnmarshalJSON added in v0.15.4

func (sdk *SDK) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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