api

package
v0.2.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const COMMENT_IKUAI_BYPASS = "IKUAI_BYPASS"
View Source
const FUNC_NAME_CUSTOM_ISP = "custom_isp"
View Source
const FuncNameStreamDomain = "stream_domain"

Variables

This section is empty.

Functions

This section is empty.

Types

type CallReq

type CallReq struct {
	FuncName string      `json:"func_name"`
	Action   string      `json:"action"`
	Param    interface{} `json:"param"`
}

type CallResp

type CallResp struct {
	ErrMsg string        `json:"ErrMsg"`
	Result int           `json:"Result"`
	RowID  int           `json:"RowId"`
	Data   *CallRespData `json:"Data"`
}

type CallRespData

type CallRespData struct {
	Total int         `json:"total"`
	Data  interface{} `json:"data"`
}

type CustomIspData

type CustomIspData struct {
	Ipgroup string `json:"ipgroup"`
	Time    string `json:"time"`
	ID      int    `json:"id"`
	Comment string `json:"comment"`
	Name    string `json:"name"`
}

type IKuai

type IKuai struct {
	// contains filtered or unexported fields
}

func NewIKuai

func NewIKuai(baseurl string) *IKuai

func (*IKuai) AddCustomIsp

func (i *IKuai) AddCustomIsp(name, tag, ipgroup string) error

func (*IKuai) AddStreamDomain

func (i *IKuai) AddStreamDomain(iface, tag, srcAddr, domains string) error

func (*IKuai) DelCustomIsp

func (i *IKuai) DelCustomIsp(id string) error

func (*IKuai) DelCustomIspAll

func (i *IKuai) DelCustomIspAll(cleanTag string) (err error)

func (*IKuai) DelCustomIspFromPreIds

func (i *IKuai) DelCustomIspFromPreIds(preIds string) (err error)

删除

func (*IKuai) DelStreamDomain

func (i *IKuai) DelStreamDomain(id string) error

func (*IKuai) DelStreamDomainAll

func (i *IKuai) DelStreamDomainAll(cleanTag string) (err error)

DelStreamDomainAll 删除所有的域名分流规则

func (*IKuai) DelStreamDomainFromPreIds

func (i *IKuai) DelStreamDomainFromPreIds(preIds string) (err error)

DelStreamDomainFromPreIds 从预备删除的id中删除

func (*IKuai) Login

func (i *IKuai) Login(username, password string) error

func (*IKuai) PrepareDelCustomIspAll

func (i *IKuai) PrepareDelCustomIspAll(tag string) (preIds string, err error)

PrepareDelCustomIspAll 预备删除

func (*IKuai) PrepareDelStreamDomainAll

func (i *IKuai) PrepareDelStreamDomainAll(tag string) (preIds string, err error)

PrepareDelStreamDomainAll 为了防止误删,先查询,然后再删除

func (*IKuai) ShowCustomIspByComment

func (i *IKuai) ShowCustomIspByComment() (result []CustomIspData, err error)

func (*IKuai) ShowStreamDomainByComment

func (i *IKuai) ShowStreamDomainByComment(comment string) (result []StreamDomainData, err error)

type StreamDomainData

type StreamDomainData struct {
	Week      string `json:"week"`
	Comment   string `json:"comment"`
	Domain    string `json:"domain"`
	SrcAddr   string `json:"src_addr"`
	Interface string `json:"interface"`
	Time      string `json:"time"`
	ID        int    `json:"id"`
	Enabled   string `json:"enabled"`
}

Jump to

Keyboard shortcuts

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