Documentation
¶
Index ¶
- Constants
- func DefaultPath() string
- type AddRequest
- type Definition
- type Run
- type RunMetadata
- type Store
- func (s *Store) Add(req AddRequest) (Definition, error)
- func (s *Store) Get(id string) (Definition, bool)
- func (s *Store) List() []Definition
- func (s *Store) Pause(id string) error
- func (s *Store) Remove(id string) error
- func (s *Store) Resume(id string) error
- func (s *Store) RunManual(id string) (Run, error)
- func (s *Store) RunsForRoutine(id string) []Run
- func (s *Store) Save() error
Constants ¶
View Source
const RunStatusRecorded = "recorded"
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
func DefaultPath() string
Types ¶
type AddRequest ¶
type Definition ¶
type Definition struct {
ID string `json:"id"`
Schedule string `json:"schedule"`
Prompt string `json:"prompt"`
CWD string `json:"cwd,omitempty"`
Provider string `json:"provider,omitempty"`
Paused bool `json:"paused"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
LastRun *RunMetadata `json:"lastRun,omitempty"`
}
type RunMetadata ¶
type Store ¶
type Store struct {
Definitions map[string]Definition `json:"definitions"`
Runs map[string]Run `json:"runs"`
// contains filtered or unexported fields
}
func LoadDefault ¶
func (*Store) Add ¶
func (s *Store) Add(req AddRequest) (Definition, error)
func (*Store) List ¶
func (s *Store) List() []Definition
func (*Store) RunsForRoutine ¶
Click to show internal directories.
Click to hide internal directories.