errors

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CreateTaskError represents an error that occurs when creating a new task
	CreateTaskError = "error creating new task"
	// DeleteTaskError represents an error that occurs when deleting a task
	DeleteTaskError = "error deleting task"
	// ListTaskError represents an error that occurs when listing tasks
	ListTaskError = "error listing tasks"
	// SearchTaskError represents an error that occurs when searching for tasks
	SearchTaskError = "error searching for tasks"
	// LoadTaskError represents an error that occurs when loading a task
	LoadTaskError = "error loading task"
	// StopRunningTaskError represents an error that occurs when stopping the running task
	StopRunningTaskError = "error stopping the running task"
	// UpdateDeletedTaskError represents an error that occurs when updating a deleted task
	UpdateDeletedTaskError = "cannot update a deleted task"
	// UndeleteTaskError represents an error that occurs when undeleting a task
	UndeleteTaskError = "error undeleting task"
	// UpdateTaskError represents an error that occurs when updating a task
	UpdateTaskError = "error updating task"
	// NoRunningTasksError represents an error that occurs when a running task was expected but not found
	NoRunningTasksError = "a task is not running"
	// OverwriteTaskByCreateError represents an error that occurs when a task is about to be overwritten by creating it again
	OverwriteTaskByCreateError = "cannot overwrite a task by creating it"
	// LoadInvalidTaskError represents an error that occurs when an attempt is made to load a task with an invalid (nonexistant) ID
	LoadInvalidTaskError = "cannot load a task that does not exist"
	// UpdateInvalidTaskError represents an error that occurs when an attempt is made to update a task with an invalid (nonexistant) ID
	UpdateInvalidTaskError = "cannot update a task that does not exist"
	// DeleteInvalidTaskError represents an error that occurs when an attempt is made to delete a task with an invalid (nonexistant) ID
	DeleteInvalidTaskError = "cannot delete a task that does not exist"
	// EmptySynopsisTaskError represents an error that occurs when a task synopsis was expected but not found
	EmptySynopsisTaskError = "cannot create a task with an empty synopsis"
	// UpdateEmptySynopsisTaskError represents an error that occurs when an attempt is made to update an existing task to have an empty synopsis
	UpdateEmptySynopsisTaskError = "cannot update a task to have an empty synopsis"
	// InvalidTaskDataError represents an error that occurs when a task is found to have invalid data
	InvalidTaskDataError = "the task is invalid"
)
View Source
const (
	// CreateTimesheetError represents an error that occurs when creating a timesheet
	CreateTimesheetError = "error creating timesheet"

	// OverwriteTimesheetByCreateError represents an error that occurs when a timesheet is about to be overwritten by creating it again
	OverwriteTimesheetByCreateError = "cannot overwrite a timesheet by creating it"
	// TimesheetWithoutTaskError represents an error that occurs when executing an operation on a timesheet that does not have a linked task
	TimesheetWithoutTaskError = "no task is associated with the timesheet"
	// ListTimesheetError represents an error that occurs when timesheets are listed
	ListTimesheetError = "error listing timesheets"
	// LoadInvalidTimesheetError represents an error that occurs when an attempt is made to load a timesheet with an invalid (nonexistant) ID
	LoadInvalidTimesheetError = "cannot load a timesheet that does not exist"
	// UpdateInvalidTimesheetError represents an error that occurs when an attempt is made to update a timesheet with an invalid (nonexistant) ID
	UpdateInvalidTimesheetError = "cannot update a timesheet that does not exist"
	// DeleteInvalidTimesheetError represents an error that occurs when an attempt is made to delete a timesheet with an invalid (nonexistant) ID
	DeleteInvalidTimesheetError = "cannot delete a timesheet that does not exist"
)
View Source
const (
	// ScanNowIntoSQLNullTimeError describes an error that occurs when scanning time.Now() into a sql.NullTime object
	ScanNowIntoSQLNullTimeError = "error scanning time.Now() into sql.NullTime"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrInvalidTaskData

type ErrInvalidTaskData struct{}

func (ErrInvalidTaskData) Error

func (e ErrInvalidTaskData) Error() string

type ErrInvalidTaskState

type ErrInvalidTaskState struct {
	Details string
}

ErrInvalidTaskState represents an error that occurs when a task is in an invalid state

func (ErrInvalidTaskState) Error

func (e ErrInvalidTaskState) Error() string

type ErrInvalidTimesheetState

type ErrInvalidTimesheetState struct {
	// Details is any extra information related to the error
	Details string
}

ErrInvalidTimesheetState represents an error that occurs when an timesheet is in an invalid state

func (ErrInvalidTimesheetState) Error

func (e ErrInvalidTimesheetState) Error() string

type ErrNoRunningTask

type ErrNoRunningTask struct{}

ErrNoRunningTask represents an error that occurs when a running task was expected but not found

func (ErrNoRunningTask) Error

func (e ErrNoRunningTask) Error() string

type ErrPidfileNotFound

type ErrPidfileNotFound struct {
	PidfilePath string
}

ErrPidfileNotFound represents an error that occurs when a Process ID (PID) file cannot be found

func (*ErrPidfileNotFound) Error

func (e *ErrPidfileNotFound) Error() string

type ErrScanNowIntoSQLNull

type ErrScanNowIntoSQLNull struct {
	// Wrapped is a Wrapped error
	Wrapped error
}

ErrScanNowIntoSQLNull represents an error that occurs when scanning time.Now() into a sql.NullTime object

func (ErrScanNowIntoSQLNull) Error

func (e ErrScanNowIntoSQLNull) Error() string

func (ErrScanNowIntoSQLNull) Unwrap

func (e ErrScanNowIntoSQLNull) Unwrap() error

Unwrap implements a Wrapped error

type InvalidTaskReportEndDate

type InvalidTaskReportEndDate struct {
	Wrapped error
	EndDate string
}

func (InvalidTaskReportEndDate) Error

func (e InvalidTaskReportEndDate) Error() string

func (InvalidTaskReportEndDate) Unwrap

func (e InvalidTaskReportEndDate) Unwrap() error

type InvalidTaskReportStartDate

type InvalidTaskReportStartDate struct {
	Wrapped   error
	StartDate string
}

func (InvalidTaskReportStartDate) Error

func (InvalidTaskReportStartDate) Unwrap

func (e InvalidTaskReportStartDate) Unwrap() error

Jump to

Keyboard shortcuts

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