contract

package
v1.0.1-0...-20e81f0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	URL       string
	Attempt   int
	Timestamp time.Time
}

Request represents a mirror request

func NewRequest

func NewRequest(URL string) *Request

NewRequest create a request

type Response

type Response struct {
	TriggeredBy   string
	FileSize      int64    `json:",omitempty"`
	LogError      string   `json:",omitempty"`
	DestURLs      []string `json:",omitempty"`
	MessageIDs    []string `json:",omitempty"`
	TimeTakenMs   int
	Rule          *config.Rule `json:",omitempty"`
	RuleURL       string
	TotalRules    int
	Status        string
	Error         string `json:",omitempty"`
	SchemaError   string `json:",omitempty"`
	NotFoundError string `json:",omitempty"`
	StartTime     time.Time
	BadRecords    int            `json:",omitempty"`
	ChecksumSkip  bool           `json:",omitempty"`
	StreamOption  *option.Stream `json:",omitempty"`
	// contains filtered or unexported fields
}

Response represents a response

func NewResponse

func NewResponse(triggeredBy string) *Response

NewResponse returns a new response

func (*Response) AddURL

func (r *Response) AddURL(URL string)

AddURL adds url to dest urls

Jump to

Keyboard shortcuts

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