Documentation ¶
Index ¶
- type KhronosService
- func (s *KhronosService) AuthenticationHandler(f http.Handler) http.Handler
- func (s *KhronosService) CreateNewJob(r *http.Request) (int, interface{}, error)
- func (s *KhronosService) DeleteJob(r *http.Request) (int, interface{}, error)
- func (s *KhronosService) DeleteResult(r *http.Request) (int, interface{}, error)
- func (s *KhronosService) GetJob(r *http.Request) (int, interface{}, error)
- func (s *KhronosService) GetJobs(r *http.Request) (int, interface{}, error)
- func (s *KhronosService) GetResult(r *http.Request) (int, interface{}, error)
- func (s *KhronosService) GetResults(r *http.Request) (int, interface{}, error)
- func (s *KhronosService) JSONEndpoints() map[string]map[string]server.JSONEndpoint
- func (s *KhronosService) JSONMiddleware(j server.JSONEndpoint) server.JSONEndpoint
- func (s *KhronosService) Middleware(h http.Handler) http.Handler
- func (s *KhronosService) Ping(r *http.Request) (int, interface{}, error)
- func (s *KhronosService) Prefix() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KhronosService ¶
KhronosService is the application served
func NewKhronosService ¶
func NewKhronosService(cfg *config.AppConfig, storage storage.Client, cron *schedule.Cron) *KhronosService
NewKhronosService creates a service object ready to be served.
func (*KhronosService) AuthenticationHandler ¶
func (s *KhronosService) AuthenticationHandler(f http.Handler) http.Handler
AuthenticationHandler Checks the application security, Authorization header and let it pass if correct.
func (*KhronosService) CreateNewJob ¶
func (s *KhronosService) CreateNewJob(r *http.Request) (int, interface{}, error)
CreateNewJob Creates and registers a new job
func (*KhronosService) DeleteJob ¶
func (s *KhronosService) DeleteJob(r *http.Request) (int, interface{}, error)
DeleteJob Deletes a job and its results
func (*KhronosService) DeleteResult ¶
func (s *KhronosService) DeleteResult(r *http.Request) (int, interface{}, error)
DeleteResult deletes a result
func (*KhronosService) GetJob ¶
func (s *KhronosService) GetJob(r *http.Request) (int, interface{}, error)
GetJob returns a single job by id
func (*KhronosService) GetJobs ¶
func (s *KhronosService) GetJobs(r *http.Request) (int, interface{}, error)
GetJobs returns a list of jobs
func (*KhronosService) GetResult ¶
func (s *KhronosService) GetResult(r *http.Request) (int, interface{}, error)
GetResult returns a single result by id
func (*KhronosService) GetResults ¶
func (s *KhronosService) GetResults(r *http.Request) (int, interface{}, error)
GetResults returns the jobs from an specific job
func (*KhronosService) JSONEndpoints ¶
func (s *KhronosService) JSONEndpoints() map[string]map[string]server.JSONEndpoint
JSONEndpoints maps the routes to the enpoints
func (*KhronosService) JSONMiddleware ¶
func (s *KhronosService) JSONMiddleware(j server.JSONEndpoint) server.JSONEndpoint
JSONMiddleware wraps all the requests around this middlewares
func (*KhronosService) Middleware ¶
func (s *KhronosService) Middleware(h http.Handler) http.Handler
Middleware registers the middlewares to execute in the request flow
func (*KhronosService) Ping ¶
func (s *KhronosService) Ping(r *http.Request) (int, interface{}, error)
Ping informs service is alive
func (*KhronosService) Prefix ¶
func (s *KhronosService) Prefix() string
Prefix returns the prefix of the service (used by gizmo)