Skip to content

Commit

Permalink
Merge pull request #229 from skriss/plugin-docs
Browse files Browse the repository at this point in the history
add godoc for ResourceSelector
  • Loading branch information
ncdc authored Nov 30, 2017
2 parents 41ec1c5 + 94ac3b3 commit bd8f433
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
24 changes: 21 additions & 3 deletions pkg/backup/item_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,27 @@ type ResourceIdentifier struct {
// included/excluded resources, and a label-selector that can be used
// to match a set of items from a cluster.
type ResourceSelector struct {
// IncludedNamespaces is a slice of namespace names to match. All
// namespaces in this slice, except those in ExcludedNamespaces,
// will be matched. A nil/empty slice matches all namespaces.
IncludedNamespaces []string
// ExcludedNamespaces is a slice of namespace names to exclude.
// All namespaces in IncludedNamespaces, *except* those in
// this slice, will be matched.
ExcludedNamespaces []string
IncludedResources []string
ExcludedResources []string
LabelSelector string
// IncludedResources is a slice of resources to match. Resources
// may be specified as full names (e.g. "services") or abbreviations
// (e.g. "svc"). All resources in this slice, except those in
// ExcludedResources, will be matched. A nil/empty slice matches
// all resources.
IncludedResources []string
// ExcludedResources is a slice of resources to exclude.
// Resources may be specified as full names (e.g. "services") or
// abbreviations (e.g. "svc"). All resources in IncludedResources,
// *except* those in this slice, will be matched.
ExcludedResources []string
// LabelSelector is a string representation of a selector to apply
// when matching resources. See "k8s.io/apimachinery/pkg/labels".Parse()
// for details on syntax.
LabelSelector string
}
24 changes: 21 additions & 3 deletions pkg/restore/item_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,27 @@ type ItemAction interface {
// included/excluded resources, and a label-selector that can be used
// to match a set of items from a cluster.
type ResourceSelector struct {
// IncludedNamespaces is a slice of namespace names to match. All
// namespaces in this slice, except those in ExcludedNamespaces,
// will be matched. A nil/empty slice matches all namespaces.
IncludedNamespaces []string
// ExcludedNamespaces is a slice of namespace names to exclude.
// All namespaces in IncludedNamespaces, *except* those in
// this slice, will be matched.
ExcludedNamespaces []string
IncludedResources []string
ExcludedResources []string
LabelSelector string
// IncludedResources is a slice of resources to match. Resources
// may be specified as full names (e.g. "services") or abbreviations
// (e.g. "svc"). All resources in this slice, except those in
// ExcludedResources, will be matched. A nil/empty slice matches
// all resources.
IncludedResources []string
// ExcludedResources is a slice of resources to exclude.
// Resources may be specified as full names (e.g. "services") or
// abbreviations (e.g. "svc"). All resources in IncludedResources,
// *except* those in this slice, will be matched.
ExcludedResources []string
// LabelSelector is a string representation of a selector to apply
// when matching resources. See "k8s.io/apimachinery/pkg/labels".Parse()
// for details on syntax.
LabelSelector string
}

0 comments on commit bd8f433

Please sign in to comment.