utils

package
v0.0.0-...-7429660 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DaeBaggageHeaderPrefix = "daectx-"
View Source
const TimeFormat = "2006-01-02 15:04:05.999"

Variables

View Source
var (
	URIDecoder = schema.NewDecoder()
	Valid      = validator.New()
)

Functions

func Base64

func Base64(buf []byte) string

func Bind

func Bind(raw *http.Request, model interface{}, obj ...interface{}) error

func DumpRespBody

func DumpRespBody(resp *http.Response) []byte

func LastError

func LastError(err error) error

func LenSyncMap

func LenSyncMap(m *sync.Map) int

func MakeAppServiceName

func MakeAppServiceName(app, name string) string

func Register

func Register(manager *registry.ServiceManager, appServiceName string, protoType string, tags map[string]string, ip string, port int) (*config.Register, error)

Types

type WrapResp

type WrapResp struct {
	Code int         `json:"dm_error"`
	Msg  string      `json:"error_msg"`
	Data interface{} `json:"data"`
}

func NewWrapResp

func NewWrapResp(data interface{}, err error) WrapResp

Jump to

Keyboard shortcuts

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