projects

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: 9 Imported by: 0

Documentation

Overview

Package projects provides access to projects via the Lighthouse API. http://help.lighthouseapp.com/kb/api/projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Membership

type Membership struct {
	ID      int    `json:"id"`
	UserID  int    `json:"user_id"`
	User    *User  `json:"user"`
	Account string `json:"account"`
}

type Memberships

type Memberships []*Membership

type Project

type Project struct {
	Archived               bool       `json:"archived"`
	ClosedStates           string     `json:"closed_states"`
	CreatedAt              *time.Time `json:"created_at"`
	DefaultAssignedUserID  int        `json:"default_assigned_user_id"`
	DefaultMilestoneID     int        `json:"default_milestone_id"`
	DefaultTicketText      string     `json:"default_ticket_text"`
	Description            string     `json:"description"`
	DescriptionHTML        string     `json:"description_html"`
	EnablePoints           bool       `json:"enable_points"`
	Hidden                 bool       `json:"hidden"`
	ID                     int        `json:"id"`
	License                string     `json:"license"`
	Name                   string     `json:"name"`
	OpenStates             string     `json:"open_states"`
	OpenTicketsCount       int        `json:"open_tickets_count"`
	OssReadonly            bool       `json:"oss_readonly"`
	Permalink              string     `json:"permalink"`
	PointsScale            string     `json:"points_scale"`
	Public                 bool       `json:"public"`
	SendChangesetsToEvents bool       `json:"send_changesets_to_events"`
	TodosCompleted         Todos      `json:"todos_completed"`
	UpdatedAt              string     `json:"updated_at"`
	OpenStatesList         StatesList `json:"open_states_list"`
	ClosedStatesList       StatesList `json:"closed_states_list"`
}

type ProjectCreate

type ProjectCreate struct {
	Archived bool   `json:"archived"`
	Name     string `json:"name"`
	Public   bool   `json:"public"`
}

type ProjectUpdate

type ProjectUpdate struct {
	Archived bool   `json:"archived"`
	Name     string `json:"name"`
	Public   bool   `json:"public"`
}

type Projects

type Projects []*Project

type Service

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

func NewService

func NewService(s *lighthouse.Service) *Service

func (*Service) Create

func (s *Service) Create(p *Project) (*Project, error)

Only the fields in ProjectCreate can be set.

func (*Service) Delete

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

func (*Service) DeleteByID added in v0.4.1

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

func (*Service) DeleteByName added in v0.4.1

func (s *Service) DeleteByName(name string) error

func (*Service) Get

func (s *Service) Get(idOrName string) (*Project, error)

func (*Service) GetByID added in v0.4.1

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

func (*Service) GetByName added in v0.4.1

func (s *Service) GetByName(name string) (*Project, error)

func (*Service) List

func (s *Service) List() (Projects, error)

func (*Service) Memberships

func (s *Service) Memberships(idOrName string) (Memberships, error)

func (*Service) MembershipsByID added in v0.4.1

func (s *Service) MembershipsByID(id int) (Memberships, error)

func (*Service) MembershipsByName added in v0.4.1

func (s *Service) MembershipsByName(name string) (Memberships, error)

func (*Service) New

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

func (*Service) Update

func (s *Service) Update(p *Project) error

Only the fields in ProjectUpdate can be set.

type StatesList

type StatesList []string

func (*StatesList) MarshalJSON

func (t *StatesList) MarshalJSON() ([]byte, error)

func (*StatesList) UnmarshalJSON

func (t *StatesList) UnmarshalJSON(data []byte) error

type Todos

type Todos struct {
	Projects   bool `json:"projects"`
	Tickets    bool `json:"tickets"`
	Milestones bool `json:"milestones"`
}

type User

type User struct {
	ID        int    `json:"id"`
	Job       string `json:"job"`
	Name      string `json:"name"`
	Website   string `json:"website"`
	AvatarURL string `json:"avatar_url"`
}

Jump to

Keyboard shortcuts

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