api

package
v2.0.0-...-a380af5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ab

type Ab struct {
}

func (*Ab) Ab

func (a *Ab) Ab(c *gin.Context)

Ab @Tags 地址 @Summary 地址列表 @Description 地址列表 @Accept json @Produce json @Success 200 {object} response.Response @Failure 500 {object} response.ErrorResponse @Router /ab [get] @Security BearerAuth

func (*Ab) CheckGuid

func (a *Ab) CheckGuid(cu *model.User, guid string) (gid, uid, cid uint, err error)

CheckGuid

func (*Ab) ComposeGuid

func (a *Ab) ComposeGuid(gid, uid, cid uint) string

ComposeGuid

func (*Ab) PTags

func (a *Ab) PTags(c *gin.Context)

PTags @Tags 地址[Personal] @Summary 标签 @Description 标签 @Accept json @Produce json @Param guid path string true "guid" @Success 200 {object} model.TagList @Failure 500 {object} response.ErrorResponse @Router /ab/tags/{guid} [post] @Security BearerAuth

func (*Ab) ParseGuid

func (a *Ab) ParseGuid(guid string) (gid, uid, cid uint)

ParseGuid

func (*Ab) PeerAdd

func (a *Ab) PeerAdd(c *gin.Context)

PeerAdd @Tags 地址[Personal] @Summary 添加地址 @Description 添加地址 @Accept json @Produce json @Param guid path string true "guid" @Success 200 {string} string @Failure 500 {object} response.ErrorResponse @Router /ab/peer/add/{guid} [post] @Security BearerAuth

func (*Ab) PeerDel

func (a *Ab) PeerDel(c *gin.Context)

PeerDel @Tags 地址[Personal] @Summary 删除地址 @Description 删除地址 @Accept json @Produce json @Param guid path string true "guid" @Success 200 {string} string @Failure 500 {object} response.ErrorResponse @Router /ab/peer/add/{guid} [delete] @Security BearerAuth

func (*Ab) PeerUpdate

func (a *Ab) PeerUpdate(c *gin.Context)

PeerUpdate @Tags 地址[Personal] @Summary 更新地址 @Description 更新地址 @Accept json @Produce json @Param guid path string true "guid" @Success 200 {string} string @Failure 500 {object} response.ErrorResponse @Router /ab/peer/update/{guid} [put] @Security BearerAuth

func (*Ab) Peers

func (a *Ab) Peers(c *gin.Context)

Peers @Tags 地址[Personal] @Summary 地址列表 @Description 地址 @Accept json @Produce json @Param current query int false "页码" @Param pageSize query int false "每页数量" @Param ab query string false "guid" @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router /ab/peers [post] @Security BearerAuth

func (*Ab) Personal

func (a *Ab) Personal(c *gin.Context)

Personal @Tags 地址[Personal] @Summary 个人地址 @Description 个人地址 @Accept json @Produce json @Param string body string false "string valid" @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router /ab/personal [post] @Security BearerAuth

func (*Ab) Settings

func (a *Ab) Settings(c *gin.Context)

Settings @Tags 地址[Personal] @Summary 设置 @Description 设置 @Accept json @Produce json @Param string body string false "string valid" @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router /ab/settings [post] @Security BearerAuth

func (*Ab) SharedProfiles

func (a *Ab) SharedProfiles(c *gin.Context)

SharedProfiles @Tags 地址[Personal] @Summary 共享地址簿 @Description 共享 @Accept json @Produce json @Param current query int false "页码" @Param pageSize query int false "每页数量" @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router /ab/shared/profiles [post] @Security BearerAuth

func (*Ab) TagAdd

func (a *Ab) TagAdd(c *gin.Context)

TagAdd @Tags 地址[Personal] @Summary 标签添加 @Description 标签 @Accept json @Produce json @Param guid path string true "guid" @Success 200 {string} string @Failure 500 {object} response.ErrorResponse @Router /ab/tag/add/{guid} [post] @Security BearerAuth

func (*Ab) TagDel

func (a *Ab) TagDel(c *gin.Context)

TagDel @Tags 地址[Personal] @Summary 标签删除 @Description 标签 @Accept json @Produce json @Param guid path string true "guid" @Success 200 {string} string @Failure 500 {object} response.ErrorResponse @Router /ab/tag/{guid} [delete] @Security BearerAuth

func (*Ab) TagRename

func (a *Ab) TagRename(c *gin.Context)

TagRename @Tags 地址[Personal] @Summary 标签重命名 @Description 标签 @Accept json @Produce json @Param guid path string true "guid" @Success 200 {string} string @Failure 500 {object} response.ErrorResponse @Router /ab/tag/rename/{guid} [put] @Security BearerAuth

func (*Ab) TagUpdate

func (a *Ab) TagUpdate(c *gin.Context)

TagUpdate @Tags 地址[Personal] @Summary 标签修改颜色 @Description 标签 @Accept json @Produce json @Param guid path string true "guid" @Success 200 {string} string @Failure 500 {object} response.ErrorResponse @Router /ab/tag/update/{guid} [put] @Security BearerAuth

func (*Ab) UpAb

func (a *Ab) UpAb(c *gin.Context)

UpAb @Tags 地址 @Summary 地址更新 @Description 地址更新 @Accept json @Produce json @Param body body requestform.AddressBookForm true "地址表单" @Success 200 {string} string "null" @Failure 500 {object} response.ErrorResponse @Router /ab [post] @Security BearerAuth

type Audit

type Audit struct {
}

func (*Audit) AuditConn

func (a *Audit) AuditConn(c *gin.Context)

AuditConn @Tags 审计 @Summary 审计连接 @Description 审计连接 @Accept json @Produce json @Param body body request.AuditConnForm true "审计连接" @Success 200 {string} string "" @Failure 500 {object} response.Response @Router /audit/conn [post]

func (*Audit) AuditFile

func (a *Audit) AuditFile(c *gin.Context)

AuditFile @Tags 审计 @Summary 审计文件 @Description 审计文件 @Accept json @Produce json @Param body body request.AuditFileForm true "审计文件" @Success 200 {string} string "" @Failure 500 {object} response.Response @Router /audit/file [post]

type Group

type Group struct {
}

func (*Group) Device

func (g *Group) Device(c *gin.Context)

Device @Tags 群组 @Summary 设备 @Description 机器 @Accept json @Produce json @Param page query int false "页码" @Param pageSize query int false "每页数量" @Param status query int false "状态" @Param accessible query string false "accessible" @Success 200 {object} response.DataResponse @Failure 500 {object} response.Response @Router /device-group/accessible [get] @Security BearerAuth

func (*Group) Peers

func (g *Group) Peers(c *gin.Context)

Peers @Tags 群组 @Summary 机器 @Description 机器 @Accept json @Produce json @Param page query int false "页码" @Param pageSize query int false "每页数量" @Param status query int false "状态" @Param accessible query string false "accessible" @Success 200 {object} response.DataResponse @Failure 500 {object} response.Response @Router /peers [get] @Security BearerAuth

func (*Group) Users

func (g *Group) Users(c *gin.Context)

Users 用户列表 @Tags 群组 @Summary 用户列表 @Description 用户列表 @Accept json @Produce json @Param page query int false "页码" @Param pageSize query int false "每页数量" @Param status query int false "状态" @Param accessible query string false "accessible" @Success 200 {object} response.DataResponse{data=[]apiResp.UserPayload} @Failure 500 {object} response.ErrorResponse @Router /users [get] @Security BearerAuth

type Index

type Index struct {
}

func (*Index) Heartbeat

func (i *Index) Heartbeat(c *gin.Context)

Heartbeat 心跳 @Tags 首页 @Summary 心跳 @Description 心跳 @Accept json @Produce json @Success 200 {object} nil @Failure 500 {object} response.Response @Router /heartbeat [post]

func (*Index) Index

func (i *Index) Index(c *gin.Context)

Index 首页 @Tags 首页 @Summary 首页 @Description 首页 @Accept json @Produce json @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router / [get]

func (*Index) Version

func (i *Index) Version(c *gin.Context)

Version 版本 @Tags 首页 @Summary 版本 @Description 版本 @Accept json @Produce json @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router /version [get]

type Login

type Login struct {
}

func (*Login) Login

func (l *Login) Login(c *gin.Context)

Login 登录 @Tags 登录 @Summary 登录 @Description 登录 @Accept json @Produce json @Param body body api.LoginForm true "登录表单" @Success 200 {object} apiResp.LoginRes @Failure 500 {object} response.ErrorResponse @Router /login [post]

func (*Login) LoginOptions

func (l *Login) LoginOptions(c *gin.Context)

LoginOptions @Tags 登录 @Summary 登录选项 @Description 登录选项 @Accept json @Produce json @Success 200 {object} []string @Failure 500 {object} response.ErrorResponse @Router /login-options [get]

func (*Login) Logout

func (l *Login) Logout(c *gin.Context)

Logout @Tags 登录 @Summary 登出 @Description 登出 @Accept json @Produce json @Success 200 {string} string @Failure 500 {object} response.ErrorResponse @Router /logout [post]

type MessageParams

type MessageParams struct {
	Lang  string `json:"lang" form:"lang"`
	Title string `json:"title" form:"title"`
	Msg   string `json:"msg" form:"msg"`
}

type Oauth

type Oauth struct {
}

func (*Oauth) Message

func (o *Oauth) Message(c *gin.Context)

func (*Oauth) OauthCallback

func (o *Oauth) OauthCallback(c *gin.Context)

OauthCallback 回调 @Tags Oauth @Summary OauthCallback @Description OauthCallback @Accept json @Produce json @Success 200 {object} apiResp.LoginRes @Failure 500 {object} response.ErrorResponse @Router /oidc/callback [get]

func (*Oauth) OidcAuth

func (o *Oauth) OidcAuth(c *gin.Context)

OidcAuth @Tags Oauth @Summary OidcAuth @Description OidcAuth @Accept json @Produce json @Success 200 {object} apiResp.LoginRes @Failure 500 {object} response.ErrorResponse @Router /oidc/auth [post]

func (*Oauth) OidcAuthQuery

func (o *Oauth) OidcAuthQuery(c *gin.Context)

OidcAuthQuery @Tags Oauth @Summary OidcAuthQuery @Description OidcAuthQuery @Accept json @Produce json @Success 200 {object} apiResp.LoginRes @Failure 500 {object} response.ErrorResponse @Router /oidc/auth-query [get]

func (*Oauth) OidcAuthQueryPre

func (o *Oauth) OidcAuthQueryPre(c *gin.Context) (*model.User, *model.UserToken)

type Peer

type Peer struct {
}

func (*Peer) SysInfo

func (p *Peer) SysInfo(c *gin.Context)

SysInfo @Tags System @Summary 提交系统信息 @Description 提交系统信息 @Accept json @Produce json @Param body body requstform.PeerForm true "系统信息表单" @Success 200 {string} string "SYSINFO_UPDATED,ID_NOT_FOUND" @Failure 500 {object} response.ErrorResponse @Router /sysinfo [post]

func (*Peer) SysInfoVer

func (p *Peer) SysInfoVer(c *gin.Context)

SysInfoVer @Tags System @Summary 获取系统版本信息 @Description 获取系统版本信息 @Accept json @Produce json @Success 200 {string} string "" @Failure 500 {object} response.ErrorResponse @Router /sysinfo_ver [post]

type User

type User struct {
}

func (*User) Info

func (u *User) Info(c *gin.Context)

Info 用户信息 @Tags 用户 @Summary 用户信息 @Description 用户信息 @Accept json @Produce json @Success 200 {object} apiResp.UserPayload @Failure 500 {object} response.Response @Router /currentUser [get] @Security token

type WebClient

type WebClient struct {
}

func (*WebClient) ServerConfig

func (i *WebClient) ServerConfig(c *gin.Context)

ServerConfig 服务配置 @Tags WEBCLIENT @Summary 服务配置 @Description 服务配置,给webclient提供api-server @Accept json @Produce json @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router /server-config [get] @Security token

func (*WebClient) ServerConfigV2

func (i *WebClient) ServerConfigV2(c *gin.Context)

ServerConfigV2 服务配置 @Tags WEBCLIENT_V2 @Summary 服务配置 @Description 服务配置,给webclient提供api-server @Accept json @Produce json @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router /server-config-v2 [get] @Security token

func (*WebClient) SharedPeer

func (i *WebClient) SharedPeer(c *gin.Context)

SharedPeer 分享的peer @Tags WEBCLIENT @Summary 分享的peer @Description 分享的peer @Accept json @Produce json @Success 200 {object} response.Response @Failure 500 {object} response.Response @Router /shared-peer [post]

Jump to

Keyboard shortcuts

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