model

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 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 Callback

type Callback struct {
	CallbackRest CallbackRest `json:"rest"`
}

type CallbackRest

type CallbackRest struct {
	Request          Request      `json:"request"`
	Delay            ProcessDelay `json:"after"`
	AuthorizationKey string       `json:"token-generator"`
}

type Moc

type Moc struct {
	Rest Rest `json:"rest"`
}

type ProcessDelay

type ProcessDelay struct {
	// contains filtered or unexported fields
}

func (*ProcessDelay) Delay

func (d *ProcessDelay) Delay() time.Duration

func (*ProcessDelay) UnmarshalJSON

func (d *ProcessDelay) UnmarshalJSON(data []byte) error

type Request

type Request struct {
	Method   string             `json:"method"`
	Body     json.RawMessage    `json:"body"`
	Endpoint string             `json:"endpoint"`
	Params   *map[string]string `json:"queryparams"`
	Headers  *map[string]string `json:"headers"`
}

type Response

type Response struct {
	Status  int                `json:"status"`
	Body    json.RawMessage    `json:"body"`
	Headers *map[string]string `json:"headers"`
	Delay   ProcessDelay       `json:"after"`
}

type Rest

type Rest struct {
	Request  Request    `json:"request"`
	Response Response   `json:"response"`
	Callback []Callback `json:"callback"`
}

Jump to

Keyboard shortcuts

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