storage

package
v0.0.0-...-d0fb70c Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoteListNotFound = errors.New("requested note-list does not exists")
View Source
var ErrNoteNotFound = errors.New("requested note does not exists")

Functions

This section is empty.

Types

type Note

type Note struct {
	ID          int32
	Name        string
	Description string
	ListID      int32
}

type Postgres

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

func New

func New(dsn string) (Postgres, error)

func (Postgres) Close

func (p Postgres) Close()

func (Postgres) CreateNote

func (p Postgres) CreateNote(note Note, authorizations []string) (int32, error)

func (Postgres) DeleteNote

func (p Postgres) DeleteNote(noteID int32, authorizations []string) error

func (Postgres) Note

func (p Postgres) Note(noteID int32, authorizations []string) (Note, error)

func (Postgres) UpdateNote

func (p Postgres) UpdateNote(note Note, authorizations []string) error

Jump to

Keyboard shortcuts

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