Documentation ¶
Index ¶
- Variables
- type Asset
- type Category
- func (c *Category) Add(subs ...*Subcategory)
- func (c *Category) Contents() string
- func (c *Category) HasChildren() bool
- func (c *Category) MarshalJSON() ([]byte, error)
- func (c *Category) Path() string
- func (c *Category) Resource() Resource
- func (c *Category) SHA() string
- func (c *Category) SetContents(contents string) error
- func (c *Category) SetPath(filepath string) error
- func (c *Category) Sub(ID string) *Subcategory
- func (c *Category) Subcategories() []string
- func (c *Category) Tree(html bool) interface{}
- type Check
- type Checklist
- func (c *Checklist) Add(v ...Check)
- func (c *Checklist) Contents() string
- func (c *Checklist) HasChildren() bool
- func (c *Checklist) Path() string
- func (c *Checklist) Resource() Resource
- func (c *Checklist) SHA() string
- func (c *Checklist) SetContents(contents string) error
- func (c *Checklist) SetParent(d *Difficulty)
- func (*Checklist) SetPath(filepath string) error
- type Component
- type Difficulty
- func (d *Difficulty) AddChecks(c ...Check)
- func (d *Difficulty) AddItem(items ...*Item) error
- func (d *Difficulty) Checks() *Checklist
- func (d *Difficulty) Contents() string
- func (d *Difficulty) HasChildren() bool
- func (d *Difficulty) Item(id string) *Item
- func (d *Difficulty) ItemNames() []string
- func (d *Difficulty) Items() []Item
- func (d *Difficulty) MarshalJSON() ([]byte, error)
- func (d *Difficulty) Path() string
- func (d *Difficulty) Resource() Resource
- func (d *Difficulty) SHA() string
- func (d *Difficulty) SetChecks(c *Checklist)
- func (d *Difficulty) SetContents(contents string) error
- func (d *Difficulty) SetParent(s *Subcategory)
- func (d *Difficulty) SetPath(filepath string) error
- func (d *Difficulty) Tree(html bool) interface{}
- type Form
- type FormInput
- type FormScreen
- type Item
- type Parser
- type Resource
- type ResourceParser
- type Subcategory
- func (s *Subcategory) AddDifficulty(difficulties ...*Difficulty) error
- func (s *Subcategory) Contents() string
- func (s *Subcategory) Difficulties() []Difficulty
- func (s *Subcategory) Difficulty(ID string) *Difficulty
- func (s *Subcategory) DifficultyNames() []string
- func (s *Subcategory) HasChildren() bool
- func (s *Subcategory) MarshalJSON() ([]byte, error)
- func (s *Subcategory) Path() string
- func (s *Subcategory) Resource() Resource
- func (s *Subcategory) SHA() string
- func (s *Subcategory) SetContents(contents string) error
- func (s *Subcategory) SetParent(c *Category)
- func (s *Subcategory) SetPath(filepath string) error
- func (s *Subcategory) Tree(html bool) interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrContent = errors.New("Invalid content") ErrSlug = errors.New("Invalid Slug") )
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ID string `json:"id"` Hash string `json:"hash,omAssetpty"` Content string `json:"content"` }
func (*Asset) HasChildren ¶
func (*Asset) SetContents ¶
type Category ¶
type Category struct { ID string `json:"id"` Name string `json:"name"` Hash string `json:"hash"` Locale string `json:"-"` Order float64 `json:"-"` // contains filtered or unexported fields }
func (*Category) Add ¶
func (c *Category) Add(subs ...*Subcategory)
func (*Category) HasChildren ¶
func (*Category) MarshalJSON ¶
func (*Category) SetContents ¶
func (*Category) Sub ¶
func (c *Category) Sub(ID string) *Subcategory
func (*Category) Subcategories ¶
type Checklist ¶
type Checklist struct { Hash string `json:"hash"` Checks []Check `json:"checks"` // contains filtered or unexported fields }
func (*Checklist) HasChildren ¶
func (*Checklist) SetContents ¶
func (*Checklist) SetParent ¶
func (c *Checklist) SetParent(d *Difficulty)
type Component ¶
type Component interface { Path() string Contents() string SetPath(path string) error SetContents(contents string) error SHA() string HasChildren() bool Resource() Resource }
A Component is en element of the resource tree
type Difficulty ¶
type Difficulty struct { ID string `json:"id"` Descr string `json:"description"` Hash string `json:"hash"` // contains filtered or unexported fields }
func (*Difficulty) AddChecks ¶
func (d *Difficulty) AddChecks(c ...Check)
func (*Difficulty) AddItem ¶
func (d *Difficulty) AddItem(items ...*Item) error
func (*Difficulty) Checks ¶
func (d *Difficulty) Checks() *Checklist
func (*Difficulty) Contents ¶
func (d *Difficulty) Contents() string
func (*Difficulty) HasChildren ¶
func (d *Difficulty) HasChildren() bool
func (*Difficulty) Item ¶
func (d *Difficulty) Item(id string) *Item
func (*Difficulty) ItemNames ¶
func (d *Difficulty) ItemNames() []string
func (*Difficulty) Items ¶
func (d *Difficulty) Items() []Item
func (*Difficulty) MarshalJSON ¶
func (d *Difficulty) MarshalJSON() ([]byte, error)
func (*Difficulty) Path ¶
func (d *Difficulty) Path() string
func (*Difficulty) Resource ¶
func (d *Difficulty) Resource() Resource
func (*Difficulty) SHA ¶
func (d *Difficulty) SHA() string
func (*Difficulty) SetChecks ¶
func (d *Difficulty) SetChecks(c *Checklist)
func (*Difficulty) SetContents ¶
func (d *Difficulty) SetContents(contents string) error
func (*Difficulty) SetParent ¶
func (d *Difficulty) SetParent(s *Subcategory)
func (*Difficulty) SetPath ¶
func (d *Difficulty) SetPath(filepath string) error
func (*Difficulty) Tree ¶
func (d *Difficulty) Tree(html bool) interface{}
type Form ¶
type Form struct { ID string `json:"id"` Name string `json:"name"` Hash string `json:"hash"` Locale string `json:"-"` Screens []FormScreen `json:"screens,omitempty"` }
func (*Form) HasChildren ¶
func (*Form) SetContents ¶
type FormScreen ¶
type Item ¶
type Item struct { ID string `json:"id"` Hash string `json:"hash,omitempty"` Title string `json:"title"` Body string `json:"body"` Order float64 `json:"-"` // contains filtered or unexported fields }
func (*Item) HasChildren ¶
func (*Item) SetContents ¶
func (*Item) SetParent ¶
func (i *Item) SetParent(d *Difficulty)
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser is an helper, creates a tree from the repo
func (*Parser) Categories ¶
type ResourceParser ¶
type ResourceParser struct {
// contains filtered or unexported fields
}
func NewResourceParser ¶
func NewResourceParser() *ResourceParser
func (*ResourceParser) Categories ¶
func (r *ResourceParser) Categories() map[string][]*Category
type Subcategory ¶
type Subcategory struct { ID string `json:"id"` Name string `json:"name"` Hash string `json:"hash"` Order float64 `json:"-"` // contains filtered or unexported fields }
func (*Subcategory) AddDifficulty ¶
func (s *Subcategory) AddDifficulty(difficulties ...*Difficulty) error
func (*Subcategory) Contents ¶
func (s *Subcategory) Contents() string
func (*Subcategory) Difficulties ¶
func (s *Subcategory) Difficulties() []Difficulty
func (*Subcategory) Difficulty ¶
func (s *Subcategory) Difficulty(ID string) *Difficulty
func (*Subcategory) DifficultyNames ¶
func (s *Subcategory) DifficultyNames() []string
func (*Subcategory) HasChildren ¶
func (s *Subcategory) HasChildren() bool
func (*Subcategory) MarshalJSON ¶
func (s *Subcategory) MarshalJSON() ([]byte, error)
func (*Subcategory) Path ¶
func (s *Subcategory) Path() string
func (*Subcategory) Resource ¶
func (s *Subcategory) Resource() Resource
func (*Subcategory) SHA ¶
func (s *Subcategory) SHA() string
func (*Subcategory) SetContents ¶
func (s *Subcategory) SetContents(contents string) error
func (*Subcategory) SetParent ¶
func (s *Subcategory) SetParent(c *Category)
func (*Subcategory) SetPath ¶
func (s *Subcategory) SetPath(filepath string) error
func (*Subcategory) Tree ¶
func (s *Subcategory) Tree(html bool) interface{}
Click to show internal directories.
Click to hide internal directories.