Versions in this module Expand all Collapse all v0 v0.0.1 Mar 14, 2025 Changes in this version + func BindAndValidate(c echo.Context, i interface{}) error + func BlueMsg(s string) string + func CalculateDestinationAddress(payload []byte, chainInfoBytes *chain.ChainInfoBytes) (destinationAddress string, err error) + func ColorMethod(method string) string + func ConvertUint64ToChainInfo(n uint64) (*chain.ChainInfo, error) + func DecodeContractCallWithTokenPayload(payload []byte) (*encode.ContractCallWithTokenPayload, error) + func GetFunctionName(f interface{}) string + func HttpErrorHandler(err error, c echo.Context) + func LogMap(data map[string][]string) + func Logf(foreground ForegroundColor, v ...interface{}) string + func MagentaMsg(s string) string + func NormalizeAddress(address string, chainType types.ChainType) string + func NormalizeHash(hash string) string + func RandomNumber(n int) (string, error) + func RandomString(n int) (string, error) + func Request(opts *RequestOption) (*http.Request, *httptest.ResponseRecorder) + func RequestLogMiddleware() echo.MiddlewareFunc + func YellowMsg(s string) string + type CustomValidator struct + func NewValidator() *CustomValidator + func (cv *CustomValidator) AddRules(rules ...ValidationRule) error + func (cv *CustomValidator) Validate(i interface{}) error + type ErrResponse struct + Message string + Metadata interface{} + type ForegroundColor int + const Black + const Blue + const Cyan + const Green + const Magenta + const Red + const White + const Yellow + type RequestOption struct + Body interface{} + ContentType string + Method string + URL string + type ValidationError struct + Message string + Metadata map[string]interface{} + func (ve ValidationError) Error() string + type ValidationRule struct + Fn validator.Func + Tag string