constant

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TEXT_PLAIN_ID = iota
	TEXT_HTML_ID
	TEXT_XML_ID
	TEXT_CSS_ID
	TEXT_JAVASCRIPT_ID
	TEXT_CSV_ID
	APPLICATION_JSON_ID
	APPLICATION_JSON_PATCH_JSON_ID
	APPLICATION_LD_JSON_ID
	APPLICATION_VND_API_JSON_ID
	APPLICATION_XML_ID
	APPLICATION_ATOM_XML_ID
	APPLICATION_RSS_XML_ID
	APPLICATION_OCTET_STREAM_ID
	APPLICATION_PDF_ID
	APPLICATION_ZIP_ID
	APPLICATION_X_WWW_FORM_URLENCODED_ID
	APPLICATION_X_HTML_XML_ID
	APPLICATION_VND_MS_EXCEL_ID
	APPLICATION_VND_MS_POWERPOINT_ID
	APPLICATION_MS_WORD_ID
	MULTIPART_FORM_DATA_ID
	MULTIPART_BYTERANGES_ID
	IMAGE_PNG_ID
	IMAGE_JPEG_ID
	IMAGE_GIF_ID
	IMAGE_SVG_XML_ID
	AUDIO_MPEG_ID
	AUDIO_OGG_ID
	AUDIO_WAV_ID
	VIDEO_MP4_ID
	VIDEO_OGG_ID
	VIDEO_WEBM_ID

	TEXT_PLAIN                        = "text/plain"
	TEXT_HTML                         = "text/html"
	TEXT_XML                          = "text/xml"
	TEXT_CSS                          = "text/css"
	TEXT_JAVASCRIPT                   = "text/javascript"
	TEXT_CSV                          = "text/csv"
	APPLICATION_JSON                  = "application/json"
	APPLICATION_JSON_PATCH_JSON       = "application/json-patch+json"
	APPLICATION_LD_JSON               = "application/ld+json"
	APPLICATION_VND_API_JSON          = "application/vnd.api+json"
	APPLICATION_XML                   = "application/xml"
	APPLICATION_ATOM_XML              = "application/atom+xml"
	APPLICATION_RSS_XML               = "application/rss+xml"
	APPLICATION_OCTET_STREAM          = "application/octet-stream"
	APPLICATION_PDF                   = "application/pdf"
	APPLICATION_ZIP                   = "application/zip"
	APPLICATION_X_WWW_FORM_URLENCODED = "application/x-www-form-urlencoded"
	APPLICATION_X_HTML_XML            = "application/xhtml+xml"
	APPLICATION_VND_MS_EXCEL          = "application/vnd.ms-excel"
	APPLICATION_VND_MS_POWERPOINT     = "application/vnd.ms-powerpoint"
	APPLICATION_MS_WORD               = "application/msword"
	MULTIPART_FORM_DATA               = "multipart/form-data"
	MULTIPART_BYTERANGES              = "multipart/byteranges"
	IMAGE_PNG                         = "image/png"
	IMAGE_JPEG                        = "image/jpeg"
	IMAGE_GIF                         = "image/gif"
	IMAGE_SVG_XML                     = "image/svg+xml"
	AUDIO_MPEG                        = "audio/mpeg"
	AUDIO_OGG                         = "audio/ogg"
	AUDIO_WAV                         = "audio/wav"
	VIDEO_MP4                         = "video/mp4"
	VIDEO_OGG                         = "video/ogg"
	VIDEO_WEBM                        = "video/webm"
)
View Source
const (
	STRING_ID = iota
	NUMBER_ID
	INTEGER_ID
	BOOLEAN_ID
	ARRAY_ID
	OBJECT_ID

	STRING_TYPE  = "string"
	NUMBER_TYPE  = "number"
	INTEGER_TYPE = "integer"
	BOOLEAN_TYPE = "boolean"
	ARRAY_TYPE   = "array"
	OBJECT_TYPE  = "object"
)
View Source
const (
	FORMAT_DATE_ID = iota
	FORMAT_DATE_TIME_ID
	FORMAT_PASSWORD_ID
	FORMAT_BYTE_ID
	FORMAT_BINARY_ID
	FORMAT_EMAIL_ID
	FORMAT_UUID_ID
	FORMAT_HOSTNAME_ID
	FORMAT_IPV4_ID
	FORMAT_IPV6_ID
	FORMAT_URI_ID
	FORMAT_URI_REF_ID
	FORMAT_URI_TEMPLATE_ID
	FORMAT_JSON_POINTER_ID
	FORMAT_RELATIVE_JSON_POINTER_ID
	FORMAT_REGEX_ID

	FORMAT_DATE                  = "date"
	FORMAT_DATE_TIME             = "date-time"
	FORMAT_PASSWORD              = "password"
	FORMAT_BYTE                  = "byte"
	FORMAT_BINARY                = "binary"
	FORMAT_EMAIL                 = "email"
	FORMAT_UUID                  = "uuid"
	FORMAT_HOSTNAME              = "hostname"
	FORMAT_IPV4                  = "ipv4"
	FORMAT_IPV6                  = "ipv6"
	FORMAT_URI                   = "uri"
	FORMAT_URI_REF               = "uri-reference"
	FORMAT_URI_TEMPLATE          = "uri-template"
	FORMAT_JSON_POINTER          = "json-pointer"
	FORMAT_RELATIVE_JSON_POINTER = "relative-json-pointer"
	FORMAT_REGEX                 = "regex"
)
View Source
const (
	FORMAT_FLOAT_ID = iota
	FORMAT_DOUBLE_ID

	FORMAT_FLOAT  = "float"
	FORMAT_DOUBLE = "double"
)
View Source
const (
	FORMAT_INT32_ID = iota
	FORMAT_INT64_ID

	FORMAT_INT32 = "int32"
	FORMAT_INT64 = "int64"
)
View Source
const (
	GET_FILE    = "get"
	POST_FILE   = "post"
	PUT_FILE    = "put"
	DELETE_FILE = "delete"
)
View Source
const (
	QUERY_PARAM_ID = iota
	HEADER_PARAM_ID
	PATH_PARAM_ID
	COOKIE_PARAM_ID

	QUERY_PARAM  = "query"
	HEADER_PARAM = "header"
	PATH_PARAM   = "path"
	COOKIE_PARAM = "cookie"
)
View Source
const (
	API_KEY_AUTH         = "ApiKey"
	BASIC_AUTH           = "BasicAuth"
	BEARER_AUTH          = "Bearer"
	OAUTH2_AUTH          = "OAuth2"
	OPEN_ID_CONNECT_AUTH = "OpenId"

	API_KEY_AUTH_LOWER         = "apikey"
	BASIC_AUTH_LOWER           = "basicauth"
	BEARER_AUTH_LOWER          = "bearer"
	OAUTH2_AUTH_LOWER          = "oauth2"
	OPEN_ID_CONNECT_AUTH_LOWER = "openid"
)
View Source
const (
	CONTINUE_STATUS_CODE            = "100"
	SWITCHING_PROTOCOLS_STATUS_CODE = "101"
	PROCESSING_STATUS_CODE          = "102"
	EARLY_HINTS_STATUS_CODE         = "103"

	SUCESS_STATUS_CODE                        = "200"
	CREATED_STATUS_CODE                       = "201"
	ACCEPTED_STATUS_CODE                      = "202"
	NON_AUTHORITATIVE_INFORMATION_STATUS_CODE = "203"
	NO_CONTENT_STATUS_CODE                    = "204"
	RESET_CONTENT_STATUS_CODE                 = "205"
	PARTIAL_CONTENT_STATUS_CODE               = "206"
	MULTI_STATUS_STATUS_CODE                  = "207"
	ALREADY_REPORTED_STATUS_CODE              = "208"
	IM_USED_STATUS_CODE                       = "226"

	MULTIPLE_CHOICES_STATUS_CODE   = "300"
	MOVED_PERMANENTLY_STATUS_CODE  = "301"
	FOUND_STATUS_CODE              = "302"
	SEE_OTHER_STATUS_CODE          = "303"
	NOT_MODIFIED_STATUS_CODE       = "304"
	USE_PROXY_STATUS_CODE          = "305"
	TEMPORARY_REDIRECT_STATUS_CODE = "307"
	PERMANENT_REDIRECT_STATUS_CODE = "308"

	BAD_REQUEST_STATUS_CODE                     = "400"
	UNAUTHORIZED_STATUS_CODE                    = "401"
	PAYMENT_REQUIRED_STATUS_CODE                = "402"
	FORBIDDEN_STATUS_CODE                       = "403"
	NOT_FOUND_STATUS_CODE                       = "404"
	METHOD_NOT_ALLOWED_STATUS_CODE              = "405"
	NOT_ACCEPTABLE_STATUS_CODE                  = "406"
	PROXY_AUTHENTICATION_REQUIRED_STATUS_CODE   = "407"
	REQUEST_TIMEOUT_STATUS_CODE                 = "408"
	CONFLICT_STATUS_CODE                        = "409"
	GONE_STATUS_CODE                            = "410"
	LENGTH_REQUIRED_STATUS_CODE                 = "411"
	PRECONDITION_FAILED_STATUS_CODE             = "412"
	PAYLOAD_TOO_LARGE_STATUS_CODE               = "413"
	URI_TOO_LONG_STATUS_CODE                    = "414"
	UNSUPPORTED_MEDIA_TYPE_STATUS_CODE          = "415"
	RANGE_NOT_SATISFIABLE_STATUS_CODE           = "416"
	EXPECTATION_FAILED_STATUS_CODE              = "417"
	I_AM_A_TEAPOT_STATUS_CODE                   = "418"
	MISDIRECTED_REQUEST_STATUS_CODE             = "421"
	UNPROCESSABLE_ENTITY_STATUS_CODE            = "422"
	LOCKED_STATUS_CODE                          = "423"
	FAILED_DEPENDENCY_STATUS_CODE               = "424"
	UPGRADE_REQUIRED_STATUS_CODE                = "426"
	PRECONDITION_REQUIRED_STATUS_CODE           = "428"
	TOO_MANY_REQUESTS_STATUS_CODE               = "429"
	REQUEST_HEADER_FIELDS_TOO_LARGE_STATUS_CODE = "431"
	UNAVAILABLE_FOR_LEGAL_REASONS_STATUS_CODE   = "451"

	INTERNAL_SERVER_ERROR_STATUS_CODE           = "500"
	NOT_IMPLEMENTED_STATUS_CODE                 = "501"
	BAD_GATEWAY_STATUS_CODE                     = "502"
	SERVICE_UNAVAILABLE_STATUS_CODE             = "503"
	GATEWAY_TIMEOUT_STATUS_CODE                 = "504"
	HTTP_VERSION_NOT_SUPPORTED_STATUS_CODE      = "505"
	VARIANT_ALSO_NEGOTIATES_STATUS_CODE         = "506"
	INSUFFICIENT_STORAGE_STATUS_CODE            = "507"
	LOOP_DETECTED_STATUS_CODE                   = "508"
	NOT_EXTENDED_STATUS_CODE                    = "510"
	NETWORK_AUTHENTICATION_REQUIRED_STATUS_CODE = "511"

	DEFAULT_STATUS = "default"
)

Variables

View Source
var FormatIntegerList = []string{
	FORMAT_INT32,
	FORMAT_INT64,
}
View Source
var FormatNumberList = []string{
	FORMAT_FLOAT,
	FORMAT_DOUBLE,
}
View Source
var StatusCodesList = []string{
	CONTINUE_STATUS_CODE,
	SWITCHING_PROTOCOLS_STATUS_CODE,
	PROCESSING_STATUS_CODE,
	EARLY_HINTS_STATUS_CODE,
	SUCESS_STATUS_CODE,
	CREATED_STATUS_CODE,
	ACCEPTED_STATUS_CODE,
	NON_AUTHORITATIVE_INFORMATION_STATUS_CODE,
	NO_CONTENT_STATUS_CODE,
	RESET_CONTENT_STATUS_CODE,
	PARTIAL_CONTENT_STATUS_CODE,
	MULTI_STATUS_STATUS_CODE,
	ALREADY_REPORTED_STATUS_CODE,
	IM_USED_STATUS_CODE,
	MULTIPLE_CHOICES_STATUS_CODE,
	MOVED_PERMANENTLY_STATUS_CODE,
	FOUND_STATUS_CODE,
	SEE_OTHER_STATUS_CODE,
	NOT_MODIFIED_STATUS_CODE,
	USE_PROXY_STATUS_CODE,
	TEMPORARY_REDIRECT_STATUS_CODE,
	PERMANENT_REDIRECT_STATUS_CODE,
	BAD_REQUEST_STATUS_CODE,
	UNAUTHORIZED_STATUS_CODE,
	PAYMENT_REQUIRED_STATUS_CODE,
	FORBIDDEN_STATUS_CODE,
	NOT_FOUND_STATUS_CODE,
	METHOD_NOT_ALLOWED_STATUS_CODE,
	NOT_ACCEPTABLE_STATUS_CODE,
	PROXY_AUTHENTICATION_REQUIRED_STATUS_CODE,
	REQUEST_TIMEOUT_STATUS_CODE,
	CONFLICT_STATUS_CODE,
	GONE_STATUS_CODE,
	LENGTH_REQUIRED_STATUS_CODE,
	PRECONDITION_FAILED_STATUS_CODE,
	PAYLOAD_TOO_LARGE_STATUS_CODE,
	URI_TOO_LONG_STATUS_CODE,
	UNSUPPORTED_MEDIA_TYPE_STATUS_CODE,
	RANGE_NOT_SATISFIABLE_STATUS_CODE,
	EXPECTATION_FAILED_STATUS_CODE,
	I_AM_A_TEAPOT_STATUS_CODE,
	MISDIRECTED_REQUEST_STATUS_CODE,
	UNPROCESSABLE_ENTITY_STATUS_CODE,
	LOCKED_STATUS_CODE,
	FAILED_DEPENDENCY_STATUS_CODE,
	UPGRADE_REQUIRED_STATUS_CODE,
	PRECONDITION_REQUIRED_STATUS_CODE,
	TOO_MANY_REQUESTS_STATUS_CODE,
	REQUEST_HEADER_FIELDS_TOO_LARGE_STATUS_CODE,
	UNAVAILABLE_FOR_LEGAL_REASONS_STATUS_CODE,
	INTERNAL_SERVER_ERROR_STATUS_CODE,
	NOT_IMPLEMENTED_STATUS_CODE,
	BAD_GATEWAY_STATUS_CODE,
	SERVICE_UNAVAILABLE_STATUS_CODE,
	GATEWAY_TIMEOUT_STATUS_CODE,
	HTTP_VERSION_NOT_SUPPORTED_STATUS_CODE,
	VARIANT_ALSO_NEGOTIATES_STATUS_CODE,
	INSUFFICIENT_STORAGE_STATUS_CODE,
	LOOP_DETECTED_STATUS_CODE,
	NOT_EXTENDED_STATUS_CODE,
	NETWORK_AUTHENTICATION_REQUIRED_STATUS_CODE,
	DEFAULT_STATUS,
}

Functions

func GetCamelCaseSecurityType

func GetCamelCaseSecurityType(securityType string) string

Types

type FormatType

type FormatType struct {
	ID   int
	Type string
}

type FormatTypes

type FormatTypes map[string]FormatType

type ParamLocation

type ParamLocation struct {
	ID   int
	Type string
}

type ParamLocations

type ParamLocations map[string]ParamLocation

type SchemaType

type SchemaType struct {
	ID   int
	Type string
}

type SchemaTypes

type SchemaTypes map[string]SchemaType

Jump to

Keyboard shortcuts

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