controllers

package
v0.0.0-...-a352b82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL