internal

package
v0.0.0-...-91eb443 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorf

func NewErrorf(code ErrorCode, format string, a ...interface{}) error

NewErrorf instantiates a new error.

func WrapErrorf

func WrapErrorf(orig error, code ErrorCode, format string, args ...interface{}) error

Types

type Category

type Category string

type CreateParams

type CreateParams struct {
	Description string
	Priority    Priority
	Dates       Dates
}

func (CreateParams) Validate

func (c CreateParams) Validate() error

type Dates

type Dates struct {
	Start time.Time
	Due   time.Time
}

func (Dates) Validate

func (d Dates) Validate() error

type Error

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

func (*Error) Code

func (e *Error) Code() ErrorCode

Code returns the code representing this error.

func (*Error) Error

func (e *Error) Error() string

Error returns the message, when wrapping errors the wrapped error is returned.

func (*Error) Unwrap

func (e *Error) Unwrap() error

Unwrap returns the wrapped error, if any.

type ErrorCode

type ErrorCode uint
const (
	ErrCodeUnknown ErrorCode = iota
	ErrCodeNotFound
	ErrCodeInvalidArgument
)

type Priority

type Priority int8
const (
	PriorityNone Priority = iota
	PriorityLow
	PriorityMedium
	PriorityHigh
)

func (Priority) Validate

func (p Priority) Validate() error

type SearchParams

type SearchParams struct {
	Description *string
	Priority    *Priority
	IsDone      *bool
	From        int64
	Size        int64
}

func (SearchParams) IsZero

func (s SearchParams) IsZero() bool

type SearchResults

type SearchResults struct {
	Tasks []Task
	Total int64
}

type Task

type Task struct {
	IsDone      bool
	Priority    Priority
	ID          string
	Description string
	Dates       Dates
	SubTasks    []Task
	Categories  []Category
}

func (Task) Validate

func (t Task) Validate() error

Directories

Path Synopsis
envvartesting
Code generated by counterfeiter.
Code generated by counterfeiter.
repository
resttesting
Code generated by counterfeiter.
Code generated by counterfeiter.
tools module

Jump to

Keyboard shortcuts

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