linear

package
v0.0.0-...-d9a425f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QueryIssue = `` /* 292-byte string literal not displayed */

Functions

This section is empty.

Types

type Api

type Api struct {
	// contains filtered or unexported fields
}

func NewLinearApi

func NewLinearApi(config Config) *Api

func (*Api) FetchIssueWithId

func (a *Api) FetchIssueWithId(workspaceName, issueId string) (IssueInfo, error)

FetchIssueWithId get issue info with id,id eg."IVAN-10" or "ce064237-bb8c-4098-beda-xxxxx"

func (*Api) GetApiKeyByWorkspace

func (a *Api) GetApiKeyByWorkspace(workspaceName string) (string, error)

type Config

type Config struct {
	Host    string
	ApiKeys []config.LinApiKey
}

type History

type History struct {
	Nodes []Node `json:"nodes"`
}

History define issue change history

type Issue

type Issue struct {
	Id        string        `json:"id"`
	Title     string        `json:"title"`
	Assignee  User          `json:"assignee"`
	State     WorkFlowState `json:"state"`
	History   History       `json:"history"`
	UpdatedAt string        `json:"updatedAt"`
}

type IssueInfo

type IssueInfo struct {
	Issue Issue `json:"issue"`
}

type Node

type Node struct {
	ToAssignee User          `json:"toAssignee"`
	ToState    WorkFlowState `json:"toState"`
}

Node history record

type User

type User struct {
	Name        string `json:"name"`        // full name,eg. user@email.com
	DisplayName string `json:"displayName"` // username without email
}

User define linear user

type WorkFlowState

type WorkFlowState struct {
	Name      string `json:"name"`
	Type      string `json:"type"`
	UpdatedAt string `json:"updatedAt"`
}

WorkFlowState define linear workflow state,eg.'canceled','progressing'

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL