Documentation
¶
Index ¶
- func HasNextPage(meta types.PageMeta) bool
- func NextCursor(meta types.PageMeta) string
- type APIError
- type ArticleService
- func (s *ArticleService) Get(ctx context.Context, id int64) (*types.ArticleResult, error)
- func (s *ArticleService) List(ctx context.Context, opts *types.ListArticlesOptions) (*types.ArticlePage, error)
- func (s *ArticleService) Search(ctx context.Context, query string, opts *types.SearchArticlesOptions) (*types.ArticleSearchPage, error)
- type Client
- type RetryTransport
- type SearchService
- type TicketService
- func (s *TicketService) Create(ctx context.Context, req *types.CreateTicketRequest) (*types.Ticket, error)
- func (s *TicketService) Delete(ctx context.Context, id int64) error
- func (s *TicketService) Get(ctx context.Context, id int64, opts *types.GetTicketOptions) (*types.TicketResult, error)
- func (s *TicketService) List(ctx context.Context, opts *types.ListTicketsOptions) (*types.TicketPage, error)
- func (s *TicketService) ListAudits(ctx context.Context, ticketID int64, opts *types.ListAuditsOptions) (*types.AuditPage, error)
- func (s *TicketService) ListComments(ctx context.Context, ticketID int64, opts *types.ListCommentsOptions) (*types.CommentPage, error)
- func (s *TicketService) Update(ctx context.Context, id int64, req *types.UpdateTicketRequest) (*types.Ticket, error)
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasNextPage ¶
HasNextPage checks if there are more pages to fetch.
func NextCursor ¶
NextCursor returns the cursor for the next page.
Types ¶
type ArticleService ¶ added in v0.3.0
type ArticleService struct {
// contains filtered or unexported fields
}
func NewArticleService ¶ added in v0.3.0
func NewArticleService(client *Client) *ArticleService
func (*ArticleService) Get ¶ added in v0.3.0
func (s *ArticleService) Get(ctx context.Context, id int64) (*types.ArticleResult, error)
func (*ArticleService) List ¶ added in v0.3.0
func (s *ArticleService) List(ctx context.Context, opts *types.ListArticlesOptions) (*types.ArticlePage, error)
func (*ArticleService) Search ¶ added in v0.3.0
func (s *ArticleService) Search(ctx context.Context, query string, opts *types.SearchArticlesOptions) (*types.ArticleSearchPage, error)
type RetryTransport ¶
type RetryTransport struct {
Base http.RoundTripper
MaxRetries int
}
RetryTransport implements exponential backoff with jitter for 429/5xx.
type SearchService ¶
type SearchService struct {
// contains filtered or unexported fields
}
func NewSearchService ¶
func NewSearchService(client *Client) *SearchService
func (*SearchService) Search ¶
func (s *SearchService) Search(ctx context.Context, query string, opts *types.SearchOptions) (*types.SearchPage, error)
type TicketService ¶
type TicketService struct {
// contains filtered or unexported fields
}
func NewTicketService ¶
func NewTicketService(client *Client) *TicketService
func (*TicketService) Create ¶
func (s *TicketService) Create(ctx context.Context, req *types.CreateTicketRequest) (*types.Ticket, error)
func (*TicketService) Get ¶
func (s *TicketService) Get(ctx context.Context, id int64, opts *types.GetTicketOptions) (*types.TicketResult, error)
func (*TicketService) List ¶
func (s *TicketService) List(ctx context.Context, opts *types.ListTicketsOptions) (*types.TicketPage, error)
func (*TicketService) ListAudits ¶ added in v0.4.7
func (s *TicketService) ListAudits(ctx context.Context, ticketID int64, opts *types.ListAuditsOptions) (*types.AuditPage, error)
func (*TicketService) ListComments ¶ added in v0.2.0
func (s *TicketService) ListComments(ctx context.Context, ticketID int64, opts *types.ListCommentsOptions) (*types.CommentPage, error)
type UserService ¶ added in v0.3.0
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶ added in v0.3.0
func NewUserService(client *Client) *UserService
func (*UserService) AutocompleteUsers ¶ added in v0.4.5
Click to show internal directories.
Click to hide internal directories.