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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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