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

app

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 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 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 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 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 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 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) *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 (*Service) AddTag

func (s *Service) AddTag(ctx context.Context, ref domain.IssueRef, name string) 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) 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) 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 (*Service) ListTags

func (s *Service) ListTags(ctx context.Context, ref domain.IssueRef) ([]domain.Tag, 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 (*Service) RemoveTag

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

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 UserStore

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

Jump to

Keyboard shortcuts

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