types

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckOutput

type CheckOutput []any

CheckOutput is the result of an `out` operation

type CheckResource

type CheckResource interface {
	// VersionPtr must return a pointer to the target version struct.
	VersionPtr() any
	// Check implements the `check` logic
	Check() (CheckOutput, error)
}

A CheckResource is able to handle the `check` step

type InOutput

type InOutput struct {
	Version  any            `json:"version" validate:"required"`
	Metadata map[string]any `json:"metadata,omitempty"`
}

InOutput is the result of an `in` operation

type InResource

type InResource interface {
	// VersionPtr must return a pointer to the target version struct.
	VersionPtr() any

	// In implements the `in` logic
	In(targetDir string) (*InOutput, error)
}

A InResource is able to handle the `in` step

type NewResource

type NewResource[T any] func(config T) (any, error)

A NewResource function creates a resource object based on the given config

type OutOutput

type OutOutput struct {
	Version  any            `json:"version" validate:"required"`
	Metadata map[string]any `json:"metadata,omitempty"`
}

OutOutput is the result of an `out` operation

type OutResource

type OutResource interface {
	// Out implements the `out` logic
	Out(sourceDir string) (*OutOutput, error)
}

A OutResource os able to handle the `out` step

type ParametrizedResource

type ParametrizedResource interface {
	// ParamsPtr must return a pointer to the target parameters struct
	ParamsPtr() any
}

A ParametrizedResource takes optional parameters to in and out

Jump to

Keyboard shortcuts

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