do

package
v0.3.20 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package do contains Task types and methods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetMyInstance added in v0.3.18

func SetMyInstance(i *my.Instance)

SetMyInstance sets the My instance

Types

type Action

type Action struct {
	Name string
	Fn   ActionFn
	Cmd  CmdParamsFn
	Web  WebParamsFn
}

func (Action) CmdHandler

func (t Action) CmdHandler() root.CmdHandler

CmdHandler returns an Action root command handler

func (Action) WebHandler

func (t Action) WebHandler() web.Handler

WebHandler returns an Action web handler

type ActionFn

type ActionFn = func(*my.Request) error

type CmdParamsFn

type CmdParamsFn = func(*my.Request, []string) error

type Data

type Data[T any] struct {
	Name string
	Fn   DataFn[T]
	Cmd  CmdParamsFn
	Web  WebParamsFn
}

func (Data[T]) CmdHandler

func (t Data[T]) CmdHandler() root.CmdHandler

CmdHandler returns a Data root command handler

func (Data[T]) WebHandler

func (t Data[T]) WebHandler() web.Handler

WebHandler returns a Data web handler

type DataFn

type DataFn[T any] = func(*my.Request) (T, error)

type WebParamsFn

type WebParamsFn = func(*my.Request, *http.Request) error

Jump to

Keyboard shortcuts

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