Documentation ¶
Index ¶
- func GetHandler(w http.ResponseWriter, r *http.Request, db *bolt.DB, tp *template.Template, ...)
- func InitDB(path string) error
- func OpenDB(path string) (*bolt.DB, error)
- func ProgressHandler(db *bolt.DB, user User, params url.Values)
- func SaveStage(db *bolt.DB, stage Stage) error
- func SaveUser(db *bolt.DB, user User) error
- type CYOAFields
- type CYOAServer
- type Stage
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHandler ¶
Types ¶
type CYOAServer ¶
func NewCYOAServer ¶
func (*CYOAServer) CYOAHandler ¶
func (s *CYOAServer) CYOAHandler(w http.ResponseWriter, r *http.Request)
type Stage ¶
type Stage struct { ID uuid.UUID // The unique UUID for this stage. The "progress" value of the User struct acts as a foreign key for this identified. Body string // The contents of this stage's HTML body. Links [][]string // A slice of slices, containing the possible options to progress from this stage. Each element contains ["text", "uuid"]. }
func NewStartStage ¶
func NewStartStage() Stage
func (Stage) GenerateLinks ¶
Click to show internal directories.
Click to hide internal directories.