Documentation
¶
Index ¶
- Constants
- func New(ctx context.Context, config *Config) (*mux.Router, error)
- func NewResponseWriter(w http.ResponseWriter) *responseWriter
- type App
- type Config
- type UserLogin
- type UserRegister
- type UserSettings
- func (us *UserSettings) AcceptEmailVerif(w http.ResponseWriter, r *http.Request)
- func (us *UserSettings) Get(w http.ResponseWriter, r *http.Request)
- func (us *UserSettings) GetAccount(w http.ResponseWriter, r *http.Request)
- func (us *UserSettings) GetPrivacy(w http.ResponseWriter, r *http.Request)
- func (us *UserSettings) GetProfile(w http.ResponseWriter, r *http.Request)
- func (us *UserSettings) SetAccount(w http.ResponseWriter, r *http.Request)
- func (us *UserSettings) SetPrivacy(w http.ResponseWriter, r *http.Request)
- func (us *UserSettings) SetProfile(w http.ResponseWriter, r *http.Request)
- func (us *UserSettings) VerifyEmail(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const (
UserIDSession = "user_id"
)
Variables ¶
This section is empty.
Functions ¶
func NewResponseWriter ¶
func NewResponseWriter(w http.ResponseWriter) *responseWriter
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the struct for the homepage or the user profile homepage
type Config ¶
type Config struct {
SessionKey, RedisAddr, RedisPassword, GmailEmail,
GmailPassword, AccessSecret, MinioEndpoint, MinioUser, MinioPassword string
}
type UserLogin ¶
type UserLogin struct {
// contains filtered or unexported fields
}
UserLogin specific handler group for user interactions similar to app but differs in handling especially error
type UserRegister ¶
type UserRegister struct {
// contains filtered or unexported fields
}
UserRegister this is created so that the error field has few accessors; not that unique to App
func (*UserRegister) Get ¶
func (ur *UserRegister) Get(w http.ResponseWriter, r *http.Request)
Get should always redirect to "/" if the user is logged in otherwise go back to "/login" to relogin
func (*UserRegister) Post ¶
func (ur *UserRegister) Post(w http.ResponseWriter, r *http.Request)
type UserSettings ¶
type UserSettings struct {
// contains filtered or unexported fields
}
UserSettings this is created so that the error field has few accessors; not that unique to App
func (*UserSettings) AcceptEmailVerif ¶
func (us *UserSettings) AcceptEmailVerif(w http.ResponseWriter, r *http.Request)
func (*UserSettings) Get ¶
func (us *UserSettings) Get(w http.ResponseWriter, r *http.Request)
func (*UserSettings) GetAccount ¶
func (us *UserSettings) GetAccount(w http.ResponseWriter, r *http.Request)
func (*UserSettings) GetPrivacy ¶
func (us *UserSettings) GetPrivacy(w http.ResponseWriter, r *http.Request)
func (*UserSettings) GetProfile ¶
func (us *UserSettings) GetProfile(w http.ResponseWriter, r *http.Request)
func (*UserSettings) SetAccount ¶
func (us *UserSettings) SetAccount(w http.ResponseWriter, r *http.Request)
func (*UserSettings) SetPrivacy ¶
func (us *UserSettings) SetPrivacy(w http.ResponseWriter, r *http.Request)
func (*UserSettings) SetProfile ¶
func (us *UserSettings) SetProfile(w http.ResponseWriter, r *http.Request)
func (*UserSettings) VerifyEmail ¶
func (us *UserSettings) VerifyEmail(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.