Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
func Resolve(prevVersion, nextVersion interface{}, fields ...Field) ([]apigateway.PatchOperation, error)
Resolve resolves differences between two inputs and creates a list of AWS APIGateway patch operations.
Both prevVersion and nextVersion must be structs or pointers to structs, and must have the same type.
The results are returned in the order the fields are defined in the struct.
Types ¶
type Field ¶
type Field struct { Name string // Name of the field in the struct. Dot.Path for nested path. Path string // Resulting path in PatchOperation. // Optional modifier for modifying the patch operations for a given field, if the // default resolver is not sufficient. The function is called with the ops // for the current field. The modifier is only called if there are // operations to apply to the field. Modifier func(input []apigateway.PatchOperation) (output []apigateway.PatchOperation) }
A Field is a field to compare. If the value has changed, a PatchOperation is created.
Click to show internal directories.
Click to hide internal directories.