session

package
v0.0.0-...-0596915 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSession

func CreateSession(passwd string, level string) (string, error)

func DeleteSessionBySecret

func DeleteSessionBySecret(secret string) error

func ValidateAccess

func ValidateAccess(secret string, level string) (bool, error)

Check if session exists and level is correct

Types

type SessionData

type SessionData struct {
	Secret    string    `json:"secret"`
	CreatedAt time.Time `json:"created_at"`
	Level     string    `json:"level"`
	Password  string    `json:"passwd"`
}

func GetSessionBySecret

func GetSessionBySecret(secret string) (*SessionData, error)

Jump to

Keyboard shortcuts

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