messages

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	AllAttachmentsCount int        `json:"all_attachments_count"`
	AttachmentsCount    int        `json:"attachments_count"`
	Body                string     `json:"body"`
	BodyHTML            string     `json:"body_html"`
	CommentsCount       int        `json:"comments_count"`
	CreatedAt           *time.Time `json:"created_at"`
	ID                  int        `json:"id"`
	Integer             int        `json:"integer"`
	MilestoneID         int        `json:"milestone_id"`
	ParentID            int        `json:"parent_id"`
	Permalink           string     `json:"permalink"`
	ProjectID           int        `json:"project_id"`
	Title               string     `json:"title"`
	Token               string     `json:"token"`
	UpdatedAt           *time.Time `json:"updated_at"`
	UserID              int        `json:"user_id"`
	UserName            string     `json:"user_name"`
	URL                 string     `json:"url"`
}

type CommentCreate

type CommentCreate struct {
	Body  string `json:"body"`
	Title string `json:"title"`
}

type Comments

type Comments []*Comment

type Message

type Message struct {
	AllAttachmentsCount int        `json:"all_attachments_count"`
	AttachmentsCount    int        `json:"attachments_count"`
	Body                string     `json:"body"`
	BodyHTML            string     `json:"body_html"`
	CommentsCount       int        `json:"comments_count"`
	CreatedAt           *time.Time `json:"created_at"`
	ID                  int        `json:"id"`
	Integer             int        `json:"integer"`
	MilestoneID         int        `json:"milestone_id"`
	ParentID            int        `json:"parent_id"`
	Permalink           string     `json:"permalink"`
	ProjectID           int        `json:"project_id"`
	Title               string     `json:"title"`
	Token               string     `json:"token"`
	UpdatedAt           *time.Time `json:"updated_at"`
	UserID              int        `json:"user_id"`
	UserName            string     `json:"user_name"`
	URL                 string     `json:"url"`
	Comments            Comments   `json:"comments"`
}

type MessageCreate

type MessageCreate struct {
	Body  string `json:"body"`
	Title string `json:"title"`
}

type MessageUpdate

type MessageUpdate struct {
	Body  string `json:"body"`
	Title string `json:"title"`
}

type Messages

type Messages []*Message

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(m *Message) (*Message, error)

Only the fields in MessageCreate can be set.

func (*Service) CreateComment

func (s *Service) CreateComment(idOrTitle string, c *Comment) (*Message, error)

Only the fields in CommentCreate can be set.

func (*Service) CreateCommentByID added in v0.4.1

func (s *Service) CreateCommentByID(id int, c *Comment) (*Message, error)

Only the fields in CommentCreate can be set.

func (*Service) CreateCommentByTitle added in v0.4.1

func (s *Service) CreateCommentByTitle(title string, c *Comment) (*Message, error)

Only the fields in CommentCreate 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) (*Message, error)

func (*Service) GetByID added in v0.4.1

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

func (*Service) GetByTitle added in v0.4.1

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

func (*Service) List

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

func (*Service) New

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

func (*Service) Update

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

Only the fields in MessageUpdate can be set.

Jump to

Keyboard shortcuts

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