Documentation
¶
Index ¶
- Variables
- type CanNext
- type Choices
- type Context
- type End
- type ErrInk
- type Node
- type ParseFunc
- type Section
- type Story
- func (s *Story) CurrentVars() map[string]interface{}
- func (s *Story) Parse(input string) *ErrInk
- func (s *Story) Pick(ctx *Context, idx int) (sec *Section, err *ErrInk)
- func (s *Story) PostParsing() (errs []*ErrInk)
- func (s *Story) Resume(ctx *Context) (sec *Section, err *ErrInk)
- func (s *Story) SetID(id string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PathSplit of the node's path PathSplit string = "__" )
Functions ¶
This section is empty.
Types ¶
type CanNext ¶
type CanNext interface {
Next() (Node, error)
SetNext(node Node)
Render() (text string, tags []string)
}
CanNext content - which can go next
type Context ¶
type Context struct {
Current string `json:"current" binding:"required"`
LN int `json:"ln" binding:"required"`
Vars map[string]interface{} `json:"vars"`
}
Context of the story
type ErrInk ¶
type ErrInk struct {
LN int `json:"ln" binding:"required"`
Message string `json:"msg" binding:"required"`
}
ErrInk for transporting the error info
type Section ¶
type Section struct {
Text string `json:"text"`
Tags []string `json:"tags"`
Opts []string `json:"opts"`
OptsTags [][]string `json:"optsTags"`
End bool `json:"end" binding:"required"`
}
Section is rendered result of current story
type Story ¶
type Story struct {
// contains filtered or unexported fields
}
Story of the ink
func (*Story) CurrentVars ¶
func (*Story) PostParsing ¶
PostParsing when all input parsing has done
Click to show internal directories.
Click to hide internal directories.