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

librarian

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Overview

Package librarian provides functionality for onboarding, generating and releasing Google Cloud client libraries.

Index

Constants

This section is empty.

Variables

View Source
var ErrLibraryNotFound = errors.New("library not found")

ErrLibraryNotFound is returned when the specified library is not found in config.

View Source
var ErrMissingGoogleapisSource = errors.New("must specify googleapis source")

ErrMissingGoogleapisSource is returned when the googleapis source is missing.

View Source
var (

	// IgnoredChanges defines the list of the files that are
	// to be ignored as changes during the bump and publish commands.
	// It is norm that a repository does not have all the files listed here.
	IgnoredChanges = []string{
		".repo-metadata.json",
		"docs/README.rst",
	}
)

Functions

func FindLibrary added in v0.8.4

func FindLibrary(c *config.Config, name string) (*config.Library, error)

FindLibrary returns a library with the given name from the config.

func GenerateDocIndex added in v0.45.0

func GenerateDocIndex(cfg *config.Config, googleapisDir string) ([]byte, error)

GenerateDocIndex produces the formatted JSON byte slice for _libraries.json from the workspace configuration and googleapis directory.

func LoadSources added in v0.8.4

func LoadSources(ctx context.Context, src *config.Sources) (*sources.Sources, error)

LoadSources fetches all source repositories needed for generation in parallel. It returns a *sources.Sources struct with all directories populated.

func Run

func Run(ctx context.Context, args ...string) error

Run executes the librarian command with the given arguments.

func RunTidyOnConfig added in v0.8.0

func RunTidyOnConfig(ctx context.Context, repoDir string, cfg *config.Config) error

RunTidyOnConfig formats and validates the provided librarian configuration and writes it to disk, relative to the specified repository root directory.

func Version added in v0.8.0

func Version() string

Version return the version information for the binary, which is constructed following https://go.dev/ref/mod#versions.

Types

type DocIndexEntry added in v0.45.0

type DocIndexEntry struct {
	PkgName      string `json:"PkgName"`
	Language     string `json:"Language"`
	DocsURL      string `json:"DocsURL"`
	APIShortname string `json:"APIShortname"`
	Product      string `json:"Product"`
}

DocIndexEntry represents an individual library entry in _libraries.json.

Directories

Path Synopsis
Package dart provides functionality for generating and releasing Dart client libraries.
Package dart provides functionality for generating and releasing Dart client libraries.
Package golang provides functionality for generating Go client libraries.
Package golang provides functionality for generating Go client libraries.
Package java provides Java specific functionality for librarian.
Package java provides Java specific functionality for librarian.
Package nodejs provides Node.js-specific functionality for librarian.
Package nodejs provides Node.js-specific functionality for librarian.
Package php provides PHP specific functionality for librarian.
Package php provides PHP specific functionality for librarian.
Package python provides Python specific functionality for librarian.
Package python provides Python specific functionality for librarian.
Package ruby provides Ruby specific functionality for librarian.
Package ruby provides Ruby specific functionality for librarian.
Package rust provides Rust specific functionality for librarian.
Package rust provides Rust specific functionality for librarian.
Package swift provides functionality for generating Swift client libraries.
Package swift provides functionality for generating Swift client libraries.

Jump to

Keyboard shortcuts

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