github.com/wangyougui/gf/v2@v2.6.5/net/ghttp/ghttp_server_config_mess.go (about)

     1  // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
     2  //
     3  // This Source Code Form is subject to the terms of the MIT License.
     4  // If a copy of the MIT was not distributed with this file,
     5  // You can obtain one at https://github.com/wangyougui/gf.
     6  
     7  package ghttp
     8  
     9  // SetNameToUriType sets the NameToUriType for server.
    10  func (s *Server) SetNameToUriType(t int) {
    11  	s.config.NameToUriType = t
    12  }
    13  
    14  // SetDumpRouterMap sets the DumpRouterMap for server.
    15  // If DumpRouterMap is enabled, it automatically dumps the route map when server starts.
    16  func (s *Server) SetDumpRouterMap(enabled bool) {
    17  	s.config.DumpRouterMap = enabled
    18  }
    19  
    20  // SetClientMaxBodySize sets the ClientMaxBodySize for server.
    21  func (s *Server) SetClientMaxBodySize(maxSize int64) {
    22  	s.config.ClientMaxBodySize = maxSize
    23  }
    24  
    25  // SetFormParsingMemory sets the FormParsingMemory for server.
    26  func (s *Server) SetFormParsingMemory(maxMemory int64) {
    27  	s.config.FormParsingMemory = maxMemory
    28  }
    29  
    30  // SetSwaggerPath sets the SwaggerPath for server.
    31  func (s *Server) SetSwaggerPath(path string) {
    32  	s.config.SwaggerPath = path
    33  }
    34  
    35  // SetSwaggerUITemplate sets the Swagger template for server.
    36  func (s *Server) SetSwaggerUITemplate(swaggerUITemplate string) {
    37  	s.config.SwaggerUITemplate = swaggerUITemplate
    38  }
    39  
    40  // SetOpenApiPath sets the OpenApiPath for server.
    41  func (s *Server) SetOpenApiPath(path string) {
    42  	s.config.OpenApiPath = path
    43  }