Sign inSign up

westwind027/mustache

By westwind027

•Updated almost 4 years ago

Image
0

320

westwind027/mustache repository overview

⁠mustache 1.0

Mustache templating



⁠About mustache

This function requires a Mustache⁠ template and data. The function returns the rendered template with the data provided. It runs Mustache version 1.1.1.

⁠Example(s)
⁠Function Configuration
functions:
- id: mustache
  image: gcr.io/direktiv/functions/mustache:1.0
  type: knative-workflow
⁠Direct template
- id: mustache 
  type: action
  action:
    function: mustache
    input: 
      files:
      - name: template.tmpl
        data: <h1>{{header}}</h1>
      template: template.tmpl
      data:
        header: This is the header
⁠Template from Direktiv variable
- id: mustache 
  type: action
  action:
    function: mustache
    files:
    - key: templ.tpl
      scope: workflow
    input: 
      template: templ.tpl
      data:
        header: This is the header
⁠Secrets

No secrets required

⁠Request
⁠Request Attributes

PostParamsBody⁠

⁠Response

List of executed commands.

⁠Reponse Types

PostOKBody⁠

⁠Example Reponses
[
  {
    "result": "\u003ch1\u003eTHIS IS THE HEADER\u003c/h1\u003e",
    "success": true
  },
  {
    "result": "My Template Output",
    "success": true
  }
]
⁠Errors
TypeDescription
io.direktiv.command.errorCommand execution failed
io.direktiv.output.errorTemplate error for output generation of the service
io.direktiv.ri.errorCan not create information object from request
⁠Types
⁠ postOKBody

Properties

NameTypeGo typeRequiredDefaultDescriptionExample
mustachePostOKBodyMustache⁠PostOKBodyMustache
⁠ postOKBodyMustache

Properties

NameTypeGo typeRequiredDefaultDescriptionExample
resultstringstring✓Template output
successbooleanbool✓
⁠ postParamsBody

Properties

NameTypeGo typeRequiredDefaultDescriptionExample
datainterface{}⁠interface{}
files[]DirektivFile⁠[]apps.DirektivFileFile to create before running commands.
templatestringstringMustache template to use

Tag summary

Content type

Image

Digest

sha256:d65a14a00…

Size

16 MB

Last updated

almost 4 years ago

docker pull westwind027/mustache