server

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error added in v0.1.5

func Error(w http.ResponseWriter, message string, code int)

func RegisterStep

func RegisterStep(stepType string, handler StepHandler)

RegisterStep registers a step handler for a specific type.

Types

type Server

type Server struct {
	Router routers.Router
}

func (*Server) Handler

func (s *Server) Handler(w http.ResponseWriter, r *http.Request)

func (*Server) ProcessStep

func (s *Server) ProcessStep(ctx context.Context, currentStepKey string, w http.ResponseWriter, steps map[string]interface{}, stepOutputs map[string]interface{}, stepInput interface{}) (interface{}, string)

type StepHandler

type StepHandler func(ctx context.Context, stepMap map[string]interface{}, stepOutputs map[string]interface{}) (interface{}, string, error)

func GetStepHandler

func GetStepHandler(stepType string) (StepHandler, error)

GetStepHandler retrieves a step handler by type.

Jump to

Keyboard shortcuts

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