jira

package
v0.0.0-...-386ad9e Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripKey

func StripKey(key string) string

Types

type FieldsID

type FieldsID int

func (*FieldsID) UnmarshalJSON

func (id *FieldsID) UnmarshalJSON(b []byte) error

type Issue

type Issue struct {
	ID     FieldsID `json:"id"`
	Self   string   `json:"self"`
	Key    string   `json:"key"`
	Fields struct {
		Summary     string   `json:"summary"`
		Description string   `json:"description"`
		Created     Time     `json:"created"`
		Updated     Time     `json:"updated"`
		Priority    Priority `json:"priority"`
		Status      struct {
			ID   FieldsID `json:"id"`
			Name string   `json:"name"`
		} `json:"status"`
		IssueType struct {
			ID   FieldsID `json:"id"`
			Name string   `json:"name"`
		} `json:"issuetype"`
		Resolution struct {
			ID   FieldsID `json:"id"`
			Name string   `json:"name"`
		} `json:"resolution"`
		Assignee Person `json:"assignee"`
		Reporter Person `json:"reporter"`
		Creator  Person `json:"creator"`
		Watches  struct {
			WatchCount int `json:"watchCount"`
		} `json:"watches"`
		Components []struct {
			ID   FieldsID `json:"id"`
			Name string   `json:"name"`
		} `json:"components"`
		Labels []string `json:"labels"`
	} `json:"fields"`
	// contains filtered or unexported fields
}

func (*Issue) Assignee

func (i *Issue) Assignee() *Person

func (*Issue) Components

func (i *Issue) Components() string

func (*Issue) Created

func (i *Issue) Created() time.Time

func (*Issue) Creator

func (i *Issue) Creator() *Person

func (*Issue) DefaultTitle

func (i *Issue) DefaultTitle() string

func (*Issue) Description

func (i *Issue) Description() string

func (*Issue) GetKey

func (i *Issue) GetKey() string

func (*Issue) GetSummary

func (i *Issue) GetSummary() string

func (*Issue) IssueType

func (i *Issue) IssueType() string

func (*Issue) Labels

func (i *Issue) Labels() string
func (i *Issue) Link() string

func (*Issue) Priority

func (i *Issue) Priority() *Priority

func (*Issue) Reporter

func (i *Issue) Reporter() *Person

func (*Issue) Resolution

func (i *Issue) Resolution() string

func (*Issue) Status

func (i *Issue) Status() string

func (*Issue) Updated

func (i *Issue) Updated() time.Time

func (*Issue) Watches

func (i *Issue) Watches() int

type Jira

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

func NewClient

func NewClient(config *config.Jira) *Jira

func (*Jira) GetByKey

func (j *Jira) GetByKey(ctx context.Context, issueKey string) (interface{}, error)

func (*Jira) GetCurrentUser

func (j *Jira) GetCurrentUser() (string, error)

func (*Jira) GetIssueCtx

func (j *Jira) GetIssueCtx(ctx context.Context, issueKey string) (*Issue, error)

func (*Jira) GetIssues

func (j *Jira) GetIssues(issueKeys []string) ([]*Issue, error)

func (*Jira) ParseKeys

func (j *Jira) ParseKeys(text string) []string

type Myself

type Myself struct {
	Self         string
	Key          string
	Name         string
	EmailAddress string `json:"emailAddress"`
	DisplayName  string `json:"displayName"`
	Active       bool
	Deleted      bool
	TimeZone     string `json:"timeZone"`
	Locale       string
}

type Person

type Person struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName"`
	Active      bool   `json:"active"`
}

func (*Person) JiraName

func (p *Person) JiraName() string

func (*Person) RealName

func (p *Person) RealName() string

type Priority

type Priority struct {
	ID      FieldsID `json:"id"`
	Name    string   `json:"name"`
	Self    string   `json:"self"`
	IconURL string   `json:"IconURL"`
}

func (*Priority) GetID

func (p *Priority) GetID() int

type Time

type Time time.Time

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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