downloadfile

package module
v0.0.0-...-dceaa68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 6 Imported by: 0

README

Download File

Download a file

Installation

flogo install github.com/retgits/flogo-components/activity/downloadfile

Link for flogo web:

https://github.com/retgits/flogo-components/activity/downloadfile

Schema

Inputs and Outputs:

{
"inputs": [
        {
            "name": "url",
            "type": "string",
            "required": true
        },
        {
            "name": "writeToDisk",
            "type": "bool",
            "required": true
        },
        {
            "name": "filename",
            "type": "string"
        },
        {
            "name": "append",
            "type": "bool"
        },
        {
            "name": "create",
            "type": "bool"
        }
    ],
    "outputs": [
        {
            "name": "result",
            "type": "string"
        }
    ]
}

Inputs

Input Description
url The full URL of the file you want to download
writeToDisk Write the downloaded file to disk (if set to true, the filename, append, and create need to be set too)
filename The name of the file you want to write to (like data.txt or ./tmp/data.txt)
append Append to the file or overwrite existing content (setting this to false deletes and recreates the file)
create Create the file if it doesn't exist

Ouputs

Output Description
result The result (either OK or the error that was generated by the OS)

Documentation

Overview

Package downloadfile implements a file download for Flogo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

NewActivity creates a new activity

Types

type MyActivity

type MyActivity struct {
	// contains filtered or unexported fields
}

MyActivity is a stub for your Activity implementation

func (*MyActivity) Eval

func (a *MyActivity) Eval(context activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval

func (*MyActivity) Metadata

func (a *MyActivity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL