Documentation
¶
Overview ¶
Package internal defines the types used to create Tasks and their corresponding attributes.
Index ¶
- func NewErrorf(code ErrorCode, format string, a ...any) error
- func PointerToValue[T any](ptr *T) T
- func ValueToPointer[T any](value T) *T
- func WrapErrorf(orig error, code ErrorCode, format string, a ...any) error
- type Category
- type CreateParams
- type Dates
- type Error
- type ErrorCode
- type Priority
- type SearchParams
- type SearchResults
- type Task
- type UpdateParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PointerToValue ¶
func PointerToValue[T any](ptr *T) T
PointerToValue converts a pointer of type *T to the value of type T it points to. It returns the zero value of T if the pointer is nil.
func ValueToPointer ¶
func ValueToPointer[T any](value T) *T
ValueToPointer converts a value of type T to a pointer of type *T.
Types ¶
type Category ¶
type Category string
Category is human readable value meant to be used to organize your tasks. Category values are unique.
type CreateParams ¶
CreateParams defines the arguments used for creating Task records.
func (CreateParams) Validate ¶
func (c CreateParams) Validate() error
Validate indicates whether the fields are valid or not.
type Dates ¶
Dates indicates a point in time where a task starts or completes, dates are not enforced on Tasks.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents an error that could be wrapping another error, it includes a code for determining what triggered the error.
type Priority ¶
type Priority int8
Priority indicates how important a Task is.
const ( // PriorityNone indicates the task needs to be prioritized. PriorityNone Priority = iota // PriorityLow indicates a non urgent task. PriorityLow // PriorityMedium indicates a task that should be completed soon. PriorityMedium // PriorityHigh indicates an urgent task that must be completed as soon as possible. PriorityHigh )
type SearchParams ¶
type SearchParams struct {
Description *string
Priority *Priority
IsDone *bool
From int64
Size int64
}
SearchParams defines the arguments used for searching Task records.
func (SearchParams) IsZero ¶
func (a SearchParams) IsZero() bool
IsZero determines whether the search arguments have values or not.
type SearchResults ¶
SearchResults defines the collection of tasks that were found.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package elasticsearch implements the Elasticsearch repository.
|
Package elasticsearch implements the Elasticsearch repository. |
|
envvartesting
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
Package kafka implements the Kafka repository to publish events.
|
Package kafka implements the Kafka repository to publish events. |
|
Package memcached implements the memcached repository to cache tasks.
|
Package memcached implements the memcached repository to cache tasks. |
|
memcachedtesting
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
Package postgresql implements the PostgreSQL repository for tasks.
|
Package postgresql implements the PostgreSQL repository for tasks. |
|
Package rabbitmq implements the RabbitMQ repository to publish events.
|
Package rabbitmq implements the RabbitMQ repository to publish events. |
|
Package redis implements the Redis repository to publish events.
|
Package redis implements the Redis repository to publish events. |
|
Package rest provides primitives to interact with the openapi HTTP API.
|
Package rest provides primitives to interact with the openapi HTTP API. |
|
resttesting
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
servicetesting
Code generated by counterfeiter.
|
Code generated by counterfeiter. |