handler

package
v0.0.0-...-9257e39 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HostAddr is http service connection address and port.
	HostAddress string
	// The http server's listen port.
	ListenPort string
)
View Source
var (
	// cookie's valid duration
	CookieExpireDuration int
	// cookie's scope
	CookieAccessScope string
	// where these files storage
	FileStorageDirectory string
	// base url of file's url
	DownloadUrlBase string
)
View Source
var (
	// TokenExpireDuration is token's valid duration.
	TokenExpireDuration time.Duration
	// EncryptionKey used for encryption.
	EncryptionKey string
	// TokenIssuer is the token's provider.
	TokenIssuer string
)

Functions

func CheckFileStatus

func CheckFileStatus(ch cache.Cache) gin.HandlerFunc

CheckFileStatus is a function that returns the status of the file in the server.

func DataAuthority

func DataAuthority(db data.Database) gin.HandlerFunc

DataAuthority function check the authentication permission for /data.

func DownloadFile

func DownloadFile(db data.Database) gin.HandlerFunc

DownloadFile is the handler function for file download.

func GetFilesList

func GetFilesList(db data.Database) gin.HandlerFunc

GetFilesList get all the files in server's storage.

func GetJournalPage

func GetJournalPage() gin.HandlerFunc

GetJournalPage is a handler function which response the GET request for journal page.

func GetLibraryPage

func GetLibraryPage() gin.HandlerFunc

GetLibraryPage is the function which response to the library page's get request.

func GetLoginPage

func GetLoginPage() gin.HandlerFunc

GetLoginPage is a function that handles GET requests for login pages.

func GetNotesList

func GetNotesList(db data.Database) gin.HandlerFunc

GetNotesList get all the notes it have so far.

func MergeTargetFile

func MergeTargetFile(db data.Database, ch cache.Cache) gin.HandlerFunc

MergeTargetFile get instructions for receiving combined files.

func PostSingleChunk

func PostSingleChunk(ch cache.Cache) gin.HandlerFunc

PostSingleChunk is functions for receiving file slices.

func SubmitLoginData

func SubmitLoginData(db data.Database) gin.HandlerFunc

SubmitLoginData is a function responsible for receiving verification login information.

func VerifyAuthority

func VerifyAuthority() gin.HandlerFunc

VerifyAuthority is a permission authentication middleware which verify the cookies.

func WriteUserNote

func WriteUserNote(db data.Database) gin.HandlerFunc

WriteUserNote is a function that receive the log submitted in the background.

Types

This section is empty.

Jump to

Keyboard shortcuts

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