Documentation
¶
Index ¶
- func BadResponse(c *gin.Context, err error)
- func BuildURLParams(baseURL string, params map[string]string) (string, error)
- func BuildWSBadResponse(status string, echo string) global.MsgData
- func BuildWSGoodResponse(status string, echo string, entry ...any) global.MsgData
- func BuildWSResponse(status string, retcode int32, echo string, entry ...any) global.MsgData
- func CheckPort(host string, port int, timeout time.Duration) error
- func CheckWebsocket(ws string, timeout time.Duration) error
- func ContainsArgs(flag string) bool
- func CreateFile(filePath string, data []byte) error
- func DecryptAES(key []byte, ct string) string
- func DownloadFile(url string, filePath string) error
- func DownloadFileWithHeaders(url string, filePath string, headers map[string]string, fileSize int64) error
- func EncryptAES(key []byte, plaintext string) string
- func FileExists(filename string) bool
- func Format(s string, args ...interface{}) string
- func GetDefault(data any, def string) string
- func GetForwardImpl() (*model.Implementation, error)
- func GetJson(url string, headers map[string]string, v any) error
- func GoodResponse(c *gin.Context, entry ...any)
- func GoodResponseArray(c *gin.Context, array any)
- func IsWinPlatform() bool
- func PKCS7Padding(data []byte, blockSize int) []byte
- func PKCS7Unpadding(data []byte) []byte
- func RandomAvailablePort(rangePort bool, start int, end int) (int, error)
- func ReturnsNonNull(data interface{}) string
- func RunExec(mx *sync.Mutex) error
- func Unzip(src string, dest string) error
- func WaitCondition(gapedMillisecond time.Duration, condition func() error, ...) <-chan struct{}
- func WaitExternalNTQQStartup(ws string, timeoutSeconds int, connectCallback func(bool), ...) <-chan struct{}
- func WaitNTQQStartup(host string, port int, waitCallback func(error)) <-chan struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadResponse ¶
BadResponse Return error status code and error message
func BuildWSBadResponse ¶ added in v0.1.0
func BuildWSGoodResponse ¶ added in v0.1.0
func BuildWSResponse ¶ added in v0.1.0
func ContainsArgs ¶ added in v0.2.0
func CreateFile ¶
func DecryptAES ¶ added in v0.0.2
func DownloadFile ¶
func DownloadFileWithHeaders ¶
func EncryptAES ¶ added in v0.0.2
func FileExists ¶
func GetDefault ¶
GetDefault allows the data param to be nil
func GetForwardImpl ¶ added in v0.2.0
func GetForwardImpl() (*model.Implementation, error)
GetForwardImpl get first forwardImpl from appsettings.json
func GoodResponse ¶ added in v0.1.0
GoodResponse Try to return data entry: mapKey1, mapValue1 ...
func GoodResponseArray ¶ added in v0.1.0
func IsWinPlatform ¶
func IsWinPlatform() bool
func PKCS7Padding ¶ added in v0.0.2
func PKCS7Unpadding ¶ added in v0.0.2
func RandomAvailablePort ¶ added in v0.1.0
func ReturnsNonNull ¶ added in v0.1.0
func ReturnsNonNull(data interface{}) string
func WaitCondition ¶ added in v0.2.0
func WaitExternalNTQQStartup ¶ added in v0.2.6
func WaitExternalNTQQStartup(ws string, timeoutSeconds int, connectCallback func(bool), waitCallback func(error)) <-chan struct{}
WaitExternalNTQQStartup wait for external NTQQ websocket connection to be enabled
func WaitNTQQStartup ¶ added in v0.2.0
WaitNTQQStartup wait the NTQQ startup
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.