sharedpatch

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToReadPatchFile              = fmt.Errorf("failed to read patch file")
	ErrUnsupportedPatchType               = fmt.Errorf("unsupported patch type")
	ErrExternalPatchMustHaveContentOrFile = fmt.Errorf("external patch must have either content or file specified")
)

Functions

func SpecPatchesToStringSlice

func SpecPatchesToStringSlice(patches []SpecPatch) []string

Types

type PatchFile

type PatchFile func(input []byte, patch []byte) ([]byte, error)

type PatchType

type PatchType string
const (
	PatchTypeJSONPatch      PatchType = "jsonpatch"
	PatchTypeGitPatch       PatchType = "git"
	PatchTypeOpenAPIOverlay PatchType = "openapi-overlay"
	PatchTypeSpeakEasy      PatchType = "speakeasy"
)

type SpecPatch

type SpecPatch struct {
	Type        string                 `yaml:"type"`
	ID          string                 `yaml:"id,omitempty"`
	File        string                 `yaml:"file,omitempty"`
	Content     string                 `yaml:"content,omitempty"`
	Config      map[string]interface{} `yaml:"config,omitempty"` // JSON or YAML config for the patch
	Description string                 `yaml:"description,omitempty"`
}

func ParsePatchSpecsFromStrings

func ParsePatchSpecsFromStrings(patches []string) []SpecPatch

func (SpecPatch) String

func (p SpecPatch) String() string

Jump to

Keyboard shortcuts

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