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) 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) RemoveTeamMembership(ctx context.Context, teamMembershipId string) (bool, error)
- type GetProjectVars
- type GetResourcesVars
- type GetTeamVars
- type GraphQLError
- type GraphQLOrganizationResponse
- type GraphQLProjectResponse
- type GraphQLProjectsResponse
- type GraphQLTeamResponse
- type GraphQLTeamsResponse
- type GraphQLUsersResponse
- type GraphQLViewerResponse
- 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
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) 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.
type GetProjectVars ¶
type GetResourcesVars ¶
type GetTeamVars ¶
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 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 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"` } }
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 ¶
Click to show internal directories.
Click to hide internal directories.