1 // Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // author xeipuuv 16 // author-github https://github.com/xeipuuv 17 // author-mail xeipuuv@gmail.com 18 // 19 // repository-name gojsonschema 20 // repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. 21 // 22 // description Contains const types for schema and JSON. 23 // 24 // created 28-02-2013 25 26 package gojsonschema 27 28 // Type constants 29 const ( 30 TYPE_ARRAY = `array` 31 TYPE_BOOLEAN = `boolean` 32 TYPE_INTEGER = `integer` 33 TYPE_NUMBER = `number` 34 TYPE_NULL = `null` 35 TYPE_OBJECT = `object` 36 TYPE_STRING = `string` 37 ) 38 39 // JSON_TYPES hosts the list of type that are supported in JSON 40 var JSON_TYPES []string 41 42 // SCHEMA_TYPES hosts the list of type that are supported in schemas 43 var SCHEMA_TYPES []string 44 45 func init() { 46 JSON_TYPES = []string{ 47 TYPE_ARRAY, 48 TYPE_BOOLEAN, 49 TYPE_INTEGER, 50 TYPE_NUMBER, 51 TYPE_NULL, 52 TYPE_OBJECT, 53 TYPE_STRING} 54 55 SCHEMA_TYPES = []string{ 56 TYPE_ARRAY, 57 TYPE_BOOLEAN, 58 TYPE_INTEGER, 59 TYPE_NUMBER, 60 TYPE_OBJECT, 61 TYPE_STRING} 62 } 63