Documentation
¶
Index ¶
- type APIError
- type BoardColumn
- type BoardView
- type Client
- func (c *Client) AddLink(project string, ticketID int, req LinkCreate) (*TicketLinkResp, error)
- func (c *Client) CreateProject(req ProjectCreate) (*ProjectResponse, error)
- func (c *Client) CreateTicket(project string, req TicketCreate) (*TicketResponse, error)
- func (c *Client) Delete(path string, params url.Values) error
- func (c *Client) DeleteProject(name string) error
- func (c *Client) DeleteWithResult(path string, params url.Values, result any) error
- func (c *Client) Do(method, path string, body any, params url.Values) ([]byte, int, error)
- func (c *Client) Get(path string, params url.Values, result any) error
- func (c *Client) GetBoard(project string, view, ticketType, status string) (*BoardView, error)
- func (c *Client) GetContext(project, topic string, version string) (*ContextDetailResponse, error)
- func (c *Client) GetProject(name string, withStats bool) (*ProjectResponse, error)
- func (c *Client) GetTicket(project string, id int) (*TicketResponse, error)
- func (c *Client) ListContexts(project string, priority, tags string, limit, offset int) (*ContextListResponse, error)
- func (c *Client) ListLinks(project string, ticketID int) ([]TicketLinkResp, error)
- func (c *Client) ListProjects(withStats bool) (*ProjectListResponse, error)
- func (c *Client) ListTickets(project string, status, ticketType, priority string, limit, offset int) (*TicketListResponse, error)
- func (c *Client) LockContext(project string, req ContextCreateRequest) (*ContextCreateResponse, error)
- func (c *Client) MoveContext(project, topic, targetProject string) (*ContextMoveResponse, error)
- func (c *Client) Post(path string, body any, result any) error
- func (c *Client) Put(path string, body any, result any) error
- func (c *Client) RemoveLink(project string, ticketID, linkID int) error
- func (c *Client) SearchContexts(project, query string, limit int) (*ContextListResponse, error)
- func (c *Client) SearchTickets(project, query string, ticketType, status string, limit int) (*TicketSearchResponse, error)
- func (c *Client) TransitionTicket(project string, id int, status string) (*TicketResponse, error)
- func (c *Client) UnlockContext(project, topic string, version string, force, noArchive bool) (*ContextDeleteResponse, error)
- func (c *Client) UpdateContext(project, topic string, req ContextUpdateRequest) (*ContextResponse, error)
- func (c *Client) UpdateTicket(project string, id int, req TicketUpdate) (*TicketResponse, error)
- type ContextCreateRequest
- type ContextCreateResponse
- type ContextDeleteResponse
- type ContextDetailResponse
- type ContextListResponse
- type ContextMoveResponse
- type ContextResponse
- type ContextUpdateRequest
- type LinkCreate
- type ProjectCreate
- type ProjectListResponse
- type ProjectResponse
- type ProjectStats
- type TicketCreate
- type TicketHistory
- type TicketLinkResp
- type TicketListResponse
- type TicketResponse
- type TicketSearchResponse
- type TicketUpdate
- type TransitionRequest
- type VersionSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type BoardColumn ¶
type BoardColumn struct {
Status string `json:"status"`
Count int `json:"count"`
Tickets []TicketResponse `json:"tickets"`
}
type BoardView ¶
type BoardView struct {
Columns []BoardColumn `json:"columns"`
Total int `json:"total"`
}
type Client ¶
type Client struct {
BaseURL string
AuthToken string
UserAgent string
HTTPClient *http.Client
Verbose bool
}
func (*Client) AddLink ¶
func (c *Client) AddLink(project string, ticketID int, req LinkCreate) (*TicketLinkResp, error)
func (*Client) CreateProject ¶
func (c *Client) CreateProject(req ProjectCreate) (*ProjectResponse, error)
func (*Client) CreateTicket ¶
func (c *Client) CreateTicket(project string, req TicketCreate) (*TicketResponse, error)
func (*Client) DeleteProject ¶
func (*Client) DeleteWithResult ¶
DeleteWithResult performs a DELETE and decodes the JSON response body. Use for endpoints that return data (e.g. context unlock returns ContextDeleteResponse).
func (*Client) GetContext ¶
func (c *Client) GetContext(project, topic string, version string) (*ContextDetailResponse, error)
func (*Client) GetProject ¶
func (c *Client) GetProject(name string, withStats bool) (*ProjectResponse, error)
func (*Client) GetTicket ¶
func (c *Client) GetTicket(project string, id int) (*TicketResponse, error)
func (*Client) ListContexts ¶
func (*Client) ListLinks ¶
func (c *Client) ListLinks(project string, ticketID int) ([]TicketLinkResp, error)
func (*Client) ListProjects ¶
func (c *Client) ListProjects(withStats bool) (*ProjectListResponse, error)
func (*Client) ListTickets ¶
func (*Client) LockContext ¶
func (c *Client) LockContext(project string, req ContextCreateRequest) (*ContextCreateResponse, error)
func (*Client) MoveContext ¶
func (c *Client) MoveContext(project, topic, targetProject string) (*ContextMoveResponse, error)
func (*Client) SearchContexts ¶
func (c *Client) SearchContexts(project, query string, limit int) (*ContextListResponse, error)
func (*Client) SearchTickets ¶
func (*Client) TransitionTicket ¶
func (*Client) UnlockContext ¶
func (*Client) UpdateContext ¶
func (c *Client) UpdateContext(project, topic string, req ContextUpdateRequest) (*ContextResponse, error)
func (*Client) UpdateTicket ¶
func (c *Client) UpdateTicket(project string, id int, req TicketUpdate) (*TicketResponse, error)
type ContextCreateRequest ¶
type ContextCreateResponse ¶
type ContextDeleteResponse ¶
type ContextDetailResponse ¶
type ContextDetailResponse struct {
ContextResponse
Content string `json:"content"`
Versions []VersionSummary `json:"versions,omitempty"`
}
type ContextListResponse ¶
type ContextListResponse struct {
Contexts []ContextResponse `json:"contexts"`
Total int `json:"total"`
}
type ContextMoveResponse ¶
type ContextResponse ¶
type ContextResponse struct {
ID int `json:"id"`
Topic string `json:"topic"`
Version string `json:"version"`
Priority string `json:"priority"`
Tags []string `json:"tags"`
Preview *string `json:"preview,omitempty"`
KeyConcepts []string `json:"key_concepts,omitempty"`
ContentHash *string `json:"content_hash,omitempty"`
LockedAt *time.Time `json:"locked_at,omitempty"`
LastAccessed *time.Time `json:"last_accessed,omitempty"`
AccessCount int `json:"access_count"`
}
type ContextUpdateRequest ¶
type LinkCreate ¶
type ProjectCreate ¶
type ProjectListResponse ¶
type ProjectListResponse struct {
Projects []ProjectResponse `json:"projects"`
Total int `json:"total"`
}
type ProjectResponse ¶
type ProjectStats ¶
type TicketCreate ¶
type TicketCreate struct {
Title string `json:"title"`
Description *string `json:"description,omitempty"`
Type string `json:"type"`
Priority string `json:"priority"`
Assignee *string `json:"assignee,omitempty"`
Tags []string `json:"tags,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
type TicketHistory ¶
type TicketLinkResp ¶
type TicketListResponse ¶
type TicketListResponse struct {
Tickets []TicketResponse `json:"tickets"`
Total int `json:"total"`
}
type TicketResponse ¶
type TicketResponse struct {
ID int `json:"id"`
Title string `json:"title"`
Description *string `json:"description,omitempty"`
Type string `json:"type"`
Status string `json:"status"`
Priority string `json:"priority"`
Assignee *string `json:"assignee,omitempty"`
Tags []string `json:"tags,omitempty"`
CreatedAt *float64 `json:"created_at,omitempty"`
UpdatedAt *float64 `json:"updated_at,omitempty"`
ClosedAt *float64 `json:"closed_at,omitempty"`
History []TicketHistory `json:"history,omitempty"`
Links []TicketLinkResp `json:"links,omitempty"`
}
type TicketSearchResponse ¶
type TicketSearchResponse struct {
Results []TicketResponse `json:"tickets"`
Total int `json:"total"`
Query string `json:"query"`
}
type TicketUpdate ¶
type TransitionRequest ¶
type TransitionRequest struct {
Status string `json:"status"`
}
type VersionSummary ¶
Click to show internal directories.
Click to hide internal directories.