openlist

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLoginParams

func CheckLoginParams() bool

func GetStatus

func GetStatus() int

func Login

func Login() error

func Logout

func Logout()

func Upload

func Upload(root, path, filename string) error

func Username

func Username() (string, error)

Types

type CommonResp

type CommonResp struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type DirContentModel

type DirContentModel struct {
	ID       string `json:"id"`
	Path     string `json:"path"`
	Name     string `json:"name"`
	Size     int64  `json:"size"`
	IsDir    bool   `json:"is_dir"`
	Modified string `json:"modified"`
	Created  string `json:"created"`
	Sign     string `json:"sign"`
	Thumb    string `json:"thumb"`
	Type     int    `json:"type"`
}

func DirInfo

func DirInfo(path string) (*DirContentModel, error)

type DirInfoRespModel

type DirInfoRespModel struct {
	CommonResp
	Data *DirContentModel `json:"data"`
}

type LoginRespModel

type LoginRespModel struct {
	CommonResp
	Data struct {
		Token string `json:"token"`
	} `json:"data"`
}

type UserInfoRespModel

type UserInfoRespModel struct {
	CommonResp
	Data struct {
		ID         string `json:"id"`
		Username   string `json:"username"`
		BasePath   string `json:"base_path"`
		Disabled   bool   `json:"disabled"`
		Permission int    `json:"permission"`
		Otp        bool   `json:"otp"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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