Documentation
¶
Index ¶
- func FixedError(err error) generated.Hook
- func If(hk generated.Hook, cond Condition) generated.Hook
- func On(hk generated.Hook, op generated.Op) generated.Hook
- func Reject(op generated.Op) generated.Hook
- func Unless(hk generated.Hook, op generated.Op) generated.Hook
- type ApplicationDependencyFunc
- type ApplicationFunc
- type ApplicationNamespaceFunc
- type ArtifactFunc
- type ArtifactReferenceFunc
- type Chain
- type CommonMixinFunc
- type Condition
- func And(first, second Condition, rest ...Condition) Condition
- func HasAddedFields(field string, fields ...string) Condition
- func HasClearedFields(field string, fields ...string) Condition
- func HasFields(field string, fields ...string) Condition
- func HasOp(op generated.Op) Condition
- func Not(cond Condition) Condition
- func Or(first, second Condition, rest ...Condition) Condition
- type DeploymentPackageFunc
- type DeploymentProfileFunc
- type DeploymentRequirementFunc
- type EndpointFunc
- type ExtensionFunc
- type IgnoredResourceFunc
- type NamespaceAdornmentFunc
- type NamespaceFunc
- type ParameterTemplateFunc
- type ProfileFunc
- type RegistryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FixedError ¶
FixedError is a hook returning a fixed error.
func If ¶
If executes the given hook under condition.
hook.If(ComputeAverage, And(HasFields(...), HasAddedFields(...)))
func On ¶
On executes the given hook only for the given operation.
hook.On(Log, generated.Delete|generated.Create)
Types ¶
type ApplicationDependencyFunc ¶
type ApplicationDependencyFunc func(context.Context, *generated.ApplicationDependencyMutation) (generated.Value, error)
The ApplicationDependencyFunc type is an adapter to allow the use of ordinary function as ApplicationDependency mutator.
type ApplicationFunc ¶
The ApplicationFunc type is an adapter to allow the use of ordinary function as Application mutator.
type ApplicationNamespaceFunc ¶
type ApplicationNamespaceFunc func(context.Context, *generated.ApplicationNamespaceMutation) (generated.Value, error)
The ApplicationNamespaceFunc type is an adapter to allow the use of ordinary function as ApplicationNamespace mutator.
type ArtifactFunc ¶
The ArtifactFunc type is an adapter to allow the use of ordinary function as Artifact mutator.
type ArtifactReferenceFunc ¶
type ArtifactReferenceFunc func(context.Context, *generated.ArtifactReferenceMutation) (generated.Value, error)
The ArtifactReferenceFunc type is an adapter to allow the use of ordinary function as ArtifactReference mutator.
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
Chain acts as a list of hooks and is effectively immutable. Once created, it will always hold the same set of hooks in the same order.
func (Chain) Append ¶
Append extends a chain, adding the specified hook as the last ones in the mutation flow.
type CommonMixinFunc ¶
The CommonMixinFunc type is an adapter to allow the use of ordinary function as CommonMixin mutator.
type Condition ¶
Condition is a hook condition function.
func HasAddedFields ¶
HasAddedFields is a condition validating `.AddedField` on fields.
func HasClearedFields ¶
HasClearedFields is a condition validating `.FieldCleared` on fields.
type DeploymentPackageFunc ¶
type DeploymentPackageFunc func(context.Context, *generated.DeploymentPackageMutation) (generated.Value, error)
The DeploymentPackageFunc type is an adapter to allow the use of ordinary function as DeploymentPackage mutator.
type DeploymentProfileFunc ¶
type DeploymentProfileFunc func(context.Context, *generated.DeploymentProfileMutation) (generated.Value, error)
The DeploymentProfileFunc type is an adapter to allow the use of ordinary function as DeploymentProfile mutator.
type DeploymentRequirementFunc ¶
type DeploymentRequirementFunc func(context.Context, *generated.DeploymentRequirementMutation) (generated.Value, error)
The DeploymentRequirementFunc type is an adapter to allow the use of ordinary function as DeploymentRequirement mutator.
type EndpointFunc ¶
The EndpointFunc type is an adapter to allow the use of ordinary function as Endpoint mutator.
type ExtensionFunc ¶
The ExtensionFunc type is an adapter to allow the use of ordinary function as Extension mutator.
type IgnoredResourceFunc ¶
type IgnoredResourceFunc func(context.Context, *generated.IgnoredResourceMutation) (generated.Value, error)
The IgnoredResourceFunc type is an adapter to allow the use of ordinary function as IgnoredResource mutator.
type NamespaceAdornmentFunc ¶
type NamespaceAdornmentFunc func(context.Context, *generated.NamespaceAdornmentMutation) (generated.Value, error)
The NamespaceAdornmentFunc type is an adapter to allow the use of ordinary function as NamespaceAdornment mutator.
type NamespaceFunc ¶
The NamespaceFunc type is an adapter to allow the use of ordinary function as Namespace mutator.
type ParameterTemplateFunc ¶
type ParameterTemplateFunc func(context.Context, *generated.ParameterTemplateMutation) (generated.Value, error)
The ParameterTemplateFunc type is an adapter to allow the use of ordinary function as ParameterTemplate mutator.
type ProfileFunc ¶
The ProfileFunc type is an adapter to allow the use of ordinary function as Profile mutator.
type RegistryFunc ¶
The RegistryFunc type is an adapter to allow the use of ordinary function as Registry mutator.