Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidData resp.CogmanError = errors.New("cogman rest: Invalid data") ErrInvalidMethod resp.CogmanError = errors.New("cogman rest: Invalid method") ErrTaskIDRequired resp.CogmanError = errors.New("cogman rest: task_id required") ErrTaskNotFound resp.CogmanError = errors.New("cogman rest: task not found") ErrBothStartEndTimeRequired resp.CogmanError = errors.New("cogman rest: both start & end time required") ErrInvalidTimeRange resp.CogmanError = errors.New("cogman rest: invalid time ranges") )
list cogman rest api related errors
Functions ¶
func StartRestServer ¶
StartRestServer initiates a rest server
Types ¶
type CogmanHandler ¶
type CogmanHandler struct {
// contains filtered or unexported fields
}
CogmanHandler holds necessary fields for handling
func NewCogmanHandler ¶
func NewCogmanHandler(cfg *Config) *CogmanHandler
NewCogmanHandler return a cogmanHandler instance
func (*CogmanHandler) ServeHTTP ¶
func (s *CogmanHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.