model

package
v0.0.0-...-e7a82c9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Created = 1
View Source
const Ignored = 2
View Source
const ReplayedFailure = 4
View Source
const ReplayedSuccess = 3

Variables

This section is empty.

Functions

func CreateRequest

func CreateRequest(request *Request) error

func DeleteRequest

func DeleteRequest(id string) error

func UpdateRequest

func UpdateRequest(request *Request) error

Types

type Request

type Request struct {
	ID                 string    `gorm:"not null;unique;primary_key" json:"id" elastic_meta:"_id"`
	Url                string    `json:"url"`
	Method             string    `json:"method"`
	Body               string    `json:"body"`
	Upstream           string    `json:"upstream"`
	Response           string    `json:"response"`
	ResponseSize       int64     `json:"response_size"`
	ResponseStatusCode int       `json:"response_code"`
	Created            time.Time `json:"created"`
	Updated            time.Time `json:"updated"`
	Status             int       `json:"status"`
	Message            string    `json:"message"`
}

func GetRequest

func GetRequest(id string) (Request, error)

func GetRequestByField

func GetRequestByField(k, v string) ([]Request, error)

func GetRequestList

func GetRequestList(from, size int, upstream string, status int) (int, []Request, error)

Jump to

Keyboard shortcuts

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