Documentation ¶
Index ¶
- Variables
- func CheckFileStatus(ch cache.Cache) gin.HandlerFunc
- func DataAuthority(db data.Database) gin.HandlerFunc
- func DownloadFile(db data.Database) gin.HandlerFunc
- func GetFilesList(db data.Database) gin.HandlerFunc
- func GetJournalPage() gin.HandlerFunc
- func GetLibraryPage() gin.HandlerFunc
- func GetLoginPage() gin.HandlerFunc
- func GetNotesList(db data.Database) gin.HandlerFunc
- func MergeTargetFile(db data.Database, ch cache.Cache) gin.HandlerFunc
- func PostSingleChunk(ch cache.Cache) gin.HandlerFunc
- func SubmitLoginData(db data.Database) gin.HandlerFunc
- func VerifyAuthority() gin.HandlerFunc
- func WriteUserNote(db data.Database) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
var ( // HostAddr is http service connection address and port. HostAddress string // The http server's listen port. ListenPort string )
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 )
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 ¶
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.