app

package
v0.0.0-...-18c62bb Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyTitleErr error = errors.New("Title can not be empty")
	EmptyBodyErr  error = errors.New("Body can not be empty")
	TimeZeroErr   error = errors.New("Time can not be zero")
)

Functions

This section is empty.

Types

type Note

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

func NewNote

func NewNote(title, body string, milliSecs int64) (Note, error)

func (Note) Body

func (note Note) Body() string

func (Note) CreatedAt

func (note Note) CreatedAt() time.Time

func (Note) ID

func (note Note) ID() ulid.ULID

func (Note) Title

func (note Note) Title() string

func (*Note) UpdateNote

func (note *Note) UpdateNote(title, body string) error

type Repository

type Repository interface {
	SaveNote(note Note)
	UpdateNote(note Note)
	GetNote(id ulid.ULID) (*Note, error)
	DeleteNote(id ulid.ULID)
	GetNotes(params openapi.GetNotesParams) []Note
}

Jump to

Keyboard shortcuts

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