Documentation ¶
Index ¶
- type Client
- func (c *Client) CheckIn() string
- func (c *Client) DownloadNodes() error
- func (c *Client) GetUserInfo() (UserProfile, error)
- func (c *Client) IsNodeExists() (bool, error)
- func (c *Client) IsTokenValid() bool
- func (c *Client) Login(username string, password string) (string, error)
- func (c *Client) Logout() error
- func (c *Client) UpdateNodes() error
- type Config
- type ErrorResponse
- type LoginRequest
- type LoginResponse
- type LogoutResponse
- type PostMetadata
- type UserProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
AccessToken string
}
func (*Client) DownloadNodes ¶
func (*Client) GetUserInfo ¶
func (c *Client) GetUserInfo() (UserProfile, error)
func (*Client) IsNodeExists ¶ added in v1.0.4
func (*Client) IsTokenValid ¶ added in v1.0.4
func (*Client) UpdateNodes ¶ added in v1.0.4
type ErrorResponse ¶
type LoginRequest ¶
type LoginResponse ¶
type LoginResponse struct { AccessToken string `json:"access_token"` Code int `json:"code"` ExpiredAt int `json:"expired_at"` ExpiresIn int `json:"expires_in"` Id int `json:"id"` Message string `json:"message"` Ret int `json:"ret"` Success bool `json:"success"` TokenType string `json:"token_type"` User UserProfile `json:"user"` Username string `json:"username"` }
type LogoutResponse ¶
type PostMetadata ¶
type UserProfile ¶
type UserProfile struct { Id int `json:"id"` Nickname string `json:"nickname"` Account string `json:"account"` Port int `json:"port"` Passwd string `json:"passwd"` Uuid string `json:"uuid"` TransferEnable int `json:"transfer_enable"` U int `json:"u"` D int `json:"d"` T int `json:"t"` Enable int `json:"enable"` SpeedLimit int `json:"speed_limit"` Credit int `json:"credit"` Balance int `json:"balance"` ExpiredAt string `json:"expired_at"` BanTime int `json:"ban_time"` Level int `json:"level"` IsAdmin int `json:"is_admin"` Group any `json:"group"` LastLogin int `json:"last_login"` ResetTime int `json:"reset_time"` InviteNum any `json:"invite_num"` Status int `json:"status"` Sublink string `json:"sublink"` SubCode string `json:"sub_code"` Clashsub string `json:"clashsub"` ClashSublinkPath string `json:"clash_sublink_path"` LabelList []string `json:"label_list"` TopLabel string `json:"top_label"` }
Click to show internal directories.
Click to hide internal directories.