package helloworld
import (
"context"
"fmt"
"github.com/tilebox/tilebox-go/workflows/v1"
)
type MyFirstTask struct{}
func (t *MyFirstTask) Execute(ctx context.Context) error {
fmt.Println("Hello World!")
return nil
}
func (t *MyFirstTask) Identifier() workflows.TaskIdentifier {
return workflows.NewTaskIdentifier("tilebox.workflows.MyTask", "v3.2")
}
type MyFirstParameterizedTask struct {
Name string
Greet bool
Data map[string]string
}
func (t *MyFirstParameterizedTask) Execute(ctx context.Context) error {
if t.Greet {
fmt.Printf("Hello %s!\n", t.Name)
}
return nil
}