Documentation
¶
Index ¶
- Variables
- func ApiGroup(group *echo.Group)
- func AuthJwtMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func BroadcastClientMessageAll(message utils.Message, client_id string)
- func BroadcastServerMessageAll(payload string)
- func Chat(c echo.Context) error
- func ClientDisconnect(conn *websocket.Conn, client_id string, client *utils.Client)
- func DeleteJournalLog(c echo.Context) error
- func EchoBackBody(c echo.Context) error
- func EchoBackQuery(c echo.Context) error
- func FetchClipboardData(c echo.Context) error
- func FileTransferGroup_old(group *echo.Group)
- func FileTransfer_old(c echo.Context) error
- func GetChatDebug(c echo.Context) error
- func GetChatLogs(c echo.Context) error
- func GetFileFromObjectKey(c echo.Context) error
- func GetLoggedData(c echo.Context) error
- func GetMarkdownFromSlug(c echo.Context) error
- func GetNotesMedia(c echo.Context) error
- func GetResume(c echo.Context) error
- func GetResumeHTML(c echo.Context) error
- func GetResumeMarkdown(c echo.Context) error
- func GetResumePDF(c echo.Context) error
- func GetResumePNG(c echo.Context) error
- func GetRootInfo(c echo.Context) error
- func GetServerLogs(c echo.Context) error
- func GetUserLogs(c echo.Context) error
- func JournalLoggerGroup(group *echo.Group)
- func KeyExistsInList(objectKeyToCheck string, fetchedObjectKeys *[]utils.FileInfo) *utils.FileInfo
- func LoginHandler(c echo.Context) error
- func MiscGroup(group *echo.Group)
- func NotesGroup(group *echo.Group)
- func PingServer(c echo.Context) error
- func PostClipboardData(c echo.Context) error
- func PostJournalLogEntry(c echo.Context) error
- func RandomGreeting(c echo.Context) error
- func ReadWebClipboardData() (*[]string, error)
- func S3FileFetchGroup(group *echo.Group)
- func SendCommandToConn(command *FT_Command, conn *websocket.Conn)
- func SendMessageToClient(message utils.Message, conn *websocket.Conn) error
- func ServerMessageToClient(payload string, conn *websocket.Conn)
- func SignupHandler(c echo.Context) error
- func StreamVideoFile(c echo.Context) error
- func UpdateApiData(c echo.Context) error
- func UpdateJournalLog(c echo.Context) error
- func UserGroup(group *echo.Group)
- func WebClipboardGroup(group *echo.Group)
- func WriteWebClipboardData(updatedData *[]string) error
- type ClientUserLogReq
- type ClipboardNew
- type DeleteLogReq
- type FT_Command
- type FT_MetaData
- type FT_Packet
- type JwtClaims
- type LogInfo
- type NewUserLogCreate
- type UpdateLogReq
- type UpdateLogReqDB
- type User2
- type UserAuth
- type UserAuthField
- type UserLogRes
- type UserLogin
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidFormat = FT_Command{SentBy: "server", Command: "error", Payload: "Invalid Command Format"} ErrInvalidTransferID = FT_Command{SentBy: "server", Command: "error", Payload: "Invalid Transfer ID"} )
Functions ¶
func AuthJwtMiddleware ¶
func AuthJwtMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func BroadcastClientMessageAll ¶
Main chat broadcast General chat The client who sent the message is skipped
func BroadcastServerMessageAll ¶
func BroadcastServerMessageAll(payload string)
For Server notification broadcasting When user joins/disconnects etc
func ClientDisconnect ¶
Handle Client socket disconnection Graceful handling prevents error logs
func DeleteJournalLog ¶
func DeleteJournalLog(c echo.Context) error
func EchoBackBody ¶
func EchoBackBody(c echo.Context) error
func EchoBackQuery ¶
func EchoBackQuery(c echo.Context) error
func FetchClipboardData ¶
func FetchClipboardData(c echo.Context) error
func FileTransferGroup_old ¶
func FileTransferGroup_old(group *echo.Group)
func FileTransfer_old ¶
func FileTransfer_old(c echo.Context) error
func GetChatDebug ¶
func GetChatDebug(c echo.Context) error
func GetChatLogs ¶
func GetChatLogs(c echo.Context) error
func GetFileFromObjectKey ¶
func GetFileFromObjectKey(c echo.Context) error
Requires password and object key as query params Object key is checked againsts the ones fetched from bucket.
func GetLoggedData ¶
func GetLoggedData(c echo.Context) error
func GetMarkdownFromSlug ¶
func GetMarkdownFromSlug(c echo.Context) error
func GetNotesMedia ¶
func GetNotesMedia(c echo.Context) error
func GetResume ¶
func GetResume(c echo.Context) error
Initially download the file in ./data/files/resume.pdf If file exists at path then return the file Else download to the location Reduction in S3 fetching cost
func GetResumeHTML ¶
func GetResumeHTML(c echo.Context) error
func GetResumeMarkdown ¶
func GetResumeMarkdown(c echo.Context) error
func GetResumePDF ¶
func GetResumePDF(c echo.Context) error
func GetResumePNG ¶
func GetResumePNG(c echo.Context) error
func GetRootInfo ¶
func GetRootInfo(c echo.Context) error
func GetServerLogs ¶
func GetServerLogs(c echo.Context) error
func GetUserLogs ¶
func GetUserLogs(c echo.Context) error
func KeyExistsInList ¶
Check whether the object key exists in the fetched object key list
func LoginHandler ¶
func LoginHandler(c echo.Context) error
func NotesGroup ¶
func NotesGroup(group *echo.Group)
func PingServer ¶
func PingServer(c echo.Context) error
func PostClipboardData ¶
func PostClipboardData(c echo.Context) error
func PostJournalLogEntry ¶
func PostJournalLogEntry(c echo.Context) error
func RandomGreeting ¶
func RandomGreeting(c echo.Context) error
func ReadWebClipboardData ¶
Doesnt maintain the formatting. Store in an empty file
func S3FileFetchGroup ¶
func S3FileFetchGroup(group *echo.Group)
func SendCommandToConn ¶
func SendCommandToConn(command *FT_Command, conn *websocket.Conn)
func SendMessageToClient ¶
Server to a single client Main method called by others
func ServerMessageToClient ¶
Simple wrapper to directly pass in strings and send to a conn
func SignupHandler ¶
func SignupHandler(c echo.Context) error
func StreamVideoFile ¶
func StreamVideoFile(c echo.Context) error
func UpdateJournalLog ¶
func UpdateJournalLog(c echo.Context) error
func WebClipboardGroup ¶
func WebClipboardGroup(group *echo.Group)
/clipboard Storing temporary data in json. Limit the number of items. Allow deletion
func WriteWebClipboardData ¶
Types ¶
type ClientUserLogReq ¶
type ClipboardNew ¶
type ClipboardNew struct {
Text string `json:"text"`
}
type DeleteLogReq ¶
type DeleteLogReq struct {
Log_Id int `json:"log_id"`
}
type FT_Command ¶
type FT_MetaData ¶
type JwtClaims ¶
type JwtClaims struct { Email string `json:"email"` Username string `json:"username"` Id int `json:"id"` jwt.StandardClaims }
The claims are fields that allow control over the tokens validity or scope. For now using these to store basic user info