generate

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package generate contains types for language container's generate command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Context *Context
	// This request is parsed from the generate-request.json file in
	// the LibrarianDir of the context.
	Request *message.Library
}

Config for the generate command. This holds the context (the directory paths) and the request parsed from the generate-request.json file.

func NewConfig

func NewConfig(ctx *Context) (*Config, error)

NewConfig creates a new Config, parsing the generate-request.json file from the LibrarianDir in the given Context.

type Context

type Context struct {
	// LibrarianDir is the path to the librarian-tool input directory.
	// It is expected to contain the generate-request.json file.
	LibrarianDir string
	// InputDir is the path to the .librarian/generator-input directory from the
	// language repository.
	InputDir string
	// OutputDir is the path to the empty directory where a language container writes
	// its output.
	OutputDir string
	// SourceDir is the path to a complete checkout of the googleapis repository.
	SourceDir string
}

Context holds the directory paths for the generate command. https://github.com/googleapis/librarian/blob/main/doc/language-onboarding.md#generate

func (*Context) Validate

func (c *Context) Validate() error

Validate ensures that the context is valid.

Jump to

Keyboard shortcuts

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