ghval

package
v0.0.0-...-192c3c3 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubValue

type GitHubValue struct {
	// raw value
	Value *string `json:"value"`

	// Path will read the value from the default branch
	Path *string `json:"path"`

	// StructuredJSONPath reads the specified path from the parsed path file.
	// Path has to be defined and has to be in yaml format in order to get the path.
	StructuredJSONPath *string `json:"structuredJSONPath"`

	// Use the commit of the current Pull Request
	PRHead *bool `json:"prHead"`
}

GitHubValue describes a value that will be determined during runtime by - reading a specific file from a path - get the current PR's commit hash

type StringOrGitHubValue

type StringOrGitHubValue struct {
	Type     Type
	StrValue string
	GHValue  GitHubValue
}

func (*StringOrGitHubValue) MarshalJSON

func (v *StringOrGitHubValue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface.

func (*StringOrGitHubValue) UnmarshalJSON

func (v *StringOrGitHubValue) UnmarshalJSON(value []byte) (err error)

func (*StringOrGitHubValue) Value

func (v *StringOrGitHubValue) Value() *GitHubValue

type Type

type Type int

Type represents the stored type of StringOrGitHubValue.

const (
	String  Type = iota // The IntOrString holds an string.
	GHValue             // The IntOrString holds a GitHubValue.
)

Jump to

Keyboard shortcuts

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