entities

package
v0.0.0-...-c3a74cb Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout      = jsonrpc2.NewError(0, "TIMEOUT")
	ErrForbidden    = jsonrpc2.NewError(3, "FORBIDDEN")
	ErrMaintenance  = jsonrpc2.NewError(4, "MAINTENANCE")
	ErrRemoteServer = jsonrpc2.NewError(5, "REMOTE_SERVER_UNAVAILABLE")
)

Global error codes

View Source
var (
	ErrCredentials     = jsonrpc2.NewError(102, "INVALID_CREDENTIALS")
	ErrTrackerType     = jsonrpc2.NewError(103, "INVALID_TRACKER_TYPE")
	ErrTrackerURL      = jsonrpc2.NewError(104, "INVALID_TRACKER_URL")
	ErrIssueURL        = jsonrpc2.NewError(105, "INVALID_ISSUE_URL")
	ErrProjectNotFound = jsonrpc2.NewError(106, "PROJECT_NOT_FOUND")
	ErrIssueNotFound   = jsonrpc2.NewError(107, "ISSUE_NOT_FOUND")
)

Tracker services error codes

Functions

func NewTrackerValidationErr

func NewTrackerValidationErr(msg string) error

NewTrackerValidationErr return new tracker validation error with message

Types

type Credentials

type Credentials struct {
	Login    string
	Password string
}

Credentials to tracker

type Issue

type Issue struct {
	ID          IssueID
	ProjectID   ProjectID `json:"-"`
	Type        TypeID
	Title       string
	Description string
	Estimate    int64
	DueDate     int64
	Done        Progress
	Spent       int64
	URL         string
}

Issue representation in our system

type IssueID

type IssueID int64

IssueID is helper type to avoid invalid int usage

type IssueURL

type IssueURL string

IssueURL is helper type to avoid invalid string usage

type NewIssue

type NewIssue struct {
	Issue
	// Be carefule with NewIssue type
	// Type field inside Issue will be empty
	// We have only id of Type with NewIssue
	Type int64
}

NewIssue differs from the Issye in a Type field. Type field is int64 type. And Type field inside issue will be empty.

type Pagination

type Pagination struct {
	Offset int
	Limit  int
}

Pagination used for pagination info in corresponding requests

type Progress

type Progress int

Progress represents progress in percents (0-100)

type Project

type Project struct {
	ID            ProjectID
	Title         string
	Link          string
	Description   string
	IssueTypes    []TypeID
	ActivityTypes []TypeID
}

Project representation in our system

type ProjectID

type ProjectID int64

ProjectID is helper type to avoid invalid int usage

type Report

type Report struct {
	IssueID    IssueID
	ActivityID int64
	Comments   string
	Duration   int64
	Started    int64
}

Report represents time report and additional information

type Tracker

type Tracker struct {
	ID          int64
	URL         string
	Type        string
	Credentials Credentials
}

Tracker representation in our system

type TypeID

type TypeID struct {
	ID   int64
	Name string
}

TypeID used for IssueTypes and ActivityTypes

type User

type User struct {
	ID   int64
	Name string
	Mail string
}

User information from tracker

Jump to

Keyboard shortcuts

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