domain

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	gorm.Model
	Title       string `validate:"required,min=3"`
	Description string
	Deadline    *time.Time
	CompletedAt *time.Time
}

Task defines the scope of an action a User implements in their tasks dashboard.

func (*Task) API

func (t *Task) API() *tasksv1.Task

API converts this Task to a tasksv1.Task.

func (*Task) FromCreateRequest

func (t *Task) FromCreateRequest(request *tasksv1.CreateTaskRequest) error

FromCreateRequest fills out the information of the current Task from the given tasksv1.CreateTaskRequest

func (*Task) JSON

func (t *Task) JSON() ([]byte, error)

JSON converts this Task to a slice of bytes in JSON format.

func (*Task) YAML

func (t *Task) YAML() ([]byte, error)

YAML converts this Task to a slice of bytes in YAML format.

Jump to

Keyboard shortcuts

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