models

package
v0.0.0-...-ae485d8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: MIT Imports: 9 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 {
	ID                int64 `json:"id"`
	ParamName         string
	APIId             int64
	RequestHeader     string
	QueryStringParams string
	RequestBody       string
	Extra             string
	Assert            string
	APIURL            string `json:"url"`
	APIMethod         string
	APIType           string // default: "json"
	AccessEndpointIds string
	Description       string
	ServerID          int64
	CreatedAt         string
	UpdatedAt         string
	Endpoint          string // for ping api
}

API model

func GetAllAPIs

func GetAllAPIs() ([]API, error)

GetAllAPIs get all apis

func GetAllAPIsByJSON

func GetAllAPIsByJSON() ([]API, error)

func GetAllAPIsByMySQL

func GetAllAPIsByMySQL() ([]API, error)

GetAllAPIsByDatabase get all apis by database.

func GetAllPingAPIs

func GetAllPingAPIs() ([]API, error)

get all ping apis.

func GetAllPingAPIsByCSV

func GetAllPingAPIsByCSV() ([]API, error)

func GetAllPingAPIsByJSON

func GetAllPingAPIsByJSON() ([]API, error)

func GetAllPingAPIsByMySQL

func GetAllPingAPIsByMySQL() ([]API, error)

type APIEndpoint

type APIEndpoint struct {
	ID          int64
	Name        string
	Type        string
	Description string
	Endpoint    string
	ServerID    int64
	CreatedAt   string
	UpdatedAt   string
}

api endpoint model

func GetAllAPIEndpoints

func GetAllAPIEndpoints() ([]APIEndpoint, error)

GetAllAPIEndpoints get all api endpoints, table name: prefix_api_endpoints

func GetAllAPIEndpointsByJSON

func GetAllAPIEndpointsByJSON() ([]APIEndpoint, error)

func GetAllAPIEndpointsByMySQL

func GetAllAPIEndpointsByMySQL() ([]APIEndpoint, error)

type Assert

type Assert struct {
	Status   []AssertItem `json:"status"`
	JSONPath []AssertItem `json:"jsonpath"`
	Cookie   []AssertItem `json:"cookie"`
	Header   []AssertItem `json:"header"`
	Body     []AssertItem `json:"body"`
}

assert model

type AssertItem

type AssertItem struct {
	Type      string `json:"type"`
	Key       string `json:"key"`
	Value     string `json:"value"`
	ValueType string `json:"value_type"`
}

assert item model

type Notification

type Notification struct {
	HTTPStatus int
	Reason     string
	Type       string
	URL        string
}

notification model

type Process

type Process struct {
	Endpoint APIEndpoint
	API      API
	Response *http.Response
	Body     []byte
}

process

Jump to

Keyboard shortcuts

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