Documentation ¶
Index ¶
- type Manifests
- func (m *Manifests) Apply(ctx context.Context, c client.Client) error
- func (m *Manifests) Delete(ctx context.Context, client client.Client) error
- func (m *Manifests) GetObjects() []client.Object
- func (m *Manifests) MutateObject(mutateFn func(unstructured2 *unstructured.Unstructured) error) error
- func (m *Manifests) SetLogger(logger logr.Logger)
- func (m *Manifests) Sync(ctx context.Context, c client.Client) error
- type ManifestsParser
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifests ¶
type Manifests struct {
// contains filtered or unexported fields
}
func (*Manifests) GetObjects ¶
func (*Manifests) MutateObject ¶
func (m *Manifests) MutateObject(mutateFn func(unstructured2 *unstructured.Unstructured) error) error
type ManifestsParser ¶
type ManifestsParser struct {
// contains filtered or unexported fields
}
func NewManifestsParser ¶
func NewManifestsParser(bytes []byte, opts ...Option) *ManifestsParser
NewManifestsParser reads manifests from a byte array.
func NewManifestsParserFromDirectory ¶
func NewManifestsParserFromDirectory(directory string, opts ...Option) *ManifestsParser
NewManifestsParserFromDirectory reads manifests from a directory. flow kubectl recognized file extensions are [.json .yaml .yml].
func NewManifestsParserFromFile ¶
func NewManifestsParserFromFile(file string, opts ...Option) *ManifestsParser
NewManifestsParserFromFile reads manifests from a file.
func (*ManifestsParser) MustParse ¶
func (p *ManifestsParser) MustParse() *Manifests
func (*ManifestsParser) Parse ¶
func (p *ManifestsParser) Parse() (*Manifests, error)
type Option ¶
type Option func(parse *ManifestsParser)
func ReverseSortObject ¶
func ReverseSortObject(mapper meta.RESTMapper) Option
ReverseSortObject sorts objects in the order of namespace scoped objects, namespaces, cluster scoped objects, CRDs.
func SetNamespace ¶
func SetNamespace(mapper meta.RESTMapper, namespace string) Option
SetNamespace sets namespace for objects.
func SortObject ¶
func SortObject(mapper meta.RESTMapper) Option
SortObject sorts objects in the order of CRDs, cluster scoped objects, namespaces, namespace scoped objects.
Click to show internal directories.
Click to hide internal directories.