Documentation ¶
Overview ¶
Package adventurer @author K·J Create at 2019-01-09 11:00
Package adventurer @author K·J Create at 2019-01-09 11:03
Package adventurer @author K·J Create at 2019-01-09 11:04
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adventurer ¶
type Adventurer struct {
// contains filtered or unexported fields
}
Adventurer 路由对象
func NewAdventurer ¶
func NewAdventurer(owner interface{}, stories *[]Story, profile *Profile, hook *StoryHook, resp *Resp, enableTrialsErr bool, logger *logrus.Logger) (*Adventurer, error)
NewAdventurer 生成路由对象
func (*Adventurer) Explore ¶
func (a *Adventurer) Explore(w http.ResponseWriter, r *http.Request)
Explore url router
func (*Adventurer) InitStory ¶
func (a *Adventurer) InitStory(stories []Story) error
InitStory 初始化story
type Hook ¶
type Hook interface { Fire(prerequisite []string, equipment Equipment) (bool, error) ErrResp(w *http.ResponseWriter) }
Hook 校验
type Profile ¶
type Profile struct { Name string // Application name Version string // Application version BuildTime string // Compilation date GoVersion string // Golang version Mode string // Deployment mode URL string // URL Desc string // Description. }
Profile 项目信息
func NewProfile ¶
NewProfile profile
Click to show internal directories.
Click to hide internal directories.