server

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 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(r *http.Request, w http.ResponseWriter, message string, status int, errorCode string)

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
	LogFormatter logrus.Formatter
}

func (*Server) Handler

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

func (*Server) ProcessStep

func (s *Server) ProcessStep(r *http.Request, 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