Documentation
¶
Index ¶
- Constants
- Variables
- func Link(sid, ref string) string
- func Merge(old, v json.RawMessage) json.RawMessage
- func Name(s string) string
- func Ref(name, at string) (string, error)
- func Slug(s string) string
- func Target(path string) (string, error)
- type Page
- type Store
- func (st *Store) All() []Page
- func (st *Store) Get(sid, name string) (Page, bool)
- func (st *Store) Of(sid string) []Page
- func (st *Store) Owners() []string
- func (st *Store) Remove(sid, name string) (bool, error)
- func (st *Store) SetState(sid, name string, v json.RawMessage) error
- func (st *Store) Show(p Page) (Page, bool, error)
- func (st *Store) State(sid, name string) json.RawMessage
Constants ¶
View Source
const MaxState = 256 << 10
Variables ¶
View Source
var ErrAt = errors.New("a section is an element id: letters, digits and - _ . :")
View Source
var ErrTooBig = errors.New("state is at most 256 KB")
Functions ¶
func Merge ¶
func Merge(old, v json.RawMessage) json.RawMessage
Types ¶
type Page ¶
type Page struct {
Session string `json:"session"`
Name string `json:"name"`
Title string `json:"title,omitempty"`
Path string `json:"path"`
Note string `json:"note,omitempty"`
At string `json:"at,omitempty"`
Shown time.Time `json:"shown"`
Kind string `json:"kind,omitempty"`
Updated time.Time `json:"updated,omitzero"`
StateAt time.Time `json:"stateAt,omitzero"`
Size int64 `json:"size,omitempty"`
Gone bool `json:"gone,omitempty"`
URL string `json:"url,omitempty"`
Host string `json:"host,omitempty"`
Of string `json:"of,omitempty"`
Cwd string `json:"cwd,omitempty"`
Actions map[string][]string `json:"actions,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.