commModels

package
v0.0.0-...-1710408 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

有关Http协议GET和POST请求的封装

Index

Constants

This section is empty.

Variables

View Source
var RDSTools redistools.RedisDataStore

Functions

func CheckErr

func CheckErr(err error)

func Get

func Get(url string) (response string)

发送GET请求 url:请求地址 response:请求返回的内容

func GetName

func GetName(params ...interface{}) string

func Post

func Post(url string, data interface{}, contentType string) (content string)

发送POST请求 url:请求地址,data:POST请求提交的数据,contentType:请求体格式,如:application/json content:请求放回的内容

func RDSTools_Get

func RDSTools_Get(k string) interface{}

func RDSTools_HGet

func RDSTools_HGet(k, f string) interface{}

func RDSTools_HGetAll

func RDSTools_HGetAll(f string) interface{}

func RDSTools_HSet

func RDSTools_HSet(k, f string, v string)

func RDSTools_HSetEx

func RDSTools_HSetEx(k, f string, v string, ttl int64)

func RDSTools_Set

func RDSTools_Set(k string, v string)

func RDSTools_SetEx

func RDSTools_SetEx(k string, v string, ttl int64)

func Strval

func Strval(value interface{}) string

Strval 获取变量的字符串值 浮点型 3.0将会转换成字符串3, "3" 非数值或字符类型的变量将会被转换成JSON格式字符串

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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