common

package
v0.0.0-...-7553a0f Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REQ          = "req"
	FILENAME_REQ = "filenameReq"
	REQ_BODY     = "reqBody"
)

Variables

This section is empty.

Functions

func ToJSON

func ToJSON(i interface{}) string

Types

type CommonRes

type CommonRes struct {
	BizContent string `json:"bizContent"`
	ErrorMsg   string `json:"errorMsg"`
	Sign       string `json:"sign"`
	StatusCode int    `json:"statusCode"`
}

func Error

func Error(code int, msg string) CommonRes

func ErrorWithSign

func ErrorWithSign(code int, msg string, sign string) CommonRes

func Succ

func Succ(code int, msg string, i interface{}, sign string) CommonRes

func SuccContent

func SuccContent(code int, msg string, content string, sign string) CommonRes

func Success

func Success(code int, bizContent string, sign string) CommonRes

type DecryptContentReq

type DecryptContentReq struct {
	AppId          string `json:"appId,required"`
	EncryptContent string `json:"encryptContent,required"`
}

type DingDingAt

type DingDingAt struct {
	AtMobiles []string `json:"atMobiles"`
	AtUserIds []string `json:"atUserIds"`
	AsAtAll   bool     `json:"isAtAll"`
}

type DingDingNotify

type DingDingNotify struct {
	Url           string `yaml:"url"`
	Secret        string `yaml:"secret"`
	Enabled       string `yaml:"enabled"`
	AlarmInterval int    `yaml:"alarm_interval"`
}

type DingDingReq

type DingDingReq struct {
	MsgType  string     `json:"msgtype"`
	Markdown Markdown   `json:"markdown"`
	Text     Markdown   `json:"text"`
	At       DingDingAt `json:"at"`
}

type Listener

type Listener func(group, dataId, data string)

type Markdown

type Markdown struct {
	Title   string `json:"title"`
	Content string `json:"content"`
	Text    string `json:"text"`
}

type RequiredReq

type RequiredReq struct {
	SignType    string `json:"signType,required" vd:"@:len($)>0; msg:'signType不能为空'"`
	Sign        string `json:"sign,required"`
	Filename    string `json:"filename,required" vd:"@:len($)>0; msg:'filename不能为空'"`
	EncryptType string `json:"encryptType,required" vd:"@:len($)>0; msg:'encryptType不能为空'"`
	BizContent  string `json:"bizContent,required"`
	Timestamp   string `json:"timestamp,required" vd:"@:len($)>0; msg:'timestamp不能为空'"`
	Version     string `json:"version,required" vd:"@:len($)>0; msg:'version不能为空'"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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