jira

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	LogTime(taskKey string, duration time.Duration, started time.Time, comment string) error
	GetAssignedIssues() ([]Issue, error)
	GetLoggedTime(fromDays int) (Logs, error)
}

type Day added in v1.0.1

type Day struct {
	Date       time.Time
	Worklogs   []*TaskLog
	TimeLogged time.Duration
}

func (*Day) DateString added in v1.0.1

func (d *Day) DateString() string

type Issue

type Issue struct {
	Summary string `json:"summary"`
	Status  string `json:"status"`
	Key     string `json:"key"`
}

type JiraAuthor added in v1.0.1

type JiraAuthor struct {
	DisplayName string `json:"displayName"`
	Email       string `json:"emailAddress"`
}

type JiraClient

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

func NewJiraClient

func NewJiraClient(config configuration.Config) *JiraClient

func (*JiraClient) GetAssignedIssues

func (c *JiraClient) GetAssignedIssues() ([]Issue, error)

func (*JiraClient) GetLoggedTime added in v1.0.1

func (c *JiraClient) GetLoggedTime(fromDays int) (Logs, error)

func (*JiraClient) LogTime

func (c *JiraClient) LogTime(taskKey string, duration time.Duration, started time.Time, comment string) error

type JiraIssue added in v1.0.1

type JiraIssue struct {
	Key    string          `json:"key"`
	Fields JiraIssueFields `json:"fields"`
}

type JiraIssueFields added in v1.0.1

type JiraIssueFields struct {
	Worklog JiraWorklogs `json:"worklog"`
	Summary string       `json:"summary"`
	Status  JiraStatus   `json:"status"`
}

type JiraIssueWorklog added in v1.0.1

type JiraIssueWorklog struct {
	Author           JiraAuthor `json:"author"`
	Started          string     `json:"started"`
	TimeSpent        string     `json:"timeSpent"`
	TimeSpentSeconds int        `json:"timeSpentSeconds"`
}

type JiraStatus added in v1.0.1

type JiraStatus struct {
	Name string `json:"name"`
}

type JiraWorklogs added in v1.0.1

type JiraWorklogs struct {
	Worklogs []JiraIssueWorklog `json:"worklogs"`
}

type Logs added in v1.0.1

type Logs struct {
	Days []*Day
}

func (*Logs) AddLog added in v1.0.1

func (t *Logs) AddLog(worklog TaskLog, started time.Time)

type Result added in v1.0.1

type Result struct {
	Issues []JiraIssue `json:"issues"`
}

type SearchJql

type SearchJql struct {
	Fields     []string `json:"fields"`
	MaxResults int      `json:"maxResults"`
	JQL        string   `json:"jql"`
	StartAt    int      `json:"startAt"`
}

type TaskLog added in v1.0.1

type TaskLog struct {
	Summary    string
	LoggedTime time.Duration
	TaskKey    string
}

func (*TaskLog) StringLoggedTime added in v1.0.1

func (d *TaskLog) StringLoggedTime() string

type Worklog

type Worklog struct {
	TimeSpent string `json:"timeSpent"`
	Started   string `json:"started"`
	Comment   string `json:"comment,omitempty"`
}

Jump to

Keyboard shortcuts

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