api

package
v0.0.0-...-68add06 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseUrl         = "api://172.25.84.30:9752"
	LoginUrl        = "%s/v1/login"
	AddBlacklistUrl = "%s/v3/blacklist/bulk"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddBlacklistBody

type AddBlacklistBody struct {
	Result  string      `json:"result"`
	Utils   []int64     `json:"utils"`
	Objects []Blacklist `json:"objects"`
}

type AddBlacklistReq

type AddBlacklistReq struct {
	Bulk []Blacklist `json:"bulk"`
}

type AddBlacklistResp

type AddBlacklistResp struct {
	Body AddBlacklistBody `json:"body"`
}

type AuthReg

type AuthReg struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type AuthResp

type AuthResp struct {
	StatusCode int  `json:"status"`
	Body       Body `json:"body"`
}

type AuthorisedUser

type AuthorisedUser struct {
	Token  string
	Cookie string
}

type Blacklist

type Blacklist struct {
	ClientID int     `json:"clientid"`
	PoolID   int     `json:"poolid"`
	ExpireAt int     `json:"expire_at"`
	IP       string  `json:"ip"`
	Reason   *string `json:"reason"`
}

type BlacklistApi

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

func (*BlacklistApi) AddToBlacklist

func (a *BlacklistApi) AddToBlacklist(bl []Blacklist) error

type Body

type Body struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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