binding_test.go — gin Source File
Architecture documentation for binding_test.go, a go file in the gin codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 314c6481_2bd0_e5a7_282c_94e41df6062a["binding_test.go"] fefe783b_8987_7aed_66c9_b2860bfc32e7["bytes"] 314c6481_2bd0_e5a7_282c_94e41df6062a --> fefe783b_8987_7aed_66c9_b2860bfc32e7 style 314c6481_2bd0_e5a7_282c_94e41df6062a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"bytes"
"encoding/json"
"errors"
"io"
"mime/multipart"
"net/http"
"os"
"reflect"
"strconv"
"strings"
"testing"
"time"
"github.com/gin-gonic/gin/testdata/protoexample"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.mongodb.org/mongo-driver/bson"
"google.golang.org/protobuf/proto"
)
type appkey struct {
Appkey string `json:"appkey" form:"appkey"`
}
type QueryTest struct {
Page int `json:"page" form:"page"`
Size int `json:"size" form:"size"`
appkey
}
type FooStruct struct {
Foo string `msgpack:"foo" json:"foo" form:"foo" xml:"foo" binding:"required,max=32"`
}
type FooBarStruct struct {
FooStruct
Bar string `msgpack:"bar" json:"bar" form:"bar" xml:"bar" binding:"required"`
}
type FooBarFileStruct struct {
FooBarStruct
File *multipart.FileHeader `form:"file" binding:"required"`
}
type FooBarFileFailStruct struct {
FooBarStruct
File *multipart.FileHeader `invalid_name:"file" binding:"required"`
}
type FooDefaultBarStruct struct {
FooStruct
Bar string `msgpack:"bar" json:"bar" form:"bar,default=hello" xml:"bar" binding:"required"`
}
// ... (1375 more lines)
Domain
Subdomains
Functions
- TestBindingBSON()
- TestBindingDefault()
- TestBindingDefaultValueFormPost()
- TestBindingForm()
- TestBindingForm2()
- TestBindingFormDefaultValue()
- TestBindingFormDefaultValue2()
- TestBindingFormEmbeddedStruct()
- TestBindingFormEmbeddedStruct2()
- TestBindingFormFilesMultipart()
- TestBindingFormFilesMultipartFail()
- TestBindingFormForTime()
- TestBindingFormForTime2()
- TestBindingFormForType()
- TestBindingFormInvalidName()
- TestBindingFormInvalidName2()
- TestBindingFormMultipart()
- TestBindingFormMultipartForMap()
- TestBindingFormMultipartForMapFail()
- TestBindingFormPost()
- TestBindingFormPostForMap()
- TestBindingFormPostForMapFail()
- TestBindingFormStringMap()
- TestBindingFormStringSliceMap()
- TestBindingJSON()
- TestBindingJSONDisallowUnknownFields()
- TestBindingJSONNilBody()
- TestBindingJSONSlice()
- TestBindingJSONStringMap()
- TestBindingJSONUseNumber()
- TestBindingJSONUseNumber2()
- TestBindingProtoBuf()
- TestBindingProtoBufFail()
- TestBindingQuery()
- TestBindingQuery2()
- TestBindingQueryBoolFail()
- TestBindingQueryFail()
- TestBindingQueryFail2()
- TestBindingQueryStringMap()
- TestBindingTOML()
- TestBindingTOMLFail()
- TestBindingXML()
- TestBindingXMLFail()
- TestBindingYAML()
- TestBindingYAMLFail()
- TestBindingYAMLStringMap()
- TestFormBindingFail()
- TestFormBindingIgnoreField()
- TestFormBindingMultipartFail()
- TestFormMultipartBindingFail()
- TestFormPostBindingFail()
- TestHeaderBinding()
- TestPlainBinding()
- TestRequiredFails()
- TestRequiredSucceeds()
- TestUriBinding()
- TestUriInnerBinding()
- TestValidationDisabled()
- TestValidationFails()
- createDefaultFormPostRequest()
- createFormFilesMultipartRequest()
- createFormFilesMultipartRequestFail()
- createFormMultipartRequest()
- createFormMultipartRequestForMap()
- createFormMultipartRequestForMapFail()
- createFormPostRequest()
- createFormPostRequestForMap()
- createFormPostRequestForMapFail()
- requestWithBody()
- testBodyBinding()
- testBodyBindingDisallowUnknownFields()
- testBodyBindingFail()
- testBodyBindingSlice()
- testBodyBindingStringMap()
- testBodyBindingUseNumber()
- testBodyBindingUseNumber2()
- testFormBinding()
- testFormBindingDefaultValue()
- testFormBindingEmbeddedStruct()
- testFormBindingForTime()
- testFormBindingForTimeFailFormat()
- testFormBindingForTimeFailLocation()
- testFormBindingForTimeNotFormat()
- testFormBindingForTimeNotUnixFormat()
- testFormBindingForType()
- testFormBindingIgnoreField()
- testFormBindingInvalidName()
- testFormBindingInvalidName2()
- testProtoBodyBinding()
- testProtoBodyBindingFail()
- testQueryBinding()
- testQueryBindingBoolFail()
- testQueryBindingFail()
Types
- FooBarFileFailStruct
- FooBarFileStruct
- FooBarStruct
- FooBarStructForTimeType
- FooDefaultBarStruct
- FooStruct
- FooStructDisallowUnknownFields
- FooStructForBoolType
- FooStructForIgnoreFormTag
- FooStructForMapPtrType
- FooStructForMapType
- FooStructForSliceMapType
- FooStructForSliceType
- FooStructForStringPtrType
- FooStructForStructPointerType
- FooStructForStructType
- FooStructForTimeTypeFailFormat
- FooStructForTimeTypeFailLocation
- FooStructForTimeTypeNotFormat
- FooStructForTimeTypeNotUnixFormat
- FooStructUseNumber
- HogeStruct
- InvalidNameMapType
- InvalidNameType
- NotSupportStruct
- QueryTest
- Tag
- Time
- any
- appkey
- bool
- failRead
- failStruct
- hook
- int
- string
- tHeader
Dependencies
- bytes
Source
Frequently Asked Questions
What does binding_test.go do?
binding_test.go is a source file in the gin codebase, written in go. It belongs to the RequestBinding domain, FormBinding subdomain.
What functions are defined in binding_test.go?
binding_test.go defines 93 function(s): TestBindingBSON, TestBindingDefault, TestBindingDefaultValueFormPost, TestBindingForm, TestBindingForm2, TestBindingFormDefaultValue, TestBindingFormDefaultValue2, TestBindingFormEmbeddedStruct, TestBindingFormEmbeddedStruct2, TestBindingFormFilesMultipart, and 83 more.
What does binding_test.go depend on?
binding_test.go imports 1 module(s): bytes.
Where is binding_test.go in the architecture?
binding_test.go is located at binding/binding_test.go (domain: RequestBinding, subdomain: FormBinding, directory: binding).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free