repository

package
v0.0.0-...-66e7cae Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	*pgx.Conn
}

func New

func New() (Model, error)

func (Model) CreateNote

func (m Model) CreateNote(ctx context.Context, note entity.Note) (int64, error)

func (Model) CreateTag

func (m Model) CreateTag(ctx context.Context, tag entity.Tag) (int64, error)

func (Model) CreateUser

func (m Model) CreateUser(ctx context.Context, usr entity.User) (int, error)

func (Model) DeleteTag

func (m Model) DeleteTag(ctx context.Context, tag string, userID int) (int64, error)

func (Model) DeleteTagInNote

func (m Model) DeleteTagInNote(ctx context.Context, tag string, userID int) (int64, error)

func (Model) GetByNik

func (m Model) GetByNik(ctx context.Context, nik string) (entity.User, error)

func (Model) GetCategories

func (m Model) GetCategories(ctx context.Context) ([]string, error)

func (Model) GetNoteByID

func (m Model) GetNoteByID(ctx context.Context, id string, userID int) (entity.Note, error)

func (Model) GetNotes

func (m Model) GetNotes(ctx context.Context, userID int) ([]entity.Note, error)

func (Model) GetNotesByIDs

func (m Model) GetNotesByIDs(ctx context.Context, ids []string, userID int) ([]entity.Note, error)

func (Model) GetTags

func (m Model) GetTags(ctx context.Context, userID int) ([]entity.Tag, error)

func (Model) GetTagsByTag

func (m Model) GetTagsByTag(ctx context.Context, tag []string, userID int) ([]entity.Tag, error)

func (Model) UpdateNote

func (m Model) UpdateNote(ctx context.Context, note entity.Note) (int64, error)

Jump to

Keyboard shortcuts

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