atlassian

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2016 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 ActivityFeed

type ActivityFeed struct {
	XMLName xml.Name        `xml:"http://www.w3.org/2005/Atom feed"json:"xml_name"`
	Title   string          `xml:"title"json:"title"`
	Id      string          `xml:"id"json:"id"`
	Link    []Link          `xml:"link"json:"link"`
	Updated time.Time       `xml:"updated,attr"json:"updated"`
	Author  Person          `xml:"author"json:"author"`
	Entries []*ActivityItem `xml:"entry"json:"entries"`
}

type ActivityIssue

type ActivityIssue struct {
	Activity *ActivityItem
	Issue    *Issue
}

type ActivityItem

type ActivityItem struct {
	Title          string                  `xml:"title"json:"title"`
	Id             string                  `xml:"id"json:"id"`
	Link           []Link                  `xml:"link"json:"link"`
	Updated        time.Time               `xml:"updated"json:"updated"`
	Author         Person                  `xml:"author"json:"author"`
	Summary        Text                    `xml:"summary"json:"summary"`
	Category       Category                `xml:"category"json:"category"`
	ActivityTarget *ActivityTargetOrObject `xml:"target"`
	ActivityObject *ActivityTargetOrObject `xml:"object"`
}

func (ActivityItem) GetIssueID

func (ai ActivityItem) GetIssueID() (string, bool)

type ActivityTargetOrObject

type ActivityTargetOrObject struct {
	Id         string `xml:"id"`
	Title      string `xml:"title"`
	Summary    string `xml:"summary"`
	Link       Link   `xml:"link"`
	ObjectType string `xml:"activity:object-type"`
}

<activity:target> <id>urn:uuid:bebc2b8e-415d-3b15-b23d-ad1d9892ee43</id> <title type="text">LRN-9244</title> <summary type="text">Make 'Check Answer' button colour Accessible</summary> <link rel="alternate" href="https://learnosity.atlassian.net/browse/LRN-9244"/> <activity:object-type>http://streams.atlassian.com/syndication/types/issue</activity:object-type> </activity:target>

type Atlassian

type Atlassian interface {
	GetNewJiraActivities(last_id_seen string) ([]*ActivityItem, error)
	GetIssue(id string) (*Issue, error)

	UserImage(ActivityItem) (io.Reader, bool, error)
}

func New

type Category

type Category struct {
	Term string `xml:"term,attr"json:"term"`
}

type Issue

type Issue struct {
	Id     string `json:"key"`
	Fields map[string]interface{}
}
type Link struct {
	Rel  string `xml:"rel,attr,omitempty"json:"rel"`
	Href string `xml:"href,attr"json:"href"`
}

type Person

type Person struct {
	Name     string `xml:"name"json:"name"`
	URI      string `xml:"uri"json:"uri"`
	Email    string `xml:"email"json:"email"`
	InnerXML string `xml:",innerxml"json:"inner_xml"`
	Link     []Link `xml:"link"json:"link"`
	Username string `xml:"username"`
}

type Text

type Text struct {
	Type string `xml:"type,attr,omitempty"json:"type"`
	Body string `xml:",chardata"json:"body"`
}

Jump to

Keyboard shortcuts

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