Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Execute(ctx context.Context, query string, variables map[string]interface{}, ...) error
- func (c *Client) GetIssue(ctx context.Context, id string) (*Issue, error)
- func (c *Client) GetIssues(ctx context.Context, filter map[string]interface{}, first int, after string) (*Issues, error)
- func (c *Client) GetProjects(ctx context.Context, filter map[string]interface{}, first int, after string) (*Projects, error)
- func (c *Client) GetRateLimit(ctx context.Context) (*RateLimit, error)
- func (c *Client) GetTeams(ctx context.Context, first int, after string) (*Teams, error)
- func (c *Client) GetViewer(ctx context.Context) (*User, error)
- type GraphQLError
- type GraphQLErrorLocation
- type GraphQLRequest
- type GraphQLResponse
- type Issue
- type Issues
- type Label
- type Labels
- type PageInfo
- type Project
- type Projects
- type RateLimit
- type State
- type Team
- type Teams
- type User
- type Users
Constants ¶
View Source
const (
BaseURL = "https://api.linear.app/graphql"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Execute ¶
func (c *Client) Execute(ctx context.Context, query string, variables map[string]interface{}, result interface{}) error
Execute performs a GraphQL request
func (*Client) GetIssues ¶
func (c *Client) GetIssues(ctx context.Context, filter map[string]interface{}, first int, after string) (*Issues, error)
GetIssues returns a list of issues with optional filtering
func (*Client) GetProjects ¶
func (c *Client) GetProjects(ctx context.Context, filter map[string]interface{}, first int, after string) (*Projects, error)
GetProjects returns a list of projects
func (*Client) GetRateLimit ¶
Rate limiting helper
type GraphQLError ¶
type GraphQLError struct {
Message string `json:"message"`
Locations []GraphQLErrorLocation `json:"locations,omitempty"`
Path []interface{} `json:"path,omitempty"`
}
type GraphQLErrorLocation ¶
type GraphQLRequest ¶
type GraphQLResponse ¶
type GraphQLResponse struct {
Data json.RawMessage `json:"data"`
Errors []GraphQLError `json:"errors,omitempty"`
}
type Issue ¶
type Issue struct {
ID string `json:"id"`
Identifier string `json:"identifier"`
Title string `json:"title"`
Description string `json:"description"`
Priority int `json:"priority"`
Estimate *float64 `json:"estimate"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DueDate *string `json:"dueDate"`
State *State `json:"state"`
Assignee *User `json:"assignee"`
Team *Team `json:"team"`
Labels *Labels `json:"labels"`
}
Issue represents a Linear issue
type Project ¶
type Project struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
State string `json:"state"`
Progress float64 `json:"progress"`
StartDate *string `json:"startDate"`
TargetDate *string `json:"targetDate"`
Lead *User `json:"lead"`
Teams *Teams `json:"teams"`
}
Project represents a Linear project
type State ¶
type State struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Color string `json:"color"`
}
State represents an issue state
type Team ¶
type Team struct {
ID string `json:"id"`
Key string `json:"key"`
Name string `json:"name"`
Description string `json:"description"`
Private bool `json:"private"`
IssueCount int `json:"issueCount"`
}
Team represents a Linear team
Click to show internal directories.
Click to hide internal directories.