{"modulePath":"github.com/kcp-dev/api-syncagent","version":"v0.9.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package mutation\n\n## Types\n\n```go\ntype Mutator interface {\n\t// MutateSpec transform a remote object into a local one. On the first\n\t// mutation, otherObj will be nil. MutateSpec can modify all fields\n\t// except the status (i.e. \"mutate spec\" here means to mutate expected state,\n\t// which can be more than just the spec).\n\tMutateSpec(toMutate *unstructured.Unstructured, otherObj *unstructured.Unstructured) (*unstructured.Unstructured, error)\n\t// MutateStatus transform a local object into a remote one. MutateStatus\n\t// must only modify the status field.\n\tMutateStatus(toMutate *unstructured.Unstructured, otherObj *unstructured.Unstructured) (*unstructured.Unstructured, error)\n}\n```\n\n```go\nfunc NewMutator(spec *syncagentv1alpha1.ResourceMutationSpec) (Mutator, error)\n```\nNewMutator creates a new mutator, which will apply the mutation rules to a synced object, in both directions. A nil spec is supported and will simply make the mutator not do anything.\n\n","path":"github.com/kcp-dev/api-syncagent/internal/mutation","name":"mutation","synopsis":"","isRedistributable":true}
