mirror of https://github.com/knative/func.git
* upgrade to latest dependencies bumping k8s.io/kube-openapi 4241196...3ee0da9: > 3ee0da9 Merge pull request # 299 from Jefftree/def-optimize > 3a31a64 Merge pull request # 292 from Jefftree/v2v3conv > ba6f675 Optimize Definition generation > e69a86c Merge pull request # 298 from Jefftree/allOf > 2cbad14 Add OpenAPIConv > 9f9c01d Merge pull request # 297 from cici37/errFix > 207f0c7 Wrap Refs with AllOf > 29d7264 Merge pull request # 295 from Jefftree/fix-api-json > d2a55e8 Align maxProperties/minProperties err value with others > 52feaf8 Merge pull request # 290 from jiahuif/feature/prune-v2-when-serving-v3 > 352e363 Fix json encoding for OpenAPI v3 Discovery > 662cbb0 Return valid for kubernetes to handle err properly > 13192b9 Merge pull request # 289 from jiahuif/feature/openapi-oneof-type > 2580423 remove embedded v2 from expected schema > 8a7ee80 Merge pull request # 293 from alexzielenski/cache-busting > 79a5a7d generated: update integration test. > d436835 add test for pruning v2 schema. > 6a7b704 Merge pull request # 291 from Jefftree/builder3-test > de6f8b0 split openapi mock class into Fake and FakeV3 > da7e27a add integration test for v3 OneOf > eca4f62 do not include v2 schema when serving v3. > 89ac9db Merge pull request # 284 from Jefftree/cache-busting > 7afa56c Add test for builder3 > 3ca26f0 address comments > 697543f add support for custom v3 oneOf types. > ddc6692 Merge pull request # 288 from Jefftree/gnostic-fix > b0d7548 Cache busting > 130db2b add wrapper around gnostic v3 document > a9dfcaa Merge pull request # 286 from Jefftree/leading-newline > 91ab739 Update gnostic to drop jsonschema dependency > 3f90b8c Merge pull request # 282 from alexzielenski/header_vendorext_marshal > c7e0de3 Merge pull request # 285 from Jefftree/proto-upgrade > 7626df5 Trim leading newlines in Descriptions > 1cd4920 add vendor extensions to marshal openapi v2 header > 86aaf54 Upgrade protobuf and change references of googleapis/gnostic -> google/gnostic Signed-off-by: Knative Automation <automation@knative.team> * Fix client-go version * Add missing license file * Add another missing license file Signed-off-by: Knative Automation <automation@knative.team> Co-authored-by: David Simansky <dsimansk@redhat.com> |
||
|---|---|---|
| .. | ||
| LICENSE | ||
| Makefile | ||
| README.txt | ||
| autoneg.go | ||
README.txt
PACKAGE
package goautoneg
import "bitbucket.org/ww/goautoneg"
HTTP Content-Type Autonegotiation.
The functions in this package implement the behaviour specified in
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Copyright (c) 2011, Open Knowledge Foundation Ltd.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
Neither the name of the Open Knowledge Foundation Ltd. nor the
names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FUNCTIONS
func Negotiate(header string, alternatives []string) (content_type string)
Negotiate the most appropriate content_type given the accept header
and a list of alternatives.
func ParseAccept(header string) (accept []Accept)
Parse an Accept Header string returning a sorted list
of clauses
TYPES
type Accept struct {
Type, SubType string
Q float32
Params map[string]string
}
Structure to represent a clause in an HTTP Accept Header
SUBDIRECTORIES
.hg