Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataResourceBody ¶
func DataResourceBody(resource *models.Resource) *models.ResourceData
DataResourceBody returns an data encapsulated version of a resource
func DataResourcesBody ¶
func DataResourcesBody(resources []*models.Resource) *models.ResourceArrayData
DataResourcesBody returns an data encapsulated version of an array of resources
Types ¶
type AuthHandlers ¶ added in v0.5.0
type AuthHandlers struct {
// contains filtered or unexported fields
}
AuthHandlers defines handlers that provide authentication
func NewAuthHandlers ¶ added in v0.5.0
func NewAuthHandlers() (*AuthHandlers, error)
NewAuthHandlers takes a sessions.Store implementation and returns an AuthHandlers struct
func (*AuthHandlers) GithubCallback ¶ added in v0.5.0
func (a *AuthHandlers) GithubCallback(w http.ResponseWriter, r *http.Request)
GithubCallback processes the OAuth callback from GitHub
func (*AuthHandlers) InitiateOAuth ¶ added in v0.5.0
func (a *AuthHandlers) InitiateOAuth(w http.ResponseWriter, r *http.Request)
InitiateOAuth initiatates an OAuth request
func (*AuthHandlers) Logout ¶ added in v0.5.0
func (a *AuthHandlers) Logout(w http.ResponseWriter, r *http.Request)
Logout clears the JWT token cookie
type WithParams ¶ added in v0.5.0
type WithParams func(http.ResponseWriter, *http.Request, Params)
WithParams can be used to wrap handlers to take an extra arg for path params
func (WithParams) ServeHTTP ¶ added in v0.5.0
func (h WithParams) ServeHTTP(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.