changesets

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 changesets provides access to a project's changesets via the Lighthouse API. http://help.lighthouseapp.com/kb/api/changesets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Operation string
	Path      string
}

func (*Change) MarshalJSON

func (c *Change) MarshalJSON() ([]byte, error)

func (*Change) UnmarshalJSON

func (c *Change) UnmarshalJSON(data []byte) error

type Changes

type Changes []*Change

type Changeset

type Changeset struct {
	Body      string     `json:"body"`
	BodyHTML  string     `json:"body_html"`
	ChangedAt *time.Time `json:"changed_at"`
	Changes   Changes    `json:"changes"`
	Committer string     `json:"committer"`
	ProjectID int        `json:"project_id"`
	Revision  string     `json:"revision"`
	TicketID  int        `json:"ticket_id"`
	Title     string     `json:"title"`
	UserID    int        `json:"user_id"`
}

type ChangesetCreate

type ChangesetCreate struct {
	Body      string     `json:"body"`
	BodyHTML  string     `json:"body_html"`
	ChangedAt *time.Time `json:"changed_at"`
	Changes   Changes    `json:"changes"`
	Revision  string     `json:"revision"`
	Title     string     `json:"title"`
	UserID    int        `json:"user_id"`
}

type Changesets

type Changesets []*Changeset

type ListOptions added in v0.4.1

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

type Service

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

func NewService

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

func (*Service) Create

func (s *Service) Create(c *Changeset) (*Changeset, error)

Only the fields in ChangesetCreate can be set.

func (*Service) Delete

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

func (*Service) Get

func (s *Service) Get(revision string) (*Changeset, error)

func (*Service) List

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

func (*Service) ListAll added in v0.4.1

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

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

func (*Service) New

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

Jump to

Keyboard shortcuts

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