Documentation ¶
Index ¶
- Constants
- func AuthMiddleware(loginRedirect http.HandlerFunc, authService AuthService, h httputils.Utils) func(next http.Handler) http.Handler
- type APIKeyHandler
- type APIKeyService
- type AnnotationsHandler
- type AnnotationsService
- type AuthService
- type CreateParams
- type UserHandler
- func (h UserHandler) ChangeAuthenticatedUserPassword(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) ChangeUserPassword(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) ChangeUserRole(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) CreateUser(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) DeleteUser(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) DisableUser(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) EnableUser(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) GetAuthenticatedUser(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) GetUser(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) ListUsers(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) UpdateAuthenticatedUser(w http.ResponseWriter, r *http.Request)
- func (h UserHandler) UpdateUser(w http.ResponseWriter, r *http.Request)
- type UserService
Constants ¶
View Source
const JWTCookieName = "pyroscopeJWT"
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(loginRedirect http.HandlerFunc, authService AuthService, h httputils.Utils) func(next http.Handler) http.Handler
AuthMiddleware authenticates requests.
Types ¶
type APIKeyHandler ¶
type APIKeyHandler struct {
// contains filtered or unexported fields
}
func NewAPIKeyHandler ¶
func NewAPIKeyHandler(logger logrus.FieldLogger, apiKeyService APIKeyService, httpUtils httputils.Utils) APIKeyHandler
func (APIKeyHandler) CreateAPIKey ¶
func (h APIKeyHandler) CreateAPIKey(w http.ResponseWriter, r *http.Request)
func (APIKeyHandler) DeleteAPIKey ¶
func (h APIKeyHandler) DeleteAPIKey(w http.ResponseWriter, r *http.Request)
func (APIKeyHandler) ListAPIKeys ¶
func (h APIKeyHandler) ListAPIKeys(w http.ResponseWriter, r *http.Request)
type APIKeyService ¶
type AnnotationsHandler ¶ added in v0.29.0
type AnnotationsHandler struct {
// contains filtered or unexported fields
}
func NewAnnotationsHandler ¶ added in v0.29.0
func NewAnnotationsHandler(logger logrus.FieldLogger, svc AnnotationsService, httpUtils httputils.Utils) *AnnotationsHandler
func (*AnnotationsHandler) CreateAnnotation ¶ added in v0.29.0
func (h *AnnotationsHandler) CreateAnnotation(w http.ResponseWriter, r *http.Request)
type AnnotationsService ¶ added in v0.29.0
type AnnotationsService interface {
CreateAnnotation(ctx context.Context, params model.CreateAnnotation) (*model.Annotation, error)
}
type AuthService ¶
type CreateParams ¶ added in v0.29.0
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(logger logrus.FieldLogger, userService UserService, httpUtils httputils.Utils) UserHandler
func (UserHandler) ChangeAuthenticatedUserPassword ¶
func (h UserHandler) ChangeAuthenticatedUserPassword(w http.ResponseWriter, r *http.Request)
func (UserHandler) ChangeUserPassword ¶
func (h UserHandler) ChangeUserPassword(w http.ResponseWriter, r *http.Request)
func (UserHandler) ChangeUserRole ¶
func (h UserHandler) ChangeUserRole(w http.ResponseWriter, r *http.Request)
func (UserHandler) CreateUser ¶
func (h UserHandler) CreateUser(w http.ResponseWriter, r *http.Request)
func (UserHandler) DeleteUser ¶
func (h UserHandler) DeleteUser(w http.ResponseWriter, r *http.Request)
func (UserHandler) DisableUser ¶
func (h UserHandler) DisableUser(w http.ResponseWriter, r *http.Request)
func (UserHandler) EnableUser ¶
func (h UserHandler) EnableUser(w http.ResponseWriter, r *http.Request)
func (UserHandler) GetAuthenticatedUser ¶
func (h UserHandler) GetAuthenticatedUser(w http.ResponseWriter, r *http.Request)
func (UserHandler) GetUser ¶
func (h UserHandler) GetUser(w http.ResponseWriter, r *http.Request)
func (UserHandler) ListUsers ¶
func (h UserHandler) ListUsers(w http.ResponseWriter, r *http.Request)
func (UserHandler) UpdateAuthenticatedUser ¶
func (h UserHandler) UpdateAuthenticatedUser(w http.ResponseWriter, r *http.Request)
func (UserHandler) UpdateUser ¶
func (h UserHandler) UpdateUser(w http.ResponseWriter, r *http.Request)
type UserService ¶
type UserService interface { CreateUser(context.Context, model.CreateUserParams) (model.User, error) FindUserByID(context.Context, uint) (model.User, error) GetAllUsers(context.Context) ([]model.User, error) UpdateUserByID(context.Context, uint, model.UpdateUserParams) (model.User, error) UpdateUserPasswordByID(context.Context, uint, model.UpdateUserPasswordParams) error DeleteUserByID(context.Context, uint) error }
Click to show internal directories.
Click to hide internal directories.