mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
39 lines
1.2 KiB
Go
39 lines
1.2 KiB
Go
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
|
//
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
// If a copy of the MIT was not distributed with this file,
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
package ghttp
|
|
|
|
// SetNameToUriType sets the NameToUriType for server.
|
|
func (s *Server) SetNameToUriType(t int) {
|
|
s.config.NameToUriType = t
|
|
}
|
|
|
|
// SetDumpRouterMap sets the DumpRouterMap for server.
|
|
// If DumpRouterMap is enabled, it automatically dumps the route map when server starts.
|
|
func (s *Server) SetDumpRouterMap(enabled bool) {
|
|
s.config.DumpRouterMap = enabled
|
|
}
|
|
|
|
// SetClientMaxBodySize sets the ClientMaxBodySize for server.
|
|
func (s *Server) SetClientMaxBodySize(maxSize int64) {
|
|
s.config.ClientMaxBodySize = maxSize
|
|
}
|
|
|
|
// SetFormParsingMemory sets the FormParsingMemory for server.
|
|
func (s *Server) SetFormParsingMemory(maxMemory int64) {
|
|
s.config.FormParsingMemory = maxMemory
|
|
}
|
|
|
|
// SetSwaggerPath sets the SwaggerPath for server.
|
|
func (s *Server) SetSwaggerPath(path string) {
|
|
s.config.SwaggerPath = path
|
|
}
|
|
|
|
// SetOpenApiPath sets the OpenApiPath for server.
|
|
func (s *Server) SetOpenApiPath(path string) {
|
|
s.config.OpenApiPath = path
|
|
}
|