Documentation
¶
Index ¶
- Variables
- func MustExtractFQN(ctx context.Context) string
- func MustExtractSection(ctx context.Context) string
- func WithFQN(ctx context.Context, fqn string) context.Context
- func WithGroup(ctx context.Context, grp string) context.Context
- type Alias
- type Aliases
- type Empty
- type PopeyeKey
- type RunInfo
- type StringSet
Constants ¶
This section is empty.
Variables ¶
View Source
var Blank = Empty{}
Blank represents an empty value.
Functions ¶
func MustExtractFQN ¶
func MustExtractFQN(ctx context.Context) string
MustExtractFQN extract fqn from context or die.
func MustExtractSection ¶
func MustExtractSection(ctx context.Context) string
MustExtractSection extract section from context or die.
Types ¶
type Alias ¶
type Alias struct {
ShortNames StringSet
Plural string
}
Alias represents a resource alias.
type Aliases ¶
type Aliases struct {
// contains filtered or unexported fields
}
Aliases represents a collection of aliases.
func (Aliases) FromAlias ¶
func (a Aliases) FromAlias(res string) string
FromAlias returns the resource name from an alias.
func (Aliases) Pluralize ¶
func (a Aliases) Pluralize(res string) string
Pluralize returns a plural form.
func (*Aliases) ToResources ¶
func (a *Aliases) ToResources(ss []string) []string
ToResources converts aliases to resource names.
type PopeyeKey ¶
type PopeyeKey string
PopeyeKey namespaces popeye context keys.
const (
// KeyRun stores run information.
KeyRun PopeyeKey = "runinfo"
)
type RunInfo ¶
type RunInfo struct {
Section, FQN, Group string
}
RunInfo describes a sanitizer run.
func MustExtractRunInfo ¶
func MustExtractRunInfo(ctx context.Context) RunInfo
MustExtractRunInfo extracts runinfo from context or die.
Click to show internal directories.
Click to hide internal directories.