milestones

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package milestones provides access to a project's milestones via the Lighthouse API. http://help.lighthouseapp.com/kb/api/milestones.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListOptions

type ListOptions struct {
	// If non-zero, the page to return
	Page int
}

type Milestone

type Milestone struct {
	AttachmentsCount int        `json:"attachments_count"`
	CompletedAt      *time.Time `json:"completed_at"`
	CreatedAt        *time.Time `json:"created_at"`
	DueOn            *time.Time `json:"due_on"`
	Goals            string     `json:"goals"`
	GoalsHTML        string     `json:"goals_html"`
	ID               int        `json:"id"`
	MaxPoints        int        `json:"max_points"`
	OpenTicketsCount int        `json:"open_tickets_count"`
	Permalink        string     `json:"permalink"`
	PointsClosed     int        `json:"points_closed"`
	PointsOpen       int        `json:"points_open"`
	Position         int        `json:"position"`
	ProjectID        int        `json:"project_id"`
	TicketsCount     int        `json:"tickets_count"`
	Title            string     `json:"title"`
	UpdatedAt        *time.Time `json:"updated_at"`
	URL              string     `json:"url"`
	UserName         string     `json:"user_name"`
}

type MilestoneCreate

type MilestoneCreate struct {
	Goals string     `json:"goals"`
	Title string     `json:"title"`
	DueOn *time.Time `json:"due_on"`
}

type MilestoneUpdate

type MilestoneUpdate struct {
	Goals string     `json:"goals"`
	Title string     `json:"title"`
	DueOn *time.Time `json:"due_on"`
}

type Milestones

type Milestones []*Milestone

type Service

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

func NewService

func NewService(s *lighthouse.Service, projectID int) *Service

func (*Service) Close

func (s *Service) Close(idOrTitle string) error

func (*Service) CloseByID added in v0.4.1

func (s *Service) CloseByID(id int) error

func (*Service) CloseByTitle added in v0.4.1

func (s *Service) CloseByTitle(title string) error

func (*Service) Create

func (s *Service) Create(m *Milestone) (*Milestone, error)

Only the fields in MilestoneCreate can be set.

func (*Service) Delete

func (s *Service) Delete(idOrTitle string) error

func (*Service) DeleteByID added in v0.4.1

func (s *Service) DeleteByID(id int) error

func (*Service) DeleteByTitle added in v0.4.1

func (s *Service) DeleteByTitle(title string) error

func (*Service) Get

func (s *Service) Get(idOrTitle string) (*Milestone, error)

func (*Service) GetByID added in v0.4.1

func (s *Service) GetByID(id int) (*Milestone, error)

func (*Service) GetByTitle added in v0.4.1

func (s *Service) GetByTitle(title string) (*Milestone, error)

func (*Service) List

func (s *Service) List(opts *ListOptions) (Milestones, error)

func (*Service) ListAll

func (s *Service) ListAll(opts *ListOptions) (Milestones, error)

ListAll repeatedly calls List and returns all pages. ListAll ignores opts.Page.

func (*Service) New

func (s *Service) New() (*Milestone, error)

func (*Service) Open

func (s *Service) Open(idOrTitle string) error

func (*Service) OpenByID added in v0.4.1

func (s *Service) OpenByID(id int) error

func (*Service) OpenByTitle added in v0.4.1

func (s *Service) OpenByTitle(title string) error

func (*Service) Update

func (s *Service) Update(m *Milestone) error

Only the fields in MilestoneUpdate can be set.

Jump to

Keyboard shortcuts

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