addtodate

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: 3 Imported by: 0

README

addtodate

addtodate provides your Flogo app the ability to add a specified number of units (days, months, or years) to a date

Settings

No settings available

Inputs

Input Description
Date start date to add the units to
Number amount of units to add to the date
Units string representation of what needs to be added (days, months, or years)

Outputs

No outputs available

Documentation

Overview

Package addtodate provides your Flogo app the ability to add a specified number of units (days, months, or years) to a date

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new AddToDate activity

Types

type Activity

type Activity struct{}

Activity is an AddToDate Activity implementation

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

Eval executes the activity

func (*Activity) Metadata

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

Metadata return the metadata for the activity

type Input

type Input struct {
	// Date is the start date to add the units to
	Date string `md:"date"`

	// Number is the amount of units to add to the date
	Number int `md:"number"`

	// Units is the string representation of what needs to be added (days, months, or years)
	Units string `md:"number"`
}

Input is the input into the AddToDate activity

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

FromMap converts the values from a map into the struct Input

func (*Input) ToMap

func (i *Input) ToMap() map[string]interface{}

ToMap converts the struct Input into a map

type Output

type Output struct {
	// Result is the new date is ISO format (yyyy-mm-dd)
	Result string `md:"result"`
}

Output is the result of the AddToDate activity

func (*Output) FromMap

func (o *Output) FromMap(values map[string]interface{}) error

FromMap converts the values from a map into the struct Output

func (*Output) ToMap

func (o *Output) ToMap() map[string]interface{}

ToMap converts the struct Output into a map

Jump to

Keyboard shortcuts

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