Documentation
¶
Index ¶
- func AddPrefix(s, prefix, sep string) string
- func AddSuffix(s, suffix, sep string) string
- func CreateEmbeddedShellRunner(workingDir string, rc dukkha.RenderingContext, stdin io.Reader, ...) (*interp.Runner, error)
- func CreateTemplate(rc dukkha.RenderingContext) *template.Template
- func ExecCmdAsTemplateFuncCall(rc dukkha.RenderingContext, stdin io.Reader, stdout io.Writer, args []string) error
- func GenerateTOTPCode(token string, t time.Time, codeLength int) (string, error)
- func GetDefaultImageTag(rc dukkha.RenderingContext, imageName string, keepKernelInfo bool) string
- func GetDefaultManifestTag(rc dukkha.RenderingContext, manifestName string) string
- func GetDefaultTag(rc dukkha.RenderingContext, name string, isManifest bool, keepKernelInfo bool) string
- func RegisterTemplateFuncs(fm map[string]TemplateFuncFactory)
- func RemovePrefix(s, prefix, sep string) string
- func RemoveSuffix(s, suffix, sep string) string
- func RunScriptInEmbeddedShell(ctx context.Context, runner *interp.Runner, parser *syntax.Parser, ...) error
- func SetDefaultImageTagIfNoTagSet(rc dukkha.RenderingContext, imageName string, keepKernelInfo bool) string
- func SetDefaultManifestTagIfNoTagSet(rc dukkha.RenderingContext, manifestName string) string
- type TemplateFuncFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTemplate ¶
func CreateTemplate(rc dukkha.RenderingContext) *template.Template
func GenerateTOTPCode ¶ added in v0.4.0
MIT License
Copyright (c)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copied from https://github.com/yitsushi/totp-cli/blob/main/internal/security/otp.go with modification to codeLength
func GetDefaultImageTag ¶ added in v0.2.0
func GetDefaultImageTag( rc dukkha.RenderingContext, imageName string, keepKernelInfo bool, ) string
func GetDefaultManifestTag ¶ added in v0.2.0
func GetDefaultManifestTag( rc dukkha.RenderingContext, manifestName string, ) string
func GetDefaultTag ¶ added in v0.2.0
func RegisterTemplateFuncs ¶
func RegisterTemplateFuncs(fm map[string]TemplateFuncFactory)
func RemovePrefix ¶
RemovePrefix of each separated string elements
func RemoveSuffix ¶
func SetDefaultImageTagIfNoTagSet ¶
func SetDefaultImageTagIfNoTagSet( rc dukkha.RenderingContext, imageName string, keepKernelInfo bool, ) string
func SetDefaultManifestTagIfNoTagSet ¶
func SetDefaultManifestTagIfNoTagSet( rc dukkha.RenderingContext, manifestName string, ) string
Types ¶
type TemplateFuncFactory ¶
type TemplateFuncFactory func(rc dukkha.RenderingContext) interface{}