Documentation
¶
Index ¶
- type Dao
- func (d *Dao) Categories(ctx context.Context) (list []model.Category, err error)
- func (d *Dao) ChangePass(ctx context.Context, operator *rest.Operator, oldPass, newPass string) error
- func (d *Dao) DeleteCategory(ctx context.Context, id int) (err error)
- func (d *Dao) DeleteNote(ctx context.Context, id int) (err error)
- func (d *Dao) Login(ctx context.Context, name, secret string) (detail model.User, err error)
- func (d *Dao) Note(ctx context.Context, id int) (*model.NoteDetail, error)
- func (d *Dao) Notes(ctx context.Context, classifyID int, opt rest.PageOption) (total int64, list []model.NoteDetail, err error)
- func (d *Dao) Ping() (err error)
- func (d *Dao) PostCategory(ctx context.Context, category *model.Category) (*model.Category, error)
- func (d *Dao) PostNote(ctx context.Context, detail *model.NoteDetail) (*model.NoteDetail, error)
- func (d *Dao) PostUser(ctx context.Context, user *model.User) (*model.User, error)
- func (d *Dao) SearchNote(ctx context.Context, key string, opt rest.PageOption) (total int64, list []model.NoteDetail, err error)
- func (d *Dao) SyncDB() (err error)
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 (*Dao) Categories ¶
Categories ...
func (*Dao) ChangePass ¶
func (d *Dao) ChangePass(ctx context.Context, operator *rest.Operator, oldPass, newPass string) error
ChangePass ...
func (*Dao) DeleteCategory ¶
DeleteCategory delete category
func (*Dao) DeleteNote ¶
DeleteNote ...
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) PostCategory ¶
PostCategory add category
func (*Dao) PostNote ¶
func (d *Dao) PostNote(ctx context.Context, detail *model.NoteDetail) (*model.NoteDetail, error)
PostNote ...
func (*Dao) SearchNote ¶
func (d *Dao) SearchNote(ctx context.Context, key string, opt rest.PageOption) (total int64, list []model.NoteDetail, err error)
SearchNote ...
Click to show internal directories.
Click to hide internal directories.