Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIKeyAuth ¶
APIKeyAuth provides simple API Key authentication
Types ¶
type APIHandler ¶
type APIHandler struct {
// contains filtered or unexported fields
}
func NewAPIHandler ¶
func NewAPIHandler(tm *tasks.Manager, logger *log.Logger) *APIHandler
func (*APIHandler) HandleGetTaskStatus ¶
func (h *APIHandler) HandleGetTaskStatus(w http.ResponseWriter, r *http.Request)
func (*APIHandler) HandleProvide2FACode ¶
func (h *APIHandler) HandleProvide2FACode(w http.ResponseWriter, r *http.Request)
func (*APIHandler) HandleSubmitTask ¶
func (h *APIHandler) HandleSubmitTask(w http.ResponseWriter, r *http.Request)
type Provide2FACodeRequest ¶
type Provide2FACodeRequest struct {
Code string `json:"code"`
}
type SubmitTaskRequest ¶
type SubmitTaskRequest struct { Actions []taskstypes.Action `json:"actions"` Credentials *taskstypes.Credentials `json:"credentials,omitempty"` // Sent in request, handled securely TwoFactorAuth taskstypes.TwoFactorAuthInfo `json:"two_factor_auth"` CallbackURL string `json:"callback_url,omitempty"` }
type SubmitTaskResponse ¶
type SubmitTaskResponse struct {
TaskID string `json:"task_id"`
}
Click to show internal directories.
Click to hide internal directories.