ics

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ics-sdk-go

初始化

调用接口前先初始化:

package main
import "github.com/jlqwer/ics-sdk-go"
func main() {
	appid := ""
	secretId := ""
	secretKey := ""
    ics.Init(appid, secretId, secretKey)
}

获取黑白名单列表

package main
import (
    "fmt"
    "github.com/jlqwer/ics-sdk-go"
)
func main() {
	appid := ""
	secretId := ""
	secretKey := ""
	ics.Init(appid, secretId, secretKey)
    res := ics.GetBlacklistIp() //黑名单
    fmt.Println(res)
    res = ics.GetWhitelistIp() //白名单
    fmt.Println(res)
}

检查IP信息(自动添加黑名单)

package main
import (
    "fmt"
    "github.com/jlqwer/ics-sdk-go"
)
func main() {
	appid := ""
	secretId := ""
	secretKey := ""
	ics.Init(appid, secretId, secretKey)
    res := ics.CheckIp(ip, useragent, uri)
    fmt.Println(res)
}

IP归属地查询

package main
import (
    "fmt"
    "github.com/jlqwer/ics-sdk-go"
)
func main() {
	appid := ""
	secretId := ""
	secretKey := ""
	ics.Init(appid, secretId, secretKey)
    res := ics.GetIpGeo(ip)
    fmt.Println(res)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(appid int, secretId string, secretKey string)

func PostJson added in v0.3.1

func PostJson(url string, postJson string) ([]byte, error)

Types

type CheckResult

type CheckResult struct {
	Code  int
	Msg   string
	Data  checkResultData
	Count int
}

func CheckIp

func CheckIp(ip string, useragent string, uri string) CheckResult

CheckIp 检查IP黑白名单&真假蜘蛛

type IpGeoResult

type IpGeoResult struct {
	Code  int
	Msg   string
	Data  ipGeoResultData
	Count int
}

func GetIpGeo

func GetIpGeo(ip string) IpGeoResult

GetIpGeo IP归属地查询

type IpList

type IpList struct {
	Code  int
	Msg   string
	Data  []string
	Count int
}

func GetBlacklistIp

func GetBlacklistIp() IpList

GetBlacklistIp 获取IP黑名单列表

func GetWhitelistIp

func GetWhitelistIp() IpList

GetWhitelistIp 获取IP白名单列表

type Result added in v0.2.0

type Result struct {
	Code int
	Msg  string
	Data interface{}
}

func SendCardMsg added in v0.2.1

func SendCardMsg(app, uids, title, description, url, btntxt string) Result

SendCardMsg 发送卡片消息

func SendTextMsg added in v0.2.1

func SendTextMsg(app, uids, content string) Result

SendTextMsg 发送文本消息

Jump to

Keyboard shortcuts

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