sharedpatch

package
v0.0.0-...-8befeed Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 3 Imported by: 0

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