service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJiraService

func NewJiraService(repository JiraRepository) *jiraService

NewJiraService returns domain JiraService

func NewRepository

func NewRepository(wd string) *repository

Types

type Build

type Build struct {
	Plugins []Plugin `xml:"plugins>plugin"`
}

type Changelog

type Changelog struct {
	Histories []ChangelogHistory `json:"histories,omitempty"`
}

type ChangelogHistory

type ChangelogHistory struct {
	Id      string           `json:"id" structs:"id"`
	Author  User             `json:"author" structs:"author"`
	Created string           `json:"created" structs:"created"`
	Items   []ChangelogItems `json:"items" structs:"items"`

} // ChangelogItems reflects one single changelog item of a history item

type ChangelogItems

type ChangelogItems struct {
	Field      string      `json:"field" structs:"field"`
	FieldType  string      `json:"fieldtype" structs:"fieldtype"`
	From       interface{} `json:"from" structs:"from"`
	FromString string      `json:"fromString" structs:"fromString"`
	To         interface{} `json:"to" structs:"to"`
	ToString   string      `json:"toString" structs:"toString"`
}

type Comments

type Comments struct{}

type Config

type Config struct {
	Pom  pom
	Npm  npm
	Jira jira
}

type Date

type Date struct{}

type Dependency

type Dependency struct {
	GroupID    string `xml:"groupId"`
	ArtifactID string `xml:"artifactId"`
	Version    string `xml:"version"`
	Classifier string `xml:"classifier"`
	Type       string `xml:"type"`
	Scope      string `xml:"scope"`
}

type DependencyManagement

type DependencyManagement struct {
	Dependencies []Dependency `xml:"dependencies>dependency"`
}

type Epic

type Epic struct{}

type FixVersion

type FixVersion struct{}

type Issue

type Issue struct {
	Expand         string               `json:"expand,omitempty" structs:"expand,omitempty"`
	ID             string               `json:"id,omitempty" structs:"id,omitempty"`
	Self           string               `json:"self,omitempty" structs:"self,omitempty"`
	Key            string               `json:"key,omitempty" structs:"key,omitempty"`
	Fields         *IssueFields         `json:"fields,omitempty" structs:"fields,omitempty"`
	RenderedFields *IssueRenderedFields `json:"renderedFields,omitempty" structs:"renderedFields,omitempty"`
	Changelog      *Changelog           `json:"changelog,omitempty" structs:"changelog,omitempty"`
	Transitions    []Transition         `json:"transitions,omitempty" structs:"transitions,omitempty"`
	Names          map[string]string    `json:"names,omitempty" structs:"names,omitempty"`
}

type IssueFields

type IssueFields struct {
	// TODO Missing fields
	//      * "workratio": -1,
	//      * "lastViewed": null,
	//      * "environment": null,
	Expand               string        `json:"expand,omitempty" structs:"expand,omitempty"`
	Type                 IssueType     `json:"issuetype,omitempty" structs:"issuetype,omitempty"`
	Project              Project       `json:"project,omitempty" structs:"project,omitempty"`
	Resolutiondate       Time          `json:"resolutiondate,omitempty" structs:"resolutiondate,omitempty"`
	Created              Time          `json:"created,omitempty" structs:"created,omitempty"`
	Duedate              Date          `json:"duedate,omitempty" structs:"duedate,omitempty"`
	Assignee             *User         `json:"assignee,omitempty" structs:"assignee,omitempty"`
	Updated              Time          `json:"updated,omitempty" structs:"updated,omitempty"`
	Description          string        `json:"description,omitempty" structs:"description,omitempty"`
	Summary              string        `json:"summary,omitempty" structs:"summary,omitempty"`
	Creator              *User         `json:"Creator,omitempty" structs:"Creator,omitempty"`
	Reporter             *User         `json:"reporter,omitempty" structs:"reporter,omitempty"`
	Status               *Status       `json:"status,omitempty" structs:"status,omitempty"`
	TimeSpent            int           `json:"timespent,omitempty" structs:"timespent,omitempty"`
	TimeEstimate         int           `json:"timeestimate,omitempty" structs:"timeestimate,omitempty"`
	TimeOriginalEstimate int           `json:"timeoriginalestimate,omitempty" structs:"timeoriginalestimate,omitempty"`
	IssueLinks           []*IssueLink  `json:"issuelinks,omitempty" structs:"issuelinks,omitempty"`
	Comments             *Comments     `json:"comment,omitempty" structs:"comment,omitempty"`
	FixVersions          []*FixVersion `json:"fixVersions,omitempty" structs:"fixVersions,omitempty"`
	Labels               []string      `json:"labels,omitempty" structs:"labels,omitempty"`
	Subtasks             []*Subtasks   `json:"subtasks,omitempty" structs:"subtasks,omitempty"`
	Epic                 *Epic         `json:"epic,omitempty" structs:"epic,omitempty"`
	Sprint               *Sprint       `json:"sprint,omitempty" structs:"sprint,omitempty"`
	Parent               *Parent       `json:"parent,omitempty" structs:"parent,omitempty"`
}
type IssueLink struct{}

type IssueRenderedFields

type IssueRenderedFields struct {
	Resolutiondate string `json:"resolutiondate,omitempty" structs:"resolutiondate,omitempty"`
	Created        string `json:"created,omitempty" structs:"created,omitempty"`
	Duedate        string `json:"duedate,omitempty" structs:"duedate,omitempty"`
	Updated        string `json:"updated,omitempty" structs:"updated,omitempty"`
	Description    string `json:"description,omitempty" structs:"description,omitempty"`
}

type IssueType

type IssueType struct {
	Self        string `json:"self,omitempty" structs:"self,omitempty"`
	ID          string `json:"id,omitempty" structs:"id,omitempty"`
	Description string `json:"description,omitempty" structs:"description,omitempty"`
	IconURL     string `json:"iconUrl,omitempty" structs:"iconUrl,omitempty"`
	Name        string `json:"name,omitempty" structs:"name,omitempty"`
	Subtask     bool   `json:"subtask,omitempty" structs:"subtask,omitempty"`
	AvatarID    int    `json:"avatarId,omitempty" structs:"avatarId,omitempty"`
}

type JiraRepository

type JiraRepository interface {
	SearchIssues(jql string) (*SearchResults, error)
}

type MavenProject

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

func NewMavenProject

func NewMavenProject() *MavenProject

func (*MavenProject) SetConfig

func (p *MavenProject) SetConfig(config Config)

func (*MavenProject) Update

func (p *MavenProject) Update(newVersion string) error

func (*MavenProject) Version

func (p *MavenProject) Version() string

type NpmProject

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

func NewNpmProject

func NewNpmProject() *NpmProject

func (*NpmProject) SetConfig

func (p *NpmProject) SetConfig(config Config)

func (*NpmProject) Update

func (p *NpmProject) Update(newVersion string) error

func (*NpmProject) Version

func (p *NpmProject) Version() string

type PackgeJson

type PackgeJson struct {
	Version string `json:"version"`
}

type Parent

type Parent struct{}

type Plugin

type Plugin struct {
	XMLName    xml.Name `xml:"plugin"`
	GroupID    string   `xml:"groupId"`
	ArtifactID string   `xml:"artifactId"`
	Version    string   `xml:"version"`
}

type PomXml

type PomXml struct {
	XMLName              xml.Name             `xml:"project"`
	ModelVersion         string               `xml:"modelVersion"`
	GroupID              string               `xml:"groupId"`
	ArtifactID           string               `xml:"artifactId"`
	Version              string               `xml:"version"`
	Packaging            string               `xml:"packaging"`
	Name                 string               `xml:"name"`
	Build                string               `xml:"build"`
	DependencyManagement DependencyManagement `xml:"dependencyManagement"`
	Dependencies         []Dependency         `xml:"dependencies>dependency"`
}

type Project

type Project struct {
	Expand       string            `json:"expand,omitempty" structs:"expand,omitempty"`
	Self         string            `json:"self,omitempty" structs:"self,omitempty"`
	ID           string            `json:"id,omitempty" structs:"id,omitempty"`
	Key          string            `json:"key,omitempty" structs:"key,omitempty"`
	Description  string            `json:"description,omitempty" structs:"description,omitempty"`
	Lead         User              `json:"lead,omitempty" structs:"lead,omitempty"`
	IssueTypes   []IssueType       `json:"issueTypes,omitempty" structs:"issueTypes,omitempty"`
	URL          string            `json:"url,omitempty" structs:"url,omitempty"`
	Email        string            `json:"email,omitempty" structs:"email,omitempty"`
	AssigneeType string            `json:"assigneeType,omitempty" structs:"assigneeType,omitempty"`
	Versions     []Version         `json:"versions,omitempty" structs:"versions,omitempty"`
	Name         string            `json:"name,omitempty" structs:"name,omitempty"`
	Roles        map[string]string `json:"roles,omitempty" structs:"roles,omitempty"`
}

Project represents a Jira Project.

type Repository

type Repository struct {
	ID   string `xml:"id"`
	Name string `xml:"name"`
	URL  string `xml:"url"`
}

type SearchResults

type SearchResults struct {
	Expand     string            `json:"expand,omitempty" yaml:"expand,omitempty"`
	Issues     []Issue           `json:"issues,omitempty" yaml:"issues,omitempty"`
	MaxResults int               `json:"maxResults,omitempty" yaml:"maxResults,omitempty"`
	Names      map[string]string `json:"names,omitempty" yaml:"names,omitempty"`
	StartAt    int               `json:"startAt,omitempty" yaml:"startAt,omitempty"`
	Total      int               `json:"total,omitempty" yaml:"total,omitempty"`
}

type Sprint

type Sprint struct{}

type Status

type Status struct{}

type Subtasks

type Subtasks struct{}

type Time

type Time struct{}

type Transition

type Transition struct {
	ID     string                     `json:"id" structs:"id"`
	Name   string                     `json:"name" structs:"name"`
	To     Status                     `json:"to" structs:"status"`
	Fields map[string]TransitionField `json:"fields" structs:"fields"`
}

type TransitionField

type TransitionField struct {
	Required bool `json:"required" structs:"required"`
}

TransitionField represents the value of one Transition

type User

type User struct{}

type Version

type Version struct{}

Jump to

Keyboard shortcuts

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