Documentation ¶
Index ¶
- func CreateTempFile(src []byte) (*os.File, error)
- func CreateUser(c echo.Context) error
- func DeleteUser(c echo.Context) error
- func DestroyFile(fileLoc string) error
- func DownloadFile(c echo.Context) error
- func GetUser(c echo.Context) error
- func LoginUser()
- func LogoutUser()
- func StringReverse(s string) string
- func TransliterateController(c echo.Context) error
- func UpdateUser(c echo.Context) error
- func UploadController(c echo.Context) error
- type ErrorMessage
- type SuccessfulResponse
- type TextSubmission
- type UploadSuccess
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempFile ¶
CreateTempFile wrapper func for ioutil.TempFile
func DestroyFile ¶
DestroyFile for deletion of tempfile on download request
func TransliterateController ¶
TransliterateController route handler
func UploadController ¶
UploadController for reading uploaded file
Types ¶
type ErrorMessage ¶
ErrorMessage for error repsonses
type SuccessfulResponse ¶
type SuccessfulResponse struct { Code int64 Message string Language string SubmittedText string TransliteratedText string }
SuccessfulResponse for transliterate success message.
type TextSubmission ¶
type TextSubmission struct {
Text string `json:"text" form:"text" query:"text"`
}
TextSubmission struct
type UploadSuccess ¶
type UploadSuccess struct { Code int64 Message string Language string OriginalFile multipart.File TempFile *os.File FileType string TransliteratedText string BytesWritten int DownloadLink string }
UploadSuccess for upload success message.
type User ¶
type User struct { ID int `json:"id" form:"id" query:"id"` FirstName string `json:"firstname" form:"firstname" query:"firstname"` LastName string `json:"lastname" form:"lastname" query:"lastname"` Email string `json:"email" form:"email" query:"email"` Pass string `json:"password" form:"password" query:"password"` //encrypt }
User struct for registering users
Click to show internal directories.
Click to hide internal directories.