schedules

package
v0.0.0-...-d2438c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	api.DefaultService
	// contains filtered or unexported fields
}

API defines a operations API

func NewAPI

func NewAPI(name string, options ...Option) *API

NewAPI creates a API with sane defaults

func (*API) Get

func (a *API) Get(ctx context.Context, req *http.Request) api.Response

Get defines a service for calling "GET" method and returns a response.

func (*API) Name

func (a *API) Name() string

Name returns the API name

func (*API) Post

func (a *API) Post(ctx context.Context, req *http.Request) api.Response

Post defines a service for calling "POST" method and returns a response.

type IdentityAPI

type IdentityAPI struct {
	api.DefaultService
	// contains filtered or unexported fields
}

IdentityAPI defines a schedules/{id} API

func NewIdentityAPI

func NewIdentityAPI(name string, options ...Option) *IdentityAPI

NewIdentityAPI creates a API with sane defaults

func (*IdentityAPI) Delete

func (a *IdentityAPI) Delete(ctx context.Context, req *http.Request) api.Response

Delete defines a service for calling "DELETE" method and returns a response.

func (*IdentityAPI) Get

func (a *IdentityAPI) Get(ctx context.Context, req *http.Request) api.Response

Get defines a service for calling "GET" method and returns a response.

func (*IdentityAPI) Name

func (a *IdentityAPI) Name() string

Name returns the IdentityAPI name

type Option

type Option func(*options)

Option to be passed to Connect to customize the resulting instance.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger sets the logger on the option

type ScheduleTaskRequest

type ScheduleTaskRequest struct {
	Query    string    `json:"query" yaml:"query"`
	Schedule time.Time `json:"schedule" yaml:"schedule"`
}

ScheduleTaskRequest represents a new task

type Task

type Task struct {
	ID         string    `json:"id" yaml:"id"`
	URL        string    `json:"url" yaml:"url"`
	Query      string    `json:"query" yaml:"query"`
	Schedule   time.Time `json:"schedule" yaml:"schedule"`
	Status     string    `json:"status" yaml:"status"`
	StatusCode int       `json:"status_code" yaml:"status_code"`
	Result     string    `json:"result" yaml:"result"`
	Err        string    `json:"err" yaml:"err"`
}

Task defines a very lightweight task

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL