shared

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSessionCookie = errors.New("no session cookie found")
	SessionCookieName  = "PDM_Session"
)

Functions

func ClearSessionCookie added in v0.1.3

func ClearSessionCookie(w http.ResponseWriter)

ClearSessionCookie deletes the session cookie.

func GetSessionLoginname added in v0.1.3

func GetSessionLoginname(r *http.Request) (string, error)

GetSessionLoginname retrieves the loginname stored in the session cookie.

func ImportSharedFiles added in v0.1.3

func ImportSharedFiles()

func SetSessionCookie added in v0.1.3

func SetSessionCookie(w http.ResponseWriter, loginname string)

SetSessionCookie sets the session cookie for the user.

Types

type CommandRequest

type CommandRequest struct {
	User    string            `json:"user"`
	Vault   string            `json:"vault,omitempty"`
	Command string            `json:"command"`
	Params  map[string]string `json:"params,omitempty"`
}

func (CommandRequest) String

func (req CommandRequest) String() string

type CommandResponse

type CommandResponse struct {
	Error string   `json:"error,omitempty"`
	Data  []string `json:"data,omitempty"`
}

func (CommandResponse) String

func (res CommandResponse) String() string

Jump to

Keyboard shortcuts

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