types

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorInternal              = errors.New("internal error")
	ErrorLicense               = errors.New("license error")
	ErrorLicenseExpired        = errors.New("license expired error")
	ErrorAccessDenied          = errors.New("access denied error")
	ErrorUnauthorizedOperation = errors.New("unauthorized operation error")
	ErrorNoResource            = errors.New("no resource error")
	ErrorInvalidRequest        = errors.New("invalid request error")
	ErrorSpaceOverCapacity     = errors.New(" space over capacity error")
	ErrorResourceOverflow      = errors.New("resource overflow error")
	ErrorTooLargeFile          = errors.New("too large file error")
	ErrorAuthentication        = errors.New("authentication error")
	ErrorUnexpected            = errors.New("unexpected error")
)

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Size        int    `json:"size"`
	CreatedUser *User  `json:"createdUser"`
	Created     *Date  `json:"created"`
	UpdatedUser *User  `json:"updatedUser"`
	Updated     *Date  `json:"updated"`
}

type AttachmentInfo

type AttachmentInfo struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type AttributeInfo added in v0.3.0

type AttributeInfo struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type Category

type Category struct {
	Id           int    `json:"id"`
	Name         string `json:"name"`
	DisplayOrder int    `json:"displayOrder"`
}

type ChangeLog

type ChangeLog struct {
	Field            string            `json:"field"`
	NewValue         *string           `json:"newValue"`
	OriginalValue    *string           `json:"originalValue"`
	AttachmentInfo   *AttachmentInfo   `json:"attachmentInfo"`
	AttributeInfo    *AttributeInfo    `json:"attributeInfo"`
	NotificationInfo *NotificationInfo `json:"notificationInfo"`
}

type Comment

type Comment struct {
	Id            int64           `json:"id"`
	Content       string          `json:"content"`
	ChangeLog     []*ChangeLog    `json:"changeLog"`
	CreatedUser   *User           `json:"createdUser"`
	Created       *Date           `json:"created"`
	Updated       *Date           `json:"updated"`
	Stars         []*Star         `json:"stars"`
	Notifications []*Notification `json:"notifications"`
}

type Date

type Date string

func NewDate added in v0.1.0

func NewDate(s string) *Date

func (*Date) String added in v0.1.0

func (d *Date) String() string

func (*Date) Time

func (d *Date) Time() time.Time

type DiskUsage added in v0.6.0

type DiskUsage struct {
	Capacity   int `json:"capacity"`
	Issue      int `json:"issue"`
	Wiki       int `json:"wiki"`
	File       int `json:"file"`
	SubVersion int `json:"subversion"`
	Git        int `json:"git"`
	GitLFS     int `json:"gitLFS"`
}

type Error

type Error struct {
	Message  string `json:"message"`
	Code     int    `json:"code"`
	MoreInfo string `json:"moreInfo"`
}

type Errors

type Errors struct {
	Errors []Error `json:"errors"`
}

func (Errors) Error added in v0.4.0

func (e Errors) Error() string

Error implements error interface.

func (Errors) Has added in v0.4.0

func (e Errors) Has(err error) bool

Has returns true if the err matches one of the errors.

type Hours added in v0.1.0

type Hours float64

func NewHours added in v0.1.0

func NewHours(f float64) *Hours

func (*Hours) String added in v0.1.0

func (h *Hours) String() string

type Issue

type Issue struct {
	Id             int64          `json:"id"`
	ProjectId      *int64         `json:"projectId"`
	IssueKey       string         `json:"issueKey"`
	KeyId          int64          `json:"keyId"`
	IssueType      *IssueType     `json:"issueType"`
	Summary        string         `json:"summary"`
	Description    string         `json:"description"`
	Resolution     *Resolution    `json:"resolution"`
	Priority       *Priority      `json:"priority"`
	Status         *ProjectStatus `json:"status"`
	Assignee       *User          `json:"assignee"`
	Category       []*Category    `json:"category"`
	Versions       []*Version     `json:"versions"`
	Milestone      []*Milestone   `json:"milestone"`
	StartDate      *Date          `json:"startDate"`
	DueDate        *Date          `json:"dueDate"`
	EstimatedHours *Hours         `json:"estimatedHours"`
	ActualHours    *Hours         `json:"actualHours"`
	ParentIssueId  *int64         `json:"parentIssueId"`
	CreatedUser    *User          `json:"createdUser"`
	Created        *Date          `json:"created"`
	UpdatedUser    *User          `json:"updatedUser"`
	Updated        *Date          `json:"updated"`
	CustomFields   []interface{}  `json:"customFields"`
	Attachments    []Attachment   `json:"attachments"`
	SharedFiles    []*SharedFile  `json:"sharedFiles"`
	Stars          []*Star        `json:"stars"`
}

func (*Issue) URLValues added in v0.6.1

func (i *Issue) URLValues() url.Values

func (*Issue) Uniq added in v0.2.0

func (a *Issue) Uniq(b *Issue)

type IssueType

type IssueType struct {
	Id           int64  `json:"id"`
	ProjectId    int64  `json:"projectId"`
	Name         string `json:"name"`
	Color        string `json:"color"`
	DisplayOrder int    `json:"displayOrder"`
}

type Milestone

type Milestone struct {
	Id             int    `json:"id"`
	ProjectId      int    `json:"projectId"`
	Name           string `json:"name"`
	Description    string `json:"description"`
	StartDate      *Date  `json:"startDate"`
	ReleaseDueDate *Date  `json:"releaseDueDate"`
	Archived       bool   `json:"archived"`
	DisplayOrder   int    `json:"displayOrder"`
}

type Notification

type Notification struct {
	Id                  int64       `json:"id"`
	AlreadyRead         bool        `json:"alreadyRead"`
	Reason              int         `json:"reason"`
	ResourceAlreadyRead bool        `json:"resourceAlreadyRead"`
	Project             Project     `json:"project"`
	Issue               Issue       `json:"issue"`
	Comment             Comment     `json:"comment"`
	PullRequest         PullRequest `json:"pullRequest"`
	PullRequestComment  Comment     `json:"pullRequestComment"`
	Sender              User        `json:"sender"`
	Created             Date        `json:"created"`
}

type NotificationInfo

type NotificationInfo struct {
	Type string `json:"type"`
}

type NulabAccount

type NulabAccount struct {
	NulabId  string `json:"nulabId"`
	Name     string `json:"name"`
	UniqueId string `json:"uniqueId"`
}

type Priority

type Priority struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type Project

type Project struct {
	Id                                int64  `json:"id"`
	ProjectKey                        string `json:"projectKey"`
	Name                              string `json:"name"`
	ChartEnabled                      bool   `json:"chartEnabled"`
	SubtaskingEnabled                 bool   `json:"subtaskingEnabled"`
	ProjectLeaderCanEditProjectLeader bool   `json:"projectLeaderCanEditProjectLeader"`
	TextFormattingRule                string `json:"textFormattingRule"`
	Archived                          bool   `json:"archived"`
}

type ProjectStatus

type ProjectStatus struct {
	Id           int64  `json:"id"`
	ProjectId    int64  `json:"projectId"`
	Name         string `json:"name"`
	Color        string `json:"color"`
	DisplayOrder int64  `json:"displayOrder"`
}

type PullRequest

type PullRequest struct {
	Id           int64   `json:"id"`
	ProjectId    int64   `json:"projectId"`
	RepositoryId int64   `json:"repositoryID"`
	Number       int     `json:"number"`
	Summary      string  `json:"summary"`
	Description  string  `json:"description"`
	Base         string  `json:"base"`
	Branch       string  `json:"branch"`
	Status       *Status `json:"status"`
	Assignee     *User   `json:"assignee"`
	Issue        *Issue  `json:"issue"`
	BaseCommit   string  `json:"baseCommit"`
	BranchCommit string  `json:"branchCommit"`
	CloseAt      *Date   `json:"closeAt"`
	MergeAt      *Date   `json:"mergeAt"`
	CreatedUser  *User   `json:"createdUser"`
	Created      *Date   `json:"created"`
	UpdatedUser  *User   `json:"updatedUser"`
	Updated      *Date   `json:"update"`
}

PullRequest represents the pull request.

func (*PullRequest) EncodeQuery added in v0.2.0

func (p *PullRequest) EncodeQuery() url.Values

type Repository

type Repository struct {
	Id           int64   `json:"id"`
	ProjectId    int64   `json:"projectId"`
	Name         string  `json:"name"`
	Description  string  `json:"description"`
	HookURL      *string `json:"hookUrl"`
	HTTPURL      string  `json:"httpUrl"`
	SSHURL       string  `json:"sshUrl"`
	DisplayOrder int     `json:"displayOrder"`
	PushedAt     *Date   `json:"pushedAt"`
	CreatedUser  *User   `json:"createdUser"`
	Created      *Date   `json:"created"`
	UpdatedUser  *User   `json:"createdUser"`
	Updated      *Date   `json:"created"`
}

Repository represents the git repository.

type Resolution

type Resolution struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type SharedFile

type SharedFile struct {
	Id          int64  `json:"id"`
	Type        string `json:"type"`
	Dir         string `json:"dir"`
	Name        string `json:"name"`
	Size        int    `json:"size"`
	CreatedUser *User  `json:"createdUser"`
	Created     *Date  `json:"created"`
	UpdatedUser *User  `json:"updatedUser"`
	Updated     *Date  `json:"updated"`
}

type Space

type Space struct {
	SpaceKey          string `json:"spaceKey"`
	Name              string `json:"name"`
	OwnerId           int64  `json:"ownerId"`
	Lang              string `json:"lang"`
	ReportSendTime    string `json:"reportSendTime"`
	TextFormatingRule string `json:"textFormattingRule"`
	Timezone          string `json:"timezone"`
	Created           *Date  `json:"created"`
	Updated           *Date  `json:"updated"`
}

type Star

type Star struct {
	Id        int64  `json:"id"`
	Comment   string `json:"comment"`
	URL       string `json:"url"`
	Title     string `json:"title"`
	Presenter *User  `json:"presenter"`
	Created   *Date  `json:"created"`
}

type Status

type Status struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type Tag

type Tag struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
}

type TotalDiskUsage added in v0.6.0

type TotalDiskUsage struct {
	DiskUsage
	Details []DiskUsage `json:"details"`
}

type User

type User struct {
	Id           int64        `json:"id"`
	UserId       string       `json:"userId"`
	Name         string       `json:"name"`
	RoleType     int          `json:"roleType"`
	Lang         string       `json:"lang"`
	MailAddress  string       `json:"mailAddress"`
	NulabAccount NulabAccount `json:"nulabAccount"`
}

type Version

type Version struct {
	Id             int64  `json:"id"`
	ProjectId      int64  `json:"projectId"`
	Name           string `json:"name"`
	Description    string `json:"description"`
	StartDate      Date   `json:"startDate"`
	ReleaseDueDate Date   `json:"releaseDueDate"`
	Archived       bool   `json:"archived"`
	DisplayOrder   int    `json:"displayOrder"`
}

type Wiki

type Wiki struct {
	Id          int64         `json:"id"`
	ProjectId   int64         `json:"projectId"`
	Name        string        `json:"name"`
	Content     string        `json:"content"`
	Tags        []*Tag        `json:"tags"`
	Attachments []*Attachment `json:"attachment"`
	SharedFiles []*SharedFile `json:"sharedFiles"`
	Stars       []*Star       `json:"stars"`
	CreatedUser *User         `json:"createdUser"`
	Created     *Date         `json:"created"`
	UpdatedUser *User         `json:"updatedUser"`
	Updated     *Date         `json:"updated"`
}

Jump to

Keyboard shortcuts

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