Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) AddMemberToTeam(ctx context.Context, teamId, userId string) (string, error)
- func (c *Client) Authorize(ctx context.Context) (ViewerPermissions, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) BulkCreateIssues(ctx context.Context, payloads []CreateIssuePayload) ([]Issue, error)
- func (c *Client) CreateIssue(ctx context.Context, payload CreateIssuePayload) (*Issue, error)
- func (c *Client) CreateIssueLabel(ctx context.Context, labelName string) (*IssueLabel, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetIssue(ctx context.Context, issueId string) (*Issue, error)
- func (c *Client) GetIssueLabel(ctx context.Context, labelName string) (*IssueLabel, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetOrganization(ctx context.Context, paginationVars PaginationVars) (Organization, Tokens, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetProject(ctx context.Context, getProjectVars GetProjectVars) (Project, Tokens, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetProjects(ctx context.Context, getResourceVars GetResourcesVars) ([]Project, string, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetTeam(ctx context.Context, getTeamVars GetTeamVars) (Team, string, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetTeamMemberships(ctx context.Context, getTeamVars GetTeamVars) ([]TeamMembership, string, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetTeams(ctx context.Context, getResourceVars GetResourcesVars) ([]Team, string, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) GetUsers(ctx context.Context, getResourceVars GetResourcesVars) ([]User, string, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) ListIssueFields(ctx context.Context) ([]IssueField, string, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) ListIssuesByIDs(ctx context.Context, issueIDs []string) ([]Issue, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) ListTeamWorkflowStates(ctx context.Context, getTeamsVars GetTeamsVars) ([]Team, string, *http.Response, *v2.RateLimitDescription, error)
- func (c *Client) RemoveTeamMembership(ctx context.Context, teamMembershipId string) (bool, error)
- type CreateIssuePayload
- type FieldOption
- type GetProjectVars
- type GetResourcesVars
- type GetTeamVars
- type GetTeamsVars
- type GraphQLError
- type GraphQLIssueFieldsResponse
- type GraphQLIssueLabelsResponse
- type GraphQLIssuesResponse
- type GraphQLOrganizationResponse
- type GraphQLProjectResponse
- type GraphQLProjectsResponse
- type GraphQLTeamResponse
- type GraphQLTeamsResponse
- type GraphQLUsersResponse
- type GraphQLViewerResponse
- type Issue
- type IssueField
- type IssueFieldEnumValue
- type IssueFieldType
- type IssueLabel
- type Organization
- type PageInfo
- type PageState
- type PaginationVars
- type Project
- type ProjectTokensState
- type Projects
- type SuccessResponse
- type Team
- type TeamMembership
- type Teams
- type Tokens
- type User
- type Users
- type ViewerPermissions
- type WorkflowState
- type WorkflowType
Constants ¶
View Source
const APIEndpoint = "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) AddMemberToTeam ¶ added in v0.0.6
func (*Client) Authorize ¶
func (c *Client) Authorize(ctx context.Context) (ViewerPermissions, *http.Response, *v2.RateLimitDescription, error)
Authorize returns permissions of user calling the API.
func (*Client) BulkCreateIssues ¶ added in v0.0.10
func (*Client) CreateIssue ¶ added in v0.0.10
func (*Client) CreateIssueLabel ¶ added in v0.0.10
func (c *Client) CreateIssueLabel(ctx context.Context, labelName string) (*IssueLabel, *http.Response, *v2.RateLimitDescription, error)
func (*Client) GetIssueLabel ¶ added in v0.0.10
func (c *Client) GetIssueLabel(ctx context.Context, labelName string) (*IssueLabel, *http.Response, *v2.RateLimitDescription, error)
func (*Client) GetOrganization ¶
func (c *Client) GetOrganization(ctx context.Context, paginationVars PaginationVars) (Organization, Tokens, *http.Response, *v2.RateLimitDescription, error)
GetOrganization returns a single Linear organization.
func (*Client) GetProject ¶
func (c *Client) GetProject(ctx context.Context, getProjectVars GetProjectVars) (Project, Tokens, *http.Response, *v2.RateLimitDescription, error)
GetProject returns single Project details.
func (*Client) GetProjects ¶
func (c *Client) GetProjects(ctx context.Context, getResourceVars GetResourcesVars) ([]Project, string, *http.Response, *v2.RateLimitDescription, error)
GetProjects returns all projects from Linear organization.
func (*Client) GetTeam ¶
func (c *Client) GetTeam(ctx context.Context, getTeamVars GetTeamVars) (Team, string, *http.Response, *v2.RateLimitDescription, error)
GetTeam returns single Team details.
func (*Client) GetTeamMemberships ¶ added in v0.0.6
func (c *Client) GetTeamMemberships(ctx context.Context, getTeamVars GetTeamVars) ([]TeamMembership, string, *http.Response, *v2.RateLimitDescription, error)
GetTeamMemberships returns team memberships from Linear organization.
func (*Client) GetTeams ¶
func (c *Client) GetTeams(ctx context.Context, getResourceVars GetResourcesVars) ([]Team, string, *http.Response, *v2.RateLimitDescription, error)
GetTeams returns all teams from Linear organization.
func (*Client) GetUsers ¶
func (c *Client) GetUsers(ctx context.Context, getResourceVars GetResourcesVars) ([]User, string, *http.Response, *v2.RateLimitDescription, error)
GetUsers returns all users from Linear organization.
func (*Client) ListIssueFields ¶ added in v0.0.10
func (c *Client) ListIssueFields(ctx context.Context) ([]IssueField, string, *http.Response, *v2.RateLimitDescription, error)
func (*Client) ListIssuesByIDs ¶ added in v0.0.10
func (*Client) ListTeamWorkflowStates ¶ added in v0.0.10
func (c *Client) ListTeamWorkflowStates(ctx context.Context, getTeamsVars GetTeamsVars) ([]Team, string, *http.Response, *v2.RateLimitDescription, error)
ListTeamWorkflowStates returns workflow states for specific teams.
type CreateIssuePayload ¶ added in v0.0.10
type FieldOption ¶ added in v0.0.10
type FieldOption func(createIssuePayload *CreateIssuePayload)
type GetProjectVars ¶
type GetResourcesVars ¶
type GetTeamVars ¶
type GetTeamsVars ¶ added in v0.0.10
type GraphQLError ¶
type GraphQLError struct {
Error string `json:"error"`
Errors []struct {
Message string `json:"message"`
} `json:"errors"`
}
func (*GraphQLError) Message ¶ added in v0.0.7
func (e *GraphQLError) Message() string
type GraphQLIssueFieldsResponse ¶ added in v0.0.10
type GraphQLIssueFieldsResponse struct {
Data struct {
Type struct {
InputFields []IssueField `json:"inputFields"`
} `json:"__type"`
} `json:"data"`
}
type GraphQLIssueLabelsResponse ¶ added in v0.0.10
type GraphQLIssueLabelsResponse struct {
Data struct {
IssueLabels struct {
Nodes []IssueLabel `json:"nodes"`
} `json:"issueLabels"`
} `json:"data"`
}
type GraphQLIssuesResponse ¶ added in v0.0.10
type GraphQLIssuesResponse struct {
Data struct {
Issues struct {
Nodes []Issue `json:"nodes"`
} `json:"issues"`
} `json:"data"`
}
type GraphQLOrganizationResponse ¶
type GraphQLOrganizationResponse struct {
Data struct {
Organization Organization `json:"organization"`
} `json:"data"`
}
type GraphQLProjectResponse ¶
type GraphQLProjectResponse struct {
Data struct {
Project Project `json:"project"`
} `json:"data"`
}
type GraphQLProjectsResponse ¶
type GraphQLProjectsResponse struct {
Data struct {
Projects Projects `json:"projects"`
} `json:"data"`
}
type GraphQLTeamResponse ¶
type GraphQLTeamResponse struct {
Data struct {
Team Team `json:"team"`
} `json:"data"`
}
type GraphQLTeamsResponse ¶
type GraphQLTeamsResponse struct {
Data struct {
Teams Teams `json:"teams"`
} `json:"data"`
}
type GraphQLUsersResponse ¶
type GraphQLUsersResponse struct {
Data struct {
Users Users `json:"users"`
} `json:"data"`
}
type GraphQLViewerResponse ¶
type GraphQLViewerResponse struct {
Data struct {
Viewer ViewerPermissions `json:"viewer"`
} `json:"data"`
}
type Issue ¶ added in v0.0.10
type Issue struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
State struct {
ID string `json:"id"`
Name string `json:"name"`
} `json:"state"`
Labels struct {
Nodes []struct {
ID string `json:"id"`
Name string `json:"name"`
} `json:"nodes"`
} `json:"labels,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
URL string `json:"url"`
}
type IssueField ¶ added in v0.0.10
type IssueField struct {
Name string `json:"name"`
Description string `json:"description"`
Type IssueFieldType `json:"type"`
}
type IssueFieldEnumValue ¶ added in v0.0.10
type IssueFieldEnumValue struct {
Name string `json:"name"`
}
type IssueFieldType ¶ added in v0.0.10
type IssueFieldType struct {
Name string `json:"name"`
Description string `json:"description"`
Kind string `json:"kind"`
OfType *IssueFieldType `json:"ofType,omitempty"`
EnumValues []IssueFieldEnumValue `json:"enumValues,omitempty"`
}
type IssueLabel ¶ added in v0.0.10
type Organization ¶
type Organization struct {
ID string `json:"id"`
Name string `json:"name"`
SamlEnabled bool `json:"samlEnabled"`
ScimEnabled bool `json:"scimEnabled"`
Subscription interface{} `json:"subscription"`
URLKey string `json:"urlKey"`
UserCount int `json:"userCount"`
Users struct {
Nodes []User `json:"nodes"`
PageInfo PageInfo `json:"pageInfo"`
} `json:"users"`
Teams struct {
Nodes []Team `json:"nodes"`
PageInfo PageInfo `json:"pageInfo"`
} `json:"teams"`
}
type PaginationVars ¶
type Project ¶
type Project struct {
Description string `json:"description"`
ID string `json:"id"`
Name string `json:"name"`
SlugID string `json:"slugId"`
URL string `json:"url"`
Teams struct {
Nodes []Team `json:"nodes"`
PageInfo PageInfo `json:"pageInfo"`
} `json:"teams"`
Members struct {
Nodes []User `json:"nodes"`
PageInfo PageInfo `json:"pageInfo"`
} `json:"members"`
}
type ProjectTokensState ¶
type SuccessResponse ¶ added in v0.0.6
type SuccessResponse struct {
Success bool `json:"success"`
}
type Team ¶
type Team struct {
ID string `json:"id"`
Name string `json:"name"`
Key string `json:"key"`
Description interface{} `json:"description"`
Memberships struct {
Nodes []TeamMembership `json:"nodes"`
PageInfo PageInfo `json:"pageInfo"`
}
States struct {
Nodes []WorkflowState `json:"nodes"`
PageInfo PageInfo `json:"pageInfo"`
} `json:"states,omitempty"`
}
type TeamMembership ¶ added in v0.0.6
type User ¶
type User struct {
Active bool `json:"active"`
Admin bool `json:"admin"`
DisplayName string `json:"displayName"`
Email string `json:"email"`
Guest bool `json:"guest"`
ID string `json:"id"`
IsMe bool `json:"isMe"`
Name string `json:"name"`
URL string `json:"url"`
Description interface{} `json:"description"`
Organization Organization `json:"organization"`
Teams struct {
Nodes []Team `json:"nodes"`
} `json:"teams"`
}
type ViewerPermissions ¶
type WorkflowState ¶ added in v0.0.10
type WorkflowState struct {
ID string `json:"id"`
Name string `json:"name"`
Color string `json:"color"`
Type WorkflowType `json:"type"`
Position float64 `json:"position"`
}
type WorkflowType ¶ added in v0.0.10
type WorkflowType string
const ( Backlog WorkflowType = "backlog" Unstarted WorkflowType = "unstarted" Started WorkflowType = "started" Completed WorkflowType = "completed" Canceled WorkflowType = "canceled" )
Click to show internal directories.
Click to hide internal directories.