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

app

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

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 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)

type GroupStore

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

type IssuePatch

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

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 Service

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

func NewService

func NewService(issues IssueStore, fields ProjectFieldStore, projects ProjectStore, tags TagStore, users UserStore, groups GroupStore) *Service

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) 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) 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) RemoveTag

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

func (*Service) SetField

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

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