Documentation ¶
Index ¶
- func CreateFile(mf *multipart.File, fname string)
- func CreateFiles(mf *multipart.File, fname string)
- type AdminPartiesHandler
- func (ph *AdminPartiesHandler) AdminParties(w http.ResponseWriter, r *http.Request)
- func (ph *AdminPartiesHandler) AdminPartiesDelete(w http.ResponseWriter, r *http.Request)
- func (ph *AdminPartiesHandler) AdminPartiesUpdate(w http.ResponseWriter, r *http.Request)
- func (ph *AdminPartiesHandler) Parties(w http.ResponseWriter, r *http.Request)
- func (ph *AdminPartiesHandler) PartiesNew(w http.ResponseWriter, r *http.Request)
- type AdminPostsHandler
- func (ph *AdminPostsHandler) AdminPostDelete(w http.ResponseWriter, r *http.Request)
- func (ph *AdminPostsHandler) AdminPostsUpdate(w http.ResponseWriter, r *http.Request)
- func (ph *AdminPostsHandler) PostNew(w http.ResponseWriter, r *http.Request)
- func (ph *AdminPostsHandler) Posts(w http.ResponseWriter, r *http.Request)
- type EventHandler
- type PartiesHandler
- type PostsHandler
- type VoterHandler
- func (uh *VoterHandler) AdminUsers(w http.ResponseWriter, r *http.Request)
- func (uh *VoterHandler) AdminUsersDelete(w http.ResponseWriter, r *http.Request)
- func (uh *VoterHandler) AdminUsersNew(w http.ResponseWriter, r *http.Request)
- func (uh *VoterHandler) AdminUsersUpdate(w http.ResponseWriter, r *http.Request)
- func (uh *VoterHandler) Authenticated(next http.Handler) http.Handler
- func (uh *VoterHandler) Authorized(next http.Handler) http.Handler
- func (uh *VoterHandler) Login(w http.ResponseWriter, r *http.Request)
- func (uh *VoterHandler) Logout(w http.ResponseWriter, r *http.Request)
- func (uh *VoterHandler) Register4Event(w http.ResponseWriter, r *http.Request)
- func (uh *VoterHandler) Signup(w http.ResponseWriter, r *http.Request)
- func (uh *VoterHandler) Vote(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
func CreateFiles ¶
func (ph *PostsHandler) PostNew(w http.ResponseWriter, r *http.Request) {
func (ph *PostsHandler) choseParty(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodPost { pst := entities.Post{} pst.Name = r.FormValue("name") pst.Writer = r.FormValue("writer") pst.Disc = r.FormValue("description") mf, fh, err := r.FormFile("vid") if err != nil { panic(err) } defer mf.Close() pst.Vid = fh.Filename CreateFiles(&mf, fh.Filename) log.Print(pst) _, errs := ph.pstServ.StorePost(&pst) if errs != nil { panic(errs) } http.Redirect(w, r, "/posts", http.StatusSeeOther) } else { ph.tmpl.ExecuteTemplate(w, "upload.post", nil) } }
Types ¶
type AdminPartiesHandler ¶
type AdminPartiesHandler struct {
// contains filtered or unexported fields
}
func NewAdminPartiesHandler ¶
func NewAdminPartiesHandler(T *template.Template, PS parties.PartiesService) *AdminPartiesHandler
func NewPartiesHandler ¶
func NewPartiesHandler(T *template.Template, PS parties.PartiesService) *AdminPartiesHandler
func (*AdminPartiesHandler) AdminParties ¶
func (ph *AdminPartiesHandler) AdminParties(w http.ResponseWriter, r *http.Request)
func (*AdminPartiesHandler) AdminPartiesDelete ¶
func (ph *AdminPartiesHandler) AdminPartiesDelete(w http.ResponseWriter, r *http.Request)
func (*AdminPartiesHandler) AdminPartiesUpdate ¶
func (ph *AdminPartiesHandler) AdminPartiesUpdate(w http.ResponseWriter, r *http.Request)
func (*AdminPartiesHandler) Parties ¶
func (ph *AdminPartiesHandler) Parties(w http.ResponseWriter, r *http.Request)
func (*AdminPartiesHandler) PartiesNew ¶
func (ph *AdminPartiesHandler) PartiesNew(w http.ResponseWriter, r *http.Request)
type AdminPostsHandler ¶
type AdminPostsHandler struct {
// contains filtered or unexported fields
}
func NewAdminPostHandler ¶
func NewAdminPostHandler(T *template.Template, PS post.PostService, csKey []byte) *AdminPostsHandler
func (*AdminPostsHandler) AdminPostDelete ¶
func (ph *AdminPostsHandler) AdminPostDelete(w http.ResponseWriter, r *http.Request)
func (*AdminPostsHandler) AdminPostsUpdate ¶
func (ph *AdminPostsHandler) AdminPostsUpdate(w http.ResponseWriter, r *http.Request)
func (*AdminPostsHandler) PostNew ¶
func (ph *AdminPostsHandler) PostNew(w http.ResponseWriter, r *http.Request)
func (*AdminPostsHandler) Posts ¶
func (ph *AdminPostsHandler) Posts(w http.ResponseWriter, r *http.Request)
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func NewEventHandler ¶
func NewEventHandler(T *template.Template, ES Event.EventService) *EventHandler
func (*EventHandler) DeleteEvents ¶
func (eh *EventHandler) DeleteEvents(w http.ResponseWriter, r *http.Request)
func (*EventHandler) EventNew ¶
func (ph *EventHandler) EventNew(w http.ResponseWriter, r *http.Request)
func (*EventHandler) Events ¶
func (ph *EventHandler) Events(w http.ResponseWriter, r *http.Request)
func (*EventHandler) UpdateEvents ¶
func (eh *EventHandler) UpdateEvents(w http.ResponseWriter, r *http.Request)
type PartiesHandler ¶
type PartiesHandler struct {
// contains filtered or unexported fields
}
type PostsHandler ¶
type PostsHandler struct {
// contains filtered or unexported fields
}
func NewPostHandler ¶
func NewPostHandler(T *template.Template, PS post.PostService) *PostsHandler
func (*PostsHandler) Posts ¶
func (ph *PostsHandler) Posts(w http.ResponseWriter, r *http.Request)
type VoterHandler ¶
type VoterHandler struct {
// contains filtered or unexported fields
}
func NewVoterHandler ¶
func NewVoterHandler(T *template.Template, AS voters.VotersService, sessServ voters.SessionService, role voters.RoleService, vtrsess *entities.Session, csKye []byte) *VoterHandler
func (*VoterHandler) AdminUsers ¶
func (uh *VoterHandler) AdminUsers(w http.ResponseWriter, r *http.Request)
func (*VoterHandler) AdminUsersDelete ¶
func (uh *VoterHandler) AdminUsersDelete(w http.ResponseWriter, r *http.Request)
func (*VoterHandler) AdminUsersNew ¶
func (uh *VoterHandler) AdminUsersNew(w http.ResponseWriter, r *http.Request)
func (*VoterHandler) AdminUsersUpdate ¶
func (uh *VoterHandler) AdminUsersUpdate(w http.ResponseWriter, r *http.Request)
func (*VoterHandler) Authenticated ¶
func (uh *VoterHandler) Authenticated(next http.Handler) http.Handler
func (*VoterHandler) Authorized ¶
func (uh *VoterHandler) Authorized(next http.Handler) http.Handler
func (*VoterHandler) Login ¶
func (uh *VoterHandler) Login(w http.ResponseWriter, r *http.Request)
func (*VoterHandler) Logout ¶
func (uh *VoterHandler) Logout(w http.ResponseWriter, r *http.Request)
func (*VoterHandler) Register4Event ¶
func (uh *VoterHandler) Register4Event(w http.ResponseWriter, r *http.Request)
func (*VoterHandler) Signup ¶
func (uh *VoterHandler) Signup(w http.ResponseWriter, r *http.Request)
func (*VoterHandler) Vote ¶
func (uh *VoterHandler) Vote(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.