Documentation ¶
Index ¶
- Constants
- Variables
- func AddHandler(priority int, handle func(http.Handler) http.Handler)
- func Create(conf string) error
- func DeleteHandler(priority int)
- func GetHandler() map[int]func(http.Handler) http.Handler
- func Info() string
- func Run() error
- func Version() string
- type Response
- func (r *Response) Bad(status int, msg string)
- func (r *Response) Error(msg string)
- func (r *Response) GetData(key string) (string, bool)
- func (r *Response) GetDataValues(keys ...string) ([]string, bool)
- func (r *Response) Good(status int)
- func (r *Response) Redirect(status int, url string)
- func (r *Response) Return(status int, data []byte)
Constants ¶
View Source
const ( //NAME is the name of the librar NAME = "Aeridya" //MAJORVER is the Major Version MAJORVER = "1" //MINORVER is the Minor Version MINORVER = "0" //RELEASEVER is the Release Version RELEASEVER = "2" //DESC is a description of the library DESC = "Server and CMS" )
Variables ¶
Functions ¶
func AddHandler ¶
AddHandler adds an http Handler to the map, requires a priority set
func DeleteHandler ¶
func DeleteHandler(priority int)
DeleteHandler removes an httpHandler based on the priority set
func GetHandler ¶
GetHandler returns the current handler map
Types ¶
type Response ¶
type Response struct { // W reference to the http.ResponseWriter W http.ResponseWriter // R reference to the http.Request R *http.Request // Status of the current request Status int // Err contains the connection error if applicable Err error // Data holds data as the request is passed in Aeridya Data interface{} }
Response is a convenience struct containing data for Aeridya to parse the connection for a user
func (*Response) Bad ¶
Bad takes a status and returns connection as an error // Recommended: 400+, 500+
func (*Response) GetData ¶ added in v1.0.1
GetData retrieves the data from the POST request Takes a key and returns the data, boolean to check if found converts the []string from the response to a string
func (*Response) GetDataValues ¶ added in v1.0.2
func (*Response) Good ¶
Good takes a status and completes the connection // Recommend: 200 status code
Click to show internal directories.
Click to hide internal directories.