model

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListModel

type ListModel struct {
	PageIndex int         `json:"pageIndex"`
	PageSize  int         `json:"pageSize"`
	PageCount int         `json:"pageCount"`
	Total     int64       `json:"total"`
	Items     interface{} `json:"items"`
}

ListModel 列表数据模型

type LogModel

type LogModel struct {
	Type    string `json:"type"`
	Content string `json:"content"`
	Created int64  `json:"created"`
}

LogModel 日志数据模型

func (*LogModel) NewItems

func (*LogModel) NewItems() interface{}

NewItems 实现 db.IModel 接口

func (*LogModel) TableName

func (*LogModel) TableName() string

TableName 表名

type RequestModel

type RequestModel struct {
	N       int         `json:"n"`
	C       int         `json:"c"`
	Timeout int         `json:"timeout"`
	Method  string      `json:"method"`
	URL     string      `json:"url"`
	Headers http.Header `json:"headers"`
	Body    string      `json:"body"`
}

type ResponseDuration

type ResponseDuration struct {
	DNS    string `json:"dns"`
	Conn   string `json:"conn"`
	Req    string `json:"req"`
	Res    string `json:"res"`
	Delay  string `json:"delay"`
	Finish string `json:"finish"`
}

type ResponseModel

type ResponseModel struct {
	Error         string           `json:"error,omitempty"`
	Status        string           `json:"status"`
	StatusCode    int              `json:"statusCode"`
	ContentLength int64            `json:"contentLength"`
	Proto         string           `json:"proto"`
	Headers       http.Header      `json:"headers"`
	Cookies       []*http.Cookie   `json:"cookies"`
	Body          string           `json:"body"`
	Code          string           `json:"code"`
	Duration      ResponseDuration `json:"duration"`
}

Jump to

Keyboard shortcuts

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