Documentation ¶
Index ¶
- Constants
- func Date(timeStr string) (string, error)
- func DateModify(fmt string, date time.Time) time.Time
- func Join(sep string, v []string) string
- func List(v ...string) []string
- func OptimusFuncMap() template.FuncMap
- func PrepareContext(builders ...ContextOpts) map[string]interface{}
- func Replace(old, newStr, name string) string
- func Trunc(c int, s string) string
- func UnixEpoch(date time.Time) string
- type ContextOpts
- type Engine
Constants ¶
View Source
const ( EntityCompiler = "compiler" // ISODateFormat https://en.wikipedia.org/wiki/ISO_8601 ISODateFormat = "2006-01-02" ISOTimeFormat = time.RFC3339 )
Variables ¶
This section is empty.
Functions ¶
func OptimusFuncMap ¶
func PrepareContext ¶
func PrepareContext(builders ...ContextOpts) map[string]interface{}
Types ¶
type ContextOpts ¶
type ContextOpts struct {
// contains filtered or unexported fields
}
func From ¶
func From(confs ...map[string]string) ContextOpts
func (ContextOpts) AddToContext ¶
func (b ContextOpts) AddToContext() ContextOpts
func (ContextOpts) WithKeyPrefix ¶
func (b ContextOpts) WithKeyPrefix(prefix string) ContextOpts
func (ContextOpts) WithName ¶
func (b ContextOpts) WithName(name string) ContextOpts
Click to show internal directories.
Click to hide internal directories.