Documentation ¶
Index ¶
- Constants
- Variables
- func AuthCheckHandler(w http.ResponseWriter, r *http.Request)
- func AuthOptionsHandler(w http.ResponseWriter, r *http.Request)
- func AuthSession(r *http.Request) (int, error)
- func ClearSecretSessionHandler(w http.ResponseWriter, r *http.Request)
- func ConfigGetHandler(w http.ResponseWriter, r *http.Request)
- func ConfigOptionsHandler(w http.ResponseWriter, r *http.Request)
- func ConfigUpdateHandler(w http.ResponseWriter, r *http.Request)
- func CreateUserHandler(w http.ResponseWriter, r *http.Request)
- func DeleteSubFile(sub_id int) error
- func DumpResponse(w http.ResponseWriter, message string, http_status int, error_code int, ...)
- func FileCreateHandler(w http.ResponseWriter, r *http.Request)
- func FileDeleteHandler(w http.ResponseWriter, r *http.Request)
- func FileDisableHandler(w http.ResponseWriter, r *http.Request)
- func FileEnableHandler(w http.ResponseWriter, r *http.Request)
- func FileListHandler(w http.ResponseWriter, r *http.Request)
- func FileOptionsHandler(w http.ResponseWriter, r *http.Request)
- func FilePauseHandler(w http.ResponseWriter, r *http.Request)
- func FileUnpauseHandler(w http.ResponseWriter, r *http.Request)
- func FileUpdateHandler(w http.ResponseWriter, r *http.Request)
- func LoginUserHandler(w http.ResponseWriter, r *http.Request)
- func LogoutUserHandler(w http.ResponseWriter, r *http.Request)
- func SaveUploadedFile(file multipart.File, fhead *multipart.FileHeader, save_path string) error
- func ServerInfoGetHandler(w http.ResponseWriter, r *http.Request)
- func ServerInfoOptionsHandler(w http.ResponseWriter, r *http.Request)
- func SetConfig(cfg *config.Config)
- func SubFileCreateHandler(w http.ResponseWriter, r *http.Request)
- func SubFileDeleteHandler(w http.ResponseWriter, r *http.Request)
- func VersionGetHandler(w http.ResponseWriter, r *http.Request)
- func VersionOptionsHandler(w http.ResponseWriter, r *http.Request)
- type ApiResponse
Constants ¶
View Source
const ( API_ERROR_SUCCESS = iota API_ERROR_BAD_REQUEST API_ERROR_FILE_SAVE_FAILED API_ERROR_FILE_NOT_FOUND API_ERROR_FILE_DATABASE_FAILED API_ERROR_BAD_AUTHENTICATION API_ERROR_PASSWORDS_DONT_MATCH API_ERROR_USER_ALREADY_EXISTS API_ERROR_SERVER_INFO_FAILED )
View Source
const AUTH_COOKIE_NAME = "t"
View Source
const AUTH_SESSION_TIMEOUT_SECS = 24 * 60 * 60
Variables ¶
View Source
var Cfg *config.Config = nil
Functions ¶
func AuthCheckHandler ¶
func AuthCheckHandler(w http.ResponseWriter, r *http.Request)
func AuthOptionsHandler ¶
func AuthOptionsHandler(w http.ResponseWriter, r *http.Request)
func ClearSecretSessionHandler ¶
func ClearSecretSessionHandler(w http.ResponseWriter, r *http.Request)
func ConfigGetHandler ¶
func ConfigGetHandler(w http.ResponseWriter, r *http.Request)
func ConfigOptionsHandler ¶
func ConfigOptionsHandler(w http.ResponseWriter, r *http.Request)
func ConfigUpdateHandler ¶
func ConfigUpdateHandler(w http.ResponseWriter, r *http.Request)
func CreateUserHandler ¶
func CreateUserHandler(w http.ResponseWriter, r *http.Request)
func DeleteSubFile ¶
func DumpResponse ¶
func DumpResponse(w http.ResponseWriter, message string, http_status int, error_code int, o interface{})
func FileCreateHandler ¶
func FileCreateHandler(w http.ResponseWriter, r *http.Request)
func FileDeleteHandler ¶
func FileDeleteHandler(w http.ResponseWriter, r *http.Request)
func FileDisableHandler ¶
func FileDisableHandler(w http.ResponseWriter, r *http.Request)
func FileEnableHandler ¶
func FileEnableHandler(w http.ResponseWriter, r *http.Request)
func FileListHandler ¶
func FileListHandler(w http.ResponseWriter, r *http.Request)
func FileOptionsHandler ¶
func FileOptionsHandler(w http.ResponseWriter, r *http.Request)
func FilePauseHandler ¶
func FilePauseHandler(w http.ResponseWriter, r *http.Request)
func FileUnpauseHandler ¶
func FileUnpauseHandler(w http.ResponseWriter, r *http.Request)
func FileUpdateHandler ¶
func FileUpdateHandler(w http.ResponseWriter, r *http.Request)
func LoginUserHandler ¶
func LoginUserHandler(w http.ResponseWriter, r *http.Request)
func LogoutUserHandler ¶
func LogoutUserHandler(w http.ResponseWriter, r *http.Request)
func SaveUploadedFile ¶
func ServerInfoGetHandler ¶
func ServerInfoGetHandler(w http.ResponseWriter, r *http.Request)
func ServerInfoOptionsHandler ¶
func ServerInfoOptionsHandler(w http.ResponseWriter, r *http.Request)
func SubFileCreateHandler ¶
func SubFileCreateHandler(w http.ResponseWriter, r *http.Request)
func SubFileDeleteHandler ¶
func SubFileDeleteHandler(w http.ResponseWriter, r *http.Request)
func VersionGetHandler ¶
func VersionGetHandler(w http.ResponseWriter, r *http.Request)
func VersionOptionsHandler ¶
func VersionOptionsHandler(w http.ResponseWriter, r *http.Request)
Types ¶
type ApiResponse ¶
Click to show internal directories.
Click to hide internal directories.