Documentation ¶
Index ¶
- func ExtractJWT(authToken string) (int, int, error)
- type Auth
- type AuthResponse
- type Health
- type Team
- func (c *Team) CreateTeam(_ int, rw http.ResponseWriter, r *http.Request)
- func (c *Team) DeleteTeam(_ int, rw http.ResponseWriter, r *http.Request)
- func (c *Team) GetTeam(rw http.ResponseWriter, r *http.Request)
- func (c *Team) GetTeams(rw http.ResponseWriter, r *http.Request)
- func (c *Team) GetTeamsByActivation(rw http.ResponseWriter, r *http.Request)
- func (c *Team) ServeHTTP(rw http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth-
func (*Auth) IsAuthorized ¶
func (c *Auth) IsAuthorized(next func(userID int, w http.ResponseWriter, r *http.Request)) http.Handler
IsAuthorized
func (*Auth) Login ¶
func (c *Auth) Login(rw http.ResponseWriter, r *http.Request)
Login checks if the user is able to authenticate
type AuthResponse ¶
type AuthResponse struct { UserID int `json:"user_id,omitempty"` Username string `json:"username,omitempty"` Token string `json:"token,omitempty"` }
AuthResponse -
type Health ¶
type Health struct {
// contains filtered or unexported fields
}
Health is a HTTP Handler for health checking
func NewHealth ¶
func NewHealth(l hclog.Logger, db data.Connection) *Health
NewHealth creates a new Health handler
type Team ¶
type Team struct {
// contains filtered or unexported fields
}
Team -
func (*Team) CreateTeam ¶
CreateTeam creates a new order
func (*Team) DeleteTeam ¶
DeleteTeam deletes a team
func (*Team) GetTeam ¶
func (c *Team) GetTeam(rw http.ResponseWriter, r *http.Request)
GetTeam gets a specific team
func (*Team) GetTeams ¶
func (c *Team) GetTeams(rw http.ResponseWriter, r *http.Request)
GetTeams gets a list of teams in order of speed
func (*Team) GetTeamsByActivation ¶
func (c *Team) GetTeamsByActivation(rw http.ResponseWriter, r *http.Request)
GetTeamsByActivation gets a list of teams by activation in order of speed
Click to show internal directories.
Click to hide internal directories.