Documentation ¶
Index ¶
- Variables
- func GetAppIni(source string) string
- func GetHtmlDoc(url string) *goquery.Document
- func HttpGet(httpUrl string, paramsMap map[string]string) string
- func HttpPost(httpurl string, paramsMap map[string]interface{}) string
- func OutError(request *gin.Context, errMsg string)
- func Output(msg interface{}, requeset *gin.Context)
- func SendDingCommonMessage(message, AccessToken, Secret string)
- func SendDingMessage(message string)
- func SetAppIniFile(source string) *ini.File
- type Body
- type Common
- func (c *Common) CheckIdCard(card string) bool
- func (c *Common) CheckMobile(phone string) bool
- func (c *Common) ClusterConsumer(topics string, groupId string)
- func (c *Common) GetCurrentDirectory() string
- func (c *Common) GetFormatTime(timeString string) string
- func (c *Common) GetImageUrl(imgUrl string) string
- func (c *Common) GetParentDirectory(dirctory string) string
- func (c *Common) GetTimeStamp(timeString string, format string) int
- func (c *Common) InterFaceToString(value interface{}) string
- func (c *Common) Log(Msg interface{}, logFileName string)
- func (c *Common) PushAsyncKafkaMessage(topic string, message interface{})
- func (c *Common) PushSyncKafkaMessage(topic string, message interface{})
- func (c *Common) SetDefault(typs reflect.Type, values reflect.Value)
- func (c *Common) StrPhoneRule(str string) string
- func (c *Common) ToInt(val string) int64
- func (c *Common) ToUint(val string) uint64
- type Error
- type HttpHelp
- type Tools
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Success = NewError(http.StatusOK, 0, "success") ServerError = NewError(http.StatusInternalServerError, 200500, "系统异常,请稍后重试!") NotFound = NewError(http.StatusNotFound, 200404, http.StatusText(http.StatusNotFound)) )
View Source
var Appini string
Functions ¶
func SendDingCommonMessage ¶
func SendDingCommonMessage(message, AccessToken, Secret string)
func SendDingMessage ¶
func SendDingMessage(message string)
func SetAppIniFile ¶
func SetAppIniFile(source string) *ini.File
Types ¶
type Common ¶
type Common struct { }
func (*Common) ClusterConsumer ¶
ClusterConsumer
@Description: @receiver c @param topics @param groupId
func (*Common) GetCurrentDirectory ¶
func (*Common) GetFormatTime ¶
GetFormatTime
@Description: @receiver c @param timeString 时间字符串 @return string @date ${DATE} ${TIME}
func (*Common) GetParentDirectory ¶
func (*Common) GetTimeStamp ¶
* 根据时间获取时间格式
func (*Common) InterFaceToString ¶
接口转字符
func (*Common) PushAsyncKafkaMessage ¶
异步发送kafka消息
func (*Common) PushSyncKafkaMessage ¶
同步发送kafka消息
func (*Common) SetDefault ¶
设置系统默认值
Click to show internal directories.
Click to hide internal directories.