schema

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	// HTTP status code
	Code int `json:"code"`
	// Response body data payload
	Body string `json:"body"`
}

Response capture the execution result

func (Response) ToString

func (resp Response) ToString() string

ToString returns string representation

type ScheduledRequest

type ScheduledRequest struct {
	// Unique ID across global region.
	ID string `json:"ID" valid:"required"`

	// Created datetime which will be seriallized into unix nano seconds since epoch.
	CreatedAt time.Time `json:"CreatedAt" valid:"required"`

	// This properties is updated after execution and PersistentStore=true
	ExecutedAt time.Time `json:"ExecutedAt"`

	// The attribute to specify the time point in which request should be triggered.
	// Note that this will not be the exact executing time as there will be slippering window
	// time due to configured polling interval and locking time.
	// EffectiveAfter time.Time `json:"EffectiveAfter" dynamodbav:",unixtime`
	EffectiveAfter time.Time `json:"EffectiveAfter" valid:"required"`

	// The attribute to prevent request got executed even if effective date already past.
	Locking bool `json:"Locking"`

	// Attribute to log failure reason for previous execution attempt
	FailureReason string `json:"FailureReason"`

	// Request method name. Available options are:
	// - GET
	// - POST
	// - PUT
	// - DELETE
	Method string `json:"Method" valid:"required,in(GET|PUT|POST|DELETE)"`

	// Absolute path or relative url string
	URL string `json:"URL" valid:"required"`

	// Request optional data payload
	Payload string `json:"Payload"`

	// Optional headers by specific request
	Headers map[string]string `json:"Headers"`

	// A boolean value that determines record persistency after the execution.
	// By default scheduled request will be removed after executing if this attribute is
	// not set.
	PersistentStore bool `json:"PersistentStore"`

	// A string that captures the output from the response returned, available only after
	// request got called and `PersistentStore=true`.
	ExecutionResult string `json:"ExecutionResult"`
}

ScheduledRequest defines the parameters for a request call triggering

func (ScheduledRequest) ToString

func (req ScheduledRequest) ToString() string

ToString returns string representation

Jump to

Keyboard shortcuts

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