data

package
v0.0.0-...-7cd8536 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 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 DB

type DB interface {
	New() DB
	Notes() NotesQ
}

type Note

type Note struct {
	ID        int64     `db:"id" structs:"-"`
	Content   string    `db:"content" structs:"content"`
	CreatedAt time.Time `db:"created_at" structs:"created_at"`
}

type NoteSelector

type NoteSelector struct {
	PageParams pgdb.OffsetPageParams
	ID         []int64
	Content    []string
	CreatedAt  []string
}

type NotesQ

type NotesQ interface {
	New() NotesQ
	Insert(notes ...Note) ([]int64, error)
	Select(selector NoteSelector) ([]Note, error)
	Get(id int64) (*Note, error)
	Delete(id int64) error
	UpdateContent(id int64, newContent string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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