Documentation
¶
Index ¶
- type MongoDB
- func (d *MongoDB) Create(data Note) (Note, error)
- func (d *MongoDB) Delete(id string) (Note, error)
- func (d *MongoDB) Get(id string) (Note, error)
- func (d *MongoDB) List(filter, sort string, tags []string) ([]Note, error)
- func (d *MongoDB) Tags() ([]string, error)
- func (d *MongoDB) Update(note Note) error
- type Note
- type NoteNoID
- type NotesDatabase
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Note ¶
type Note struct { ID primitive.ObjectID `bson:"_id" json:"id,omitempty"` Content string `bson:"content" json:"content"` Title string `bson:"title" json:"title"` Created int `bson:"created" json:"created,omitempty"` Updated int `bson:"updated" json:"updated,omitempty"` Score int `bson:"_score" json:"_score,omitempty"` Tags []string `bson:"tags" json:"tags,omitempty"` Response *Response `bson:"api_response" json:"api_response,omitempty"` Error string `bson:"error" json:"error,omitempty"` }
Click to show internal directories.
Click to hide internal directories.