Documentation ¶
Index ¶
- Variables
- type Config
- func (c *Config) Check(loadWellknown bool) (err error)
- func (c *Config) GetBaseUrlFromDef(api *openapi3.T) (baseUrl string, err error)
- func (c *Config) GetFileName() string
- func (c *Config) GetTimeFormat() string
- func (c *Config) HasFeatureDB() bool
- func (c *Config) IsLocalFile() bool
- func (c *Config) IsStaticPath(path string) bool
- func (c *Config) IsWellknownView(path, method string) bool
- func (c *Config) LoadApi(loadWellknown bool) (api *openapi3.T, baseUrl string, err error)
- func (c *Config) LoadWellknownAsApi() (api *openapi3.T, baseUrl string, err error)
- func (c *Config) OpenFile() (io.Reader, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultStaticFileTypes = []string{".js", ".png", ".jpg", ".jpeg", ".js", ".css", ".html", "svg"}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Definition string UserName string Password string Config string // Format string //除了指定Server外,允许单独指定Url前缀 BaseUrl string Server string ServerVariables []string SourceMode string StaticFileTypes []string Debug int TimeFormat string File string //用于加载常见URL WellknownAPIs string //缓存文件的路径 DbName string //IP Hash长度 IPHashLength int // contains filtered or unexported fields }
func (*Config) GetBaseUrlFromDef ¶
func (*Config) GetFileName ¶
func (*Config) GetTimeFormat ¶
func (*Config) HasFeatureDB ¶ added in v0.9.0
func (*Config) IsLocalFile ¶
func (*Config) IsStaticPath ¶
func (*Config) IsWellknownView ¶
func (*Config) LoadWellknownAsApi ¶
LoadWellknownAsApi 将wellknown作为定义文件进行加载,主要为了初始使用或者体验使用,本函数调用时,wellknown应该已经加载完毕
Click to show internal directories.
Click to hide internal directories.