Documentation ¶
Index ¶
- Variables
- func DecodeGETRequest(request *SimpwebservRequest) map[string]string
- func DecodePOSTFormRequest(request *SimpwebservRequest) map[string]string
- func RecvFile(request *SimpwebservRequest, storePath string, name string, maxSize int) error
- type SimpwebservApp
- type SimpwebservRequest
- type SimpwebservResponse
- func BuildBasicResponse() *SimpwebservResponse
- func BuildJumpResponse(target string) *SimpwebservResponse
- func BuildNotFoundResponse() *SimpwebservResponse
- func SendFile(request *SimpwebservRequest, contentType string, filePath string, ...) *SimpwebservResponse
- func SendStaticFile(path string, contentType string) *SimpwebservResponse
- type SimpwebservUrlNode
Constants ¶
This section is empty.
Variables ¶
View Source
var FileOverSize = errors.New("File over size")
Functions ¶
func DecodeGETRequest ¶ added in v1.1.0
func DecodeGETRequest(request *SimpwebservRequest) map[string]string
func DecodePOSTFormRequest ¶ added in v1.2.0
func DecodePOSTFormRequest(request *SimpwebservRequest) map[string]string
Types ¶
type SimpwebservApp ¶
type SimpwebservApp struct { Listener net.Listener UrlMap SimpwebservUrlNode }
func App ¶
func App() SimpwebservApp
func (*SimpwebservApp) Register ¶
func (app *SimpwebservApp) Register(function func(*SimpwebservRequest) *SimpwebservResponse, path string)
func (*SimpwebservApp) Run ¶
func (app *SimpwebservApp) Run(host string, port uint16)
type SimpwebservRequest ¶
type SimpwebservResponse ¶
type SimpwebservResponse struct { Protocol string Code string CodeName string Header map[string]string Body *bytes.Buffer ToDoCommand string }
func BuildBasicResponse ¶
func BuildBasicResponse() *SimpwebservResponse
func BuildJumpResponse ¶ added in v1.1.0
func BuildJumpResponse(target string) *SimpwebservResponse
func BuildNotFoundResponse ¶
func BuildNotFoundResponse() *SimpwebservResponse
func SendFile ¶ added in v1.2.0
func SendFile(request *SimpwebservRequest, contentType string, filePath string, fileName string) *SimpwebservResponse
func SendStaticFile ¶ added in v1.1.0
func SendStaticFile(path string, contentType string) *SimpwebservResponse
type SimpwebservUrlNode ¶
type SimpwebservUrlNode struct { Name string NextLayer *list.List IncludeBack bool Function func(*SimpwebservRequest) *SimpwebservResponse }
Click to show internal directories.
Click to hide internal directories.