Documentation ¶
Index ¶
- Constants
- func DisplayHelpCmdTemplate()
- type Template
- func (t *Template) GenerateLimitRange(name string) (v1.LimitRange, error)
- func (t *Template) GenerateLimitRangeYaml(name string) (string, error)
- func (t *Template) GetContent() string
- func (t *Template) GetContentObj() (*v1.LimitRange, error)
- func (t *Template) GetContentYaml() []byte
- func (t *Template) GetDesc() string
- func (t *Template) GetEnabled() bool
- func (t *Template) GetInfo()
- func (t *Template) GetName() string
- func (t *Template) SetContent(content string)
- func (t *Template) SetDesc(desc string)
- func (t *Template) SetEnabled(enabled bool)
- func (t *Template) SetName(name string)
- type TemplateStack
- func (ts *TemplateStack) AddTemplate(template *Template)
- func (ts *TemplateStack) DisplayTemplate(name string)
- func (ts *TemplateStack) DisplayTemplateInfo(name string)
- func (ts *TemplateStack) DisplayTemplates()
- func (ts *TemplateStack) GetTemplate(name string) (*Template, error)
- func (ts *TemplateStack) RemoveTemplate(name string) error
- func (ts *TemplateStack) UpdateTemplate(name string, updatedTemplate *Template) error
Constants ¶
const ( // GroupAPI is the group API scope use in this package GroupAPI = "sxlimits.k8s.startx.fr" // GroupName is the group name use in this package GroupName = "template" )
Variables ¶
This section is empty.
Functions ¶
func DisplayHelpCmdTemplate ¶
func DisplayHelpCmdTemplate()
DisplayHelpCmdTemplate display the help message for the subcommand template
Types ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template represents a template class
func NewTemplate ¶
NewTemplate creates a new instance of Template
func (*Template) GenerateLimitRange ¶ added in v0.0.3
func (t *Template) GenerateLimitRange(name string) (v1.LimitRange, error)
Generate a new The name of the limitrange from the template
func (*Template) GenerateLimitRangeYaml ¶ added in v0.0.3
Generatea new The name of the limitrange from the template
func (*Template) GetContent ¶
GetContent returns the content property of the template
func (*Template) GetContentObj ¶
func (t *Template) GetContentObj() (*v1.LimitRange, error)
GetContentYaml returns the content property as a string byte
func (*Template) GetContentYaml ¶
GetContentYaml returns the content property as a string byte
func (*Template) GetEnabled ¶
GetEnabled returns the enabled property of the template
func (*Template) SetContent ¶
SetContent sets the content property of the template
func (*Template) SetEnabled ¶
SetEnabled sets the enabled property of the template
type TemplateStack ¶
type TemplateStack struct {
// contains filtered or unexported fields
}
TemplateStack represents a stack of Template objects
func NewTemplateStack ¶
func NewTemplateStack() *TemplateStack
NewTemplateStack creates a new instance of TemplateStack
func (*TemplateStack) AddTemplate ¶
func (ts *TemplateStack) AddTemplate(template *Template)
AddTemplate adds a template to the stack
func (*TemplateStack) DisplayTemplate ¶
func (ts *TemplateStack) DisplayTemplate(name string)
displayTemplate show the template stack
func (*TemplateStack) DisplayTemplateInfo ¶
func (ts *TemplateStack) DisplayTemplateInfo(name string)
displayTemplate show the template stack
func (*TemplateStack) DisplayTemplates ¶
func (ts *TemplateStack) DisplayTemplates()
displayTemplate show the template stack
func (*TemplateStack) GetTemplate ¶
func (ts *TemplateStack) GetTemplate(name string) (*Template, error)
displayTemplate show the template stack
func (*TemplateStack) RemoveTemplate ¶
func (ts *TemplateStack) RemoveTemplate(name string) error
RemoveTemplate removes a template from the stack
func (*TemplateStack) UpdateTemplate ¶
func (ts *TemplateStack) UpdateTemplate(name string, updatedTemplate *Template) error
UpdateTemplate updates an existing template in the stack