util

package
v0.0.0-...-6acd299 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B64Decode

func B64Decode(data string) string

B64Decode - base64 decode

func B64Encode

func B64Encode(data string) string

B64Encode - base64 encode

func Comprehension

func Comprehension(slice []string) []string

Comprehension - remove blank strings in slices

func GetCallFuncName

func GetCallFuncName() string

GetCallFuncName - get the function name of the caller

func GetCallFuncRoute

func GetCallFuncRoute(skip int) []string

GetCallFuncRoute - get the route to the function name of the caller and return it as a slice

func ParseEvents

func ParseEvents(data []byte) []*linebot.Event

ParseEvents - extract `[]*linebot.Event`

func RandomString

func RandomString(length int) string

RandomString - generate a random string

func SetGinContext

func SetGinContext(w http.ResponseWriter, r *http.Request) *gin.Context

SetGinContext - create `*gin.Context` from `http.ResponseWriter` and `*http.Request`

func ValidateSignature

func ValidateSignature(secret, signature string, body []byte) bool

ValidateSignature - perform signature verification

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL