dao

package
v0.0.0-...-6dc5add Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

Dao def

func New

func New() (d *Dao)

New create instance of Dao

func (*Dao) Categories

func (d *Dao) Categories(ctx context.Context) (list []model.Category, err error)

Categories ...

func (*Dao) ChangePass

func (d *Dao) ChangePass(ctx context.Context, operator *rest.Operator, oldPass, newPass string) error

ChangePass ...

func (*Dao) DeleteCategory

func (d *Dao) DeleteCategory(ctx context.Context, id int) (err error)

DeleteCategory delete category

func (*Dao) DeleteNote

func (d *Dao) DeleteNote(ctx context.Context, id int) (err error)

DeleteNote ...

func (*Dao) Login

func (d *Dao) Login(ctx context.Context, name, secret string) (detail model.User, err error)

Login ...

func (*Dao) Note

func (d *Dao) Note(ctx context.Context, id int) (*model.NoteDetail, error)

Note ...

func (*Dao) Notes

func (d *Dao) Notes(ctx context.Context, classifyID int, opt rest.PageOption) (total int64, list []model.NoteDetail, err error)

Notes ...

func (*Dao) Ping

func (d *Dao) Ping() (err error)

Ping ...

func (*Dao) PostCategory

func (d *Dao) PostCategory(ctx context.Context, category *model.Category) (*model.Category, error)

PostCategory add category

func (*Dao) PostNote

func (d *Dao) PostNote(ctx context.Context, detail *model.NoteDetail) (*model.NoteDetail, error)

PostNote ...

func (*Dao) PostUser

func (d *Dao) PostUser(ctx context.Context, user *model.User) (*model.User, error)

PostUser ...

func (*Dao) SearchNote

func (d *Dao) SearchNote(ctx context.Context, key string, opt rest.PageOption) (total int64, list []model.NoteDetail, err error)

SearchNote ...

func (*Dao) SyncDB

func (d *Dao) SyncDB() (err error)

SyncDB ...

Jump to

Keyboard shortcuts

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