assets

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedFiles embed.FS

EmbeddedFiles bundles the proto annotation definitions shipped with the forge binary so they can be vendored into scaffolded projects without a network fetch.

Functions

func GetForgeV1Proto

func GetForgeV1Proto() ([]byte, error)

GetForgeV1Proto returns the unified forge/v1/forge.proto file.

func WriteExampleProto

func WriteExampleProto(serviceName, destPath string, data any) error

WriteExampleProto writes an example proto file with the given service name.

func WriteForgeV1Proto

func WriteForgeV1Proto(destDir string) error

WriteForgeV1Proto writes the unified forge.proto into destDir/forge.proto, rewriting the go_package option to point at forge's shared forgepb package.

Rationale: scaffolded projects vendor forge.proto into proto/forge/v1/ as a buf COMPILE input (other protos import its annotations), but they do NOT generate a local Go copy — buf.gen.yaml excludes forge/v1 from output and the project links forge/pkg/forgepb instead. The fixed go_package below is what makes the cross-file blank-imports in the generated *.pb.go resolve to that shared package.

func WriteTemplate

func WriteTemplate(templateName, destPath string) error

WriteTemplate writes a project template to the specified path.

func WriteTemplateWithData

func WriteTemplateWithData(templateName, destPath string, data any) error

WriteTemplateWithData writes a project template with data substitution.

Types

This section is empty.

Jump to

Keyboard shortcuts

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