Documentation
¶
Overview ¶
Package pace is a Go client for the pace.dev API.
Index ¶
- type AddCommentRequest
- type AddCommentResponse
- type Card
- type CardsService
- func (s *CardsService) CreateCard(ctx context.Context, r CreateCardRequest) (*CreateCardResponse, error)
- func (s *CardsService) DeleteCard(ctx context.Context, r DeleteCardRequest) (*DeleteCardResponse, error)
- func (s *CardsService) GetCard(ctx context.Context, r GetCardRequest) (*GetCardResponse, error)
- func (s *CardsService) PutBackCard(ctx context.Context, r PutBackCardRequest) (*PutBackCardResponse, error)
- func (s *CardsService) TakeCard(ctx context.Context, r TakeCardRequest) (*TakeCardResponse, error)
- func (s *CardsService) UpdateCard(ctx context.Context, r UpdateCardRequest) (*UpdateCardResponse, error)
- func (s *CardsService) UpdateCardStatus(ctx context.Context, r UpdateCardStatusRequest) (*UpdateCardStatusResponse, error)
- type Client
- type Comment
- type CommentsService
- type CreateCardRequest
- type CreateCardResponse
- type DeleteCardRequest
- type DeleteCardResponse
- type DeleteCommentRequest
- type DeleteCommentResponse
- type File
- type GetCardRequest
- type GetCardResponse
- type Person
- type PutBackCardRequest
- type PutBackCardResponse
- type TakeCardRequest
- type TakeCardResponse
- type UpdateCardRequest
- type UpdateCardResponse
- type UpdateCardStatusRequest
- type UpdateCardStatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCommentRequest ¶
type AddCommentRequest struct {
// OrgID is the ID of the org.
OrgID string `json:"orgID"`
// TargetKind is the kind of item this comment is for. Can be "card", "message", or
// "showcase".
TargetKind string `json:"targetKind"`
// TargetID is the ID of the target.
TargetID string `json:"targetID"`
// Body is the markdown body of the comment.
Body string `json:"body"`
}
AddCommentRequest is the input object for AddComment.
type AddCommentResponse ¶
type AddCommentResponse struct {
// Comment is the comment that was created.
Comment Comment `json:"comment"`
}
AddCommentResponse is the output object for AddComment.
type Card ¶
type Card struct {
// ID is the unique ID of the card within the org.
ID string `json:"id"`
// CTime is the time this was created.
CTime string `json:"cTime"`
// MTime is the time this comment was last modified.
MTime string `json:"mTime"`
// TeamID is the ID of the team that this card belongs to.
TeamID string `json:"teamID"`
// Slug is the URL slug for this card.
Slug string `json:"slug"`
// Title is the title of the card.
Title string `json:"title"`
// Status is the current status of the card.
Status string `json:"status"`
// Author is the Person who created this card.
Author Person `json:"author"`
// Body is the markdown body of this card.
Body string `json:"body"`
// BodyHTML is the HTML rendering of the body of this card.
BodyHTML string `json:"bodyHTML"`
// Tags is a list of tags associated with this card.
Tags []string `json:"tags"`
// TakenByCurrentUser indicates whether the current user has taken this card or
// not.
TakenByCurrentUser bool `json:"takenByCurrentUser"`
// TakenByPeople is a list of people who have taken responsibility for this Card.
TakenByPeople []Person `json:"takenByPeople"`
// Files are the list of files that are attached to this Card.
Files []File `json:"files"`
}
Card is a card in Pace.
type CardsService ¶
type CardsService struct {
// contains filtered or unexported fields
}
CardsService allows you to programmatically manage cards in Pace.
func NewCardsService ¶
func NewCardsService(client *Client) *CardsService
NewCardsService makes a new client for accessing CardsService services.
func (*CardsService) CreateCard ¶
func (s *CardsService) CreateCard(ctx context.Context, r CreateCardRequest) (*CreateCardResponse, error)
CreateCard creates a new Card.
func (*CardsService) DeleteCard ¶
func (s *CardsService) DeleteCard(ctx context.Context, r DeleteCardRequest) (*DeleteCardResponse, error)
DeleteCard deletes a card.
func (*CardsService) GetCard ¶
func (s *CardsService) GetCard(ctx context.Context, r GetCardRequest) (*GetCardResponse, error)
GetCard gets a card.
func (*CardsService) PutBackCard ¶
func (s *CardsService) PutBackCard(ctx context.Context, r PutBackCardRequest) (*PutBackCardResponse, error)
PutBackCard removes a user from the list of responsbile users. Undoes TakeCard.
func (*CardsService) TakeCard ¶
func (s *CardsService) TakeCard(ctx context.Context, r TakeCardRequest) (*TakeCardResponse, error)
TakeCard takes responsibility for a card. Can be undone with PutBackCard.
func (*CardsService) UpdateCard ¶
func (s *CardsService) UpdateCard(ctx context.Context, r UpdateCardRequest) (*UpdateCardResponse, error)
UpdateCard updates the title and body of the card.
func (*CardsService) UpdateCardStatus ¶
func (s *CardsService) UpdateCardStatus(ctx context.Context, r UpdateCardStatusRequest) (*UpdateCardStatusResponse, error)
UpdateCardStatus updates a card's status.
type Client ¶
type Client struct {
// RemoteHost is the URL of the remote server that this Client should
// access. Default: https://pace.dev
RemoteHost string
// HTTPClient is the http.Client to use when making HTTP requests.
HTTPClient *http.Client
// Debug writes a line of debug log output.
Debug func(s string)
// contains filtered or unexported fields
}
Client is used to access Pace services.
type Comment ¶
type Comment struct {
// ID is the ID of the comment.
ID string `json:"id"`
// CTime is the time this was created.
CTime string `json:"cTime"`
// MTime is the time this comment was last modified.
MTime string `json:"mTime"`
// Body is the markdown body of the comment.
Body string `json:"body"`
// BodyHTML is the HTML formatted body of the comment.
BodyHTML string `json:"bodyHTML"`
// Author is the person who posted this comment.
Author Person `json:"author"`
}
Comment is a single comment in Pace.
type CommentsService ¶
type CommentsService struct {
// contains filtered or unexported fields
}
CommentsService allows you to programmatically manage comments in Pace.
func NewCommentsService ¶
func NewCommentsService(client *Client) *CommentsService
NewCommentsService makes a new client for accessing CommentsService services.
func (*CommentsService) AddComment ¶
func (s *CommentsService) AddComment(ctx context.Context, r AddCommentRequest) (*AddCommentResponse, error)
AddComment adds a comment.
func (*CommentsService) DeleteComment ¶
func (s *CommentsService) DeleteComment(ctx context.Context, r DeleteCommentRequest) (*DeleteCommentResponse, error)
DeleteComment deletes a Comment.
type CreateCardRequest ¶
type CreateCardRequest struct {
// OrgID is the org ID in which to create the card.
OrgID string `json:"orgID"`
// TeamID is the team ID in which to create the card.
TeamID string `json:"teamID"`
// Title is the title of the card.
Title string `json:"title"`
// ParentTargetKind is the kind of target to relate this card to (e.g. "card",
// "message", or "showcase")
ParentTargetKind string `json:"parentTargetKind"`
// ParentTargetID is the ID of the item to relate this new card to.
ParentTargetID string `json:"parentTargetID"`
}
CreateCardRequest is the input object for CreateCard.
type CreateCardResponse ¶
type CreateCardResponse struct {
// Card is the card that was just created.
Card Card `json:"card"`
}
CreateCardResponse is the output object for CreateCard.
type DeleteCardRequest ¶
type DeleteCardRequest struct {
// OrgID is the ID of your org.
OrgID string `json:"orgID"`
// CardID is the ID of the card to delete.
CardID string `json:"cardID"`
}
DeleteCardRequest is the input object for DeleteCard.
type DeleteCardResponse ¶
type DeleteCardResponse struct {
}
DeleteCardResponse is the output object for DeleteCard.
type DeleteCommentRequest ¶
type DeleteCommentRequest struct {
// ID is the ID of the comment to delete.
ID string `json:"id"`
// OrgID is the ID of your org.
OrgID string `json:"orgID"`
// TargetKind is the kind of target this Comment was made on. Can be "card",
// "message", or "showcase". Used to help identify the Comment.
TargetKind string `json:"targetKind"`
// TargetID is the ID of the target. Used to help identify the Comment.
TargetID string `json:"targetID"`
}
DeleteCommentRequest is the input object for DeleteComment.
type DeleteCommentResponse ¶
type DeleteCommentResponse struct {
}
DeleteCommentResponse is the output object for DeleteComment.
type File ¶
type File struct {
// ID is the identifier for this file.
ID string `json:"id"`
// CTime is the time the file was uploaded.
CTime string `json:"cTime"`
// Name is the name of the file.
Name string `json:"name"`
// Path is the path of the file.
Path string `json:"path"`
// ContentType is the type of the file.
ContentType string `json:"contentType"`
// FileType is the type of file. Can be "file", "video", "image", "audio" or
// "screenshare".
FileType string `json:"fileType"`
// Size is the size of the file in bytes.
Size int `json:"size"`
// DownloadURL URL which can be used to get the file.
DownloadURL string `json:"downloadURL"`
// ThumbnailURL is an optional thumbnail URL for this file.
ThumbnailURL string `json:"thumbnailURL"`
// Author is the person who uploaded the file.
Author Person `json:"author"`
}
File represents an attached file.
type GetCardRequest ¶
type GetCardRequest struct {
// OrgID is the ID of the org.
OrgID string `json:"orgID"`
// CardID is the ID of the card to get.
CardID string `json:"cardID"`
}
GetCardRequest is the input object for GetCard.
type GetCardResponse ¶
type GetCardResponse struct {
// Card is the card.
Card Card `json:"card"`
}
GetCardResponse is the output object for GetCard.
type Person ¶
type Person struct {
// ID is the ID of the Person.
ID string `json:"id"`
// Username is the Person's username within the org.
Username string `json:"username"`
// Name is the name of the Person.
Name string `json:"name"`
// PhotoURL is the URL of a picture of this Person.
PhotoURL string `json:"photoURL"`
}
Person is a human who uses Pace.
type PutBackCardRequest ¶
type PutBackCardRequest struct {
// OrgID is the ID of your org.
OrgID string `json:"orgID"`
// CardID is the ID of the card to unassign yourself from.
CardID string `json:"cardID"`
}
PutBackCardRequest is the input object for PutBackCard.
type PutBackCardResponse ¶
type PutBackCardResponse struct {
// Card is the newly updated Card.
Card Card `json:"card"`
}
PutBackCardResponse is the output object for PutBackCard.
type TakeCardRequest ¶
type TakeCardRequest struct {
// OrgID is the ID of your org.
OrgID string `json:"orgID"`
// CardID is the ID of the card to assign yourself to.
CardID string `json:"cardID"`
}
TakeCardRequest is the input object for TakeCard.
type TakeCardResponse ¶
type TakeCardResponse struct {
// Card is the newly updated Card.
Card Card `json:"card"`
}
TakeCardResponse is the output object for TakeCard.
type UpdateCardRequest ¶
type UpdateCardRequest struct {
// OrgID is the ID of the org.
OrgID string `json:"orgID"`
// CardID is the ID of the card to update.
CardID string `json:"cardID"`
// Title is the new title for the card.
Title string `json:"title"`
// Body is the new markdown body for the card.
Body string `json:"body"`
}
UpdateCardRequest is the input object for UpdateCard.
type UpdateCardResponse ¶
type UpdateCardResponse struct {
// Card is the recently updated Card.
Card Card `json:"card"`
}
UpdateCardResponse is the output object for UpdateCard.
type UpdateCardStatusRequest ¶
type UpdateCardStatusRequest struct {
// OrgID is the ID of the org.
OrgID string `json:"orgID"`
// CardID is the ID number of the card.
CardID string `json:"cardID"`
// Status is the new status of the card. Valid strings are "future", "next",
// "progress", "done".
Status string `json:"status"`
}
UpdateCardStatusRequest is the input object UpdateCardStatus.
type UpdateCardStatusResponse ¶
type UpdateCardStatusResponse struct {
// Card is the card that was updated.
Card Card `json:"card"`
}
UpdateCardStatusResponse is the output object for UpdateCardService.
