Discover Packages
github.com/yangkequn/saavuu
specification
package
Version:
v0.0.0-...-48e1cf4
Opens a new window with list of versions in this module.
Published: Feb 29, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
var DisAllowedDataKeyNames = map[string ]bool {
"": true ,
"string": true ,
"int32": true ,
"int64": true ,
"float32": true ,
"float64": true ,
"int": true ,
"uint": true ,
"float": true ,
"bool": true ,
"byte": true ,
"rune": true ,
"complex64": true ,
"complex128": true ,
}
View Source
var DisAllowedServiceNames = map[string ]bool {
"": true ,
"string": true ,
"int32": true ,
"int64": true ,
"float32": true ,
"float64": true ,
"int": true ,
"uint": true ,
"float": true ,
"bool": true ,
"byte": true ,
"rune": true ,
"complex64": true ,
"complex128": true ,
}
return the api name of the service
name with format "api:serviceName". first letter of serviceName should be lower case, and start with "api:"
two possible source of the service name:
1. the type name of the first parameter of the function
2. the name give by the user
do not panic, because it may be called by web client. otherwise the server can be maliciously closed by the client
func ApiNameByType(i interface{}) (name string )
func GetValidDataKeyName(value interface{}, Key *string ) (isValidName bool )
func MarshalApiInput(paramIn interface{}) (out []byte , err error )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.