Documentation ¶
Index ¶
- Variables
- func ByAlias(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
- func ByClusterProvider(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
- func ByFlags(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
- func ByHistoryID(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
- func ByIdentityProvider(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
- func ByProviderID(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
- func FilterEntry(entry *historyv1alpha.HistoryEntry, filterSpec *FilterSpec, ...) bool
- func FilterHistory(list *historyv1alpha.HistoryEntryList, filterSpec *FilterSpec) error
- func FilterHistoryWithFuncs(list *historyv1alpha.HistoryEntryList, filterSpec *FilterSpec, ...) error
- type FilterFunc
- type FilterSpec
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultFilterFuncs = []FilterFunc{ByHistoryID, ByProviderID, ByAlias, ByClusterProvider, ByIdentityProvider, ByFlags} ErrListNil = errors.New("history list is nil") ErrFilterSpecNil = errors.New("filter spec is nil") )
View Source
var ( ErrNoLoader = errors.New("loader required for history store") ErrStoreFileRequired = errors.New("history store must be a file") ErrEntryNotFound = errors.New("history entry not found") ErrDuplicateAlias = errors.New("duplicate alias detected") ErrNoEntries = errors.New("no history entries found") )
Functions ¶
func ByAlias ¶
func ByAlias(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
func ByClusterProvider ¶
func ByClusterProvider(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
func ByFlags ¶
func ByFlags(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
func ByHistoryID ¶
func ByHistoryID(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
func ByIdentityProvider ¶
func ByIdentityProvider(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
func ByProviderID ¶
func ByProviderID(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
func FilterEntry ¶
func FilterEntry(entry *historyv1alpha.HistoryEntry, filterSpec *FilterSpec, filterFucs []FilterFunc) bool
func FilterHistory ¶
func FilterHistory(list *historyv1alpha.HistoryEntryList, filterSpec *FilterSpec) error
func FilterHistoryWithFuncs ¶
func FilterHistoryWithFuncs(list *historyv1alpha.HistoryEntryList, filterSpec *FilterSpec, filterFucs []FilterFunc) error
Types ¶
type FilterFunc ¶
type FilterFunc func(spec *FilterSpec, entry *historyv1alpha.HistoryEntry) bool
FilterFunc is the spec for a filter function that returns true if the history entry should be included. A filterFunc decides how to handle values in the spec and what is deemed as empty or not specified
type FilterSpec ¶
type FilterSpec struct { ClusterProvider *string IdentityProvider *string ProviderID *string HistoryID *string Alias *string Flags map[string]string Kubeconfig *string }
func CreateFilterFromMap ¶
func CreateFilterFromMap(filterMap map[string]string) *FilterSpec
type Store ¶
type Store interface { Add(entry *historyv1alpha.HistoryEntry) error Remove(entries []*historyv1alpha.HistoryEntry) error SetHistoryList(historyList *historyv1alpha.HistoryEntryList) error GetAll() (*historyv1alpha.HistoryEntryList, error) GetByID(id string) (*historyv1alpha.HistoryEntry, error) GetByProvider(providerName string) ([]*historyv1alpha.HistoryEntry, error) GetByProviderWithID(providerName, providerID string) ([]*historyv1alpha.HistoryEntry, error) GetByAlias(alias string) (*historyv1alpha.HistoryEntry, error) GetLastModified(index int) (*historyv1alpha.HistoryEntry, error) Update(entry *historyv1alpha.HistoryEntry) error GetAllSortedByLastUsed() (*historyv1alpha.HistoryEntryList, error) }
Store is an interface for the history store
Directories ¶
Path | Synopsis |
---|---|
mock_loader
Package mock_loader is a generated GoMock package.
|
Package mock_loader is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.