Documentation ¶
Index ¶
- Variables
- type App
- type AppHandler
- type Handler
- type NewHandler
- type Odie
- func (odie *Odie) Action(action string) (*html.URL, error)
- func (odie *Odie) DbDelete(v interface{}) error
- func (odie *Odie) DbGet(id int64, v interface{}) error
- func (odie *Odie) DbInsert(v interface{}) error
- func (odie *Odie) DbUpdate(id int64, v interface{}) error
- func (odie *Odie) DefaultURL() *html.URL
- func (odie *Odie) Display()
- func (odie *Odie) Footer(urls []*html.URL)
- func (odie *Odie) GetAll(v interface{}) error
- func (odie *Odie) GetOrder(v interface{}, order string) error
- func (odie *Odie) Header(urls []*html.URL)
- func (odie *Odie) HomeURL() *html.URL
- func (odie *Odie) Init() []*html.URL
- func (odie *Odie) LoadFromQuery(iface interface{}) error
- func (odie *Odie) NewForm(action string) *html.FormElement
- func (odie *Odie) RenderError(err error)
- func (odie *Odie) SetContentType(mimeType html.MimeType)
- func (odie *Odie) ShowHeader(which string, urls []*html.URL) (*html.DivElement, *html.DivElement)
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NotFound = errors.New("Not Found") ServerError = errors.New("Internal Server Error") )
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) Register ¶
func (a *App) Register(page string, h NewHandler)
type AppHandler ¶
type AppHandler struct {
// contains filtered or unexported fields
}
type Handler ¶
type Handler interface { // Init App. Returns slice of urls showing stack (index -> page1 -> page2) // Optional, if []byte is returned, then that data is written Init() ([]*html.URL, []byte, error) RenderError(err error) Action(string) (*html.URL, error) // return a URL to refersh to when complete Header([]*html.URL) Display() // contains filtered or unexported methods }
type NewHandler ¶
type NewHandler func() Handler
type Odie ¶
type Odie struct { Request *http.Request Response http.ResponseWriter Doc *html.Document Body *html.BodyElement Url *html.URL Orm *xorm.Engine Path string // Path to applicatio's base directory // contains filtered or unexported fields }
func (*Odie) Action ¶
Action will perform an action before the page loads. return value of url of refresh page without action query string. The allows for db updates and a page reload would not do a double action error value of nil will continue on to render. A page reload will recall action Controlled by presense of action= query string
func (*Odie) DefaultURL ¶
func (*Odie) Display ¶
func (odie *Odie) Display()
Display will show render page between header and footer
func (*Odie) LoadFromQuery ¶
func (*Odie) RenderError ¶
RednerError is called anytime a fatal error is encountered
func (*Odie) SetContentType ¶
func (*Odie) ShowHeader ¶
func (odie *Odie) ShowHeader(which string, urls []*html.URL) (*html.DivElement, *html.DivElement)
ShowHeader will return the inner div and outer div
Click to show internal directories.
Click to hide internal directories.