comment

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIPathCreateComment = "/open_api/:project_key/work_item/:work_item_type_key/:work_item_id/comment/create"
View Source
const APIPathDeleteComment = "/open_api/:project_key/work_item/:work_item_type_key/:work_item_id/comment/:comment_id"
View Source
const APIPathQueryComments = "/open_api/:project_key/work_item/:work_item_type_key/:work_item_id/comments"
View Source
const APIPathUpdateComment = "/open_api/:project_key/work_item/:work_item_type_key/:work_item_id/comment/:comment_id"

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID int64 `json:"id"`

	WorkItemID int64 `json:"work_item_id"`

	WorkItemTypeKey string `json:"work_item_type_key"`

	CreatedAt int64 `json:"created_at"`

	Operator string `json:"operator"`

	Content string `json:"content"`
}

type CommentService

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

func NewService

func NewService(config *core.Config) *CommentService

func (*CommentService) CreateComment

func (a *CommentService) CreateComment(ctx context.Context, req *CreateCommentReq, options ...core.RequestOptionFunc) (*CreateCommentResp, error)

添加评论

func (*CommentService) DeleteComment

func (a *CommentService) DeleteComment(ctx context.Context, req *DeleteCommentReq, options ...core.RequestOptionFunc) (*DeleteCommentResp, error)

删除评论

func (*CommentService) QueryComments

func (a *CommentService) QueryComments(ctx context.Context, req *QueryCommentsReq, options ...core.RequestOptionFunc) (*QueryCommentsResp, error)

查询评论

func (*CommentService) UpdateComment

func (a *CommentService) UpdateComment(ctx context.Context, req *UpdateCommentReq, options ...core.RequestOptionFunc) (*UpdateCommentResp, error)

更新评论

type CreateCommentReq

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

type CreateCommentReqBody

type CreateCommentReqBody struct {
	Content  string        `json:"content"`
	RichText []interface{} `json:"rich_text"`
}

type CreateCommentReqBuilder

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

func NewCreateCommentReqBuilder

func NewCreateCommentReqBuilder() *CreateCommentReqBuilder

func (*CreateCommentReqBuilder) Build

func (builder *CreateCommentReqBuilder) Build() *CreateCommentReq

func (*CreateCommentReqBuilder) Content

func (builder *CreateCommentReqBuilder) Content(content string) *CreateCommentReqBuilder

func (*CreateCommentReqBuilder) ProjectKey

func (builder *CreateCommentReqBuilder) ProjectKey(projectKey string) *CreateCommentReqBuilder

func (*CreateCommentReqBuilder) RichTest added in v1.0.12

func (builder *CreateCommentReqBuilder) RichTest(r []interface{}) *CreateCommentReqBuilder

func (*CreateCommentReqBuilder) WorkItemID

func (builder *CreateCommentReqBuilder) WorkItemID(workItemID int64) *CreateCommentReqBuilder

func (*CreateCommentReqBuilder) WorkItemTypeKey

func (builder *CreateCommentReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateCommentReqBuilder

type CreateCommentResp

type CreateCommentResp struct {
	*core.APIResp `json:"-"`
	core.CodeError
	Data int64 `json:"data"`
}

type DeleteCommentReq

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

type DeleteCommentReqBuilder

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

func NewDeleteCommentReqBuilder

func NewDeleteCommentReqBuilder() *DeleteCommentReqBuilder

func (*DeleteCommentReqBuilder) Build

func (builder *DeleteCommentReqBuilder) Build() *DeleteCommentReq

func (*DeleteCommentReqBuilder) CommentID

func (builder *DeleteCommentReqBuilder) CommentID(commentID int64) *DeleteCommentReqBuilder

func (*DeleteCommentReqBuilder) ProjectKey

func (builder *DeleteCommentReqBuilder) ProjectKey(projectKey string) *DeleteCommentReqBuilder

func (*DeleteCommentReqBuilder) WorkItemID

func (builder *DeleteCommentReqBuilder) WorkItemID(workItemID int64) *DeleteCommentReqBuilder

func (*DeleteCommentReqBuilder) WorkItemTypeKey

func (builder *DeleteCommentReqBuilder) WorkItemTypeKey(workItemTypeKey string) *DeleteCommentReqBuilder

type DeleteCommentResp

type DeleteCommentResp struct {
	*core.APIResp `json:"-"`
	core.CodeError
}

type QueryCommentsReq

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

type QueryCommentsReqBuilder

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

func NewQueryCommentsReqBuilder

func NewQueryCommentsReqBuilder() *QueryCommentsReqBuilder

func (*QueryCommentsReqBuilder) Build

func (builder *QueryCommentsReqBuilder) Build() *QueryCommentsReq

func (*QueryCommentsReqBuilder) PageNum

func (builder *QueryCommentsReqBuilder) PageNum(pageNum int64) *QueryCommentsReqBuilder

func (*QueryCommentsReqBuilder) PageSize

func (builder *QueryCommentsReqBuilder) PageSize(pageSize int64) *QueryCommentsReqBuilder

func (*QueryCommentsReqBuilder) ProjectKey

func (builder *QueryCommentsReqBuilder) ProjectKey(projectKey string) *QueryCommentsReqBuilder

func (*QueryCommentsReqBuilder) WorkItemID

func (builder *QueryCommentsReqBuilder) WorkItemID(workItemID int64) *QueryCommentsReqBuilder

func (*QueryCommentsReqBuilder) WorkItemTypeKey

func (builder *QueryCommentsReqBuilder) WorkItemTypeKey(workItemTypeKey string) *QueryCommentsReqBuilder

type QueryCommentsResp

type QueryCommentsResp struct {
	*core.APIResp `json:"-"`
	core.CodeError
	Data []*Comment `json:"data"`

	Pagination *common.Pagination `json:"pagination"`
}

type UpdateCommentReq

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

type UpdateCommentReqBody

type UpdateCommentReqBody struct {
	Content string `json:"content"`
}

type UpdateCommentReqBuilder

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

func NewUpdateCommentReqBuilder

func NewUpdateCommentReqBuilder() *UpdateCommentReqBuilder

func (*UpdateCommentReqBuilder) Build

func (builder *UpdateCommentReqBuilder) Build() *UpdateCommentReq

func (*UpdateCommentReqBuilder) CommentID

func (builder *UpdateCommentReqBuilder) CommentID(commentID int64) *UpdateCommentReqBuilder

func (*UpdateCommentReqBuilder) Content

func (builder *UpdateCommentReqBuilder) Content(content string) *UpdateCommentReqBuilder

func (*UpdateCommentReqBuilder) ProjectKey

func (builder *UpdateCommentReqBuilder) ProjectKey(projectKey string) *UpdateCommentReqBuilder

func (*UpdateCommentReqBuilder) WorkItemID

func (builder *UpdateCommentReqBuilder) WorkItemID(workItemID int64) *UpdateCommentReqBuilder

func (*UpdateCommentReqBuilder) WorkItemTypeKey

func (builder *UpdateCommentReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateCommentReqBuilder

type UpdateCommentResp

type UpdateCommentResp struct {
	*core.APIResp `json:"-"`
	core.CodeError
}

Jump to

Keyboard shortcuts

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