Documentation ¶
Overview ¶
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- func CurrFuncName() string
- func CurrVersion() string
- func DecodeJWT(c echo.Context, claims jwt.Claims, secret string) error
- func EncodeJWT(claims jwt.Claims, secret string) (string, error)
- func ExtractJWTFromHeader(c echo.Context) string
- func FindStringInSlice(slice []string, str string) int
- func FloatInRange(i, min, max float64) float64
- func GetRandomNumberFromRange(min, max int) int
- func HasStringInSlice(slice []string, str string, modifier func(str string) string) bool
- func InterfaceStripTags(data interface{}, trimSpace bool) interface{}
- func IsFilesExistInDirectory(path string, filesToCheck []string) (bool, error)
- func ParseBeanSystemFilesAndDirectorires()
- func PostDataStripTags(c echo.Context, trimSpace bool) (map[string]interface{}, error)
- func StructStripTags(data interface{}, trimSpace bool) error
- type CopyableMap
- type CopyableSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrVersion ¶
func CurrVersion() string
Returns the current version, only support module mode binaries.
func DecodeJWT ¶
ExtractUserInfoFromJWT extracts user info from JWT. It is faster than calling redis to get those info.
func ExtractJWTFromHeader ¶
func ExtractJWTFromHeader(c echo.Context) string
ExtractJWTFromHeader returns the JWT token string from authorization header.
func FindStringInSlice ¶ added in v1.1.10
FindStringInSlice returns the smallest index at which str == slice[index], or -1 if there is no such index.
func FloatInRange ¶
TODO: Change to generic after go1.18 release
func HasStringInSlice ¶ added in v1.1.10
if !slice.HasString(src, "ee", modifier) { }
func InterfaceStripTags ¶
func InterfaceStripTags(data interface{}, trimSpace bool) interface{}
func IsFilesExistInDirectory ¶
`IsFilesExistInDirectory` function will check the files (filesToCheck) exist in a specific diretory or not.
func ParseBeanSystemFilesAndDirectorires ¶
func ParseBeanSystemFilesAndDirectorires()
func PostDataStripTags ¶
func StructStripTags ¶
c.Logger().Info(test.Lastname)
Types ¶
type CopyableMap ¶
type CopyableMap map[string]interface{}
func (CopyableMap) DeepCopy ¶
func (m CopyableMap) DeepCopy() map[string]interface{}
DeepCopy will create a deep copy of this map. The depth of this copy is all inclusive. Both maps and slices will be considered when making the copy. Keep in mind that the slices in the resulting map will be of type []interface{}, so when using them, you will need to use type assertion to retrieve the value in the expected type. Reference: https://stackoverflow.com/questions/23057785/how-to-copy-a-map/23058707
type CopyableSlice ¶
type CopyableSlice []interface{}
func (CopyableSlice) DeepCopy ¶
func (s CopyableSlice) DeepCopy() []interface{}
DeepCopy will create a deep copy of this slice. The depth of this copy is all inclusive. Both maps and slices will be considered when making the copy. Reference: https://stackoverflow.com/questions/23057785/how-to-copy-a-map/23058707