Documentation ¶
Index ¶
- type AppConsulArgsRequire
- type AppConsulArgsRequireService
- type AppRedisArgsRequire
- type AppRedisArgsRequireArray
- type AppRedisArgsRequireArrayValue
- type AppRedisArgsRequireArrayValues
- type AppRedisArgsRequireMap
- type AppRedisArgsRequireMapValue
- type AppRedisArgsRequireMapValues
- type Bool
- type Cell
- type CmdArgsRequire
- type Column
- type DialArgsRequire
- type Duration
- type HttArgsRequire
- type HttpArgsBasicAuth
- type HttpArgsForm
- type HttpArgsRequireContentType
- type HttpArgsRequireHeader
- type HttpArgsRequireStatus
- type JSONSchema
- type ReachText
- type RepeatArgsRequire
- type RequireContent
- type RequireFieldMatch
- type RequireFieldMatchNot
- type RequireJSON
- type RequireJSONPath
- type RequireJSONSchema
- type RequireMatch
- type RequireNumeric
- type RequireValue
- type RequireXPath
- type Row
- type Slice
- type SqlArgsRequire
- type SqlArgsRequireCell
- type SqlArgsRequireCells
- type SqlArgsRequireColumn
- type SqlArgsRequireColumns
- type SqlArgsRequireRow
- type SqlArgsRequireRows
- type SqlArgsRequireTable
- type String
- type Table
- type Uint
- type Validatable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConsulArgsRequire ¶
type AppConsulArgsRequire struct { Key map[string]*RequireContent `json:"key"` Service map[string]*AppConsulArgsRequireService `json:"service"` }
func (*AppConsulArgsRequire) Match ¶
func (a *AppConsulArgsRequire) Match(client *api.Client) (err error)
func (*AppConsulArgsRequire) Validate ¶
func (a *AppConsulArgsRequire) Validate() (err error)
type AppConsulArgsRequireService ¶
type AppConsulArgsRequireService struct { Tags []string `json:"tags"` Exist *Bool `json:"exist"` Healthy *Bool `json:"healthy"` }
func (*AppConsulArgsRequireService) Match ¶
func (a *AppConsulArgsRequireService) Match(out []*api.ServiceEntry) (err error)
func (*AppConsulArgsRequireService) Validate ¶
func (a *AppConsulArgsRequireService) Validate() (err error)
type AppRedisArgsRequire ¶
type AppRedisArgsRequire struct { Value *RequireValue `json:"value"` Array *AppRedisArgsRequireArray `json:"array"` Map *AppRedisArgsRequireMap `json:"map"` }
func (*AppRedisArgsRequire) Match ¶
func (a *AppRedisArgsRequire) Match(value interface{}) (err error)
func (*AppRedisArgsRequire) Validate ¶
func (a *AppRedisArgsRequire) Validate() (err error)
type AppRedisArgsRequireArray ¶
type AppRedisArgsRequireArray struct { Count RequireNumeric `json:"count"` All *RequireValue `json:"all"` Value AppRedisArgsRequireArrayValues `json:"value"` }
func (*AppRedisArgsRequireArray) Match ¶
func (a *AppRedisArgsRequireArray) Match(value interface{}) error
func (*AppRedisArgsRequireArray) Validate ¶
func (a *AppRedisArgsRequireArray) Validate() (err error)
type AppRedisArgsRequireArrayValue ¶
type AppRedisArgsRequireArrayValue struct { Index *Uint `json:"index"` RequireValue }
func (*AppRedisArgsRequireArrayValue) Match ¶
func (a *AppRedisArgsRequireArrayValue) Match(value []interface{}) (err error)
func (*AppRedisArgsRequireArrayValue) Validate ¶
func (a *AppRedisArgsRequireArrayValue) Validate() (err error)
type AppRedisArgsRequireArrayValues ¶
type AppRedisArgsRequireArrayValues []*AppRedisArgsRequireArrayValue
func (AppRedisArgsRequireArrayValues) Match ¶
func (a AppRedisArgsRequireArrayValues) Match(values []interface{}) (err error)
func (AppRedisArgsRequireArrayValues) Validate ¶
func (a AppRedisArgsRequireArrayValues) Validate() (err error)
type AppRedisArgsRequireMap ¶
type AppRedisArgsRequireMap struct { Count RequireNumeric `json:"count"` All *RequireValue `json:"all"` Value AppRedisArgsRequireMapValues `json:"value"` }
func (*AppRedisArgsRequireMap) Match ¶
func (a *AppRedisArgsRequireMap) Match(value interface{}) error
func (*AppRedisArgsRequireMap) Validate ¶
func (a *AppRedisArgsRequireMap) Validate() (err error)
type AppRedisArgsRequireMapValue ¶
type AppRedisArgsRequireMapValue struct { Key *String `json:"key"` Exist *Bool `json:"exist"` RequireValue }
func (*AppRedisArgsRequireMapValue) Match ¶
func (a *AppRedisArgsRequireMapValue) Match(values map[string]interface{}) (err error)
func (*AppRedisArgsRequireMapValue) Validate ¶
func (a *AppRedisArgsRequireMapValue) Validate() (err error)
type AppRedisArgsRequireMapValues ¶
type AppRedisArgsRequireMapValues []*AppRedisArgsRequireMapValue
func (AppRedisArgsRequireMapValues) Match ¶
func (a AppRedisArgsRequireMapValues) Match(values map[string]interface{}) (err error)
func (AppRedisArgsRequireMapValues) Validate ¶
func (a AppRedisArgsRequireMapValues) Validate() (err error)
type CmdArgsRequire ¶
type CmdArgsRequire struct { ExitCode *RequireNumeric `json:"exit_code"` Output *RequireContent `json:"output"` Stderr *RequireContent `json:"stderr"` }
func (*CmdArgsRequire) Match ¶
func (a *CmdArgsRequire) Match(exitCode int, output []byte, stderr []byte) (err error)
func (*CmdArgsRequire) Validate ¶
func (a *CmdArgsRequire) Validate() (err error)
type DialArgsRequire ¶
type DialArgsRequire struct {
Content *RequireContent `json:"content"`
}
func (*DialArgsRequire) Match ¶
func (a *DialArgsRequire) Match(content []byte) (err error)
func (*DialArgsRequire) Validate ¶
func (a *DialArgsRequire) Validate() (err error)
type HttArgsRequire ¶
type HttArgsRequire struct { Status *HttpArgsRequireStatus `json:"status"` Content *RequireContent `json:"content"` Header *HttpArgsRequireHeader `json:"header"` }
func (*HttArgsRequire) Validate ¶
func (a *HttArgsRequire) Validate() (err error)
type HttpArgsBasicAuth ¶
type HttpArgsForm ¶
type HttpArgsForm struct { Values map[string]string `json:"values"` Files map[string]string `json:"files"` }
func (*HttpArgsForm) SubmitForm ¶
func (a *HttpArgsForm) SubmitForm(b *bytes.Buffer) (contentType string, err error)
func (*HttpArgsForm) Validate ¶
func (a *HttpArgsForm) Validate() (err error)
type HttpArgsRequireContentType ¶
type HttpArgsRequireContentType string
const ( HttpArgsRequireContentTypeJSON HttpArgsRequireContentType = "JSON" HttpArgsRequireContentTypeXML HttpArgsRequireContentType = "XML" HttpArgsRequireContentTypeHTML HttpArgsRequireContentType = "HTML" HttpArgsRequireContentTypeYAML HttpArgsRequireContentType = "YAML" )
func (HttpArgsRequireContentType) Is ¶
func (v HttpArgsRequireContentType) Is(value HttpArgsRequireContentType) bool
func (HttpArgsRequireContentType) Match ¶
func (v HttpArgsRequireContentType) Match(content []byte) error
func (HttpArgsRequireContentType) Validate ¶
func (v HttpArgsRequireContentType) Validate() error
type HttpArgsRequireHeader ¶
type HttpArgsRequireHeader struct { Exists []string `json:"exists"` NotExists []string `json:"not_exists"` Regexp map[string]RequireFieldMatch `json:"match"` NotRegexp map[string]RequireFieldMatchNot `json:"not_match"` Eq map[string][]string `json:"eq"` }
func (*HttpArgsRequireHeader) Match ¶
func (a *HttpArgsRequireHeader) Match(header http.Header) (err error)
func (*HttpArgsRequireHeader) Validate ¶
func (a *HttpArgsRequireHeader) Validate() (err error)
type HttpArgsRequireStatus ¶
type HttpArgsRequireStatus struct {
RequireNumeric
}
func (*HttpArgsRequireStatus) Match ¶
func (a *HttpArgsRequireStatus) Match(status int) error
func (*HttpArgsRequireStatus) Validate ¶
func (a *HttpArgsRequireStatus) Validate() error
type JSONSchema ¶
type JSONSchema string
func (*JSONSchema) Match ¶
func (a *JSONSchema) Match(value []byte) error
func (*JSONSchema) MatchString ¶
func (a *JSONSchema) MatchString(value string) error
func (*JSONSchema) Validate ¶
func (a *JSONSchema) Validate() error
type RepeatArgsRequire ¶
func (*RepeatArgsRequire) Validate ¶
func (a *RepeatArgsRequire) Validate() (err error)
type RequireContent ¶
type RequireContent struct { Type HttpArgsRequireContentType `json:"type"` Length *RequireNumeric `json:"length"` JSON []RequireJSON `json:"json"` XML []RequireXPath `json:"xml"` HTML []RequireXPath `json:"html"` Text []RequireMatch `json:"text"` }
func (*RequireContent) Match ¶
func (a *RequireContent) Match(name string, content []byte) (err error)
func (*RequireContent) Validate ¶
func (a *RequireContent) Validate() (err error)
type RequireFieldMatch ¶
type RequireFieldMatch []string
func (RequireFieldMatch) Match ¶
func (match RequireFieldMatch) Match(name string, input []byte) error
func (RequireFieldMatch) MatchStrings ¶
func (match RequireFieldMatch) MatchStrings(name string, input []string) error
func (RequireFieldMatch) Validate ¶
func (match RequireFieldMatch) Validate() error
type RequireFieldMatchNot ¶
type RequireFieldMatchNot []string
func (RequireFieldMatchNot) Match ¶
func (match RequireFieldMatchNot) Match(name string, input []byte) error
func (RequireFieldMatchNot) MatchStrings ¶
func (match RequireFieldMatchNot) MatchStrings(name string, input []string) error
func (RequireFieldMatchNot) Validate ¶
func (match RequireFieldMatchNot) Validate() error
type RequireJSON ¶
type RequireJSON struct { JSONPath string `json:"jsonpath"` RequireXPath RequireJSONSchema }
func (*RequireJSON) Validate ¶
func (a *RequireJSON) Validate() (err error)
type RequireJSONPath ¶
type RequireJSONPath struct { JSONPath string `json:"jsonpath"` RequireMatch RequireJSONSchema }
func (*RequireJSONPath) Validate ¶
func (a *RequireJSONPath) Validate() (err error)
type RequireJSONSchema ¶
type RequireJSONSchema struct {
JSONSchema *JSONSchema `json:"jsonschema"`
}
func (*RequireJSONSchema) Match ¶
func (a *RequireJSONSchema) Match(content []byte) (err error)
func (*RequireJSONSchema) Validate ¶
func (a *RequireJSONSchema) Validate() error
type RequireMatch ¶
type RequireMatch struct { Regexp RequireFieldMatch `json:"match"` NotRegexp RequireFieldMatchNot `json:"not_match"` }
func (*RequireMatch) MatchStrings ¶
func (a *RequireMatch) MatchStrings(name string, input []string) (err error)
func (*RequireMatch) Validate ¶
func (a *RequireMatch) Validate() (err error)
type RequireNumeric ¶
type RequireNumeric struct { In []float64 `json:"in"` NotIn []float64 `json:"not_in"` Eq *float64 `json:"eq"` Le *float64 `json:"le"` Leq *float64 `json:"leq"` Ge *float64 `json:"ge"` Geq *float64 `json:"geq"` Not *float64 `json:"not"` }
func (*RequireNumeric) MatchString ¶
func (a *RequireNumeric) MatchString(name string, str string) error
func (*RequireNumeric) Validate ¶
func (a *RequireNumeric) Validate() (err error)
type RequireValue ¶
type RequireValue struct { IsNull *Bool `json:"is_null"` Numeric *RequireNumeric `json:"numeric"` Content *RequireContent `json:"content"` Bool *Bool `json:"bool"` }
func (*RequireValue) Match ¶
func (a *RequireValue) Match(value interface{}) (err error)
func (*RequireValue) Validate ¶
func (a *RequireValue) Validate() (err error)
type RequireXPath ¶
type RequireXPath struct { XPath string `json:"xpath"` RequireMatch }
func (*RequireXPath) Match ¶
func (a *RequireXPath) Match(name string, _type HttpArgsRequireContentType, content []byte) (err error)
func (*RequireXPath) Validate ¶
func (a *RequireXPath) Validate() error
type SqlArgsRequire ¶
type SqlArgsRequire struct { Count RequireNumeric `json:"count"` Rows SqlArgsRequireTable `json:"rows"` Row SqlArgsRequireRows `json:"row"` Column SqlArgsRequireColumns `json:"column"` Cell SqlArgsRequireCells `json:"cell"` }
func (*SqlArgsRequire) Match ¶
func (a *SqlArgsRequire) Match(rows Table) (err error)
func (*SqlArgsRequire) Validate ¶
func (a *SqlArgsRequire) Validate() (err error)
type SqlArgsRequireCell ¶
type SqlArgsRequireCell struct { Cell RequireValue }
func (*SqlArgsRequireCell) Match ¶
func (a *SqlArgsRequireCell) Match(rows Table) (err error)
func (*SqlArgsRequireCell) Validate ¶
func (a *SqlArgsRequireCell) Validate() (err error)
type SqlArgsRequireCells ¶
type SqlArgsRequireCells []SqlArgsRequireCell
func (SqlArgsRequireCells) Match ¶
func (a SqlArgsRequireCells) Match(rows Table) (err error)
func (SqlArgsRequireCells) Validate ¶
func (a SqlArgsRequireCells) Validate() (err error)
type SqlArgsRequireColumn ¶
type SqlArgsRequireColumn struct { Column RequireValue Value Slice `json:"value"` }
func (*SqlArgsRequireColumn) Match ¶
func (a *SqlArgsRequireColumn) Match(table Table) (err error)
func (*SqlArgsRequireColumn) Validate ¶
func (a *SqlArgsRequireColumn) Validate() (err error)
type SqlArgsRequireColumns ¶
type SqlArgsRequireColumns []SqlArgsRequireColumn
func (SqlArgsRequireColumns) Match ¶
func (a SqlArgsRequireColumns) Match(table Table) (err error)
func (SqlArgsRequireColumns) Validate ¶
func (a SqlArgsRequireColumns) Validate() (err error)
type SqlArgsRequireRow ¶
type SqlArgsRequireRow struct { Row RequireValue Value Slice `json:"value"` }
func (*SqlArgsRequireRow) Match ¶
func (a *SqlArgsRequireRow) Match(table Table) (err error)
func (*SqlArgsRequireRow) Validate ¶
func (a *SqlArgsRequireRow) Validate() (err error)
type SqlArgsRequireRows ¶
type SqlArgsRequireRows []SqlArgsRequireRow
func (SqlArgsRequireRows) Match ¶
func (a SqlArgsRequireRows) Match(table Table) (err error)
func (SqlArgsRequireRows) Validate ¶
func (a SqlArgsRequireRows) Validate() (err error)
type SqlArgsRequireTable ¶
type SqlArgsRequireTable struct { Value Table `json:"value"` RequireValue }
func (*SqlArgsRequireTable) Match ¶
func (a *SqlArgsRequireTable) Match(table Table) (err error)
func (*SqlArgsRequireTable) Validate ¶
func (a *SqlArgsRequireTable) Validate() (err error)
type Validatable ¶
type Validatable interface {
Validate() (err error)
}
Source Files ¶
- app_consul_require.go
- app_consul_require_service.go
- app_redis_require.go
- app_redis_require_array.go
- app_redis_require_array_value.go
- app_redis_require_array_values.go
- app_redis_require_map.go
- app_redis_require_map_value.go
- app_redis_require_map_values.go
- cmd_require.go
- dial_require.go
- executor_require_field_match.go
- executor_require_field_match_not.go
- executor_require_json_path.go
- executor_require_jsonschema.go
- executor_require_match.go
- executor_require_numeric.go
- executor_require_xpath.go
- executor_type_cell.go
- executor_type_column.go
- executor_type_row.go
- functions.go
- http_basic_auth.go
- http_form.go
- http_require.go
- http_require_content_json.go
- http_require_content_type.go
- http_require_header.go
- http_require_status.go
- repeat_require.go
- require_content.go
- require_value.go
- sql_require.go
- sql_require_cell.go
- sql_require_cells.go
- sql_require_column.go
- sql_require_columns.go
- sql_require_row.go
- sql_require_rows.go
- sql_require_table.go
- type_bool.go
- type_duration.go
- type_jsonschema.go
- type_reachtext.go
- type_slice.go
- type_string.go
- type_table.go
- type_uint.go
- type_validatable.go
Click to show internal directories.
Click to hide internal directories.