Documentation ¶
Index ¶
- Constants
- func FuncB32Dec(input string) (string, error)
- func FuncB32Enc(input string) string
- func FuncB64Dec(input string) (string, error)
- func FuncB64Enc(input string) string
- func FuncDefault(d any, vals ...any) any
- func FuncDict(pairs ...any) map[string]any
- func FuncElemsJoin(sep string, elems any) string
- func FuncEmpty(v any) bool
- func FuncExpandEnv(s string) string
- func FuncFileContent(path string) (data string, err error)
- func FuncGet(m map[string]any, key string) any
- func FuncGetEnv(key string) string
- func FuncHashSum(new func() hash.Hash) func(data string) string
- func FuncIndent(indent int, value string) string
- func FuncIterate(count *uint) (out []uint)
- func FuncKeys(maps ...map[string]any) []string
- func FuncKindIs(is string, v any) bool
- func FuncKindOf(v any) string
- func FuncList(items ...any) []any
- func FuncMap() map[string]any
- func FuncMultilineIndent(indent int, multiline, value string) string
- func FuncMustGetEnv(key string) (string, error)
- func FuncNewlineIndent(indent int, value string) string
- func FuncSecret(path string) (data string, err error)
- func FuncSet(m map[string]any, key string, value any) map[string]any
- func FuncSortAlpha(slice any) []string
- func FuncStringContains(substr string, s string) bool
- func FuncStringHasPrefix(prefix string, s string) bool
- func FuncStringHasSuffix(suffix string, s string) bool
- func FuncStringJoinX(elems []string, sep string, n int, p string) string
- func FuncStringQuote(in ...any) string
- func FuncStringQuoteMultiLine(char rune) func(in ...any) string
- func FuncStringReplace(old, new, s string) string
- func FuncStringSQuote(in ...any) string
- func FuncStringSplit(sep, value string) map[string]string
- func FuncStringSplitList(sep, s string) []string
- func FuncStringTrimAll(cutset, s string) string
- func FuncStringTrimPrefix(prefix, s string) string
- func FuncStringTrimSuffix(suffix, s string) string
- func FuncTypeIs(is string, v any) bool
- func FuncTypeIsLike(is string, v any) bool
- func FuncTypeOf(v any) string
- func FuncUUIDv4() string
- type AssetTemplates
- type Config
- type EmailEventValues
- type EmailIdentityVerificationJWTValues
- type EmailIdentityVerificationOTCValues
- type EmailTemplate
- type NotificationTemplates
- type OpenAPIAssetTemplates
- type OpenIDConnectTemplates
- type Provider
- func (p *Provider) GetAssetIndexTemplate() (t Template)
- func (p *Provider) GetAssetOpenAPIIndexTemplate() (t Template)
- func (p *Provider) GetAssetOpenAPISpecTemplate() (t Template)
- func (p *Provider) GetEventEmailTemplate() (t *EmailTemplate)
- func (p *Provider) GetIdentityVerificationJWTEmailTemplate() (t *EmailTemplate)
- func (p *Provider) GetIdentityVerificationOTCEmailTemplate() (t *EmailTemplate)
- func (p *Provider) GetOpenIDConnectAuthorizeResponseFormPostTemplate() (t *th.Template)
- func (p *Provider) LoadTemplatedAssets(fs fs.ReadFileFS) (err error)
- type Template
- type Templates
Constants ¶
const ( TemplateNameEmailIdentityVerificationJWT = "IdentityVerificationJWT" TemplateNameEmailIdentityVerificationOTC = "IdentityVerificationOTC" TemplateNameEmailEvent = "Event" TemplateNameOIDCAuthorizeFormPost = "AuthorizeResponseFormPost.html" )
Template File Names.
const ( TemplateCategoryNotifications = "notification" TemplateCategoryOpenIDConnect = "oidc" )
Template Category Names.
Variables ¶
This section is empty.
Functions ¶
func FuncB32Dec ¶ added in v4.38.0
FuncB32Dec is a helper function that provides similar functionality to the helm b32dec func.
func FuncB32Enc ¶ added in v4.38.0
FuncB32Enc is a helper function that provides similar functionality to the helm b32enc func.
func FuncB64Dec ¶ added in v4.38.0
FuncB64Dec is a helper function that provides similar functionality to the helm b64dec func.
func FuncB64Enc ¶ added in v4.38.0
FuncB64Enc is a helper function that provides similar functionality to the helm b64enc func.
func FuncDefault ¶ added in v4.38.0
FuncDefault is a helper function that provides similar functionality to the helm default func.
func FuncDict ¶ added in v4.38.0
FuncDict is a helper function that provides similar functionality to the helm dict func.
func FuncElemsJoin ¶ added in v4.38.0
FuncElemsJoin is a helper function that provides similar functionality to the helm join func.
func FuncEmpty ¶ added in v4.38.0
FuncEmpty is a helper function that provides similar functionality to the helm empty func.
func FuncExpandEnv ¶ added in v4.38.0
FuncExpandEnv is a special version of os.ExpandEnv that excludes secret keys.
func FuncFileContent ¶ added in v4.38.0
FuncFileContent returns the file content.
func FuncGet ¶ added in v4.38.0
FuncGet is a helper function that provides similar functionality to the helm get func.
func FuncGetEnv ¶ added in v4.38.0
FuncGetEnv is a special version of os.GetEnv that excludes secret keys.
func FuncHashSum ¶ added in v4.38.0
FuncHashSum is a helper function that provides similar functionality to helm sum funcs.
func FuncIndent ¶ added in v4.38.0
FuncIndent is a helper function that provides similar functionality to the helm indent func.
func FuncIterate ¶ added in v4.38.0
FuncIterate is a template function which takes a single uint returning a slice of units from 0 up to that number.
func FuncKeys ¶ added in v4.38.0
FuncKeys is a helper function that provides similar functionality to the helm keys func.
func FuncKindIs ¶ added in v4.38.0
FuncKindIs is a helper function that provides similar functionality to the helm kindIs func.
func FuncKindOf ¶ added in v4.38.0
FuncKindOf is a helper function that provides similar functionality to the helm kindOf func.
func FuncList ¶ added in v4.38.0
FuncList is a helper function that provides similar functionality to the helm list func.
func FuncMap ¶ added in v4.38.0
FuncMap returns the template FuncMap commonly used in several templates.
func FuncMultilineIndent ¶ added in v4.38.0
FuncMultilineIndent is a helper function that performs YAML multiline intending with a multiline format input such as |, |+, |-, >, >+, >-, etc. This is only true if the value has newline characters otherwise it just returns the same output as the indent function.
func FuncMustGetEnv ¶ added in v4.38.0
FuncMustGetEnv is a special version of os.GetEnv that excludes secret keys and returns an error if it doesn't exist.
func FuncNewlineIndent ¶ added in v4.38.0
FuncNewlineIndent is a helper function that provides similar functionality to the helm nindent func.
func FuncSecret ¶ added in v4.38.0
FuncSecret returns the file content stripping the newlines from the end of the content.
func FuncSet ¶ added in v4.38.0
FuncSet is a helper function that provides similar functionality to the helm set func.
func FuncSortAlpha ¶ added in v4.38.0
FuncSortAlpha is a helper function that provides similar functionality to the helm sortAlpha func.
func FuncStringContains ¶ added in v4.38.0
FuncStringContains is a helper function that provides similar functionality to the helm contains func.
func FuncStringHasPrefix ¶ added in v4.38.0
FuncStringHasPrefix is a helper function that provides similar functionality to the helm hasPrefix func.
func FuncStringHasSuffix ¶ added in v4.38.0
FuncStringHasSuffix is a helper function that provides similar functionality to the helm hasSuffix func.
func FuncStringJoinX ¶ added in v4.38.0
FuncStringJoinX takes a list of string elements, joins them by the sep string, before every int n characters are written it writes string p. This is useful for line breaks mostly.
func FuncStringQuote ¶ added in v4.38.0
FuncStringQuote is a helper function that provides similar functionality to the helm quote func.
func FuncStringQuoteMultiLine ¶ added in v4.38.0
FuncStringQuoteMultiLine is a helper function that provides similar functionality to FuncStringQuote and FuncStringSQuote, however it skips quoting if the string contains multiple lines.
func FuncStringReplace ¶ added in v4.38.0
FuncStringReplace is a helper function that provides similar functionality to the helm replace func.
func FuncStringSQuote ¶ added in v4.38.0
FuncStringSQuote is a helper function that provides similar functionality to the helm squote func.
func FuncStringSplit ¶ added in v4.38.0
FuncStringSplit is a template function which takes sep and value, splitting the value by the sep into a slice.
func FuncStringSplitList ¶ added in v4.38.0
FuncStringSplitList is a special split func that reverses the inputs to match helm templates.
func FuncStringTrimAll ¶ added in v4.38.0
FuncStringTrimAll is a helper function that provides similar functionality to the helm trimAll func.
func FuncStringTrimPrefix ¶ added in v4.38.0
FuncStringTrimPrefix is a helper function that provides similar functionality to the helm trimPrefix func.
func FuncStringTrimSuffix ¶ added in v4.38.0
FuncStringTrimSuffix is a helper function that provides similar functionality to the helm trimSuffix func.
func FuncTypeIs ¶ added in v4.38.0
FuncTypeIs is a helper function that provides similar functionality to the helm typeIs func.
func FuncTypeIsLike ¶ added in v4.38.0
FuncTypeIsLike is a helper function that provides similar functionality to the helm typeIsLike func.
func FuncTypeOf ¶ added in v4.38.0
FuncTypeOf is a helper function that provides similar functionality to the helm typeOf func.
func FuncUUIDv4 ¶ added in v4.38.0
func FuncUUIDv4() string
FuncUUIDv4 is a helper function that provides similar functionality to the helm uuidv4 func.
Types ¶
type AssetTemplates ¶ added in v4.38.0
type AssetTemplates struct {
// contains filtered or unexported fields
}
AssetTemplates are templates for specific key assets.
type Config ¶ added in v4.36.3
type Config struct {
EmailTemplatesPath string
}
Config for the Provider.
type EmailEventValues ¶ added in v4.38.0
type EmailEventValues struct { Title string BodyPrefix string BodySuffix string BodyEvent string DisplayName string Details map[string]any RemoteIP string }
EmailEventValues are the values used for event templates.
type EmailIdentityVerificationJWTValues ¶ added in v4.38.0
type EmailIdentityVerificationJWTValues struct { Title string DisplayName string Domain string RemoteIP string LinkURL string LinkText string RevocationLinkURL string RevocationLinkText string }
EmailIdentityVerificationJWTValues are the values used for the identity verification JWT templates.
type EmailIdentityVerificationOTCValues ¶ added in v4.38.0
type EmailIdentityVerificationOTCValues struct { Title string DisplayName string Domain string RemoteIP string OneTimeCode string RevocationLinkURL string RevocationLinkText string }
EmailIdentityVerificationOTCValues are the values used for the identity verification OTP templates.
type EmailTemplate ¶ added in v4.38.0
EmailTemplate is the template type which contains both the html and txt versions of a template.
type NotificationTemplates ¶ added in v4.36.3
type NotificationTemplates struct {
// contains filtered or unexported fields
}
NotificationTemplates are the templates for the notification system.
type OpenAPIAssetTemplates ¶ added in v4.38.0
type OpenAPIAssetTemplates struct {
// contains filtered or unexported fields
}
OpenAPIAssetTemplates are asset templates for the OpenAPI specification.
type OpenIDConnectTemplates ¶ added in v4.38.0
type OpenIDConnectTemplates struct {
// contains filtered or unexported fields
}
type Provider ¶ added in v4.36.3
type Provider struct {
// contains filtered or unexported fields
}
Provider of templates.
func (*Provider) GetAssetIndexTemplate ¶ added in v4.38.0
GetAssetIndexTemplate returns a Template used to generate the React index document.
func (*Provider) GetAssetOpenAPIIndexTemplate ¶ added in v4.38.0
GetAssetOpenAPIIndexTemplate returns a Template used to generate the OpenAPI index document.
func (*Provider) GetAssetOpenAPISpecTemplate ¶ added in v4.38.0
GetAssetOpenAPISpecTemplate returns a Template used to generate the OpenAPI specification document.
func (*Provider) GetEventEmailTemplate ¶ added in v4.38.0
func (p *Provider) GetEventEmailTemplate() (t *EmailTemplate)
GetEventEmailTemplate returns an EmailTemplate used for generic event notifications.
func (*Provider) GetIdentityVerificationJWTEmailTemplate ¶ added in v4.38.0
func (p *Provider) GetIdentityVerificationJWTEmailTemplate() (t *EmailTemplate)
GetIdentityVerificationJWTEmailTemplate returns the EmailTemplate for Identity Verification notifications.
func (*Provider) GetIdentityVerificationOTCEmailTemplate ¶ added in v4.38.0
func (p *Provider) GetIdentityVerificationOTCEmailTemplate() (t *EmailTemplate)
GetIdentityVerificationOTCEmailTemplate returns the EmailTemplate for Identity Verification notifications.
func (*Provider) GetOpenIDConnectAuthorizeResponseFormPostTemplate ¶ added in v4.38.0
GetOpenIDConnectAuthorizeResponseFormPostTemplate returns a Template used to generate the OpenID Connect 1.0 Form Post Authorize Response.
func (*Provider) LoadTemplatedAssets ¶ added in v4.38.0
func (p *Provider) LoadTemplatedAssets(fs fs.ReadFileFS) (err error)
LoadTemplatedAssets takes an embed.FS and loads each templated asset document into a Template.