models

package
v0.0.0-...-eac86dd Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	WithID(id int) Builder
	WithTask(task string) Builder
	WithCompleted(completed bool) Builder
	Build() *Todo
}

func NewBuilder

func NewBuilder() Builder

type Todo

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

func (*Todo) CompleteTodo

func (u *Todo) CompleteTodo()

func (*Todo) IsValid

func (t *Todo) IsValid() bool

func (*Todo) ToTransfer

func (u *Todo) ToTransfer() *TodoTransfer

type TodoTransfer

type TodoTransfer struct {
	ID   int    `json:"id"`
	Task string `json:"task"`
	Done *bool  `json:"completed"`
}

func (*TodoTransfer) ToModel

func (u *TodoTransfer) ToModel() *Todo

Jump to

Keyboard shortcuts

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