Provider Hub
atlas
function
Golang

L2 Construct: golang

atlas transformation script

Description

Runs an golang script to process entity data

L2 Data

  1. Provider: atlas
  2. Module: function
  3. Action: golang

Example Step

{
  "name": "insert-your-step-name",
  "type": "l2",
  "l2_data": {
    "provider": "atlas",
    "module": "function",
    "action": "golang",
    "metadata": {}
  }
}
 

Input

Example

{
  "type": "public_repo",
  "public_repo_config": {
    "url": "https://github.com/PontusLabs/scripts.git"
  },
  "params": {
    "base_url": "",
    "entities": null,
    "metadata": null
  }
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/atlas/function/script-handler-input",
  "$ref": "#/$defs/ScriptHandlerInput",
  "$defs": {
    "BasicScriptParams": {
      "properties": {
        "base_url": {
          "type": "string"
        },
        "entities": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "metadata": {
          "type": "object"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["base_url", "entities", "metadata"]
    },
    "PublicRepoConfig": {
      "properties": {
        "url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["url"]
    },
    "ScriptHandlerInput": {
      "properties": {
        "type": {
          "type": "string"
        },
        "public_repo_config": {
          "$ref": "#/$defs/PublicRepoConfig"
        },
        "params": {
          "$ref": "#/$defs/BasicScriptParams"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["type", "params"]
    }
  }
}
 

Output

Example

{
  "ok": true,
  "result": {}
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/atlas/function/script-handler-output",
  "$ref": "#/$defs/ScriptHandlerOutput",
  "$defs": {
    "ScriptHandlerOutput": {
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "result": {
          "type": "object"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["ok", "result"]
    }
  }
}