Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPageLimit = 50

Variables

This section is empty.

Functions

func Ambiguousf

func Ambiguousf(format string, args ...any) error

func Authf

func Authf(format string, args ...any) error

func NotFoundf

func NotFoundf(format string, args ...any) error

func Runtimef

func Runtimef(format string, args ...any) error

func Validationf

func Validationf(format string, args ...any) error

Types

type AddWorkItemRequest added in v0.4.0

type AddWorkItemRequest struct {
	Duration string
	Date     string
	Text     *string
	Type     *string
	Author   *string
}

type BoardStore added in v0.2.0

type BoardStore interface {
	ListBoards(context.Context) ([]domain.Board, error)
	ValidateIssueBoardChange(context.Context, string, []domain.Board, []domain.Board) error
	ApplyIssueBoardChange(context.Context, string, []domain.Board, []domain.Board) error
}

type CommentStore added in v0.3.0

type CommentStore interface {
	ListComments(context.Context, domain.IssueRef, Page) ([]domain.Comment, error)
	CreateComment(context.Context, domain.IssueRef, string) (domain.Comment, error)
	EditComment(context.Context, domain.IssueRef, string, string) (domain.Comment, error)
	SoftRemoveComment(context.Context, domain.IssueRef, string) error
}

type CreateIssueRequest added in v0.3.0

type CreateIssueRequest struct {
	Project     domain.ProjectRef
	Summary     string
	Description *string
	Fields      []FieldInput
	Tags        []string
}

type EditRequest

type EditRequest struct {
	Summary     *string
	Description *string
	Fields      []FieldInput
	AddTags     []string
	RemoveTags  []string
}

type EditWorkItemRequest added in v0.4.0

type EditWorkItemRequest struct {
	Duration  *string
	Date      *string
	Text      *string
	Type      *string
	ClearType bool
	Author    *string
}

type Error

type Error struct {
	Kind    ErrorKind
	Message string
	Err     error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorKind

type ErrorKind int
const (
	ErrorRuntime ErrorKind = iota
	ErrorValidation
	ErrorAuth
	ErrorNotFound
	ErrorAmbiguous
)

func KindOf

func KindOf(err error) ErrorKind

type FieldAssignment

type FieldAssignment struct {
	Field domain.FieldDefinition
	Value domain.FieldValue
}

type FieldInput

type FieldInput struct {
	Name  string
	Value string
}

type FieldResolver

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

func NewFieldResolver

func NewFieldResolver(fields ProjectFieldStore, users UserStore, groups GroupStore) *FieldResolver

func (*FieldResolver) Definitions

func (r *FieldResolver) Definitions(ctx context.Context, projectID string) ([]domain.FieldDefinition, error)

func (*FieldResolver) Resolve

func (r *FieldResolver) Resolve(ctx context.Context, issue domain.Issue, ref domain.FieldRef, values []string, clear bool) (FieldAssignment, error)

func (*FieldResolver) ResolveForProject added in v0.3.0

func (r *FieldResolver) ResolveForProject(ctx context.Context, project domain.Project, ref domain.FieldRef, values []string) (FieldAssignment, error)

type GroupStore

type GroupStore interface {
	SearchGroups(context.Context, string) ([]domain.Group, error)
}

type IssueCreate added in v0.3.0

type IssueCreate struct {
	Project     domain.Project
	Summary     string
	Description *string
	Fields      []FieldAssignment
	Tags        []domain.Tag
}

type IssueCreator added in v0.3.0

type IssueCreator interface {
	CreateIssue(context.Context, IssueCreate) (domain.Issue, error)
}

type IssueIdentityStore added in v0.4.0

type IssueIdentityStore interface {
	GetIssueIdentity(context.Context, domain.IssueRef) (domain.IssueIdentity, error)
}

type IssuePatch

type IssuePatch struct {
	Summary     *string
	Description *string
	Fields      []FieldAssignment
	Tags        *[]domain.Tag
}

func (IssuePatch) Empty added in v0.2.0

func (p IssuePatch) Empty() bool

type IssueSearchStore added in v0.3.0

type IssueSearchStore interface {
	SearchIssues(context.Context, string, Page) ([]domain.IssueSummary, error)
}

type LinkRelationReference added in v0.4.0

type LinkRelationReference struct {
	Type      string
	Direction *string
}

type LinkStore added in v0.4.0

type Page added in v0.3.0

type Page struct {
	Offset int
	Limit  int
}

type PageRequest added in v0.3.0

type PageRequest struct {
	Offset int
	Limit  *int
	All    bool
}

func (PageRequest) Validate added in v0.3.0

func (r PageRequest) Validate() error

type ProjectFieldStore

type ProjectFieldStore interface {
	ListProjectFields(context.Context, string) ([]domain.FieldDefinition, error)
	ListFieldOptions(context.Context, string, domain.FieldDefinition) ([]domain.FieldOption, error)
	ListFieldUsers(context.Context, string, domain.FieldDefinition) ([]domain.User, error)
}

type ProjectStore

type ProjectStore interface {
	GetProject(context.Context, domain.ProjectRef) (domain.Project, error)
	SearchProjects(context.Context, string) ([]domain.Project, error)
}

type ProjectTimeTrackingStore added in v0.4.0

type ProjectTimeTrackingStore interface {
	TimeTrackingEnabled(context.Context, string) (bool, error)
	ListWorkItemTypes(context.Context, string, Page) ([]domain.WorkItemType, error)
}

type RawAPI

type RawAPI interface {
	DoRaw(context.Context, string, string, []byte, http.Header) (RawResponse, error)
}

type RawResponse

type RawResponse struct {
	StatusCode int
	Header     http.Header
	Body       []byte
}

type SavedSearchStore added in v0.3.0

type SavedSearchStore interface {
	GetSavedSearch(context.Context, string) (domain.SavedSearch, error)
	ListSavedSearches(context.Context, Page) ([]domain.SavedSearch, error)
}

type SavedSearchView added in v0.3.0

type SavedSearchView struct {
	Search domain.SavedSearch
	Issues []domain.IssueSummary
}

type Service

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

func NewService

func NewService(issues IssueStore, creator IssueCreator, issueSearch IssueSearchStore, savedSearches SavedSearchStore, fields ProjectFieldStore, projects ProjectStore, tags TagStore, users UserStore, groups GroupStore, boards BoardStore, comments CommentStore, workItems WorkItemStore, timeTracking ProjectTimeTrackingStore, userDirectory UserDirectoryStore, issueIdentity IssueIdentityStore, links LinkStore) *Service

func (*Service) AddComment added in v0.3.0

func (s *Service) AddComment(ctx context.Context, issue domain.IssueRef, text string) (domain.Comment, error)
func (s *Service) AddIssueLink(ctx context.Context, source, target domain.IssueRef, reference LinkRelationReference) (domain.IssueLinkChange, error)

func (*Service) AddTag

func (s *Service) AddTag(ctx context.Context, ref domain.IssueRef, name string) error

func (*Service) AddWorkItem added in v0.4.0

func (s *Service) AddWorkItem(ctx context.Context, ref domain.IssueRef, request AddWorkItemRequest) (domain.WorkItem, error)

func (*Service) ClearField

func (s *Service) ClearField(ctx context.Context, ref domain.IssueRef, field domain.FieldRef) (domain.Issue, error)

func (*Service) CreateIssue added in v0.3.0

func (s *Service) CreateIssue(ctx context.Context, req CreateIssueRequest) (domain.Issue, error)

func (*Service) EditComment added in v0.3.0

func (s *Service) EditComment(ctx context.Context, issue domain.IssueRef, commentID, text string) (domain.Comment, error)

func (*Service) EditIssue

func (s *Service) EditIssue(ctx context.Context, ref domain.IssueRef, req EditRequest) (domain.Issue, error)

func (*Service) EditWorkItem added in v0.4.0

func (s *Service) EditWorkItem(ctx context.Context, ref domain.IssueRef, itemID string, request EditWorkItemRequest) (domain.WorkItem, error)

func (*Service) GetField

func (s *Service) GetField(ctx context.Context, ref domain.IssueRef, field domain.FieldRef) (domain.IssueField, error)

func (*Service) GetIssue

func (s *Service) GetIssue(ctx context.Context, ref domain.IssueRef) (domain.Issue, error)

func (*Service) GetWorkItem added in v0.4.0

func (s *Service) GetWorkItem(ctx context.Context, ref domain.IssueRef, itemID string) (domain.WorkItem, error)

func (*Service) ListComments added in v0.3.0

func (s *Service) ListComments(ctx context.Context, issue domain.IssueRef, request PageRequest) ([]domain.Comment, error)

func (*Service) ListFields

func (s *Service) ListFields(ctx context.Context, ref domain.IssueRef) ([]domain.IssueField, error)
func (s *Service) ListIssueLinks(ctx context.Context, source domain.IssueRef, reference LinkRelationReference, request PageRequest) (domain.IssueLinkList, error)

func (*Service) ListLinkTypes added in v0.4.0

func (s *Service) ListLinkTypes(ctx context.Context, request PageRequest) ([]domain.LinkType, error)

func (*Service) ListTags

func (s *Service) ListTags(ctx context.Context, ref domain.IssueRef) ([]domain.Tag, error)

func (*Service) ListWorkItemTypes added in v0.4.0

func (s *Service) ListWorkItemTypes(ctx context.Context, ref domain.IssueRef, request PageRequest) ([]domain.WorkItemType, error)

func (*Service) ListWorkItems added in v0.4.0

func (s *Service) ListWorkItems(ctx context.Context, ref domain.IssueRef, request PageRequest) ([]domain.WorkItem, error)

func (*Service) MoveIssue

func (s *Service) MoveIssue(ctx context.Context, ref domain.IssueRef, projectRef domain.ProjectRef) (domain.Issue, error)

func (*Service) RemoveComment added in v0.3.0

func (s *Service) RemoveComment(ctx context.Context, issue domain.IssueRef, commentID string) error
func (s *Service) RemoveIssueLink(ctx context.Context, source, target domain.IssueRef, reference LinkRelationReference) (domain.IssueLinkChange, error)

func (*Service) RemoveTag

func (s *Service) RemoveTag(ctx context.Context, ref domain.IssueRef, name string) error

func (*Service) RemoveWorkItem added in v0.4.0

func (s *Service) RemoveWorkItem(ctx context.Context, ref domain.IssueRef, itemID string) (string, error)

func (*Service) ResolveIssueIdentity added in v0.4.0

func (s *Service) ResolveIssueIdentity(ctx context.Context, ref domain.IssueRef) (domain.IssueIdentity, error)

ResolveIssueIdentity resolves canonical issue identity without loading issue details.

func (*Service) ResolveSavedSearch added in v0.4.0

func (s *Service) ResolveSavedSearch(ctx context.Context, ref string) (domain.SavedSearch, error)

ResolveSavedSearch resolves saved-search metadata without executing its query.

func (*Service) SearchIssues added in v0.3.0

func (s *Service) SearchIssues(ctx context.Context, query string, request PageRequest) ([]domain.IssueSummary, error)

func (*Service) SetField

func (s *Service) SetField(ctx context.Context, ref domain.IssueRef, field domain.FieldRef, values []string) (domain.Issue, error)

func (*Service) ViewSavedSearch added in v0.3.0

func (s *Service) ViewSavedSearch(ctx context.Context, ref string, request PageRequest) (SavedSearchView, error)

ViewSavedSearch resolves a visible saved search then executes its stored query.

type TagStore

type TagStore interface {
	SearchTags(context.Context, string) ([]domain.Tag, error)
}

type UserDirectoryStore added in v0.4.0

type UserDirectoryStore interface {
	ListUsers(context.Context, Page) ([]domain.User, error)
}

type UserStore

type UserStore interface {
	Me(context.Context) (domain.User, error)
}

type WorkItemCreate added in v0.4.0

type WorkItemCreate struct {
	Date            time.Time
	DurationMinutes int64
	Text            *string
	Type            *domain.WorkItemType
	Author          *domain.User
}

type WorkItemPatch added in v0.4.0

type WorkItemPatch struct {
	DurationMinutes *int64
	Date            *time.Time
	Text            *string
	Type            WorkItemTypePatch
	Author          *domain.User
}

type WorkItemStore added in v0.4.0

type WorkItemTypePatch added in v0.4.0

type WorkItemTypePatch struct {
	Set   bool
	Value *domain.WorkItemType
}

Jump to

Keyboard shortcuts

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