Documentation
¶
Overview ¶
Package comment implements functionality related to Phobos comments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateCommentInput ¶
type CreateCommentInput struct {
ThreadID *string
PipelineID *string
ReleaseID *string
Text string
}
CreateCommentInput is the input for creating a comment
type DeleteCommentInput ¶
DeleteCommentInput is the input for deleting a comment
type GetCommentsInput ¶
type GetCommentsInput struct {
// Sort specifies the field to sort on and direction
Sort *db.CommentSortableField
// PaginationOptions supports cursor based pagination
PaginationOptions *pagination.Options
// Search is used to search for a comment
Search *string
// ThreadID to filter comments by
ThreadID string
}
GetCommentsInput is the input for querying a list of comments
type GetThreadsInput ¶
type GetThreadsInput struct {
// Sort specifies the field to sort on and direction
Sort *db.ThreadSortableField
// PaginationOptions supports cursor based pagination
PaginationOptions *pagination.Options
// PipelineID filters the threads by the specified pipeline
PipelineID *string
// ReleaseID filters the threads by the specified release
ReleaseID *string
}
GetThreadsInput is the input for querying a list of threads
type Service ¶
type Service interface {
GetCommentByID(ctx context.Context, id string) (*models.Comment, error)
GetCommentsByIDs(ctx context.Context, idList []string) ([]models.Comment, error)
GetCommentByPRN(ctx context.Context, prn string) (*models.Comment, error)
GetComments(ctx context.Context, input *GetCommentsInput) (*db.CommentsResult, error)
GetThreadByID(ctx context.Context, id string) (*models.Thread, error)
GetThreadByPRN(ctx context.Context, prn string) (*models.Thread, error)
GetThreadsByIDs(ctx context.Context, idList []string) ([]models.Thread, error)
GetThreads(ctx context.Context, input *GetThreadsInput) (*db.ThreadsResult, error)
CreateComment(ctx context.Context, input *CreateCommentInput) (*models.Comment, error)
UpdateComment(ctx context.Context, input *UpdateCommentInput) (*models.Comment, error)
DeleteComment(ctx context.Context, input *DeleteCommentInput) error
SubscribeToComments(ctx context.Context, options *SubscribeToCommentsInput) (<-chan *Event, error)
}
Service implements all comment related functionality
func NewService ¶
func NewService( logger logger.Logger, dbClient *db.Client, limitChecker limits.LimitChecker, eventManager *events.EventManager, activityService activityevent.Service, ) Service
NewService returns an instance of Service
type SubscribeToCommentsInput ¶
SubscribeToCommentsInput is the input for subscribing to a single comment
type UpdateCommentInput ¶
UpdateCommentInput is the input for updating a comment
Click to show internal directories.
Click to hide internal directories.