Documentation ¶
Index ¶
- Variables
- type Box
- func (d *Box) CleanHistoryOf(key string) error
- func (d *Box) CleanHistoryOfAll() error
- func (d *Box) Delete(key string) error
- func (d *Box) DeleteGroup(name string) error
- func (d *Box) DeleteGroupWithRelated(name string) error
- func (d *Box) Get(key string) (Note, error)
- func (d *Box) GetGroups() []string
- func (d *Box) GetHistoryOf(key string) ([]Change, error)
- func (d *Box) GetLastKey() string
- func (d *Box) GetMainKey() (string, error)
- func (d *Box) GroupExists(name string) bool
- func (d *Box) GroupOf(key string) (string, error)
- func (d *Box) List() []NoteView
- func (d *Box) ListAllKeys() []string
- func (d *Box) MainAlreadyExists() bool
- func (d *Box) ManyNewFrom(notes []Note) ([]string, error)
- func (d *Box) ModifyAssignedGroup(key, name string) error
- func (d *Box) ModifyContent(key string, content string) error
- func (d *Box) ModifyGroupName(oldName, newName string) error
- func (d *Box) ModifyTag(key string, tag string) error
- func (d *Box) ModifyType(key string, sType string) error
- func (d *Box) New(content, contentType string) (string, error)
- func (d *Box) NewFrom(note Note) (string, error)
- func (d *Box) NewGroup(name string) error
- func (d *Box) NewWithTag(content, contentType, tag string) (string, error)
- func (d *Box) RemoveFromAssignedGroup(key string) error
- func (d *Box) Replace(key string, note Note) error
- func (d *Box) ReplaceBox(box BoxData)
- func (d *Box) ResetTo(key, subKey string) error
- func (d *Box) ResetToBefore(key string) error
- func (d *Box) ResetToWithDeletions(key, subKey string) error
- func (d *Box) SearchByKeyPattern(pattern string) (string, Note, error)
- func (d *Box) SearchByKeyTagPattern(pattern string) (string, Note, error)
- func (d *Box) TagAlreadyExists(tag string) bool
- func (d *Box) TagIsValid(tag string) error
- type BoxData
- type Change
- type Note
- type NoteView
- type SetModifier
- type Window
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMainAlreadyExists error = errors.New("main note already exists") ErrGroupAlreadyExists error = errors.New("group already exists") ErrMainSetNotFound error = errors.New("main note not found") ErrTagAlreadyExists error = errors.New("tag already exists") ErrInvalidNoteType error = errors.New("invalid note type") ErrTagNotProvided error = errors.New("tag not provided") ErrGroupNotFound error = errors.New("group not found") ErrNoteNotFound error = errors.New("note not found") ErrKeyNotFound error = errors.New("key not found") ErrTagInvalid error = errors.New("tag invalid") )
Functions ¶
This section is empty.
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
func (*Box) CleanHistoryOf ¶
func (*Box) CleanHistoryOfAll ¶
func (*Box) DeleteGroup ¶
func (*Box) DeleteGroupWithRelated ¶
func (*Box) GetLastKey ¶
func (*Box) GetMainKey ¶
func (*Box) GroupExists ¶
func (*Box) ListAllKeys ¶
func (*Box) MainAlreadyExists ¶
func (*Box) ModifyAssignedGroup ¶
func (*Box) ModifyGroupName ¶
func (*Box) RemoveFromAssignedGroup ¶
func (*Box) ReplaceBox ¶
func (*Box) ResetToBefore ¶
func (*Box) ResetToWithDeletions ¶
func (*Box) SearchByKeyPattern ¶
func (*Box) SearchByKeyTagPattern ¶
func (*Box) TagAlreadyExists ¶
func (*Box) TagIsValid ¶
type BoxData ¶
type BoxData struct { LastAccess string `json:"lastSet"` NaoSet map[string]Note `json:"naoSet"` Groups []string `json:"groups"` }
func JustLoadBox ¶
func JustLoadBox() BoxData
type Note ¶
type Note struct { Tag string `json:"tag,omitempty"` Type string `json:"type"` ShadowType string `json:"shadowType"` Group string `json:"group"` Content string `json:"content"` Extension string `json:"extension,omitempty"` History []Change `json:"history"` Title string `json:"title,omitempty"` LastUpdate time.Time `json:"lastUpdate"` Version int `json:"version"` }
type NoteView ¶
type NoteView struct { Tag string `json:"tag"` Key string `json:"key"` Type string `json:"type"` Size string `json:"size"` Content string `json:"content"` Group string `json:"group"` Title string `json:"title"` Extension string `json:"extension"` LastUpdate time.Time `json:"lastUpdate"` Version int `json:"version"` }
type SetModifier ¶
Click to show internal directories.
Click to hide internal directories.