Documentation ¶
Index ¶
- Constants
- type Galleries
- func (g *Galleries) Create(w http.ResponseWriter, r *http.Request)
- func (g *Galleries) Delete(w http.ResponseWriter, r *http.Request)
- func (g *Galleries) Edit(w http.ResponseWriter, r *http.Request)
- func (g *Galleries) ImageDelete(w http.ResponseWriter, r *http.Request)
- func (g *Galleries) ImageUpload(w http.ResponseWriter, r *http.Request)
- func (g *Galleries) Index(w http.ResponseWriter, r *http.Request)
- func (g *Galleries) Show(w http.ResponseWriter, r *http.Request)
- func (g *Galleries) Update(w http.ResponseWriter, r *http.Request)
- type GalleryForm
- type LoginForm
- type SignupForm
- type Static
- type Users
Constants ¶
View Source
const ( ShowGallery = "show_gallery" EditGallery = "edit_gallery" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Galleries ¶
type Galleries struct { New *views.View ShowView *views.View EditView *views.View IndexView *views.View // contains filtered or unexported fields }
func NewGalleries ¶
func NewGalleries(gs models.GalleryService, is models.ImageService, r *mux.Router) *Galleries
func (*Galleries) Create ¶
func (g *Galleries) Create(w http.ResponseWriter, r *http.Request)
POST /galleries
func (*Galleries) Delete ¶
func (g *Galleries) Delete(w http.ResponseWriter, r *http.Request)
POST /galleries/:id/delete
func (*Galleries) Edit ¶
func (g *Galleries) Edit(w http.ResponseWriter, r *http.Request)
GET /galleries/:id/edit
func (*Galleries) ImageDelete ¶
func (g *Galleries) ImageDelete(w http.ResponseWriter, r *http.Request)
POST /galleries/:id/images/:filename/delete
data:
func (*Galleries) ImageUpload ¶
func (g *Galleries) ImageUpload(w http.ResponseWriter, r *http.Request)
POST /galleries/:id/images
func (*Galleries) Index ¶
func (g *Galleries) Index(w http.ResponseWriter, r *http.Request)
GET /galleries
type GalleryForm ¶
type GalleryForm struct {
Title string `schema:"title"`
}
type SignupForm ¶
type Users ¶
type Users struct { NewView *views.View LoginView *views.View // contains filtered or unexported fields }
func NewUsers ¶
func NewUsers(us models.UserService) *Users
NewUsers is used to create a new Users controller. This function will panic if the templates are not parsed correctly, and should only be used during initial setup.
func (*Users) Create ¶
func (u *Users) Create(w http.ResponseWriter, r *http.Request)
Create is used to process the signup form when a user submits it. This is used to create a new user account.
POST /signup
Click to show internal directories.
Click to hide internal directories.