pt

package
v0.0.3-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectOwner   string = "owner"
	ProjectMemeber string = "member"
	ProjectViewer  string = "viewer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	RequestDoer
	ClientCaller
}

func (*Client) DeleteProject

func (service *Client) DeleteProject(projectID int) (*http.Response, error)

DeleteProject deletes a given project by id.

func (*Client) GetProject

func (service *Client) GetProject(projectID int) (*Project, *http.Response, error)

GetProject returns a specific project's information.

func (*Client) ListProjects

func (service *Client) ListProjects() ([]*Project, *http.Response, error)

ListProjects returns all active projects for the current user.

func (*Client) NewProject

func (service *Client) NewProject(project ProjectsRequest) (*Project, *http.Response, error)

NewProject returns the created project's information.

func (*Client) UpdateProject

func (service *Client) UpdateProject(projectID int, project ProjectRequest) (*Project, *http.Response, error)

UpdateProject returns the updated project's information.

type ClientCaller

type ClientCaller interface {
	ProjectCaller
}

func NewClient

func NewClient(apiToken string) ClientCaller

type Person

type Person pivotal.Person

type Project

type Project pivotal.Project

type ProjectCaller

type ProjectCaller interface {
	ListProjects() ([]*Project, *http.Response, error)
	GetProject(projectID int) (*Project, *http.Response, error)
	NewProject(project ProjectsRequest) (*Project, *http.Response, error)
	UpdateProject(projectID int, project ProjectRequest) (*Project, *http.Response, error)
	DeleteProject(projectID int) (*http.Response, error)
}

type ProjectMembership

type ProjectMembership pivotal.ProjectMembership

type ProjectRequest

type ProjectRequest struct {
	Name                         string            `json:"name,omitempty"`
	Status                       string            `json:"status,omitempty"`
	IterationLength              int               `json:"iteration_length,omitempty"`
	WeekStartDay                 pivotal.Day       `json:"week_start_day,omitempty"`
	PointScale                   string            `json:"point_scale,omitempty"`
	BugsAndChoresAreEstimatable  bool              `json:"bugs_and_chores_are_estimatable,omitempty"`
	AutomaticPlanning            bool              `json:"automatic_planning,omitempty"`
	EnableTasks                  bool              `json:"enable_tasks,omitempty"`
	StartDate                    *pivotal.Date     `json:"start_date,omitempty"`
	TimeZone                     *pivotal.TimeZone `json:"time_zone,omitempty"`
	VelocityAveragedOver         int               `json:"velocity_averaged_over,omitempty"`
	NumberOfDoneIterationsToShow int               `json:"number_of_done_iterations_to_show,omitempty"`
	Description                  string            `json:"description,omitempty"`
	ProfileContent               string            `json:"profile_content,omitempty"`
	EnableIncomingEmails         bool              `json:"enable_incoming_emails,omitempty"`
	InitialVelocity              int               `json:"initial_velocity,omitempty"`
	ProjectType                  string            `json:"project_type,omitempty"`
	Public                       bool              `json:"public,omitempty"`
	AtomEnabled                  bool              `json:"atom_enabled,omitempty"`
	AccountID                    int               `json:"account_id,omitempty"`
	JoinAs                       string            `json:"join_as,omitempty"`
}

type ProjectsRequest

type ProjectsRequest struct {
	NoOwner        bool   `json:"no_owner,omitempty"`
	NewAccountName string `json:"new_account_name,omitempty"`
	ProjectRequest
}

type RequestDoer

type RequestDoer interface {
	Do(req *http.Request, v interface{}) (*http.Response, error)
	NewRequest(method, urlPath string, body interface{}) (*http.Request, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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