jkl

package module
v0.0.0-...-1458b63 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: MIT Imports: 17 Imported by: 0

README

jkl

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

TODO: Write usage instructions

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommentIdSeparator = "~"
View Source
var Verbose *bool

Functions

func AddComment

func AddComment(taskKey string, comment string) error

func DoTransition

func DoTransition(taskKey string, transitionName string) error

func Edit

func Edit(issue *JiraIssue) error

func EditComment

func EditComment(taskKey string, commentId string, comment *Comment) error

func FindRCFile

func FindRCFile() string

func LogWork

func LogWork(taskKey string, workAmount string) error

func PrettySeconds

func PrettySeconds(seconds int) string

Types

type AllowedValue

type AllowedValue struct {
	Id    string
	Self  string
	Value string
}

func (*AllowedValue) String

func (a *AllowedValue) String() string

type Attachment

type Attachment struct {
	Filename string
	Author   *Author
	Content  string
}

func (*Attachment) String

func (a *Attachment) String() string

type Author

type Author struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
}

func (*Author) String

func (a *Author) String() string

type Comment

type Comment struct {
	Id     string  `json:"id"`
	Author *Author `json:"author"`
	Body   string  `json:"body"`
}

func GetComment

func GetComment(taskKey string, commentId string) (*Comment, error)

type CommentColl

type CommentColl struct {
	Comments []Comment
}

type CreateMeta

type CreateMeta struct {
	Projects []*Project
}

func GetCreateMeta

func GetCreateMeta(projectKey, issueType string) (*CreateMeta, error)

type EditMeta

type EditMeta struct {
	Fields map[string]*FieldSpec
}

type FieldSpec

type FieldSpec struct {
	Name     string
	Required bool
	Schema   struct {
		Type     string
		Custom   string
		CustomId int
		Items    string
	}
	Operations    []string
	AllowedValues []*AllowedValue
}

type Fields

type Fields struct {
	*IssueType   `json:"issuetype,omitempty"`
	Assignee     *Author       `json:",omitempty"`
	Project      *Project      `json:"project,omitempty"`
	Summary      string        `json:"summary,omitempty"`
	Description  string        `json:"description,omitempty"`
	Comment      *CommentColl  `json:"comment,omitempty"`
	Parent       *JiraIssue    `json:",omitempty"`
	Status       *Status       `json:",omitempty"`
	TimeTracking *TimeTracking `json:"timetracking,omitempty"`
	Attachment   []*Attachment `json:"attachment,omitempty"`
	IssueLinks   []*IssueLink  `json:"issueLinks,omitempty"`
	Priority     *Priority     `json:",omitempty"`
	Worklog      *Worklogs     `json:"worklog,omitempty"`

	ExtraFields map[string]interface{} `json:"-"`
	// contains filtered or unexported fields
}

func (*Fields) PrettyOriginalEstimate

func (f *Fields) PrettyOriginalEstimate() string

func (*Fields) PrettyRemaining

func (f *Fields) PrettyRemaining() string

func (*Fields) UnmarshalJSON

func (f *Fields) UnmarshalJSON(b []byte) error
type IssueLink struct {
	LinkType     *LinkType `json:"type"`
	InwardIssue  *JiraIssue
	OutwardIssue *JiraIssue
}

func (*IssueLink) String

func (i *IssueLink) String() string

type IssueType

type IssueType struct {
	Name    string `json:"name"`
	IconURL string `json:",omitempty"`
	Fields  map[string]*FieldSpec
}

func (*IssueType) RangeFieldSpecs

func (it *IssueType) RangeFieldSpecs() string

type JiraClient

type JiraClient struct {
	*http.Client
	// contains filtered or unexported fields
}

func NewJiraClient

func NewJiraClient(jiraRoot string) *JiraClient

func (*JiraClient) Do

func (j *JiraClient) Do(req *http.Request) (*http.Response, error)

func (*JiraClient) Get

func (j *JiraClient) Get(path string) (*http.Response, error)

func (*JiraClient) Post

func (j *JiraClient) Post(path string, payload io.Reader) (*http.Response, error)

func (*JiraClient) Put

func (j *JiraClient) Put(path string, payload io.Reader) (*http.Response, error)

type JiraIssue

type JiraIssue struct {
	Key         string        `json:"key,omitempty"`
	Fields      *Fields       `json:"fields,omitempty"`
	Transitions []*Transition `json:"transitions,omitempty"`
	EditMeta    *EditMeta     `json:"editmeta,omitempty"`
}

func Create

func Create(issue *JiraIssue) (*JiraIssue, error)

func GetIssue

func GetIssue(taskKey string) (*JiraIssue, error)

func List

func List(jql string) ([]*JiraIssue, error)

func (*JiraIssue) PrintExtraFields

func (i *JiraIssue) PrintExtraFields() string

func (*JiraIssue) String

func (i *JiraIssue) String() string

func (*JiraIssue) URL

func (i *JiraIssue) URL() string

func (*JiraIssue) UnmarshalJSON

func (i *JiraIssue) UnmarshalJSON(b []byte) error

type LinkType

type LinkType struct {
	Id      string
	Name    string
	Inward  string
	Outward string
}

type Priority

type Priority struct {
	Name string
}

type Project

type Project struct {
	Key        string `json:"key,omitempty"`
	Name       string
	IssueTypes []*IssueType
}

type Schema

type Schema struct {
	System   string
	Custom   string
	CustomId int
}
type Search struct {
	Issues []*JiraIssue `json:"issues"`
}

type Status

type Status struct {
	Name    string
	IconURL string `json:",omitempty"`
}

type TimeTracking

type TimeTracking struct {
	OriginalEstimateSeconds  int
	RemainingEstimateSeconds int
}

type Transition

type Transition struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type Worklog

type Worklog struct {
	Author           *Author
	Comment          string
	TimeSpent        string
	TimeSpentSeconds int
	Started          string
}

func (*Worklog) String

func (w *Worklog) String() string

type Worklogs

type Worklogs struct {
	Worklogs []*Worklog `json:",omitempty"`
}

Directories

Path Synopsis
cmd
jkl

Jump to

Keyboard shortcuts

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