webserver

package
v0.0.0-...-ab7327d Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(port int, stdLogger *log.Logger, errorLogger *log.Logger, curr_dir string, database *sql.DB)

Types

type DirectoryContentResponse

type DirectoryContentResponse struct {
	Directory string     `json:"directory"`
	FileInfos []FileInfo `json:"fileInfos"`
	Error     string     `json:"error,omitempty"`
}

type DiskUsageResponse

type DiskUsageResponse struct {
	Directory string `json:"directory"`
	DiskUsage int64  `json:"diskUsage"`
	Error     string `json:"error,omitempty"`
}

type FileInfo

type FileInfo struct {
	Name    string `json:"name"`
	Size    int64  `json:"size"`
	Mode    string `json:"mode"`
	ModTime string `json:"modTime"`
	IsDir   bool   `json:"isDir"`
}

type FileInfoResponse

type FileInfoResponse struct {
	FileInfo FileInfo `json:"fileInfo"`
	Error    string   `json:"error,omitempty"`
}

type PingResponse

type PingResponse struct {
	Message     string        `json:"message"`
	ElapsedTime time.Duration `json:"elapsedTime"`
}

type User

type User struct {
	ID       int    `json:"id"`
	Username string `json:"username"`
	Password string `json:"password"`
	Role     string `json:"role"`
}

Jump to

Keyboard shortcuts

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