sleepop

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOp

func GetOp() ops.RegisterableOp

Types

type SleepConfig

type SleepConfig struct {
	// Optional: default duration if not specified in input
	DefaultDuration string `json:"default_duration"`
}

SleepConfig defines the configuration for sleep activities - ALL fields MUST have json tags

type SleepInput

type SleepInput struct {
	Duration string `json:"duration" validate:"required"` // Required: duration to sleep (e.g., "5s", "1m", "500ms")
}

SleepInput defines the input for sleep activities - ALL fields MUST have json tags

type SleepOutput

type SleepOutput struct {
	StartTime      time.Time `json:"start_time"`      // When the sleep started
	EndTime        time.Time `json:"end_time"`        // When the sleep ended
	ActualDuration string    `json:"actual_duration"` // Actual duration slept
	Completed      bool      `json:"completed"`       // Whether sleep completed normally
	Interrupted    bool      `json:"interrupted"`     // Whether sleep was interrupted
	ErrorMessage   string    `json:"error_message"`   // Error message if interrupted
}

SleepOutput defines the output from sleep activities - ALL fields MUST have json tags

Jump to

Keyboard shortcuts

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