Documentation
¶
Index ¶
- type MediaController
- func (m *MediaController) BasePath() string
- func (m *MediaController) CreatesMediasFromDirectory(w http.ResponseWriter, r *http.Request, next func())
- func (m *MediaController) DownloadMedias(w http.ResponseWriter, r *http.Request, next func())
- func (m *MediaController) GetMedias(w http.ResponseWriter, r *http.Request, next func())
- func (m *MediaController) GetName() string
- func (m *MediaController) GetRandomMedia(w http.ResponseWriter, r *http.Request, next func())
- func (m *MediaController) LoadController(r *mux.Router, db dbm.DatabaseQuerier)
- func (m *MediaController) UploadPrivateImage(w http.ResponseWriter, r *http.Request, next func())
- type UserController
- func (l *UserController) BasePath() string
- func (l *UserController) GetName() string
- func (l *UserController) LoadController(r *mux.Router, db dbm.DatabaseQuerier, userManager user.Manager)
- func (l *UserController) Login(w http.ResponseWriter, r *http.Request, next func())
- func (l *UserController) Logout(w http.ResponseWriter, r *http.Request, next func())
- func (l *UserController) Register(w http.ResponseWriter, r *http.Request, next func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MediaController ¶
type MediaController struct { DomainBase string // contains filtered or unexported fields }
MediaController represent media management controller
func (*MediaController) BasePath ¶
func (m *MediaController) BasePath() string
BasePath base path used for the routes of the controller
func (*MediaController) CreatesMediasFromDirectory ¶
func (m *MediaController) CreatesMediasFromDirectory(w http.ResponseWriter, r *http.Request, next func())
CreatesMediasFromDirectory generate Media model in DB from file in "./static/images/"
func (*MediaController) DownloadMedias ¶
func (m *MediaController) DownloadMedias(w http.ResponseWriter, r *http.Request, next func())
DownloadMedias get all files name to DownloadMedias It will search in ./static.images the files It will zip them Open a dialog box to download
func (*MediaController) GetMedias ¶
func (m *MediaController) GetMedias(w http.ResponseWriter, r *http.Request, next func())
GetMedias used to retriev 20 medias from the database, the page must be add in parameter
func (*MediaController) GetName ¶
func (m *MediaController) GetName() string
GetName Name of the controller
func (*MediaController) GetRandomMedia ¶
func (m *MediaController) GetRandomMedia(w http.ResponseWriter, r *http.Request, next func())
GetRandomMedia return an image choosed randomly in the Database
func (*MediaController) LoadController ¶
func (m *MediaController) LoadController(r *mux.Router, db dbm.DatabaseQuerier)
LoadController Middleware of the controller
func (*MediaController) UploadPrivateImage ¶
func (m *MediaController) UploadPrivateImage(w http.ResponseWriter, r *http.Request, next func())
UploadPrivateImage Upload image to the filesystem
type UserController ¶
type UserController struct { DomainBase string // contains filtered or unexported fields }
LoginController manage login logout
func (*UserController) BasePath ¶
func (l *UserController) BasePath() string
BasePath base path used for the routes of the controller
func (*UserController) GetName ¶
func (l *UserController) GetName() string
GetName Name of the controller
func (*UserController) LoadController ¶
func (l *UserController) LoadController(r *mux.Router, db dbm.DatabaseQuerier, userManager user.Manager)
LoadController Middleware of the controller
func (*UserController) Login ¶
func (l *UserController) Login(w http.ResponseWriter, r *http.Request, next func())
Login log in
func (*UserController) Logout ¶
func (l *UserController) Logout(w http.ResponseWriter, r *http.Request, next func())
Logout log out
func (*UserController) Register ¶
func (l *UserController) Register(w http.ResponseWriter, r *http.Request, next func())
Register a new user