api

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearSession

func ClearSession(c *gin.Context)

func GetLoginUser

func GetLoginUser(c *gin.Context) string

func IsLogin

func IsLogin(c *gin.Context) bool

func NewAPIHandler

func NewAPIHandler(g *gin.RouterGroup, a2 *APIv2Handler)

func SetLoginUser

func SetLoginUser(c *gin.Context, userName string, maxAge int) error

func SetMaxAge

func SetMaxAge(c *gin.Context) error

Types

type APIHandler

type APIHandler struct {
	ApiService
	// contains filtered or unexported fields
}

type APIv2Handler

type APIv2Handler struct {
	ApiService
	// contains filtered or unexported fields
}

func NewAPIv2Handler

func NewAPIv2Handler(g *gin.RouterGroup) *APIv2Handler

func (*APIv2Handler) ReloadTokens

func (a *APIv2Handler) ReloadTokens()

type ApiService

func (*ApiService) AddToken

func (a *ApiService) AddToken(c *gin.Context)

func (*ApiService) ChangePass

func (a *ApiService) ChangePass(c *gin.Context)

func (*ApiService) CheckChanges

func (a *ApiService) CheckChanges(c *gin.Context)

func (*ApiService) DeleteToken

func (a *ApiService) DeleteToken(c *gin.Context)

func (*ApiService) GetDb

func (a *ApiService) GetDb(c *gin.Context)

func (*ApiService) GetKeypairs

func (a *ApiService) GetKeypairs(c *gin.Context)

func (*ApiService) GetLogs

func (a *ApiService) GetLogs(c *gin.Context)

func (*ApiService) GetOnlines

func (a *ApiService) GetOnlines(c *gin.Context)

func (*ApiService) GetSettings

func (a *ApiService) GetSettings(c *gin.Context)

func (*ApiService) GetStats

func (a *ApiService) GetStats(c *gin.Context)

func (*ApiService) GetStatus

func (a *ApiService) GetStatus(c *gin.Context)

func (*ApiService) GetTokens

func (a *ApiService) GetTokens(c *gin.Context)

func (*ApiService) GetUsers

func (a *ApiService) GetUsers(c *gin.Context)

func (*ApiService) ImportDb

func (a *ApiService) ImportDb(c *gin.Context)

func (*ApiService) LinkConvert

func (a *ApiService) LinkConvert(c *gin.Context)

func (*ApiService) LoadData

func (a *ApiService) LoadData(c *gin.Context)

func (*ApiService) LoadPartialData

func (a *ApiService) LoadPartialData(c *gin.Context, objs []string) error

func (*ApiService) LoadTokens

func (a *ApiService) LoadTokens() ([]byte, error)

func (*ApiService) Login

func (a *ApiService) Login(c *gin.Context)

func (*ApiService) Logout

func (a *ApiService) Logout(c *gin.Context)

func (*ApiService) RestartApp

func (a *ApiService) RestartApp(c *gin.Context)

func (*ApiService) RestartSb

func (a *ApiService) RestartSb(c *gin.Context)

func (*ApiService) Save

func (a *ApiService) Save(c *gin.Context, loginUser string)

type Msg

type Msg struct {
	Success bool        `json:"success"`
	Msg     string      `json:"msg"`
	Obj     interface{} `json:"obj"`
}

type TokenInMemory

type TokenInMemory struct {
	Token    string
	Expiry   int64
	Username string
}

Jump to

Keyboard shortcuts

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