Documentation
¶
Index ¶
- type Entry
- type EntryType
- type FileStore
- func (s *FileStore) Create(ctx context.Context, prompt string) (*Ticket, error)
- func (s *FileStore) Get(ctx context.Context, id string) (*Ticket, error)
- func (s *FileStore) List(ctx context.Context, status *Status) ([]Ticket, error)
- func (s *FileStore) NextPending(ctx context.Context) (*Ticket, error)
- func (s *FileStore) Stats(ctx context.Context) (map[Status]int, error)
- func (s *FileStore) Update(ctx context.Context, ticket *Ticket) error
- type Processor
- type Status
- type Store
- type Ticket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Type EntryType `yaml:"type"`
Author string `yaml:"author"`
Timestamp time.Time `yaml:"timestamp"`
Content string `yaml:"content"`
}
Entry represents a prompt or comment on a ticket.
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore implements Store using the filesystem.
func NewFileStore ¶
NewFileStore creates a new filesystem-based ticket store.
func (*FileStore) NextPending ¶
NextPending returns the oldest pending ticket.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor handles ticket-to-job orchestration.
func NewProcessor ¶
NewProcessor creates a new ticket processor.
type Store ¶
type Store interface {
List(ctx context.Context, status *Status) ([]Ticket, error)
Get(ctx context.Context, id string) (*Ticket, error)
Create(ctx context.Context, prompt string) (*Ticket, error)
Update(ctx context.Context, ticket *Ticket) error
Stats(ctx context.Context) (map[Status]int, error)
NextPending(ctx context.Context) (*Ticket, error)
}
Store defines the interface for ticket storage.
type Ticket ¶
type Ticket struct {
ID string `yaml:"id"`
Project string `yaml:"project"`
Status Status `yaml:"status"`
CreatedAt time.Time `yaml:"created_at"`
JobID string `yaml:"job_id,omitempty"`
Entries []Entry `yaml:"entries"`
}
Ticket represents a task to be processed.
func (*Ticket) PromptContent ¶
PromptContent returns the content of the first prompt entry.
func (*Ticket) PromptPreview ¶
PromptPreview returns a truncated preview of the prompt.
Click to show internal directories.
Click to hide internal directories.