Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
Body string `json:"body"`
Author string `json:"author,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Comment is a ticket comment entry.
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore is an in-memory Store for tests and demos.
func NewMemoryStore ¶
func NewMemoryStore(seed map[string]Ticket) *MemoryStore
NewMemoryStore creates an in-memory ticket store optionally seeded with records.
func (*MemoryStore) AddComment ¶
type Store ¶
type Store interface {
Get(ctx context.Context, id string) (Ticket, error)
Update(ctx context.Context, id string, fields map[string]string) (Ticket, error)
AddComment(ctx context.Context, id, author, body string) (Ticket, error)
}
Store persists ticket records for the ticket tool executor.
type Ticket ¶
type Ticket struct {
ID string `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
Description string `json:"description,omitempty"`
Comments []Comment `json:"comments,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
Ticket is a support ticket record manipulated by the ticket tool.
Click to show internal directories.
Click to hide internal directories.