// Copyright 2015 go-swagger maintainers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package strfmt import ( "database/sql/driver" "encoding/base64" "errors" "fmt" "regexp" "strings" "github.com/asaskevich/govalidator" "github.com/mailru/easyjson/jlexer" "github.com/mailru/easyjson/jwriter" "gopkg.in/mgo.v2/bson" ) const ( // HostnamePattern http://json-schema.org/latest/json-schema-validation.html#anchor114 // A string instance is valid against this attribute if it is a valid // representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. // http://tools.ietf.org/html/rfc1034#section-3.5 // ::= any one of the ten digits 0 through 9 // var digit = /[0-9]/; // ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case // var letter = /[a-zA-Z]/; // ::= | // var letDig = /[0-9a-zA-Z]/; // ::= | "-" // var letDigHyp = /[-0-9a-zA-Z]/; // ::= | // var ldhStr = /[-0-9a-zA-Z]+/; //