github.com/mmatczuk/gohan@v0.0.0-20170206152520-30e45d9bdb69/examples/go_extension/example.yaml (about)

     1  extensions:
     2  - code: exampleapp_callback
     3    code_type: go
     4    id: example
     5    path: .*
     6  - code: |
     7      gohan_register_handler("pre_list", function (context){
     8        var exampleModule = require("exampleapp");
     9        exampleModule.HelloWorld("example app!",
    10          {"hobby": "sleeping"});
    11      });
    12    id: example_js
    13    path: .*
    14  networks: []
    15  policies:
    16  - action: '*'
    17    effect: allow
    18    id: admin_statement
    19    principal: admin
    20    resource:
    21      path: .*
    22  schemas:
    23  - description: Todo
    24    id: todo
    25    plural: todos
    26    prefix: /v0.1
    27    schema:
    28      properties:
    29        description:
    30          description: Description
    31          default: ""
    32          permission:
    33          - create
    34          - update
    35          title: Description
    36          type: string
    37          unique: false
    38        id:
    39          description: ID
    40          permission:
    41          - create
    42          title: ID
    43          type: string
    44          unique: false
    45        name:
    46          description: Name
    47          permission:
    48          - create
    49          - update
    50          title: Name
    51          type: string
    52          unique: false
    53        tenant_id:
    54          description: Tenant ID
    55          permission:
    56          - create
    57          title: Tenant
    58          type: string
    59          unique: false
    60      propertiesOrder:
    61      - id
    62      - name
    63      - description
    64      type: object
    65    singular: todo
    66    title: Todo