v8models

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	ID   uint64 `json:"id"`
	Self string `json:"self"`
	Name string `json:"name"`
	Type string `json:"type"`
}

func (Board) ExtractRawMessage

func (b Board) ExtractRawMessage(blob []byte) (json.RawMessage, error)

func (Board) FromAPI

func (b Board) FromAPI(sourceId uint64, raw json.RawMessage) (interface{}, error)

type Changelog

type Changelog struct {
	ID     uint64 `json:"id,string"`
	Author struct {
		Self         string `json:"self"`
		Name         string `json:"name"`
		Key          string `json:"key"`
		EmailAddress string `json:"emailAddress"`
		AvatarUrls   struct {
			Four8X48  string `json:"48x48"`
			Two4X24   string `json:"24x24"`
			One6X16   string `json:"16x16"`
			Three2X32 string `json:"32x32"`
		} `json:"avatarUrls"`
		DisplayName string `json:"displayName"`
		Active      bool   `json:"active"`
		TimeZone    string `json:"timeZone"`
	} `json:"author"`
	Created core.Iso8601Time `json:"created"`
	Items   []ChangelogItem  `json:"items"`
}

type ChangelogItem

type ChangelogItem struct {
	Field      string `json:"field"`
	Fieldtype  string `json:"fieldtype"`
	From       string `json:"from"`
	FromString string `json:"fromString"`
	To         string `json:"to"`
	ToString   string `json:"toString"`
}

type Issue

type Issue struct {
	Expand string `json:"expand"`
	ID     uint64 `json:"id,string"`
	Self   string `json:"self"`
	Key    string `json:"key"`
	Fields struct {
		AllFields map[string]interface{}
		Issuetype struct {
			Self        string `json:"self"`
			ID          string `json:"id"`
			Description string `json:"description"`
			IconURL     string `json:"iconUrl"`
			Name        string `json:"name"`
			Subtask     bool   `json:"subtask"`
			AvatarID    int    `json:"avatarId"`
		} `json:"issuetype"`
		Parent *struct {
			ID  uint64 `json:"id,string"`
			Key string `json:"key"`
		} `json:"parent"`
		Timespent     interface{} `json:"timespent"`
		Sprint        *Sprint     `json:"sprint"`
		ClosedSprints []Sprint    `json:"closedSprints"`
		Project       struct {
			Self           string `json:"self"`
			ID             uint64 `json:"id,string"`
			Key            string `json:"key"`
			Name           string `json:"name"`
			ProjectTypeKey string `json:"projectTypeKey"`
			AvatarUrls     struct {
				Four8X48  string `json:"48x48"`
				Two4X24   string `json:"24x24"`
				One6X16   string `json:"16x16"`
				Three2X32 string `json:"32x32"`
			} `json:"avatarUrls"`
		} `json:"project"`
		FixVersions        []interface{}     `json:"fixVersions"`
		Aggregatetimespent interface{}       `json:"aggregatetimespent"`
		Resolution         interface{}       `json:"resolution"`
		Resolutiondate     *core.Iso8601Time `json:"resolutiondate"`
		Workratio          int               `json:"workratio"`
		LastViewed         string            `json:"lastViewed"`
		Watches            struct {
			Self       string `json:"self"`
			WatchCount int    `json:"watchCount"`
			IsWatching bool   `json:"isWatching"`
		} `json:"watches"`
		Created core.Iso8601Time `json:"created"`
		Epic    *struct {
			ID      int    `json:"id"`
			Key     string `json:"key"`
			Self    string `json:"self"`
			Name    string `json:"name"`
			Summary string `json:"summary"`
			Color   struct {
				Key string `json:"key"`
			} `json:"color"`
			Done bool `json:"done"`
		} `json:"epic"`
		Priority *struct {
			Self    string `json:"self"`
			IconURL string `json:"iconUrl"`
			Name    string `json:"name"`
			ID      uint64 `json:"id,string"`
		} `json:"priority"`
		Labels                        []interface{}    `json:"labels"`
		Timeestimate                  interface{}      `json:"timeestimate"`
		Aggregatetimeoriginalestimate interface{}      `json:"aggregatetimeoriginalestimate"`
		Versions                      []interface{}    `json:"versions"`
		Issuelinks                    []interface{}    `json:"issuelinks"`
		Assignee                      *User            `json:"assignee"`
		Updated                       core.Iso8601Time `json:"updated"`
		Status                        struct {
			Self           string `json:"self"`
			Description    string `json:"description"`
			IconURL        string `json:"iconUrl"`
			Name           string `json:"name"`
			ID             string `json:"id"`
			StatusCategory struct {
				Self      string `json:"self"`
				ID        int    `json:"id"`
				Key       string `json:"key"`
				ColorName string `json:"colorName"`
				Name      string `json:"name"`
			} `json:"statusCategory"`
		} `json:"status"`
		Timeoriginalestimate *int64      `json:"timeoriginalestimate"`
		Description          interface{} `json:"description"`
		Timetracking         *struct {
			RemainingEstimate        string `json:"remainingEstimate"`
			TimeSpent                string `json:"timeSpent"`
			RemainingEstimateSeconds int64  `json:"remainingEstimateSeconds"`
			TimeSpentSeconds         int    `json:"timeSpentSeconds"`
		} `json:"timetracking"`
		Archiveddate          interface{}   `json:"archiveddate"`
		Aggregatetimeestimate *int64        `json:"aggregatetimeestimate"`
		Summary               string        `json:"summary"`
		Creator               User          `json:"creator"`
		Subtasks              []interface{} `json:"subtasks"`
		Reporter              struct {
			Self         string `json:"self"`
			Name         string `json:"name"`
			Key          string `json:"key"`
			EmailAddress string `json:"emailAddress"`
			AvatarUrls   struct {
				Four8X48  string `json:"48x48"`
				Two4X24   string `json:"24x24"`
				One6X16   string `json:"16x16"`
				Three2X32 string `json:"32x32"`
			} `json:"avatarUrls"`
			DisplayName string `json:"displayName"`
			Active      bool   `json:"active"`
			TimeZone    string `json:"timeZone"`
		} `json:"reporter"`
		Aggregateprogress struct {
			Progress int `json:"progress"`
			Total    int `json:"total"`
		} `json:"aggregateprogress"`
		Environment interface{} `json:"environment"`
		Duedate     interface{} `json:"duedate"`
		Progress    struct {
			Progress int `json:"progress"`
			Total    int `json:"total"`
		} `json:"progress"`
		Worklog *struct {
			StartAt    int       `json:"startAt"`
			MaxResults int       `json:"maxResults"`
			Total      int       `json:"total"`
			Worklogs   []Worklog `json:"worklogs"`
		} `json:"worklog"`
	} `json:"fields"`
	Changelog *struct {
		StartAt    int         `json:"startAt"`
		MaxResults int         `json:"maxResults"`
		Total      int         `json:"total"`
		Histories  []Changelog `json:"histories"`
	} `json:"changelog"`
}

func (Issue) ExtractEntities

func (i Issue) ExtractEntities(sourceId uint64, storyPointField string) ([]uint64, *models.JiraIssue, bool, []*models.JiraWorklog, []*models.JiraChangelog, []*models.JiraChangelogItem)

func (Issue) ExtractRawMessage

func (Issue) ExtractRawMessage(blob []byte) (json.RawMessage, error)

func (Issue) Unmarshal

func (Issue) Unmarshal(raw json.RawMessage) ([]Issue, error)

type Project

type Project struct {
	Self string `json:"self"`
	ID   string `json:"id"`
	Key  string `json:"key"`
	Name string `json:"name"`
}

func (Project) ExtractRawMessage

func (Project) ExtractRawMessage(blob []byte) (json.RawMessage, error)

func (Project) FromAPI

func (Project) FromAPI(sourceId uint64, raw json.RawMessage) (interface{}, error)
type RemoteLink struct {
	ID          uint64 `json:"id"`
	Self        string `json:"self"`
	GlobalID    string `json:"globalId"`
	Application struct {
		Type string `json:"type"`
		Name string `json:"name"`
	} `json:"application"`
	Relationship string `json:"relationship"`
	Object       struct {
		URL     string `json:"url"`
		Title   string `json:"title"`
		Summary string `json:"summary"`
		Icon    struct {
			URL16X16 string `json:"url16x16"`
			Title    string `json:"title"`
		} `json:"icon"`
		Status struct {
			Resolved bool `json:"resolved"`
			Icon     struct {
				URL16X16 string `json:"url16x16"`
				Title    string `json:"title"`
				Link     string `json:"link"`
			} `json:"icon"`
		} `json:"status"`
	} `json:"object"`
}

func (RemoteLink) ExtractRawMessage

func (RemoteLink) ExtractRawMessage(blob []byte) (json.RawMessage, error)

func (RemoteLink) FromAPI

func (RemoteLink) FromAPI(sourceId, issueId uint64, raw json.RawMessage) (interface{}, error)

type Sprint

type Sprint struct {
	ID            uint64     `json:"id"`
	Self          string     `json:"self"`
	State         string     `json:"state"`
	Name          string     `json:"name"`
	StartDate     *time.Time `json:"startDate"`
	EndDate       *time.Time `json:"endDate"`
	CompleteDate  *time.Time `json:"completeDate"`
	OriginBoardID uint64     `json:"originBoardId"`
}

func (Sprint) ExtractRawMessage

func (Sprint) ExtractRawMessage(blob []byte) (json.RawMessage, error)

func (Sprint) FromAPI

func (s Sprint) FromAPI(sourceId uint64, raw json.RawMessage) (interface{}, error)

func (Sprint) GetJiraSprints

func (s Sprint) GetJiraSprints(sourceId uint64, raw json.RawMessage) ([]*models.JiraSprint, error)

type Transformer

type Transformer interface {
	FromAPI(sourceId uint64, raw json.RawMessage) (interface{}, error)
	ExtractRawMessage(blob []byte) (json.RawMessage, error)
}

type TransformerWithIssueId

type TransformerWithIssueId interface {
	FromAPI(sourceId, issueId uint64, raw json.RawMessage) (interface{}, error)
	ExtractRawMessage(blob []byte) (json.RawMessage, error)
}

type User

type User struct {
	Self         string `json:"self"`
	Key          string `json:"key"`
	Name         string `json:"name"`
	EmailAddress string `json:"emailAddress"`
	AccountId    string `json:"accountId"`
	AvatarUrls   struct {
		Four8X48  string `json:"48x48"`
		Two4X24   string `json:"24x24"`
		One6X16   string `json:"16x16"`
		Three2X32 string `json:"32x32"`
	} `json:"avatarUrls"`
	DisplayName string `json:"displayName"`
	Active      bool   `json:"active"`
	Deleted     bool   `json:"deleted"`
	TimeZone    string `json:"timeZone"`
	Locale      string `json:"locale"`
}

type Worklog

type Worklog struct {
	Self             string           `json:"self"`
	Author           *User            `json:"author"`
	UpdateAuthor     *User            `json:"updateAuthor"`
	Comment          string           `json:"comment"`
	Created          string           `json:"created"`
	Updated          core.Iso8601Time `json:"updated"`
	Started          core.Iso8601Time `json:"started"`
	TimeSpent        string           `json:"timeSpent"`
	TimeSpentSeconds int              `json:"timeSpentSeconds"`
	ID               string           `json:"id"`
	IssueID          string           `json:"issueId"`
}

func (Worklog) ExtractRawMessage

func (Worklog) ExtractRawMessage(blob []byte) (json.RawMessage, error)

func (Worklog) FromAPI

func (Worklog) FromAPI(sourceId, issueId uint64, raw json.RawMessage) (interface{}, error)

Jump to

Keyboard shortcuts

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