toolticket

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

func (s *MemoryStore) AddComment(_ context.Context, id, author, body string) (Ticket, error)

func (*MemoryStore) Get

func (s *MemoryStore) Get(_ context.Context, id string) (Ticket, error)

func (*MemoryStore) Update

func (s *MemoryStore) Update(_ context.Context, id string, fields map[string]string) (Ticket, error)

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.

Jump to

Keyboard shortcuts

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