Documentation ¶
Index ¶
- Constants
- type IntegrationForm
- type Integrations
- func (g *Integrations) Create(w http.ResponseWriter, r *http.Request)
- func (g *Integrations) Delete(w http.ResponseWriter, r *http.Request)
- func (g *Integrations) Edit(w http.ResponseWriter, r *http.Request)
- func (g *Integrations) Index(w http.ResponseWriter, r *http.Request)
- func (re *Integrations) Result(w http.ResponseWriter, r *http.Request)
- func (g *Integrations) Scan(w http.ResponseWriter, r *http.Request)
- func (g *Integrations) Update(w http.ResponseWriter, r *http.Request)
- type LoginForm
- type Repo
- type SignupForm
- type Static
- type Users
- func (u *Users) CookieTest(w http.ResponseWriter, r *http.Request)
- func (u *Users) Create(w http.ResponseWriter, r *http.Request)
- func (u *Users) Login(w http.ResponseWriter, r *http.Request)
- func (u *Users) Logout(w http.ResponseWriter, r *http.Request)
- func (u *Users) New(w http.ResponseWriter, r *http.Request)
Constants ¶
const ( IndexIntegrations = "index_integrations" EditIntegration = "edit_integration" )
const (
LIMIT = 1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IntegrationForm ¶
IntegrationForm is for processing the IntegrationForm
type Integrations ¶
type Integrations struct { New *views.View ShowView *views.View EditView *views.View IndexView *views.View ResultView *views.View // contains filtered or unexported fields }
Integrations contains the user's integrations for CRUD
func NewIntegrations ¶
func NewIntegrations(gs models.IntegrationService, r *mux.Router) *Integrations
NewIntegrations is for creating a new integration
func (*Integrations) Create ¶
func (g *Integrations) Create(w http.ResponseWriter, r *http.Request)
Create uses the POST HTTP method with path being /integrations
func (*Integrations) Delete ¶
func (g *Integrations) Delete(w http.ResponseWriter, r *http.Request)
Delete <=> POST /integrations/:id/delete
func (*Integrations) Edit ¶
func (g *Integrations) Edit(w http.ResponseWriter, r *http.Request)
Edit <=> GET /integrations/:id/edit
func (*Integrations) Index ¶
func (g *Integrations) Index(w http.ResponseWriter, r *http.Request)
Index <=> GET /integrations
func (*Integrations) Result ¶
func (re *Integrations) Result(w http.ResponseWriter, r *http.Request)
Result renders result view.
func (*Integrations) Scan ¶
func (g *Integrations) Scan(w http.ResponseWriter, r *http.Request)
Scan uses the POST HTTP method with path being /integrations/scan
func (*Integrations) Update ¶
func (g *Integrations) Update(w http.ResponseWriter, r *http.Request)
Update an existing integration
type SignupForm ¶
type SignupForm struct { UserName string `schema:"username"` Email string `schema:"email"` Password string `schema:"password"` }
SignupForm holds the expected data for the sign-up form for users to interact with
type Static ¶
type Static struct { Home *views.View Pricing *views.View Limit *views.View Privacy *views.View Business *views.View Breaches *views.View Automatic *views.View Team *views.View }
Static contains the webpages that are not rendering dynamic content
type Users ¶
type Users struct { NewView *views.View LoginView *views.View // contains filtered or unexported fields }
Users presents the view and what a user (us) can do
func NewUsers ¶
func NewUsers(us models.UserService) *Users
NewUsers defines the views for users that do not have an account
func (*Users) CookieTest ¶
func (u *Users) CookieTest(w http.ResponseWriter, r *http.Request)
CookieTest is for debugging in dev. to see that the user data is being stored and returned
func (*Users) Create ¶
func (u *Users) Create(w http.ResponseWriter, r *http.Request)
Create processes the sign-up form and stores a new user record in the database
func (*Users) Login ¶
func (u *Users) Login(w http.ResponseWriter, r *http.Request)
Login processes the user's login attempt to the application