targetprocess

package module
v0.0.0-...-dab5d4d Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 10 Imported by: 0

README

Golang api for Targetprocess

Features:

  • /Bugs
    • GET
    • POST
    • Del
  • /UserStories
    • GET
  • /Assignables
    • GET

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Unauthorized = &Error{
		Status:  "Unauthorized",
		Message: "Check your credential",
	}
)

Functions

This section is empty.

Types

type Assignable

type Assignable struct {
	Id          int64
	Name        string
	Description string
}

type AssignableGetReply

type AssignableGetReply struct {
	Prev  string
	Next  string
	Items []Assignable
}

type AssignableService

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

func (*AssignableService) ExecSearch

func (s *AssignableService) ExecSearch(query *Query, receiver interface{}) error

func (*AssignableService) Search

func (s *AssignableService) Search(query *Query) (AssignableGetReply, error)

type Bug

type Bug struct {
	Id          int64
	Name        string
	Description string
	StartDate   DateTime `json:"StartDate,omitempty"`
	EndDate     DateTime `json:"EndDate,omitempty"`
	CreateDate  DateTime `json:"CreateDate,omitempty"`

	Tags     string  `json:"Tags,omitempty"`
	Priority float32 `json:"NumericPriority"`
	Effort   float32 `json:"Effort,omitempty"`
	Units    string
	Type     EntityType
	Project  Project
}

type BugDescription

type BugDescription struct {
	//Id          uint64 `json:"Id,omitempty"`
	Name        string
	Description string
	Project     ProjectDescription
	Teams       Teams `json:"AssignedTeams, omitempty"`
}

type BugsGetReply

type BugsGetReply struct {
	Prev  string
	Next  string
	Items []Bug
}

type BugsService

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

func (*BugsService) Create

func (b *BugsService) Create(description BugDescription) (Bug, error)

func (*BugsService) Delete

func (b *BugsService) Delete(id int64) error

func (*BugsService) Get

func (b *BugsService) Get(id int64) (Bug, error)

func (*BugsService) Next

func (b *BugsService) Next(url string) (BugsGetReply, error)

func (*BugsService) Search

func (b *BugsService) Search(query *Query) (BugsGetReply, error)

type ClientOpt

type ClientOpt struct {
	User        string
	Password    string
	Token       string
	AccessToken string
	Url         string
	// contains filtered or unexported fields
}

type DateTime

type DateTime time.Time

func (*DateTime) UnmarshalJSON

func (dt *DateTime) UnmarshalJSON(data []byte) error

type EntityState

type EntityState struct {
	Id       int64
	Type     string `json:"ResourceType"`
	Name     string
	Priority float32 `json:"NumericPriority"`
}

type EntityType

type EntityType struct {
	Id   int64
	Type string `json:"ResourceType"`
	Name string
}

type Error

type Error struct {
	XMLName xml.Name `xml:"Error"`
	Status  string
	Message string
	Type    string
	Details string
	Id      string `xml:"ErrorId"`
}

func (Error) Error

func (e Error) Error() string

type Order

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

func OrderBy

func OrderBy(field string) Order

func OrderByDesc

func OrderByDesc(field string) Order

type Priority

type Priority struct {
	Id         int64
	Type       string `json:"ResourceType"`
	Name       string
	Importance int
}

type Process

type Process struct {
	Id   int64
	Type string `json:"ResourceType"`
	Name string
}

type Project

type Project struct {
	Id      int64
	Type    string `json:"ResourceType"`
	Name    string
	Process Process
}

type ProjectDescription

type ProjectDescription struct {
	Id int
}

type Query

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

func NewQuery

func NewQuery() *Query

func Where

func Where(str string) *Query

func (*Query) Append

func (q *Query) Append(fields ...string) *Query

func (*Query) Inclde

func (q *Query) Inclde(fields ...string) *Query

func (*Query) InnerTake

func (q *Query) InnerTake(cnt int32) *Query

func (*Query) Order

func (q *Query) Order(order Order) *Query

func (*Query) Skip

func (q *Query) Skip(cnt int32) *Query

func (*Query) Take

func (q *Query) Take(cnt int32) *Query

func (*Query) Where

func (q *Query) Where(str string) *Query

type StoryGetReply

type StoryGetReply struct {
	Prev  string
	Next  string
	Items []UseStory
}

type TPClient

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

func NewClient

func NewClient(opt ClientOpt) TPClient

func (*TPClient) Assignables

func (t *TPClient) Assignables() *AssignableService

func (*TPClient) Bugs

func (t *TPClient) Bugs() *BugsService

func (*TPClient) Story

func (t *TPClient) Story() *UserStoryService

func (TPClient) Url

func (t TPClient) Url() string

type Teams

type Teams []int

func (Teams) MarshalJSON

func (m Teams) MarshalJSON() ([]byte, error)

type UseStory

type UseStory struct {
	Id          int64
	Name        string
	Description string
	StartDate   DateTime `json:"StartDate,omitempty"`
	EndDate     DateTime `json:"EndDate,omitempty"`
	CreateDate  DateTime `json:"CreateDate,omitempty"`

	Tags     string  `json:"Tags,omitempty"`
	Priority float32 `json:"NumericPriority"`
	Effort   float32 `json:"Effort,omitempty"`
	Units    string
	Type     EntityType
	Project  Project
}

type UserStoryService

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

func (*UserStoryService) ExecGet

func (s *UserStoryService) ExecGet(id int64, receiver interface{}) error

func (*UserStoryService) ExecSearch

func (s *UserStoryService) ExecSearch(query *Query, receiver interface{}) error

func (*UserStoryService) Get

func (s *UserStoryService) Get(id int64) (UseStory, error)

func (*UserStoryService) Search

func (s *UserStoryService) Search(query *Query) (StoryGetReply, error)

Jump to

Keyboard shortcuts

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