...

Package customprovider

import "sigs.k8s.io/cli-utils/test/e2e/customprovider"
Overview
Index

Overview ▾

Variables

var InventoryCRD = []byte(strings.TrimSpace(`
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: inventories.cli-utils.example.io
spec:
  conversion:
    strategy: None
  group: cli-utils.example.io
  names:
    kind: Inventory
    listKind: InventoryList
    plural: inventories
    singular: inventory
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Example for cli-utils e2e tests
        properties:
          spec:
            properties:
              objects:
                items:
                  properties:
                    group:
                      type: string
                    kind:
                      type: string
                    name:
                      type: string
                    namespace:
                      type: string
                  required:
                  - group
                  - kind
                  - name
                  - namespace
                  type: object
                type: array
            type: object
          status:
            properties:
              objects:
                items:
                  properties:
                    group:
                      type: string
                    kind:
                      type: string
                    name:
                      type: string
                    namespace:
                      type: string
                    strategy:
                      type: string
                    actuation:
                      type: string
                    reconcile:
                      type: string
                  required:
                  - group
                  - kind
                  - name
                  - namespace
                  - strategy
                  - actuation
                  - reconcile
                  type: object
                type: array
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
`))
var InventoryGVK = schema.GroupVersionKind{
    Group:   "cli-utils.example.io",
    Version: "v1alpha1",
    Kind:    "Inventory",
}

func WrapInventoryInfoObj

func WrapInventoryInfoObj(obj *unstructured.Unstructured) inventory.Info

func WrapInventoryObj

func WrapInventoryObj(obj *unstructured.Unstructured) inventory.Storage

type CustomClientFactory

type CustomClientFactory struct {
}

func (CustomClientFactory) NewClient

func (CustomClientFactory) NewClient(factory util.Factory) (inventory.Client, error)

type InventoryCustomType

type InventoryCustomType struct {
    // contains filtered or unexported fields
}

func (InventoryCustomType) Apply

func (i InventoryCustomType) Apply(dc dynamic.Interface, mapper meta.RESTMapper, _ inventory.StatusPolicy) error

Apply is an Inventory interface function implemented to apply the inventory object.

func (InventoryCustomType) ApplyWithPrune

func (i InventoryCustomType) ApplyWithPrune(dc dynamic.Interface, mapper meta.RESTMapper, _ inventory.StatusPolicy, _ object.ObjMetadataSet) error

func (InventoryCustomType) GetObject

func (i InventoryCustomType) GetObject() (*unstructured.Unstructured, error)

func (InventoryCustomType) ID

func (i InventoryCustomType) ID() string

func (InventoryCustomType) Load

func (i InventoryCustomType) Load() (object.ObjMetadataSet, error)

func (InventoryCustomType) Name

func (i InventoryCustomType) Name() string

func (InventoryCustomType) Namespace

func (i InventoryCustomType) Namespace() string

func (InventoryCustomType) Store

func (i InventoryCustomType) Store(objs object.ObjMetadataSet, status []actuation.ObjectStatus) error

func (InventoryCustomType) Strategy

func (i InventoryCustomType) Strategy() inventory.Strategy