github.com/Axway/agent-sdk@v1.1.101/pkg/config/resourcefilterconfig.go (about)

     1  package config
     2  
     3  // ResourceEventType - watch filter event types
     4  type ResourceEventType string
     5  
     6  // Resource event types
     7  const (
     8  	ResourceEventCreated ResourceEventType = "created"
     9  	ResourceEventUpdated ResourceEventType = "updated"
    10  	ResourceEventDeleted ResourceEventType = "deleted"
    11  )
    12  
    13  // ResourceScope -  scope config for watch resource filter
    14  type ResourceScope struct {
    15  	Kind string `json:"kind"`
    16  	Name string `json:"name"`
    17  }
    18  
    19  // ResourceFilter - custom watch filter
    20  type ResourceFilter struct {
    21  	Group            string              `json:"group"` // remove group ? and default to management or allow filter for other groups as well?
    22  	Kind             string              `json:"kind"`
    23  	Name             string              `json:"name"`
    24  	EventTypes       []ResourceEventType `json:"eventTypes"`
    25  	Scope            *ResourceScope      `json:"scope"`
    26  	IsCachedResource bool                `json:"isCachedResource"`
    27  }