actors

package
v0.5.2-beta Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActionFuncMap map[string]*ActionLayout = map[string]*ActionLayout{
	"r2_upload": {F: R2Upload, N: NextOKKO},
}

ActionFuncMap map

View Source
var NewActionContext = func(awsConf aws.Config, action *base.Action, store base.IStore, logger base.ILogger) *ActionContext {
	l := logger.Duplicate()
	l.SetActionID(action.ActionID)
	l.SetActionName(action.ActionName)
	return &ActionContext{
		AwsConfig: awsConf,
		Action:    action,
		Store:     store,
		Logger:    l,
		NewS3Client: func() *s3.Client {
			return s3.NewFromConfig(awsConf)
		},
		NewCloudFlareClient: nil,
	}
}

Functions

func R2Upload

func R2Upload(ctx *ActionContext) (*base.ActionOutput, error)

R2Upload func

Types

type ActionContext

type ActionContext struct {
	Rehearsal           bool
	AwsConfig           aws.Config
	Action              *base.Action
	Store               base.IStore
	Logger              base.ILogger
	NewS3Client         s3ClientFunc
	NewCloudFlareClient interface{}
}

ActionContext struct

type ActionFunc

type ActionFunc func(ctx *ActionContext) (*base.ActionOutput, error)

ActionFunc func

type ActionLayout

type ActionLayout struct {
	F ActionFunc
	N NextType
}

type NextType

type NextType int
const (
	// NextOKKO const 0
	NextOKKO NextType = iota
	// NextOK const 1
	NextOK
	// NextKO const
	NextKO
)

Jump to

Keyboard shortcuts

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