models

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: MIT Imports: 2 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 {
	Title       string    `json:"title,omitempty"`
	Description string    `json:"description,omitempty"`
	IsCompleted bool      `json:"isCompleted,omitempty"`
	CreatedAt   time.Time `json:"createdAt,omitempty"`
	CompletedAt time.Time `json:"completedAt,omitempty"`
}

func NewTask added in v0.4.3

func NewTask(title, description string) *Task

func (*Task) AppendDescription

func (task *Task) AppendDescription(text string) string

func (*Task) SetComplete

func (task *Task) SetComplete()

func (*Task) SetUncomplete

func (task *Task) SetUncomplete()

func (Task) String

func (task Task) String() string

func (*Task) UpdateDescription added in v0.4.3

func (task *Task) UpdateDescription(newDescription string) string

func (*Task) UpdateTitle

func (task *Task) UpdateTitle(newTitle string) string

Jump to

Keyboard shortcuts

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