Documentation ¶
Index ¶
- Constants
- func EqualPluginOperation(pluginOp1, pluginOp2 PluginOperation) bool
- func EqualPluginOperationList(pluginOps1, pluginOps2 []PluginOperation) bool
- func ParseOptionalFieldMapVal(sliceVal string) map[string]string
- func ParseOptionalFieldSliceVal(sliceVal string) []string
- type Metadata
- type OptionalFields
- type Plugin
- type PluginMetadata
- type PluginOperation
- type PluginRequest
- type PluginResponse
- type PluginRun
- type Runner
- type RunnerResponse
- type Version
Constants ¶
View Source
const ( RequestVersion = V1 ResponseVersion = V1 )
View Source
const ( // Metadata string is the constant string that will be used by the binary-pluigin helper and the cli helpers // To notice that MetadataString string = "METADATA" )
Variables ¶
This section is empty.
Functions ¶
func EqualPluginOperation ¶
func EqualPluginOperation(pluginOp1, pluginOp2 PluginOperation) bool
func EqualPluginOperationList ¶
func EqualPluginOperationList(pluginOps1, pluginOps2 []PluginOperation) bool
Types ¶
type Metadata ¶
type Metadata interface {
Metadata() PluginMetadata
}
type OptionalFields ¶
type PluginMetadata ¶
type PluginMetadata struct { Name string `json:"name"` Version string `json:"version"` RequestVersion []Version `json:"requestVersion"` ResponseVersion []Version `json:"responseVersion"` OptionalFields []OptionalFields `json:"optionalFields,omitempty"` }
type PluginOperation ¶
func PluginOperationsFromPatch ¶
func PluginOperationsFromPatch(pluginName string, patches jsonpatch.Patch) []PluginOperation
type PluginRequest ¶ added in v0.0.2
type PluginRequest struct { unstructured.Unstructured `json:",inline"` Extras map[string]string `json:"extras,omitempty"` }
type PluginResponse ¶
type PluginRun ¶
type PluginRun interface { // Determine for a given resources what the plugin is deciding to do with this Run(PluginRequest) (PluginResponse, error) }
type Runner ¶
type Runner struct { // This is where we need to put extra info // This should include generic args to be passed to each Plugin // This also needs to handle the options that it will need. // TODO: Figure out options that the runner will need and implement here. PluginPriorities map[string]int OptionalFlags map[string]string Log *logrus.Logger }
func (*Runner) Run ¶
func (r *Runner) Run(object unstructured.Unstructured, plugins []Plugin) (RunnerResponse, error)
type RunnerResponse ¶
RunnerResponse will be responsble for TransformFile is a marshaled jsonpatch.Patch IgnoredPatches is a marshaled []PluginOperation
Click to show internal directories.
Click to hide internal directories.