Documentation ¶
Overview ¶
Package actions provides definitions of actions and their data
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ActionAddNote identifies a type of action for adding a note ActionAddNote = "add_note" // ActionRemoveNote identifies a type of action for removing a note ActionRemoveNote = "remove_note" // ActionEditNote identifies a type of action for editing a note ActionEditNote = "edit_note" // ActionAddBook identifies a type of action for adding a book ActionAddBook = "add_book" // ActionRemoveBook identifies a type of action for removing a book ActionRemoveBook = "remove_book" )
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { UUID string `json:"uuid"` Schema int `json:"schema"` Type string `json:"type"` Data json.RawMessage `json:"data"` Timestamp int64 `json:"timestamp"` }
Action represents an operation on a Dnote resource
type AddBookDataV1 ¶
type AddBookDataV1 struct {
BookName string `json:"book_name"`
}
AddBookDataV1 is a data for adding a book (v1)
type AddNoteDataV1 ¶
type AddNoteDataV1 struct { NoteUUID string `json:"note_uuid"` BookName string `json:"book_name"` Content string `json:"content"` }
AddNoteDataV1 is a data for adding a note (v1)
type AddNoteDataV2 ¶
type AddNoteDataV2 struct { NoteUUID string `json:"note_uuid"` BookName string `json:"book_name"` Content string `json:"content"` Public bool `json:"public"` }
AddNoteDataV2 is a data for adding a note (v2)
type EditNoteDataV1 ¶
type EditNoteDataV1 struct { NoteUUID string `json:"note_uuid"` FromBook string `json:"from_book"` ToBook string `json:"to_book"` Content string `json:"content"` }
EditNoteDataV1 is a data for editing a note (v1)
type EditNoteDataV2 ¶
type EditNoteDataV2 struct { NoteUUID string `json:"note_uuid"` FromBook string `json:"from_book"` ToBook *string `json:"to_book"` Content *string `json:"content"` Public *bool `json:"public"` }
EditNoteDataV2 is a data for editing a note (v2)
type EditNoteDataV3 ¶ added in v0.2.0
type EditNoteDataV3 struct { NoteUUID string `json:"note_uuid"` BookName *string `json:"book_name"` Content *string `json:"content"` Public *bool `json:"public"` }
EditNoteDataV3 is a data for editing a note (v2)
type RemoveBookDataV1 ¶
type RemoveBookDataV1 struct {
BookName string `json:"book_name"`
}
RemoveBookDataV1 is a data for removing a book (v1)
type RemoveNoteDataV1 ¶
type RemoveNoteDataV1 struct { NoteUUID string `json:"note_uuid"` BookName string `json:"book_name"` }
RemoveNoteDataV1 is a data for removing a note (v1)
type RemoveNoteDataV2 ¶ added in v0.2.0
type RemoveNoteDataV2 struct {
NoteUUID string `json:"note_uuid"`
}
RemoveNoteDataV2 is a data for removing a note (v2)
Click to show internal directories.
Click to hide internal directories.