Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package config provides types and functions for reading and writing librarian.yaml configuration files.

Index

Constants

View Source
const (
	// BranchMain is the default git branch name.
	BranchMain = "main"

	// LibrarianYAML is the filename for the librarian configuration file.
	LibrarianYAML = "librarian.yaml"

	// RemoteUpstream is the default git remote name.
	RemoteUpstream = "upstream"
)
View Source
const (
	// LanguageUnknown represents an unsupported or unspecified language.
	LanguageUnknown = "unknown"
	// LanguageAll is the identifier for all languages.
	LanguageAll = "all"
	// LanguageCsharp is the language identifier for C#.
	LanguageCsharp = "csharp"
	// LanguageDart is the language identifier for Dart.
	LanguageDart = "dart"
	// LanguageDotnet is the language identifier for .NET.
	LanguageDotnet = "dotnet"
	// LanguageFake is the language identifier for Fakes.
	LanguageFake = "fake"
	// LanguageGo is the language identifier for Go.
	LanguageGo = "go"
	// LanguageJava is the language identifier for Java.
	LanguageJava = "java"
	// LanguageNodejs is the language identifier for Node.js.
	LanguageNodejs = "nodejs"
	// LanguagePhp is the language identifier for PHP.
	LanguagePhp = "php"
	// LanguagePython is the language identifier for Python.
	LanguagePython = "python"
	// LanguageRuby is the language identifier for Ruby.
	LanguageRuby = "ruby"
	// LanguageRust is the language identifier for Rust.
	LanguageRust = "rust"
	// LanguageSwift is the language identifier for Swift.
	LanguageSwift = "swift"
)
View Source
const (
	// SpecProtobuf defines the name for service specifications based on
	// [Protobuf].
	//
	// [Protobuf]: https://protocolbuffers.dev
	SpecProtobuf = "protobuf"
	// SpecDiscovery defines the name for service specifications based on
	// [Discovery docs].
	//
	// [Discovery docs]: https://developers.google.com/discovery/v1/reference/apis
	SpecDiscovery = "discovery"
	// SpecOpenAPI defines the name for service specifications based on
	// [OpenAPI].
	//
	// [OpenAPI]: https://swagger.io/specification/
	SpecOpenAPI = "openapi"
	// SpecNone is used for client library specifications that combine two other
	// clients. The only case today is Cloud Storage for Rust.
	SpecNone = "none"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API added in v0.1.1

type API struct {
	// Path specifies which googleapis Path to generate from (for generated
	// libraries).
	Path string `yaml:"path,omitempty"`

	// Go contains Go-specific API configuration.
	Go *GoAPI `yaml:"go,omitempty"`

	// Java contains Java-specific API configuration.
	Java *JavaAPI `yaml:"java,omitempty"`

	// Nodejs contains Node.js-specific API configuration.
	Nodejs *NodejsAPI `yaml:"nodejs,omitempty"`

	// PHP contains PHP-specific API configuration.
	PHP *PHPAPI `yaml:"php,omitempty"`

	// Ruby contains Ruby-specific API configuration.
	Ruby *RubyAPI `yaml:"ruby,omitempty"`
}

API describes an API to include in a library.

type AdditionalProto added in v0.14.0

type AdditionalProto struct {
	// Path is the path to the proto file, relative to the googleapis root.
	Path string `yaml:"path"`

	// GenerateProtoClasses indicates whether to include this proto in standard Protocol Buffer Java classes generation.
	GenerateProtoClasses bool `yaml:"generate_proto_classes,omitempty"`

	// CopyToOutput indicates whether to copy this proto to the output directory.
	CopyToOutput bool `yaml:"copy_to_output,omitempty"`
}

AdditionalProto represents an additional proto file to include in generation.

type CargoTool added in v0.10.0

type CargoTool struct {
	// Name is the cargo package name.
	Name string `yaml:"name"`

	// Version is the version to install.
	Version string `yaml:"version"`
}

CargoTool defines a tool to install via cargo.

type CommonDiscovery added in v0.17.0

type CommonDiscovery struct {
	// OperationID is the ID of the LRO operation type (e.g., ".google.cloud.compute.v1.Operation").
	OperationID string `yaml:"operation_id"`

	// Pollers is a list of LRO polling configurations.
	Pollers []CommonPoller `yaml:"pollers,omitempty"`
}

CommonDiscovery contains discovery-specific configuration for LRO polling.

This is used (via some aliases) by both Swift and Rust, thus the `Common` prefix.

type CommonPoller added in v0.17.0

type CommonPoller struct {
	// Prefix is an acceptable prefix for the URL path (e.g., "compute/v1/projects/{project}/zones/{zone}").
	Prefix string `yaml:"prefix"`

	// MethodID is the corresponding method ID (e.g., ".google.cloud.compute.v1.zoneOperations.get").
	MethodID string `yaml:"method_id"`
}

CommonPoller defines how to find a suitable poller RPC for discovery APIs.

This is used (via some aliases) by both Swift and Rust, thus the `Common` prefix.

type ComposerTool added in v0.26.0

type ComposerTool struct {
	// Name is the composer package name.
	Name string `yaml:"name"`

	// Version is the version to install.
	Version string `yaml:"version"`

	// Repo is the GitHub repository to fetch the tool from (e.g. github.com/googleapis/gapic-generator-php).
	Repo string `yaml:"repo,omitempty"`

	// SHA256 is the SHA256 checksum of the package.
	SHA256 string `yaml:"sha256,omitempty"`

	// LocalPath is the path to a local composer project.
	// When present, Version, Repo, and SHA256 are ignored.
	LocalPath string `yaml:"local_path,omitempty"`

	// Entrypoint is the path to the main script to execute.
	// If set, an executable wrapper is generated for this tool.
	Entrypoint string `yaml:"entrypoint,omitempty"`
}

ComposerTool defines a tool to install via Composer.

type Config

type Config struct {
	// Language is the language for this workspace (go, python, rust).
	Language string `yaml:"language"`

	// Version is the librarian tool version to use.
	Version string `yaml:"version,omitempty"`

	// Repo is the repository name, such as "googleapis/google-cloud-python".
	// It is used for:
	// - Providing to the Java GAPIC generator for observability features.
	// - Generating the .repo-metadata.json.
	Repo string `yaml:"repo,omitempty"`

	// Sources references external source repositories.
	Sources *Sources `yaml:"sources,omitempty"`

	// Tools defines required tools.
	Tools *Tools `yaml:"tools,omitempty"`

	// Default contains default settings for all libraries. They apply to all libraries unless overridden.
	Default *Default `yaml:"default,omitempty"`

	// Libraries contains configuration overrides for libraries that need
	// special handling, and differ from default settings.
	Libraries []*Library `yaml:"libraries,omitempty"`
}

Config represents a librarian.yaml configuration file.

type CopyConfig added in v0.25.0

type CopyConfig struct {
	// Src specifies the source file path relative to the staging directory.
	Src string `yaml:"src"`

	// Dst specifies the destination file path relative to the library root.
	Dst string `yaml:"dst"`
}

CopyConfig represents a file copy rule.

type DartPackage added in v0.8.0

type DartPackage struct {
	// APIKeysEnvironmentVariables is a comma-separated list of environment variable names
	// that can contain API keys (e.g., "GOOGLE_API_KEY,GEMINI_API_KEY").
	APIKeysEnvironmentVariables string `yaml:"api_keys_environment_variables,omitempty"`

	// Dependencies is a comma-separated list of dependencies.
	Dependencies string `yaml:"dependencies,omitempty"`

	// DevDependencies is a comma-separated list of development dependencies.
	DevDependencies string `yaml:"dev_dependencies,omitempty"`

	// ExtraImports is additional imports to include in the generated library.
	ExtraImports string `yaml:"extra_imports,omitempty"`

	// IncludeList is a list of proto files to include (e.g., "date.proto", "expr.proto").
	IncludeList []string `yaml:"include_list,omitempty"`

	// IssueTrackerURL is the URL for the issue tracker.
	IssueTrackerURL string `yaml:"issue_tracker_url,omitempty"`

	// LibraryPathOverride overrides the library path.
	LibraryPathOverride string `yaml:"library_path_override,omitempty"`

	// NameOverride overrides the package name
	NameOverride string `yaml:"name_override,omitempty"`

	// Packages maps Dart package names to version constraints.
	// Keys are in the format "package:googleapis_auth" and values are version strings like "^2.0.0".
	// These are merged with default settings, with library settings taking precedence.
	Packages map[string]string `yaml:"packages,omitempty"`

	// PartFile is the path to a part file to include in the generated library.
	PartFile string `yaml:"part_file,omitempty"`

	// Prefixes maps protobuf package names to Dart import prefixes.
	// Keys are in the format "prefix:google.protobuf" and values are the prefix names.
	// These are merged with default settings, with library settings taking precedence.
	Prefixes map[string]string `yaml:"prefixes,omitempty"`

	// Protos maps protobuf package names to Dart import paths.
	// Keys are in the format "proto:google.api" and values are import paths like "package:google_cloud_api/api.dart".
	// These are merged with default settings, with library settings taking precedence.
	Protos map[string]string `yaml:"protos,omitempty"`

	// ReadmeAfterTitleText is text to insert in the README after the title.
	ReadmeAfterTitleText string `yaml:"readme_after_title_text,omitempty"`

	// ReadmeQuickstartText is text to use for the quickstart section in the README.
	ReadmeQuickstartText string `yaml:"readme_quickstart_text,omitempty"`

	// RepositoryURL is the URL to the repository for this package.
	RepositoryURL string `yaml:"repository_url,omitempty"`

	// SkippedIds is a list of proto IDs to skip in generation.
	SkippedIds []string `yaml:"skipped_ids,omitempty"`

	// SupportsSSE indicates whether the target API supports Server-Sent Events (SSE) for methods
	// where `ServerSideStreaming` is `true`.
	SupportsSSE bool `yaml:"supports_sse,omitempty"`

	// TitleOverride overrides the API title.
	TitleOverride string `yaml:"title_override,omitempty"`

	// Version is the version of the dart package.
	Version string `yaml:"version,omitempty"`
}

DartPackage contains Dart-specific library configuration.

type Default added in v0.8.0

type Default struct {
	// Keep lists files and directories to preserve during regeneration. These represent
	// critical custom handwritten files (e.g., package.json, custom configs, and handwritten tests)
	// and semi-handmade documentation files (README.md, CHANGELOG.md, .readme-partials.yaml)
	// that are not natively generated from proto schemas but are strictly required by the post-processor's
	// markdown generation and release tracking passes.
	Keep []string `yaml:"keep,omitempty"`
	// Output is the directory where code is written. For example, for Rust
	// this is src/generated.
	Output string `yaml:"output,omitempty"`

	// TagFormat is the template for git tags, such as "{name}/v{version}".
	TagFormat string `yaml:"tag_format,omitempty"`

	// Dart contains Dart-specific default configuration.
	Dart *DartPackage `yaml:"dart,omitempty"`

	// Dotnet contains .NET-specific default configuration.
	Dotnet *DotnetPackage `yaml:"dotnet,omitempty"`

	// Go contains Go-specific default configuration.
	Go *GoDefault `yaml:"go,omitempty"`

	// Java contains Java-specific default configuration.
	Java *JavaDefault `yaml:"java,omitempty"`

	// Nodejs contains Node.js-specific default configuration.
	Nodejs *NodejsDefault `yaml:"nodejs,omitempty"`

	// PHP contains PHP-specific default configuration.
	PHP *PHPDefault `yaml:"php,omitempty"`

	// Rust contains Rust-specific default configuration.
	Rust *RustDefault `yaml:"rust,omitempty"`

	// Python contains Python-specific default configuration.
	Python *PythonDefault `yaml:"python,omitempty"`

	// Swift contains Swift-specific default configuration.
	Swift *SwiftDefault `yaml:"swift,omitempty"`
}

Default contains default settings for all libraries.

type DotnetCsproj added in v0.8.4

type DotnetCsproj struct {
	// Snippets contains XML fragments for .csproj files.
	Snippets *DotnetCsprojSnippets `yaml:"snippets,omitempty"`

	// IntegrationTests contains configuration for integration test projects.
	IntegrationTests *DotnetCsprojSnippets `yaml:"integration_tests,omitempty"`
}

DotnetCsproj contains configuration for .csproj file generation.

type DotnetCsprojSnippets added in v0.8.4

type DotnetCsprojSnippets struct {
	// EmbeddedResources is a list of glob patterns for embedded resources.
	EmbeddedResources []string `yaml:"embedded_resources,omitempty"`
}

DotnetCsprojSnippets contains XML fragments to be merged into .csproj files.

type DotnetPackage added in v0.8.4

type DotnetPackage struct {
	// AdditionalServiceDescriptors is a list of extra service descriptors to include.
	AdditionalServiceDescriptors []string `yaml:"additional_service_descriptors,omitempty"`

	// Csproj contains configuration for .csproj file generation and overrides.
	Csproj *DotnetCsproj `yaml:"csproj,omitempty"`

	// Dependencies maps NuGet package IDs to version strings.
	Dependencies map[string]string `yaml:"dependencies,omitempty"`

	// Generator overrides the default generator (e.g., "proto").
	Generator string `yaml:"generator,omitempty"`

	// PackageGroup lists packages that must be released together.
	PackageGroup []string `yaml:"package_group,omitempty"`

	// Postgeneration contains post-generation shell commands or extra protos.
	Postgeneration []*DotnetPostgeneration `yaml:"postgeneration,omitempty"`

	// Pregeneration contains declarative proto mutations.
	Pregeneration []*DotnetPregeneration `yaml:"pregeneration,omitempty"`
}

DotnetPackage contains .NET-specific library configuration.

type DotnetPostgeneration added in v0.8.4

type DotnetPostgeneration struct {
	// Run is a shell command to execute.
	Run string `yaml:"run,omitempty"`

	// ExtraProto is an extra proto file to compile.
	ExtraProto string `yaml:"extra_proto,omitempty"`
}

DotnetPostgeneration represents a post-generation action.

type DotnetPregeneration added in v0.8.4

type DotnetPregeneration struct {
	// RenameMessage renames a message.
	RenameMessage *DotnetRenameMessage `yaml:"rename_message,omitempty"`

	// RemoveField removes a field from a message.
	RemoveField *DotnetRemoveField `yaml:"remove_field,omitempty"`

	// RenameRPC renames an RPC.
	RenameRPC *DotnetRenameRPC `yaml:"rename_rpc,omitempty"`
}

DotnetPregeneration represents a declarative proto mutation.

type DotnetRemoveField added in v0.8.4

type DotnetRemoveField struct {
	Message string `yaml:"message"`
	Field   string `yaml:"field"`
}

DotnetRemoveField contains remove field configuration.

type DotnetRenameMessage added in v0.8.4

type DotnetRenameMessage struct {
	From string `yaml:"from"`
	To   string `yaml:"to"`
}

DotnetRenameMessage contains rename message configuration.

type DotnetRenameRPC added in v0.8.4

type DotnetRenameRPC struct {
	From     string `yaml:"from"`
	To       string `yaml:"to"`
	WireName string `yaml:"wire_name,omitempty"`
}

DotnetRenameRPC contains rename RPC configuration.

type GemTool added in v0.26.0

type GemTool struct {
	// Name is the gem name.
	Name string `yaml:"name"`

	// Version is the version to install.
	Version string `yaml:"version"`
}

GemTool defines a tool to install via gem.

type GoAPI added in v0.8.0

type GoAPI struct {
	// ClientPackage is the package name of the generated client.
	ClientPackage string `yaml:"client_package,omitempty"`
	// DIREGAPIC indicates whether generation uses DIREGAPIC (Discovery REST GAPICs).
	// This is typically false. Used for the GCE (compute) client.
	DIREGAPIC bool `yaml:"diregapic,omitempty"`
	// DisabledGeneratorFeatures provides a mechanism for disabling generator features
	// at the API level.
	// These features will be disabled if both specified in EnabledGeneratorFeatures and
	// DisabledGeneratorFeatures.
	DisabledGeneratorFeatures []string `yaml:"disabled_generator_features,omitempty"`
	// EnabledGeneratorFeatures provides a mechanism for enabling generator features
	// at the API level.
	EnabledGeneratorFeatures []string `yaml:"enabled_generator_features,omitempty"`
	// ImportPath is the Go import path for the API.
	ImportPath string `yaml:"import_path,omitempty"`
	// InternalCopies lists private copies of the API's messages to generate
	// into internal Go packages, so that an additional protoc plugin can run
	// on each copy without its output becoming part of the public API surface.
	// Each copy is generated from the proto files in the API directory,
	// without services, under a renamed proto package so that it can be
	// linked beside the public package. Copies require the open protobuf API
	// level. A copy directory holds generated code only and is removed
	// entirely before regeneration, so handwritten code must live outside it.
	InternalCopies []*GoInternalCopy `yaml:"internal_copies,omitempty"`
	// NestedProtos is a list of nested proto files.
	NestedProtos []string `yaml:"nested_protos,omitempty"`
	// NoMetadata indicates whether to skip generating gapic_metadata.json.
	// This is typically false.
	NoMetadata bool `yaml:"no_metadata,omitempty"`
	// NoSnippets indicates whether to skip generating snippets.
	// This is typically false.
	NoSnippets bool `yaml:"no_snippets,omitempty"`
	// ProtoAPILevel allows direct control of protobuf plugin's code generation
	// level. Values allowed are API_OPEN, API_HYBRID, and API_OPAQUE.
	// The default is unset, which relies on proto file annotations.
	// More info: https://protobuf.dev/reference/go/opaque-migration/
	ProtoAPILevel string `yaml:"proto_api_level,omitempty"`
	// ProtoOnly determines whether to generate a Proto-only client.
	// A proto-only client does not define a service in the proto files.
	ProtoOnly bool `yaml:"proto_only,omitempty"`
	// ProtoPackage is the proto package name.
	ProtoPackage string `yaml:"proto_package,omitempty"`
}

GoAPI represents configuration for a single API within a Go module.

type GoDefault added in v0.13.0

type GoDefault struct {
	// Toolchain is the desired Go toolchain version (e.g., "go1.25.0").
	Toolchain string `yaml:"toolchain,omitempty"`
	// DefaultEnabledGeneratorFeatures lists the generator features enabled by default for all APIs.
	// These default features are appended AFTER any features explicitly declared in individual APIs.
	DefaultEnabledGeneratorFeatures []string `yaml:"default_enabled_generator_features,omitempty"`
}

GoDefault defines Go-specific default configuration.

type GoInternalCopy added in v0.45.0

type GoInternalCopy struct {
	// ImportPath is the Go import path of the copy, relative to
	// cloud.google.com/go, in canonical form and inside the library's own
	// module. It must contain an "internal" path element so that the copy
	// cannot be imported by users of the library, and must not overlap the
	// directory of another copy or of a generated client. Existing symlinks
	// below the library output directory are rejected before generation.
	ImportPath string `yaml:"import_path"`
	// Plugin is the required additional protoc plugin, without the
	// "protoc-gen-" prefix, for example "go-vtproto". The binary is looked
	// up in the Go tool bin directory, then on the PATH. Declare its Go
	// module under tools.go. The name must contain only letters, digits,
	// "-", or "_".
	Plugin string `yaml:"plugin"`
	// PluginOptions are passed as `--<plugin>_opt` values. The plugin must
	// write its output next to protoc-gen-go's, under the Go import path.
	// Layout options `paths=`, `module=`, and `M<file>=` import mappings are
	// rejected, including in comma-separated parameter lists.
	PluginOptions []string `yaml:"plugin_options,omitempty"`
	// ProtoPackage is the proto package of the copy. It must be a valid
	// proto package name that differs from the proto package of the API and
	// of every other copy.
	ProtoPackage string `yaml:"proto_package"`
}

GoInternalCopy describes a private copy of an API's messages generated into an internal Go package.

type GoModule added in v0.8.0

type GoModule struct {
	// DeleteGenerationOutputPaths is a list of paths to delete before generation.
	DeleteGenerationOutputPaths []string `yaml:"delete_generation_output_paths,omitempty"`
	// ModulePathVersion is the version of the Go module path.
	ModulePathVersion string `yaml:"module_path_version,omitempty"`
	// NestedModule is the name of a nested module directory.
	NestedModule string `yaml:"nested_module,omitempty"`
}

GoModule represents the Go-specific configuration for a library.

type GoTool added in v0.11.0

type GoTool struct {
	// Name is the go module name.
	Name string `yaml:"name"`

	// Version is the version to install.
	Version string `yaml:"version,omitempty"`
}

GoTool defines a tool to install via go.

type JavaAPI added in v0.8.4

type JavaAPI struct {
	// Monolithic indicates whether to merge all modules (proto, grpc, gapic)
	// into a single directory. This is currently only used for the grafeas library
	// to maintain its legacy code structure.
	Monolithic bool `yaml:"monolithic,omitempty"`

	// AdditionalProtos is a list of additional proto files to include in generation.
	// By default, these files are used purely as compilation dependencies for the GAPIC generator.
	// Note: google/cloud/common_resources.proto is included by default unless
	// OmitCommonResources is set to true.
	AdditionalProtos []*AdditionalProto `yaml:"additional_protos,omitempty"`

	// OmitCommonResources indicates whether to omit the default inclusion of
	// google/cloud/common_resources.proto.
	OmitCommonResources bool `yaml:"omit_common_resources,omitempty"`

	// ExcludedProtos is a list of proto files to exclude from generation.
	// It expects the full path starting from the root of the googleapis
	// directory (e.g., "google/cloud/aiplatform/v1/schema/io_format.proto").
	ExcludedProtos []string `yaml:"excluded_protos,omitempty"`

	// GAPICArtifactIDOverride overrides the artifact ID for the GAPIC module.
	// It determines the module's directory name and is used to derive proto
	// and gRPC artifact IDs if they are not explicitly overridden.
	GAPICArtifactIDOverride string `yaml:"gapic_artifact_id_override,omitempty"`

	// GRPCArtifactIDOverride overrides the artifact ID for the gRPC module.
	// The artifact ID is also used as the name for the module's directory.
	GRPCArtifactIDOverride string `yaml:"grpc_artifact_id_override,omitempty"`

	// ProtoArtifactIDOverride overrides the artifact ID for the proto module.
	// The artifact ID is also used as the name for the module's directory.
	ProtoArtifactIDOverride string `yaml:"proto_artifact_id_override,omitempty"`

	// GenerateGAPIC indicates whether to generate the GAPIC client surface.
	// Defaults to true.
	GenerateGAPIC *bool `yaml:"generate_gapic,omitempty"`

	// GenerateProto indicates whether to generate proto module.
	// Defaults to true. If set to false, should also set generate_resource_names to false.
	GenerateProto *bool `yaml:"generate_proto,omitempty"`

	// GenerateGRPC indicates whether to generate grpc module.
	// Defaults to true.
	// TODO(https://github.com/googleapis/librarian/issues/6066):
	// remove after this is resolved
	GenerateGRPC *bool `yaml:"generate_grpc,omitempty"`

	// GenerateResourceNames indicates whether to extract resource names from the GAPIC phase.
	// Defaults to true.
	GenerateResourceNames *bool `yaml:"generate_resource_names,omitempty"`

	// CopyFiles is a list of file copies to perform after generation.
	// It applies to files in the GAPIC module.
	CopyFiles []*JavaFileCopy `yaml:"copy_files,omitempty"`

	// Samples determines whether to generate samples for the API,
	// default is true when omitted.
	Samples *bool `yaml:"samples,omitempty"`
}

JavaAPI represents configuration for a single API within a Java module.

type JavaDefault added in v0.22.0

type JavaDefault struct {
	// CustomGroupIDs maps API path prefixes (e.g., "google/shopping") to their
	// corresponding Maven Group IDs (e.g., "com.google.shopping").
	// Use this to override the default "com.google.cloud" Group ID for specific API
	// paths (e.g., maps, ads, shopping).
	CustomGroupIDs map[string]string `yaml:"custom_group_ids,omitempty"`
	// LibrariesBOMVersion is the version of the libraries-bom to use for Java.
	// This must be set in the default configuration.
	LibrariesBOMVersion string `yaml:"libraries_bom_version,omitempty"`
	// MinJavaVersion is the minimum Java version required, used only in README generation.
	// Defaults to 8 if unspecified.
	MinJavaVersion int `yaml:"min_java_version,omitempty"`
}

JavaDefault contains Java-specific default configuration.

type JavaFileCopy added in v0.11.0

type JavaFileCopy struct {
	// Source is the source path relative to the generated GAPIC module directory
	// (e.g., "src/main/java/com/google/storage/v2/gapic_metadata.json").
	// These paths are used before restructuring the output into Maven modules.
	Source string `yaml:"source"`
	// Destination is the destination path relative to the generated GAPIC module directory.
	// These paths are used before restructuring the output into Maven modules.
	Destination string `yaml:"destination"`
}

JavaFileCopy represents a file copy for Java.

type JavaModule added in v0.8.4

type JavaModule struct {
	// AlternateHeaders is the path to a file containing alternate license header text.
	AlternateHeaders string `yaml:"alternate_headers,omitempty"`

	// APIIDOverride is the ID of the API (e.g., "pubsub.googleapis.com"),
	// allows the "api_id" field in .repo-metadata.json to be overridden.
	// Defaults to "{library.api_shortname}.googleapis.com".
	APIIDOverride string `yaml:"api_id_override,omitempty"`

	// APIDescriptionOverride allows the "api_description" field in
	// .repo-metadata.json to be overridden.
	APIDescriptionOverride string `yaml:"api_description_override,omitempty"`

	// APIShortnameOverride allows the "api_shortname" field in
	// .repo-metadata.json to be overridden.
	APIShortnameOverride string `yaml:"api_shortname_override,omitempty"`

	// ArtifactID is the Maven artifact ID.
	ArtifactID string `yaml:"artifact_id,omitempty"`

	// ClientDocumentationOverride allows the "client_documentation" field in
	// .repo-metadata.json to be overridden.
	ClientDocumentationOverride string `yaml:"client_documentation_override,omitempty"`

	// CodeownerTeam is the GitHub team that owns the code.
	CodeownerTeam string `yaml:"codeowner_team,omitempty"`

	// ExcludedPOMs is a list of artifact ids, whose module should be excluded
	// when updating pom.xml and are omitted when counting new modules.
	ExcludedPOMs []string `yaml:"excluded_poms,omitempty"`

	// GroupID is the Maven group ID, defaults to "com.google.cloud".
	GroupID string `yaml:"group_id,omitempty"`

	// IssueTrackerOverride allows the "issue_tracker" field in .repo-metadata.json
	// to be overridden.
	IssueTrackerOverride string `yaml:"issue_tracker_override,omitempty"`

	// ReleasedVersion is the last released version of the library.
	// If omitted, it will be derived from the library version.
	// Note: It assumes a minor bump from the previous '.0' version
	// (e.g., '1.2.0-SNAPSHOT' -> '1.1.0') and does not support
	// deriving previous patch releases (e.g., '1.1.1').
	ReleasedVersion string `yaml:"released_version,omitempty"`

	// LibraryTypeOverride allows the "library_type" field in .repo-metadata.json
	// to be overridden.
	LibraryTypeOverride string `yaml:"library_type_override,omitempty"`

	// NamePrettyOverride allows the "name_pretty" field in .repo-metadata.json
	// to be overridden.
	NamePrettyOverride string `yaml:"name_pretty_override,omitempty"`

	// ProductDocumentationOverride allows the "product_documentation" field in
	// .repo-metadata.json to be overridden.
	ProductDocumentationOverride string `yaml:"product_documentation_override,omitempty"`

	// RecommendedPackage is the recommended package name.
	RecommendedPackage string `yaml:"recommended_package,omitempty"`

	// BillingNotRequired indicates whether the API does NOT require billing.
	// This is typically false.
	BillingNotRequired bool `yaml:"billing_not_required,omitempty"`

	// RestDocumentation is the URL for the REST documentation.
	RestDocumentation string `yaml:"rest_documentation,omitempty"`

	// RpcDocumentation is the URL for the RPC documentation.
	RpcDocumentation string `yaml:"rpc_documentation,omitempty"`

	// TransportOverride allows the "transport" field in .repo-metadata.json
	// to be overridden.
	// TODO(https://github.com/googleapis/librarian/issues/5561):
	// investigate and determine if can remove
	TransportOverride string `yaml:"transport_override,omitempty"`

	// SkipPOMUpdates indicates whether to skip updating pom.xml files.
	// TODO(https://github.com/googleapis/librarian/issues/5277):
	// re-evaluate together with ExcludedPOMs
	SkipPOMUpdates bool `yaml:"skip_pom_updates,omitempty"`

	// SkipAPIID indicates whether to skip adding api_id to .repo-metadata.json.
	SkipAPIID bool `yaml:"skip_api_id,omitempty"`
}

JavaModule contains Java-specific library configuration. TODO(https://github.com/googleapis/librarian/issues/4130): add fill defaults for fields with default.

type Library added in v0.8.0

type Library struct {

	// Name is the library name, such as "secretmanager" or "storage".
	Name string `yaml:"name,omitempty"`

	// Version is the library version.
	Version string `yaml:"version,omitempty"`

	// Comment is an optional comment explaining configuration choices.
	// It supports UTF-8 text. Multiline comments are supported, but may
	// be reformatted when tidying.
	//
	// For example, it can be used in pair with [Library.SkipGenerate] to record
	// a reason or link to a bug:
	//
	//	skip_generate: true
	//	comment: "Generation is skipped due to https://github.com/googleapis/librarian/issues/1234"
	Comment string `yaml:"comment,omitempty"`

	// Preview signifies that this API has a preview variant, and it contains
	// overrides specific to the preview API variant. This is merged with the
	// containing [Library], preferring those [Library.Preview] values that are
	// set over their counterpart in the containing configuration.
	//
	// The most common overrides are [Library.Version] and [Library.APIs], with
	// the former containing a pre-release version based on the containing
	// version of the stable client, and the latter being a subset of APIs,
	// typically omitting alpha and beta paths.
	//
	// The [Library.Output] may be a different location and derived on a
	// per-language basis, but will not be serialized in the configuration.
	//
	// Important: The boolean fields [Library.SkipRelease] and
	// [Library.SkipGenerate] set in the containing config will always be
	// applied to the Preview library as well, because previews are related to
	// the stable library and should be managed identically.
	Preview *Library `yaml:"preview,omitempty"`

	// API specifies which googleapis API to generate from (for generated
	// libraries).
	APIs []*API `yaml:"apis,omitempty"`

	// CopyrightYear is the copyright year for the library.
	CopyrightYear string `yaml:"copyright_year,omitempty"`

	// TitleOverride overrides the title used in README generation.
	TitleOverride string `yaml:"title_override,omitempty"`

	// Keep lists files and directories to preserve during regeneration. These represent
	// critical custom handwritten files (e.g., package.json, custom configs, and handwritten tests)
	// and semi-handmade documentation files (README.md, CHANGELOG.md, .readme-partials.yaml)
	// that are not natively generated from proto schemas but are strictly required by the post-processor's
	// markdown generation and release tracking passes.
	Keep []string `yaml:"keep,omitempty"`

	// Output is the directory where code is written. This overrides
	// Default.Output.
	Output string `yaml:"output,omitempty"`

	// Postprocess contains post-processing operations executed after code generation.
	Postprocess *Postprocess `yaml:"postprocess,omitempty"`

	// Roots specifies the source roots to use for generation. Defaults to googleapis.
	Roots []string `yaml:"roots,omitempty"`

	// SkipGenerate disables code generation for this library.
	SkipGenerate bool `yaml:"skip_generate,omitempty"`

	// SkipRelease disables release for this library.
	SkipRelease bool `yaml:"skip_release,omitempty"`

	// SpecificationFormat specifies the API specification format. Valid values
	// are "protobuf" (default) or "discovery".
	SpecificationFormat string `yaml:"specification_format,omitempty"`

	// Dart contains Dart-specific library configuration.
	Dart *DartPackage `yaml:"dart,omitempty"`

	// Dotnet contains .NET-specific library configuration.
	Dotnet *DotnetPackage `yaml:"dotnet,omitempty"`

	// Go contains Go-specific library configuration.
	Go *GoModule `yaml:"go,omitempty"`

	// Java contains Java-specific library configuration.
	Java *JavaModule `yaml:"java,omitempty"`

	// Nodejs contains Node.js-specific library configuration.
	Nodejs *NodejsPackage `yaml:"nodejs,omitempty"`

	// Python contains Python-specific library configuration.
	Python *PythonPackage `yaml:"python,omitempty"`

	// Ruby contains Ruby-specific library configuration.
	Ruby *RubyPackage `yaml:"ruby,omitempty"`

	// Rust contains Rust-specific library configuration.
	Rust *RustCrate `yaml:"rust,omitempty"`

	// Swift contains Swift-specific library configuration.
	Swift *SwiftPackage `yaml:"swift,omitempty"`
}

Library represents a library configuration.

type MavenTool added in v0.15.0

type MavenTool struct {
	// Name is the Maven tool name. It is used as the filename for the generated executable wrapper script.
	Name string `yaml:"name"`

	// Version is the version to install.
	Version string `yaml:"version,omitempty"`

	// GroupID is the Maven artifact group ID.
	GroupID string `yaml:"group_id,omitempty"`

	// ArtifactID is the Maven artifact ID.
	ArtifactID string `yaml:"artifact_id,omitempty"`

	// Classifier is the classifier of the Maven artifact.
	Classifier string `yaml:"classifier,omitempty"`

	// Packaging is the Maven packaging. Acceptable values are lowercase "jar" and "exe".
	// If the packaging is "exe", the wrapper script executes it directly.
	// Otherwise, it executes the tool using "java -jar".
	Packaging string `yaml:"packaging,omitempty"`

	// LocalPath is the path to a local Maven project directory containing a pom.xml file.
	// When present, version, group_id, artifact_id are ignored.
	LocalPath string `yaml:"local_path,omitempty"`

	// MainClass is the fully qualified main class name to execute (used with -cp).
	MainClass string `yaml:"main_class,omitempty"`
}

MavenTool defines a tool to install via Maven.

type MethodOperation added in v0.25.0

type MethodOperation struct {
	// Path specifies the relative file path to modify.
	Path string `yaml:"path"`

	// Action specifies the operation (`delete`, `copy_and_rename`, or `deprecate`).
	Action string `yaml:"action"`

	// FuncName specifies the target method name.
	FuncName string `yaml:"func_name"`

	// NewName specifies the new method name for copy_and_rename operations.
	NewName string `yaml:"new_name,omitempty"`

	// DeprecationMessage specifies the deprecation message for deprecate operations.
	DeprecationMessage string `yaml:"deprecation_message,omitempty"`
}

MethodOperation represents a method-level operation like delete, copy_and_rename, or deprecate.

type NodejsAPI added in v0.11.0

type NodejsAPI struct {
	// AdditionalProtos is a list of additional proto files to include in generation.
	AdditionalProtos []string `yaml:"additional_protos,omitempty"`

	// DIREGAPIC indicates whether generation uses DIREGAPIC (Discovery REST GAPICs).
	// This is typically false. Used for the GCE (compute) client.
	DIREGAPIC bool `yaml:"diregapic,omitempty"`

	// ExcludeProtos is a list of proto files to exclude from generation.
	// It expects the full path starting from the root of the googleapis
	// directory (e.g., "google/cloud/aiplatform/v1/schema/io_format.proto").
	ExcludeProtos []string `yaml:"exclude_protos,omitempty"`

	// Mixins controls mixin behavior for this API (e.g., "none" to disable).
	// When set, this overrides the package-level mixins setting.
	Mixins string `yaml:"mixins,omitempty"`

	// OmitCommonResources indicates whether to omit the default inclusion of
	// google/cloud/common_resources.proto.
	OmitCommonResources bool `yaml:"omit_common_resources,omitempty"`

	// Path is the source path.
	Path string `yaml:"path,omitempty"`
}

NodejsAPI represents configuration for a single API within a Node.js package.

type NodejsDefault added in v0.43.0

type NodejsDefault struct {
	// CustomPackagePrefixes maps API path prefixes to their npm package prefixes.
	// Values can be:
	//   - An npm scope (e.g., "google/shopping/merchant": "@google-shopping"):
	//     the remainder path becomes the package name (e.g., "@google-shopping/accounts").
	//   - An npm scope with a partial package name (e.g., "google/area120": "@google/area120"):
	//     the remainder path is appended with a hyphen (e.g., "@google/area120-tables").
	//   - An npm scope with a full package name (e.g., "google/chat": "@google-apps/chat"):
	//     used as-is when there is no remainder path (e.g., "@google-apps/chat").
	CustomPackagePrefixes map[string]string `yaml:"custom_package_prefixes,omitempty"`
}

NodejsDefault contains Node.js-specific default configuration.

type NodejsPackage added in v0.8.4

type NodejsPackage struct {
	// AdditionalProtos is a list of additional proto files to include in generation.
	// This can be overridden at the API level.
	AdditionalProtos []string `yaml:"additional_protos,omitempty"`

	// BundleConfig is the path to a GAPIC bundle config file.
	BundleConfig string `yaml:"bundle_config,omitempty"`

	// DefaultVersion is the default version of the API to use. When omitted,
	// the version in the first API path is used.
	DefaultVersion string `yaml:"default_version,omitempty"`

	// Dependencies maps npm package names to version constraints.
	Dependencies map[string]string `yaml:"dependencies,omitempty"`

	// ESM indicates that generation should produce ES Modules (ESM) outputs.
	ESM bool `yaml:"esm,omitempty"`

	// ExtraProtocParameters is a list of extra parameters to pass to protoc.
	ExtraProtocParameters []string `yaml:"extra_protoc_parameters,omitempty"`

	// HandwrittenLayer indicates the library has a handwritten layer on top
	// of the generated code.
	HandwrittenLayer bool `yaml:"handwritten_layer,omitempty"`

	// MainService is the name of the main service for libraries with a
	// handwritten layer.
	MainService string `yaml:"main_service,omitempty"`

	// PackageName is the npm package name (e.g., "@google-cloud/access-approval").
	// For standard Google Cloud libraries ("google-cloud-*"), it is automatically
	// derived as "@google-cloud/<suffix>" if omitted. For non-cloud libraries,
	// this is required and must be configured explicitly or populated during
	// "librarian add".
	PackageName string `yaml:"package_name,omitempty"`

	// ClientDocumentationOverride allows the client_documentation field in
	// .repo-metadata.json to be overridden from the default that's inferred.
	ClientDocumentationOverride string `yaml:"client_documentation_override,omitempty"`

	// MetadataNameOverride allows the name field in .repo-metadata.json to be overridden.
	MetadataNameOverride string `yaml:"metadata_name_override,omitempty"`

	// NamePrettyOverride allows the name_pretty field in .repo-metadata.json to be overridden.
	NamePrettyOverride string `yaml:"name_pretty_override,omitempty"`
}

NodejsPackage contains Node.js-specific library configuration.

type PHPAPI added in v0.26.0

type PHPAPI struct {
	// AdditionalProtos is a list of additional proto files to include in generation.
	AdditionalProtos []string `yaml:"additional_protos,omitempty"`

	// CommonResources indicates whether to include common resources in generation.
	// Must be configured either globally or per-API.
	CommonResources *bool `yaml:"common_resources,omitempty"`

	// ExcludedProtos is a list of proto files to exclude from generation.
	// It expects the full path starting from the root of the googleapis
	// directory (e.g., "google/cloud/aiplatform/v1/schema/io_format.proto").
	ExcludedProtos []string `yaml:"excluded_protos,omitempty"`

	// GapicYAML is the GAPIC YAML configuration file, if provided.
	// It expects the path relative to the config root or the googleapis directory
	// (e.g., "google/cloud/aiplatform/v1/aiplatform_gapic.yaml").
	GapicYAML string `yaml:"gapic_yaml,omitempty"`

	// GenerateGAPIC indicates whether to generate the GAPIC client surface.
	// Defaults to true.
	GenerateGAPIC *bool `yaml:"generate_gapic,omitempty"`

	// ProtoPackage overrides the derived proto package for the API.
	ProtoPackage string `yaml:"proto_package,omitempty"`

	// Samples determines whether to generate samples for the API.
	// Default to true when omitted.
	Samples *bool `yaml:"samples,omitempty"`

	// StagingSubdir is the subdirectory in staging where the generated files should be placed.
	StagingSubdir string `yaml:"staging_subdir,omitempty"`
}

PHPAPI represents configuration for a single API within a PHP package.

type PHPDefault added in v0.27.0

type PHPDefault struct {
	// CommonResources indicates whether to include common resources in generation.
	// Must be configured either globally or per-API.
	CommonResources *bool `yaml:"common_resources,omitempty"`
}

PHPDefault contains PHP-specific global default configuration.

type PNPMTool added in v0.15.0

type PNPMTool struct {
	// Name is the pnpm package name.
	Name string `yaml:"name"`

	// Version is the version to install.
	Version string `yaml:"version"`

	// Package is the URL or path of the package to install.
	Package string `yaml:"package,omitempty"`

	// SHA256 is the SHA256 checksum of the package.
	SHA256 string `yaml:"sha256,omitempty"`

	// Checksum is a deprecated alias for SHA256.
	Checksum string `yaml:"checksum,omitempty"`

	// Build defines the commands to run to build the tool after installation.
	Build []string `yaml:"build,omitempty"`

	// SrcDir is the path to the directory inside the fetched archive that should
	// be treated as the root for operations.
	SrcDir string `yaml:"src_dir,omitempty"`
}

PNPMTool defines a tool to install via pnpm.

type PipTool added in v0.10.0

type PipTool struct {
	// Name is the pip package name.
	Name string `yaml:"name"`

	// Version is the version to install.
	Version string `yaml:"version"`

	// Package is the pip install specifier (e.g., "pkg@git+https://...").
	Package string `yaml:"package,omitempty"`

	// LocalPath is the path to a local Python package to install.
	LocalPath string `yaml:"local_path,omitempty"`
}

PipTool defines a tool to install via pip.

type Postprocess added in v0.25.0

type Postprocess struct {
	// Replace contains literal string replacement rules.
	Replace []ReplaceConfig `yaml:"replace,omitempty"`

	// ReplaceRegex contains regular expression replacement rules.
	ReplaceRegex []ReplaceRegexConfig `yaml:"replace_regex,omitempty"`

	// CopyFile contains file copy rules.
	CopyFile []CopyConfig `yaml:"copy_file,omitempty"`

	// RemoveFile contains glob patterns of files to remove.
	RemoveFile []string `yaml:"remove_file,omitempty"`

	// MethodOperations contains method-level operations (`delete`, `copy_and_rename`, `deprecate`).
	MethodOperations []MethodOperation `yaml:"method_operations,omitempty"`
}

Postprocess represents post-processing configuration options integrated into librarian.yaml.

type Protoc added in v0.25.0

type Protoc struct {
	// Version is the version to install.
	Version string `yaml:"version,omitempty"`

	// SHA256 is the default SHA256 checksum of the package (used for linux-x86_64 if not specified in sha256_by_platform).
	SHA256 string `yaml:"sha256,omitempty"`

	// SHA256ByPlatform defines SHA256 checksums indexed by the release platform name
	// (e.g., "linux-x86_64", "osx-aarch_64", "osx-x86_64", "win64", "win32").
	SHA256ByPlatform map[string]string `yaml:"sha256_by_platform,omitempty"`
}

Protoc defines the configuration for installing the protoc compiler.

type PythonDefault added in v0.8.4

type PythonDefault struct {
	// AllowedNamespaces contains the list of allowed GAPIC namespaces.
	// If empty, all namespaces are allowed.
	AllowedNamespaces []string `yaml:"allowed_namespaces,omitempty"`

	// CommonGAPICPaths contains paths which are generated for any package
	// containing a GAPIC API. These are relative to the package's output
	// directory, and the string "{neutral-source}" is replaced with the path
	// to the version-neutral source code (e.g. "google/cloud/run"). If a
	// library defines its own common_gapic_paths, they will be appended to
	// the defaults.
	CommonGAPICPaths []string `yaml:"common_gapic_paths,omitempty"`

	// LibraryType is the type to emit in .repo-metadata.json.
	LibraryType string `yaml:"library_type,omitempty"`
}

PythonDefault contains Python-specific default configuration.

type PythonPackage added in v0.8.0

type PythonPackage struct {
	PythonDefault `yaml:",inline"`

	// OptArgsByAPI contains additional options passed to the generator.
	// In each entry, the key is the API path and the value is the list of
	// options to pass when generating that API.
	// Example: {"google/cloud/secrets/v1beta": ["python-gapic-name=secretmanager"]}
	OptArgsByAPI map[string][]string `yaml:"opt_args_by_api,omitempty"`

	// ProtoOnlyAPIs contains the list of API paths which are proto-only, so
	// should use regular protoc Python generation instead of GAPIC.
	ProtoOnlyAPIs []string `yaml:"proto_only_apis,omitempty"`

	// ClientDocumentationOverride allows the client_documentation field in
	// .repo-metadata.json to be overridden from the default that's inferred.
	// TODO(https://github.com/googleapis/librarian/issues/4175): reduce uses
	// of this field to only cases where it's really needed.
	ClientDocumentationOverride string `yaml:"client_documentation_override,omitempty"`

	// IssueTrackerOverride allows the issue_tracker field in
	// .repo-metadata.json to be overridden, to reduce diffs while migrating.
	// TODO(https://github.com/googleapis/librarian/issues/4175): remove this
	// field.
	IssueTrackerOverride string `yaml:"issue_tracker_override,omitempty"`

	// MetadataNameOverride allows the name in .repo-metadata.json (which is
	// also used as part of the client documentation URI) to be overridden. By
	// default, it's the package name, but older packages use the API short name
	// instead.
	MetadataNameOverride string `yaml:"metadata_name_override,omitempty"`

	// DefaultVersion is the default version of the API to use. When omitted,
	// the version in the first API path is used.
	DefaultVersion string `yaml:"default_version,omitempty"`
}

PythonPackage contains Python-specific library configuration. It inherits from PythonDefault, allowing library-specific overrides of global settings.

type ReplaceConfig added in v0.25.0

type ReplaceConfig struct {
	// Path specifies the relative file path or glob pattern to modify.
	Path string `yaml:"path"`

	// Original specifies the exact string to find.
	Original string `yaml:"original"`

	// Replacement specifies the replacement string.
	Replacement string `yaml:"replacement"`
}

ReplaceConfig represents a replacement rule.

type ReplaceRegexConfig added in v0.25.0

type ReplaceRegexConfig struct {
	// Path specifies the relative file path or glob pattern to modify.
	Path string `yaml:"path"`

	// Pattern specifies the regular expression pattern to find.
	Pattern string `yaml:"pattern"`

	// Replacement specifies the replacement string.
	Replacement string `yaml:"replacement"`
}

ReplaceRegexConfig represents a regex replacement rule.

type RubyAPI added in v0.28.0

type RubyAPI struct {
	// AdditionalProtos is a list of additional proto files to include in generation.
	AdditionalProtos []string `yaml:"additional_protos,omitempty"`

	// DeleteGenerationOutputPaths is a list of directory paths relative to the output directory to delete after generation.
	DeleteGenerationOutputPaths []string `yaml:"delete_generation_output_paths,omitempty"`

	// RubyCloudOpts contains options passed to the Ruby Cloud GAPIC generator as the `--ruby_cloud_opt` option.
	RubyCloudOpts *RubyCloudOpts `yaml:"ruby_cloud_opts,omitempty"`
}

RubyAPI represents configuration for a single API within a Ruby package.

type RubyCloudOpts added in v0.29.0

type RubyCloudOpts struct {
	// EnvPrefix is the environment variable prefix.
	EnvPrefix string `yaml:"ruby-cloud-env-prefix,omitempty"`

	// ExtraDependencies contains extra runtime dependencies to the .gemspec file.
	ExtraDependencies string `yaml:"ruby-cloud-extra-dependencies,omitempty"`

	// FactoryMethodSuffix appends a suffix to client constructor helper methods.
	FactoryMethodSuffix string `yaml:"ruby-cloud-factory-method-suffix,omitempty"`

	// GemName overrides the gem name for multi-wrapper sub-gem generation.
	GemName string `yaml:"ruby-cloud-gem-name,omitempty"`

	// GemNamespace is the root Ruby namespace.
	GemNamespace string `yaml:"ruby-cloud-gem-namespace,omitempty"`

	// GenericEndpoint specifies whether the client is for a generic endpoint service without a fixed default host or default credentials.
	GenericEndpoint bool `yaml:"ruby-cloud-generic-endpoint,omitempty"`

	// MigrationVersion specifies the gem version milestone at which the library was migrated to GAPIC, generating a migration section in the README file.
	MigrationVersion string `yaml:"ruby-cloud-migration-version,omitempty"`

	// NamespaceOverride overrides token / segment replacements applied across all generated
	// module & class paths.
	NamespaceOverride string `yaml:"ruby-cloud-namespace-override,omitempty"`

	// PathOverride overrides file/directory paths under lib/ and proto_docs/.
	PathOverride string `yaml:"ruby-cloud-path-override,omitempty"`

	// RenamedFrom specifies the former gem name when a wrapper gem has been renamed (e.g. google-cloud-run for google-cloud-run-client).
	RenamedFrom string `yaml:"ruby-cloud-renamed-from,omitempty"`

	// ServiceOverride overrides generated service class names when proto package service
	// names don't match desired Ruby conventions.
	ServiceOverride string `yaml:"ruby-cloud-service-override,omitempty"`

	// Title overrides the gem title.
	Title string `yaml:"ruby-cloud-title,omitempty"`

	// WrapperGemOverride overrides a versioned client gem to a custom non-standard main wrapper gem name.
	WrapperGemOverride string `yaml:"ruby-cloud-wrapper-gem-override,omitempty"`

	// WrapperOf overrides the wrapper-of option for multi-wrapper sub-gem generation.
	WrapperOf string `yaml:"ruby-cloud-wrapper-of,omitempty"`

	// YardStrict enables or disables strict YARD syntax checks during generation.
	YardStrict string `yaml:"ruby-cloud-yard-strict,omitempty"`
}

RubyCloudOpts contains the options passed to the `--ruby_cloud_opt` argument of GAPIC generator Ruby. The library entries in the librarian.yaml hold the exact parameter names appearing in the option value.

type RubyPackage added in v0.28.0

type RubyPackage struct {
	// DeleteGenerationOutputPaths is a list of paths relative to the output directory to delete after generation.
	DeleteGenerationOutputPaths []string `yaml:"delete_generation_output_paths,omitempty"`

	// ToysTasks is a list of toys tasks to execute after generation.
	ToysTasks []string `yaml:"toys_tasks,omitempty"`

	// WrapperOf contains the API versions (e.g. "v1:0.29") of versioned libraries that this library wraps.
	WrapperOf []string `yaml:"wrapper_of,omitempty"`
}

RubyPackage contains Ruby-specific library configuration.

type RustCrate added in v0.8.0

type RustCrate struct {
	RustDefault `yaml:",inline"`

	// Modules specifies generation targets for veneer crates. Each module
	// defines a source proto path, output location, and template to use.
	Modules []*RustModule `yaml:"modules,omitempty"`

	// PerServiceFeatures enables per-service feature flags.
	PerServiceFeatures bool `yaml:"per_service_features,omitempty"`

	// ModulePath is the module path for the crate.
	ModulePath string `yaml:"module_path,omitempty"`

	// TemplateOverride overrides the default template.
	TemplateOverride string `yaml:"template_override,omitempty"`

	// PackageNameOverride overrides the package name.
	PackageNameOverride string `yaml:"package_name_override,omitempty"`

	// RootName is the root name for the crate.
	RootName string `yaml:"root_name,omitempty"`

	// DefaultFeatures is a list of default features to enable.
	DefaultFeatures []string `yaml:"default_features,omitempty"`

	// IncludeList is a list of proto files to include (e.g., "date.proto", "expr.proto").
	IncludeList []string `yaml:"include_list,omitempty"`

	// IncludedIds is a list of IDs to include.
	IncludedIds []string `yaml:"included_ids,omitempty"`

	// SkippedIds is a list of IDs to skip.
	SkippedIds []string `yaml:"skipped_ids,omitempty"`

	// DisabledClippyWarnings is a list of clippy warnings to disable.
	DisabledClippyWarnings []string `yaml:"disabled_clippy_warnings,omitempty"`

	// HandwrittenSurface indicates whether the crate or specific services have a handwritten surface.
	// Accepts "true" for all services, or a comma-separated list of service IDs.
	HandwrittenSurface string `yaml:"handwritten_surface,omitempty"`

	// ExtensibleBuilders is a list of method IDs whose generated request builders expose pub(crate) internals.
	ExtensibleBuilders []string `yaml:"extensible_builders,omitempty"`

	// HasVeneer indicates whether the crate has a veneer.
	HasVeneer bool `yaml:"has_veneer,omitempty"`

	// RoutingRequired indicates whether routing is required.
	RoutingRequired bool `yaml:"routing_required,omitempty"`

	// IncludeGrpcOnlyMethods indicates whether to include gRPC-only methods.
	IncludeGrpcOnlyMethods bool `yaml:"include_grpc_only_methods,omitempty"`

	// IdempotencyHook configures an opt-in method on the request struct to resolve and transform idempotency request options before dispatch.
	IdempotencyHook string `yaml:"idempotency_hook,omitempty"`

	// IncludeStreamingMethods indicates whether to include gRPC streaming
	// methods.
	IncludeStreamingMethods bool `yaml:"include_streaming_methods,omitempty"`

	// PostProcessProtos indicates whether to post-process protos.
	PostProcessProtos string `yaml:"post_process_protos,omitempty"`

	// DocumentationOverrides contains overrides for element documentation.
	DocumentationOverrides []RustDocumentationOverride `yaml:"documentation_overrides,omitempty"`

	// PaginationOverrides contains overrides for pagination configuration.
	PaginationOverrides []RustPaginationOverride `yaml:"pagination_overrides,omitempty"`

	// MessageModuleNameOverrides contains codec-level overrides for message module names in model.rs.
	MessageModuleNameOverrides map[string]string `yaml:"message_module_name_overrides,omitempty"`

	// NameOverrides contains codec-level overrides for type and service names.
	NameOverrides string `yaml:"name_overrides,omitempty"`

	// Discovery contains discovery-specific configuration for LRO polling.
	Discovery *RustDiscovery `yaml:"discovery,omitempty"`

	// QuickstartServiceOverride overrides the default heuristically selected service for the package-level quickstart.
	QuickstartServiceOverride string `yaml:"quickstart_service_override,omitempty"`

	// InternalModules is a list of kept extra modules that should have pub(crate) visibility instead of pub.
	InternalModules []string `yaml:"internal_modules,omitempty"`
}

RustCrate contains Rust-specific library configuration. It inherits from RustDefault, allowing library-specific overrides of global settings.

type RustDefault added in v0.8.0

type RustDefault struct {
	// PackageDependencies is a list of default package dependencies. These
	// are inherited by all libraries. If a library defines its own
	// package_dependencies, the library-specific ones take precedence over
	// these defaults for dependencies with the same name.
	PackageDependencies []*RustPackageDependency `yaml:"package_dependencies,omitempty"`

	// DisabledRustdocWarnings is a list of rustdoc warnings to disable.
	DisabledRustdocWarnings []string `yaml:"disabled_rustdoc_warnings,omitempty"`

	// GenerateSetterSamples indicates whether to generate setter samples.
	GenerateSetterSamples string `yaml:"generate_setter_samples,omitempty"`

	// GenerateRpcSamples indicates whether to generate RPC samples.
	GenerateRpcSamples string `yaml:"generate_rpc_samples,omitempty"`

	// DetailedTracingAttributes indicates whether to include detailed tracing attributes.
	DetailedTracingAttributes *bool `yaml:"detailed_tracing_attributes,omitempty"`

	// LroStubOptions indicates whether to include LRO poller options in generated stub traits.
	LroStubOptions *bool `yaml:"lro_stub_options,omitempty"`

	// ResourceNameHeuristic indicates whether to apply heuristics to identify and generate resource names.
	ResourceNameHeuristic *bool `yaml:"resource_name_heuristic,omitempty"`

	// AllowGrpcAnyFields is a list of protobuf field IDs with google.protobuf.Any
	// permitted in gRPC/streaming RPCs (their fields will be dropped in prost conversion).
	AllowGrpcAnyFields []string `yaml:"allow_grpc_any_fields,omitempty"`

	// GrpcClient is the Rust type used for the inner gRPC client in generated transports.
	// Defaults to "gaxi::grpc::Client".
	GrpcClient string `yaml:"grpc_client,omitempty"`

	// DefaultTransport specifies the default transport protocol for unary methods ("grpc" or "http").
	// Defaults to "http".
	DefaultTransport string `yaml:"default_transport,omitempty"`
}

RustDefault contains Rust-specific default configuration.

type RustDiscovery added in v0.8.0

type RustDiscovery = CommonDiscovery

RustDiscovery contains discovery-specific configuration for LRO polling.

type RustDocumentationOverride added in v0.8.0

type RustDocumentationOverride struct {
	// ID is the fully qualified element ID (e.g., .google.cloud.dialogflow.v2.Message.field).
	ID string `yaml:"id"`

	// Match is the text to match in the documentation.
	Match string `yaml:"match"`

	// Replace is the replacement text.
	Replace string `yaml:"replace"`
}

RustDocumentationOverride represents a documentation override for a specific element.

type RustModule added in v0.8.0

type RustModule struct {
	// GrpcClient is the Rust type used for the inner gRPC client in generated transports.
	// This overrides the crate-level setting. Defaults to "gaxi::grpc::Client".
	GrpcClient string `yaml:"grpc_client,omitempty"`

	// DisabledRustdocWarnings specifies rustdoc lints to disable. An empty slice explicitly enables all warnings.
	DisabledRustdocWarnings yaml.StringSlice `yaml:"disabled_rustdoc_warnings,omitempty"`

	// DefaultTransport specifies the default transport protocol for unary methods ("grpc" or "http").
	// This overrides the crate-level setting.
	DefaultTransport string `yaml:"default_transport,omitempty"`

	// DetailedTracingAttributes indicates whether to include detailed tracing attributes.
	// This overrides the crate-level setting.
	DetailedTracingAttributes *bool `yaml:"detailed_tracing_attributes,omitempty"`

	// LroStubOptions indicates whether to include LRO poller options in generated stub traits.
	// This overrides the crate-level setting.
	LroStubOptions *bool `yaml:"lro_stub_options,omitempty"`

	// DocumentationOverrides contains overrides for element documentation.
	DocumentationOverrides []RustDocumentationOverride `yaml:"documentation_overrides,omitempty"`

	// ExtendGrpcTransport indicates whether the transport stub can be
	// extended (in order to support streams).
	ExtendGrpcTransport bool `yaml:"extend_grpc_transport,omitempty"`

	// GenerateSetterSamples indicates whether to generate setter samples.
	GenerateSetterSamples string `yaml:"generate_setter_samples,omitempty"`

	// GenerateRpcSamples indicates whether to generate RPC samples.
	GenerateRpcSamples string `yaml:"generate_rpc_samples,omitempty"`

	// HasVeneer indicates whether this module has a handwritten wrapper.
	HasVeneer bool `yaml:"has_veneer,omitempty"`

	// IncludedIds is a list of proto IDs to include in generation.
	IncludedIds []string `yaml:"included_ids,omitempty"`

	// IncludeGrpcOnlyMethods indicates whether to include gRPC-only methods.
	IncludeGrpcOnlyMethods bool `yaml:"include_grpc_only_methods,omitempty"`

	// IdempotencyHook configures an opt-in method on the request struct to resolve and transform idempotency request options before dispatch.
	IdempotencyHook string `yaml:"idempotency_hook,omitempty"`

	// IncludeList is a list of proto files to include (e.g., "date.proto", "expr.proto").
	IncludeList yaml.StringSlice `yaml:"include_list,omitempty"`

	// IncludeStreamingMethods indicates whether to include gRPC streaming
	// methods.
	IncludeStreamingMethods bool `yaml:"include_streaming_methods,omitempty"`

	// HandwrittenSurface indicates whether the module or specific services have a handwritten surface.
	// Accepts "true" for all services, or a comma-separated list of service IDs.
	HandwrittenSurface string `yaml:"handwritten_surface,omitempty"`

	// InternalBuilders indicates whether generated builders should be internal to the crate.
	InternalBuilders bool `yaml:"internal_builders,omitempty"`

	// ExtensibleBuilders is a list of method IDs whose generated request builders expose pub(crate) internals.
	ExtensibleBuilders []string `yaml:"extensible_builders,omitempty"`

	// ModulePath is the Rust module path for converters
	// (e.g., "crate::generated::gapic::model").
	ModulePath string `yaml:"module_path,omitempty"`

	ModuleRoots map[string]string `yaml:"module_roots,omitempty"`

	// MessageModuleNameOverrides contains codec-level overrides for message module names in model.rs.
	MessageModuleNameOverrides map[string]string `yaml:"message_module_name_overrides,omitempty"`

	// NameOverrides contains codec-level overrides for type and service names.
	NameOverrides string `yaml:"name_overrides,omitempty"`

	// Output is the directory where generated code is written
	// (e.g., "src/storage/src/generated/gapic").
	Output string `yaml:"output"`

	// PostProcessProtos contains code to post-process generated protos.
	PostProcessProtos string `yaml:"post_process_protos,omitempty"`

	// ResourceNameHeuristic indicates whether to apply heuristics to identify and generate resource names.
	// This overrides the crate-level setting.
	ResourceNameHeuristic *bool `yaml:"resource_name_heuristic,omitempty"`

	// RootName is the key for the root directory in the source map.
	// It overrides the default root, googleapis, used by the rust+prost generator.
	RootName string `yaml:"root_name,omitempty"`

	// RoutingRequired indicates whether routing is required.
	RoutingRequired bool `yaml:"routing_required,omitempty"`

	// ServiceConfig is the path to the service config file.
	ServiceConfig string `yaml:"service_config,omitempty"`

	// SkippedIds is a list of proto IDs to skip in generation.
	SkippedIds []string `yaml:"skipped_ids,omitempty"`

	// SpecificationFormat overrides the library-level specification format.
	SpecificationFormat string `yaml:"specification_format,omitempty"`

	// APIPath is the proto path to generate from (e.g., "google/storage/v2").
	APIPath string `yaml:"api_path"`

	// Template specifies which generator template to use.
	// Valid values: "grpc-client", "http-client", "prost", "convert-prost", "mod", "storage".
	Template string `yaml:"template"`
}

RustModule defines a generation target within a veneer crate. Each module specifies what proto source to use, which template to apply, and where to output the generated code.

type RustPackageDependency added in v0.8.0

type RustPackageDependency struct {
	// Name is the dependency name. It is listed first so it appears at the top
	// of each dependency entry in YAML.
	Name string `yaml:"name"`

	// Ignore prevents this package from being mapped to an external crate.
	// When true, references to this package stay as `crate::` instead of being
	// mapped to the external crate name. This is used for self-referencing
	// packages like location and longrunning.
	Ignore bool `yaml:"ignore,omitempty"`

	// Package is the package name.
	Package string `yaml:"package"`

	// Source is the dependency source.
	Source string `yaml:"source,omitempty"`

	// Feature is the feature name for the dependency.
	Feature string `yaml:"feature,omitempty"`

	// ForceUsed forces the dependency to be used even if not referenced.
	ForceUsed bool `yaml:"force_used,omitempty"`

	// UsedIf specifies a condition for when the dependency is used.
	UsedIf string `yaml:"used_if,omitempty"`
}

RustPackageDependency represents a package dependency configuration.

type RustPaginationOverride added in v0.8.0

type RustPaginationOverride struct {
	// ID is the fully qualified method ID (e.g., .google.cloud.sql.v1.Service.Method).
	ID string `yaml:"id"`

	// ItemField is the name of the field used for items.
	ItemField string `yaml:"item_field"`
}

RustPaginationOverride represents a pagination override for a specific method.

type RustPoller added in v0.8.0

type RustPoller = CommonPoller

RustPoller defines how to find a suitable poller RPC for discovery APIs.

type Source added in v0.8.0

type Source struct {
	// Commit is the git commit hash or tag to use.
	Commit string `yaml:"commit"`

	// Dir is a local directory path to use instead of fetching.
	// If set, Commit and SHA256 are ignored.
	Dir string `yaml:"dir,omitempty"`

	// SHA256 is the expected hash of the tarball for this commit.
	SHA256 string `yaml:"sha256,omitempty"`

	// Subpath is a directory inside the fetched archive that should be treated as
	// the root for operations.
	Subpath string `yaml:"subpath,omitempty"`
}

Source represents a source repository.

type Sources added in v0.8.0

type Sources struct {
	// Comment is an optional comment explaining configuration choices.
	// It supports UTF-8 text. Multiline comments are supported, but may
	// be reformatted when tidying.
	Comment string `yaml:"comment,omitempty"`

	// Conformance is the path to the `conformance-tests` repository, used as include directory for `protoc`.
	Conformance *Source `yaml:"conformance,omitempty"`

	// Discovery is the discovery-artifact-manager repository configuration.
	Discovery *Source `yaml:"discovery,omitempty"`

	// Googleapis is the googleapis repository configuration.
	Googleapis *Source `yaml:"googleapis,omitempty"`

	// ProtobufSrc is the path to the `protobuf` repository, used as include directory for `protoc`.
	ProtobufSrc *Source `yaml:"protobuf,omitempty"`

	// Showcase is the showcase repository configuration.
	Showcase *Source `yaml:"showcase,omitempty"`
}

Sources references external source repositories.

type SwiftDefault added in v0.10.0

type SwiftDefault struct {
	// Dependencies is a list of package dependencies.
	Dependencies []SwiftDependency `yaml:"dependencies,omitempty"`

	// The default version for new libraries.
	DefaultVersion string `yaml:"default_version,omitempty"`
}

SwiftDefault contains the configuration shared by all Swift libraries.

type SwiftDependency added in v0.10.0

type SwiftDependency struct {
	// Name is the module imported from the dependency.
	//
	// Examples:
	// - to import `Logging` from the `swift-log` package, create a dependency:
	//     {name: "Logging", version: "1.14.0", url: "https://github.com/apple/swift-log"},
	// - to import `GoogleIamV1` from the `swift-google-iam-v1` package.
	//     {name: "GoogleIamV1", path: "generated/swift-google-iam-v1"}
	Name string `yaml:"name"`
	// Path configures the path for local (to the monorepo) packages.
	//
	// For example, the authentication package definition will set this to `packages/auth`, which
	// would generate the following snippet in the `Package.swift` files:
	//
	// “`
	// .package(path: "../../packages/auth")
	// “`
	Path string `yaml:"path,omitempty"`
	// URL configures the `url:` parameter in the package definition.
	//
	// For example, `https://github.com/apple/swift-protobuf` would generate the following snippet in
	// the `Package.swift` files:
	//
	// “`
	// .package(url: "https://github.com/apple/swift-protobuf")
	// “`
	URL string `yaml:"url,omitempty"`
	// Version configures the minimum version for external package definitions.
	//
	// For example, if the `swift-protobuf` package used `1.36.1`, then the codec would generate the
	// following snippet in the `Package.swift` files:
	//
	// “`
	// .package(url: "https://github.com/apple/swift-protobuf", from: "1.36.1")
	// “`
	Version string `yaml:"version,omitempty"`
	// RequiredByServices is true if this dependency is required by packages with services.
	//
	// This will be set for the `gax` library and the `auth` library. Maybe more if we split the HTTP
	// and gRPC clients into separate libraries.
	RequiredByServices bool `yaml:"required_by_services,omitempty"`
	// ApiPackage is the name of the API package provided by this library.
	//
	// In Swift a package contains at most one channel for one API. For packages that implement an
	// API, this field contains the name of the package in the specification language of that API.
	// At the moment this is only used by Protobuf-based APIs, as OpenAPI and discovery doc APIs are
	// self-contained.
	//
	// Note that some packages, for example `auth` and `gax`, do not implement APIs. This field is
	// empty for such libraries.
	//
	// Examples:
	// - The `GoogleWKT` package will set this to `google.cloud.protobuf`.
	// - The `GoogleCloudLocation` package will set this to `google.cloud.location`.
	ApiPackage string `yaml:"api_package,omitempty"`
	// SpiAttribute if set, the dependency requires an `@_spi(...)` attribute.
	SpiAttribute string `yaml:"spi,omitempty"`
}

SwiftDependency represents a dependency in Swift Package Manager.

type SwiftDiscovery added in v0.17.0

type SwiftDiscovery = CommonDiscovery

SwiftDiscovery contains discovery-specific configuration for LRO polling.

type SwiftModule added in v0.12.0

type SwiftModule struct {
	// Output is the directory where generated code is written (e.g., "Tests/ProtoJSON/generated").
	Output string `yaml:"output"`

	// ServiceConfig is the path to the service config file (e.g., "google/storage/control/v2/storage_v2.yaml").
	ServiceConfig string `yaml:"service_config,omitempty"`

	// APIPath is the proto path to generate from (e.g., "google/storage/v2").
	APIPath string `yaml:"api_path"`

	// ModuleType is the type of module to generate (e.g., "swift-protobuf", "convert-swift", or empty/"default" for standard GAPIC).
	ModuleType string `yaml:"module_type,omitempty"`

	// IncludeList is a subset of proto files under the target API path to include.
	// This is typically reserved for special cases to avoid generating unused/dead code.
	// For example, in Storage we need Protobuf gencode for a subset of the protos in the google/type
	// directory. This code is private to the package (google-cloud-storage in Rust, GoogleCloudStorage
	// in Swift). All other files in google/type would be dead code.
	IncludeList []string `yaml:"include_list,omitempty"`

	// IncludedIDs is a list of proto IDs to include in generation for this module.
	// If set, only these IDs and their dependencies are generated.
	IncludedIDs []string `yaml:"included_ids,omitempty"`

	// SkippedIds is a list of proto IDs to skip in generation for this module.
	SkippedIds []string `yaml:"skipped_ids,omitempty"`

	// ModulePath is the module import path or target containing stubs (used by convert-swift and gRPC transports).
	ModulePath string `yaml:"module_path,omitempty"`

	// NameOverrides contains codec-level overrides for service names for this module.
	NameOverrides map[string]string `yaml:"name_overrides,omitempty"`

	// IdempotencyHook configures an opt-in method on the request struct to resolve and transform idempotency request options before dispatch for this module.
	IdempotencyHook string `yaml:"idempotency_hook,omitempty"`
}

SwiftModule defines a generation target within a larger crate. Typically a veneer, but sometimes also test targets.

Each module specifies what proto source to use, and where to output the generated code.

type SwiftPackage added in v0.10.0

type SwiftPackage struct {
	SwiftDefault `yaml:",inline"`

	// LibraryNameOverride overrides the default library name.
	//
	// In Swift, each GAPIC package consists of a single product (the library),
	// which contains a single target and module name. For example, the package
	// for the google/cloud/secretmanager/v1 API is called
	// google-cloud-secretmanager-v1, and contains a single product:
	// `GoogleCloudSecretManagerV1`, which in turn contains a single target and
	// module of the same name.
	//
	// To use the library applications use this import:
	//
	// “`
	// import GoogleCloudSecretManagerV1
	// “`
	//
	// Normally the name is derived from:
	// - If the Protobuf namespace overrides for PHP, Ruby, and C# are
	//   consistent, sidekick uses this name.
	// - Otherwise, the name implied by the Protobuf package
	// - Or the package set in the service config yaml file
	LibraryNameOverride string `yaml:"library_name_override,omitempty"`

	// IncludeList is a subset of proto files under the target API path to
	// include (e.g., ["date.proto", "expr.proto"]).
	IncludeList []string `yaml:"include_list,omitempty"`

	// IncludedIDs is a list of proto IDs to include in generation for the package.
	// If set, only these IDs and their dependencies are generated.
	IncludedIDs []string `yaml:"included_ids,omitempty"`

	// SkippedIds is a list of proto IDs to skip in generation for the package.
	SkippedIds []string `yaml:"skipped_ids,omitempty"`

	// Modules specifies generation targets for veneers and test packages.
	//
	// Each module defines a source proto path, and output location.
	Modules []*SwiftModule `yaml:"modules,omitempty"`

	// PackageNameOverride overrides the package name.
	//
	// This may be useful if the protobuf package lacks the necessary prefixes,
	// e.g. `grafeas.v1` may be published as `google-grafeas-v1` to match the
	// other packages.
	PackageNameOverride string `yaml:"package_name_override,omitempty"`

	// NameOverrides contains codec-level overrides for service names (e.g.,
	// {".google.storage.v2.Storage": "StorageControl"}).
	NameOverrides map[string]string `yaml:"name_overrides,omitempty"`

	// PerServiceTraits enables per-service compile-time flags.
	PerServiceTraits bool `yaml:"per_service_traits,omitempty"`

	// DefaultTraits is a list of compile-time traits enabled by default.
	DefaultTraits []string `yaml:"default_traits,omitempty"`

	// Discovery contains discovery-specific configuration for LRO polling.
	Discovery *SwiftDiscovery `yaml:"discovery,omitempty"`

	// LROAnyConverter names the generated converter for the `Any` fields of
	// `google.longrunning.Operation` (e.g. "StorageControlLROAnyConverter"),
	// which converts long-running operation payloads by type URL. Cannot be
	// combined with `per_service_traits`.
	LROAnyConverter string `yaml:"lro_any_converter,omitempty"`

	// QuickstartServiceOverride overrides the default heuristically selected service for the package-level quickstart.
	QuickstartServiceOverride string `yaml:"quickstart_service_override,omitempty"`

	// IdempotencyHook configures an opt-in method on the request struct to resolve and transform idempotency request options before dispatch.
	IdempotencyHook string `yaml:"idempotency_hook,omitempty"`
}

SwiftPackage contains Swift-specific configuration for a Swift library.

It inherits from SwiftDefault, allowing library-specific overrides of global settings.

type SwiftPoller added in v0.17.0

type SwiftPoller = CommonPoller

SwiftPoller defines how to find a suitable poller RPC for discovery APIs.

type SwiftTool added in v0.38.0

type SwiftTool struct {
	// Name is the tool name or binary name (e.g., "protoc-gen-swift", "protoc-gen-grpc-swift").
	Name string `yaml:"name"`

	// Version is the git tag or branch to install (e.g., "1.38.1", "1.23.0").
	Version string `yaml:"version,omitempty"`

	// Repo is the git repository URL to fetch and build the tool from (e.g., "https://github.com/apple/swift-protobuf.git").
	Repo string `yaml:"repo,omitempty"`

	// Product is the SwiftPM product name passed to `swift build --product <product>`.
	// If omitted, `swift build -c release` builds default targets.
	Product string `yaml:"product,omitempty"`

	// LocalPath is the path to a local Swift package directory.
	//
	// When present, Version and Repo are ignored. This can be useful in tests, and to test tools under development.
	LocalPath string `yaml:"local_path,omitempty"`
}

SwiftTool defines a tool to install via Swift Package Manager.

type Tools added in v0.10.0

type Tools struct {
	// Comment is an optional comment explaining configuration choices.
	// It supports UTF-8 text. Multiline comments are supported, but may
	// be reformatted when tidying.
	Comment string `yaml:"comment,omitempty"`

	// Cargo defines tools to install via cargo.
	Cargo []*CargoTool `yaml:"cargo,omitempty"`

	// Composer defines tools to install via Composer.
	Composer []*ComposerTool `yaml:"composer,omitempty"`

	// Go defines tools to install via go.
	Go []*GoTool `yaml:"go,omitempty"`

	// Gem defines tools to install via gem.
	Gem []*GemTool `yaml:"gem,omitempty"`

	// Maven defines tools to install via Maven.
	Maven []*MavenTool `yaml:"maven,omitempty"`

	// Pip defines tools to install via pip.
	Pip []*PipTool `yaml:"pip,omitempty"`

	// PNPM defines tools to install via pnpm.
	PNPM []*PNPMTool `yaml:"pnpm,omitempty"`

	// Protoc defines the protoc installation.
	Protoc *Protoc `yaml:"protoc,omitempty"`

	// Swift defines tools to install via Swift.
	Swift []*SwiftTool `yaml:"swift,omitempty"`
}

Tools defines required tools.

Jump to

Keyboard shortcuts

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