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 FileTransfer(c echo.Context) error
- func FileTransferGroup(group *echo.Group)
- func GetChatDebug(c echo.Context) error
- func GetChatLogs(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 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 LoginHandler(c echo.Context) error
- func MiscGroup(group *echo.Group)
- func NotesGroup(group *echo.Group)
- func PingServer(c echo.Context) error
- func PostJournalLogEntry(c echo.Context) error
- func RandomGreeting(c echo.Context) error
- 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)
- type ClientUserLogReq
- 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 ¶
View Source
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 FileTransfer ¶
func FileTransfer(c echo.Context) error
func FileTransferGroup ¶
func FileTransferGroup(group *echo.Group)
func GetChatDebug ¶
func GetChatDebug(c echo.Context) error
func GetChatLogs ¶
func GetChatLogs(c echo.Context) error
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 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 LoginHandler ¶
func LoginHandler(c echo.Context) error
func NotesGroup ¶
func NotesGroup(group *echo.Group)
func PingServer ¶
func PingServer(c echo.Context) error
func PostJournalLogEntry ¶
func PostJournalLogEntry(c echo.Context) error
func RandomGreeting ¶
func RandomGreeting(c echo.Context) error
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
Types ¶
type ClientUserLogReq ¶
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
type NewUserLogCreate ¶
type UpdateLogReq ¶
type UpdateLogReqDB ¶
type UserAuthField ¶
type UserLogRes ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.