Documentation
¶
Overview ¶
sandbox is a package used for testing diegen on patterns that are not otherwise covered within the Kubernetes API
Index ¶
- Variables
- type Direct
- type DirectDie
- func (d *DirectDie) DeepCopy() *DirectDie
- func (d *DirectDie) DieDiff(opts ...cmp.Option) string
- func (d *DirectDie) DieFeed(r Direct) *DirectDie
- func (d *DirectDie) DieFeedJSON(j []byte) *DirectDie
- func (d *DirectDie) DieFeedPtr(r *Direct) *DirectDie
- func (d *DirectDie) DieFeedRawExtension(raw runtime.RawExtension) *DirectDie
- func (d *DirectDie) DieFeedYAML(y []byte) *DirectDie
- func (d *DirectDie) DieFeedYAMLFile(name string) *DirectDie
- func (d *DirectDie) DieImmutable(immutable bool) *DirectDie
- func (d *DirectDie) DiePatch(patchType types.PatchType) ([]byte, error)
- func (d *DirectDie) DieRelease() Direct
- func (d *DirectDie) DieReleaseJSON() []byte
- func (d *DirectDie) DieReleasePtr() *Direct
- func (d *DirectDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *DirectDie) DieReleaseYAML() []byte
- func (d *DirectDie) DieSeal() *DirectDie
- func (d *DirectDie) DieSealFeed(r Direct) *DirectDie
- func (d *DirectDie) DieSealFeedPtr(r *Direct) *DirectDie
- func (d *DirectDie) DieSealRelease() Direct
- func (d *DirectDie) DieSealReleasePtr() *Direct
- func (d *DirectDie) DieStamp(fn func(r *Direct)) *DirectDie
- func (d *DirectDie) DieStampAt(jp string, fn interface{}) *DirectDie
- func (d *DirectDie) DieWith(fns ...func(d *DirectDie)) *DirectDie
- func (d *DirectDie) Hello(v string) *DirectDie
- func (d *DirectDie) World(v string) *DirectDie
Constants ¶
This section is empty.
Variables ¶
var DirectBlank = (&DirectDie{}).DieFeed(Direct{})
Functions ¶
This section is empty.
Types ¶
type Direct ¶
Direct tests generating a die directly for a struct within the same package +die
func (*Direct) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Direct.
func (*Direct) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DirectDie ¶
type DirectDie struct {
// contains filtered or unexported fields
}
func (*DirectDie) DeepCopy ¶
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*DirectDie) DieDiff ¶ added in v0.13.0
DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.
func (*DirectDie) DieFeedJSON ¶
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*DirectDie) DieFeedPtr ¶
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*DirectDie) DieFeedRawExtension ¶
func (d *DirectDie) DieFeedRawExtension(raw runtime.RawExtension) *DirectDie
DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*DirectDie) DieFeedYAML ¶
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*DirectDie) DieFeedYAMLFile ¶
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*DirectDie) DieImmutable ¶
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*DirectDie) DiePatch ¶ added in v0.13.0
DiePatch generates a patch between the current value of the die and the sealed value.
func (*DirectDie) DieRelease ¶
DieRelease returns the resource managed by the die.
func (*DirectDie) DieReleaseJSON ¶
DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.
func (*DirectDie) DieReleasePtr ¶
DieReleasePtr returns a pointer to the resource managed by the die.
func (*DirectDie) DieReleaseRawExtension ¶
func (d *DirectDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*DirectDie) DieReleaseYAML ¶
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*DirectDie) DieSeal ¶ added in v0.13.0
DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.
func (*DirectDie) DieSealFeed ¶ added in v0.13.0
DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.
func (*DirectDie) DieSealFeedPtr ¶ added in v0.13.0
DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.
func (*DirectDie) DieSealRelease ¶ added in v0.13.0
DieSealRelease returns the sealed resource managed by the die.
func (*DirectDie) DieSealReleasePtr ¶ added in v0.13.0
DieSealReleasePtr returns the sealed resource pointer managed by the die.
func (*DirectDie) DieStamp ¶
DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.
func (*DirectDie) DieStampAt ¶
Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.
Future iterations will improve type coercion from the resource to the callback argument.