Documentation ¶
Index ¶
- Constants
- type Google
- type Handler
- type MockHandler
- func (_m *MockHandler) Callback(w http.ResponseWriter, r *http.Request)
- func (_m *MockHandler) DeleteCookie(w http.ResponseWriter, name string)
- func (_m *MockHandler) EXPECT() *MockHandler_Expecter
- func (_m *MockHandler) Login(w http.ResponseWriter, r *http.Request)
- func (_m *MockHandler) Logout(w http.ResponseWriter, r *http.Request)
- func (_m *MockHandler) SetSessionCookie(w http.ResponseWriter, session *db.Session)
- type MockHandler_Callback_Call
- func (_c *MockHandler_Callback_Call) Return() *MockHandler_Callback_Call
- func (_c *MockHandler_Callback_Call) Run(run func(w http.ResponseWriter, r *http.Request)) *MockHandler_Callback_Call
- func (_c *MockHandler_Callback_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request)) *MockHandler_Callback_Call
- type MockHandler_DeleteCookie_Call
- func (_c *MockHandler_DeleteCookie_Call) Return() *MockHandler_DeleteCookie_Call
- func (_c *MockHandler_DeleteCookie_Call) Run(run func(w http.ResponseWriter, name string)) *MockHandler_DeleteCookie_Call
- func (_c *MockHandler_DeleteCookie_Call) RunAndReturn(run func(http.ResponseWriter, string)) *MockHandler_DeleteCookie_Call
- type MockHandler_Expecter
- func (_e *MockHandler_Expecter) Callback(w interface{}, r interface{}) *MockHandler_Callback_Call
- func (_e *MockHandler_Expecter) DeleteCookie(w interface{}, name interface{}) *MockHandler_DeleteCookie_Call
- func (_e *MockHandler_Expecter) Login(w interface{}, r interface{}) *MockHandler_Login_Call
- func (_e *MockHandler_Expecter) Logout(w interface{}, r interface{}) *MockHandler_Logout_Call
- func (_e *MockHandler_Expecter) SetSessionCookie(w interface{}, session interface{}) *MockHandler_SetSessionCookie_Call
- type MockHandler_Login_Call
- type MockHandler_Logout_Call
- func (_c *MockHandler_Logout_Call) Return() *MockHandler_Logout_Call
- func (_c *MockHandler_Logout_Call) Run(run func(w http.ResponseWriter, r *http.Request)) *MockHandler_Logout_Call
- func (_c *MockHandler_Logout_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request)) *MockHandler_Logout_Call
- type MockHandler_SetSessionCookie_Call
- func (_c *MockHandler_SetSessionCookie_Call) Return() *MockHandler_SetSessionCookie_Call
- func (_c *MockHandler_SetSessionCookie_Call) Run(run func(w http.ResponseWriter, session *db.Session)) *MockHandler_SetSessionCookie_Call
- func (_c *MockHandler_SetSessionCookie_Call) RunAndReturn(run func(http.ResponseWriter, *db.Session)) *MockHandler_SetSessionCookie_Call
- type OAuth2
Constants ¶
const ( RedirectURICookie = "redirecturi" OAuthStateCookie = "oauthstate" SessionCookieName = "teams_backend_session_id" IDTokenKey = "id_token" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { Login(w http.ResponseWriter, r *http.Request) Callback(w http.ResponseWriter, r *http.Request) Logout(w http.ResponseWriter, r *http.Request) SetSessionCookie(w http.ResponseWriter, session *db.Session) DeleteCookie(w http.ResponseWriter, name string) }
type MockHandler ¶
MockHandler is an autogenerated mock type for the Handler type
func NewMockHandler ¶
func NewMockHandler(t interface { mock.TestingT Cleanup(func()) }, ) *MockHandler
NewMockHandler creates a new instance of MockHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockHandler) Callback ¶
func (_m *MockHandler) Callback(w http.ResponseWriter, r *http.Request)
Callback provides a mock function with given fields: w, r
func (*MockHandler) DeleteCookie ¶
func (_m *MockHandler) DeleteCookie(w http.ResponseWriter, name string)
DeleteCookie provides a mock function with given fields: w, name
func (*MockHandler) EXPECT ¶
func (_m *MockHandler) EXPECT() *MockHandler_Expecter
func (*MockHandler) Login ¶
func (_m *MockHandler) Login(w http.ResponseWriter, r *http.Request)
Login provides a mock function with given fields: w, r
func (*MockHandler) Logout ¶
func (_m *MockHandler) Logout(w http.ResponseWriter, r *http.Request)
Logout provides a mock function with given fields: w, r
func (*MockHandler) SetSessionCookie ¶
func (_m *MockHandler) SetSessionCookie(w http.ResponseWriter, session *db.Session)
SetSessionCookie provides a mock function with given fields: w, session
type MockHandler_Callback_Call ¶
MockHandler_Callback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Callback'
func (*MockHandler_Callback_Call) Return ¶
func (_c *MockHandler_Callback_Call) Return() *MockHandler_Callback_Call
func (*MockHandler_Callback_Call) Run ¶
func (_c *MockHandler_Callback_Call) Run(run func(w http.ResponseWriter, r *http.Request)) *MockHandler_Callback_Call
func (*MockHandler_Callback_Call) RunAndReturn ¶
func (_c *MockHandler_Callback_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request)) *MockHandler_Callback_Call
type MockHandler_DeleteCookie_Call ¶
MockHandler_DeleteCookie_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCookie'
func (*MockHandler_DeleteCookie_Call) Return ¶
func (_c *MockHandler_DeleteCookie_Call) Return() *MockHandler_DeleteCookie_Call
func (*MockHandler_DeleteCookie_Call) Run ¶
func (_c *MockHandler_DeleteCookie_Call) Run(run func(w http.ResponseWriter, name string)) *MockHandler_DeleteCookie_Call
func (*MockHandler_DeleteCookie_Call) RunAndReturn ¶
func (_c *MockHandler_DeleteCookie_Call) RunAndReturn(run func(http.ResponseWriter, string)) *MockHandler_DeleteCookie_Call
type MockHandler_Expecter ¶
type MockHandler_Expecter struct {
// contains filtered or unexported fields
}
func (*MockHandler_Expecter) Callback ¶
func (_e *MockHandler_Expecter) Callback(w interface{}, r interface{}) *MockHandler_Callback_Call
Callback is a helper method to define mock.On call
- w http.ResponseWriter
- r *http.Request
func (*MockHandler_Expecter) DeleteCookie ¶
func (_e *MockHandler_Expecter) DeleteCookie(w interface{}, name interface{}) *MockHandler_DeleteCookie_Call
DeleteCookie is a helper method to define mock.On call
- w http.ResponseWriter
- name string
func (*MockHandler_Expecter) Login ¶
func (_e *MockHandler_Expecter) Login(w interface{}, r interface{}) *MockHandler_Login_Call
Login is a helper method to define mock.On call
- w http.ResponseWriter
- r *http.Request
func (*MockHandler_Expecter) Logout ¶
func (_e *MockHandler_Expecter) Logout(w interface{}, r interface{}) *MockHandler_Logout_Call
Logout is a helper method to define mock.On call
- w http.ResponseWriter
- r *http.Request
func (*MockHandler_Expecter) SetSessionCookie ¶
func (_e *MockHandler_Expecter) SetSessionCookie(w interface{}, session interface{}) *MockHandler_SetSessionCookie_Call
SetSessionCookie is a helper method to define mock.On call
- w http.ResponseWriter
- session *db.Session
type MockHandler_Login_Call ¶
MockHandler_Login_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Login'
func (*MockHandler_Login_Call) Return ¶
func (_c *MockHandler_Login_Call) Return() *MockHandler_Login_Call
func (*MockHandler_Login_Call) Run ¶
func (_c *MockHandler_Login_Call) Run(run func(w http.ResponseWriter, r *http.Request)) *MockHandler_Login_Call
func (*MockHandler_Login_Call) RunAndReturn ¶
func (_c *MockHandler_Login_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request)) *MockHandler_Login_Call
type MockHandler_Logout_Call ¶
MockHandler_Logout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logout'
func (*MockHandler_Logout_Call) Return ¶
func (_c *MockHandler_Logout_Call) Return() *MockHandler_Logout_Call
func (*MockHandler_Logout_Call) Run ¶
func (_c *MockHandler_Logout_Call) Run(run func(w http.ResponseWriter, r *http.Request)) *MockHandler_Logout_Call
func (*MockHandler_Logout_Call) RunAndReturn ¶
func (_c *MockHandler_Logout_Call) RunAndReturn(run func(http.ResponseWriter, *http.Request)) *MockHandler_Logout_Call
type MockHandler_SetSessionCookie_Call ¶
MockHandler_SetSessionCookie_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSessionCookie'
func (*MockHandler_SetSessionCookie_Call) Return ¶
func (_c *MockHandler_SetSessionCookie_Call) Return() *MockHandler_SetSessionCookie_Call
func (*MockHandler_SetSessionCookie_Call) Run ¶
func (_c *MockHandler_SetSessionCookie_Call) Run(run func(w http.ResponseWriter, session *db.Session)) *MockHandler_SetSessionCookie_Call
func (*MockHandler_SetSessionCookie_Call) RunAndReturn ¶
func (_c *MockHandler_SetSessionCookie_Call) RunAndReturn(run func(http.ResponseWriter, *db.Session)) *MockHandler_SetSessionCookie_Call