Vendor dependencies
This commit is contained in:
+69
@@ -0,0 +1,69 @@
|
||||
package traits
|
||||
|
||||
import smithy "github.com/aws/smithy-go"
|
||||
|
||||
// HTTPHeader represents smithy.api#httpHeader.
|
||||
type HTTPHeader struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTPHeader) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "httpHeader"} }
|
||||
|
||||
// HTTPLabel represents smithy.api#httpLabel.
|
||||
type HTTPLabel struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTPLabel) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "httpLabel"} }
|
||||
|
||||
// HTTPPayload represents smithy.api#httpPayload.
|
||||
type HTTPPayload struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTPPayload) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "httpPayload"} }
|
||||
|
||||
// HTTPPrefixHeaders represents smithy.api#httpPrefixHeaders.
|
||||
type HTTPPrefixHeaders struct {
|
||||
Prefix string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTPPrefixHeaders) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "httpPrefixHeaders"} }
|
||||
|
||||
// HTTPQuery represents smithy.api#httpQuery.
|
||||
type HTTPQuery struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTPQuery) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "httpQuery"} }
|
||||
|
||||
// HTTPQueryParams represents smithy.api#httpQueryParams.
|
||||
type HTTPQueryParams struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTPQueryParams) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "httpQueryParams"} }
|
||||
|
||||
// HTTPResponseCode represents smithy.api#httpResponseCode.
|
||||
type HTTPResponseCode struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTPResponseCode) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "httpResponseCode"} }
|
||||
|
||||
// HTTP represents smithy.api#http.
|
||||
type HTTP struct {
|
||||
Method string
|
||||
URI string
|
||||
Code int
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTP) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "http"} }
|
||||
|
||||
// HTTPError represents smithy.api#httpError.
|
||||
type HTTPError struct {
|
||||
Code int
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HTTPError) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "httpError"} }
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
package traits
|
||||
|
||||
// Trait index constants, ordered by frequency of occurrence across AWS API
|
||||
// models. Lower indices are assigned to more common traits so that the
|
||||
// per-schema indexed slice stays small.
|
||||
const (
|
||||
indexJSONName = iota
|
||||
indexHTTP
|
||||
indexHTTPLabel
|
||||
indexXMLName
|
||||
indexHTTPQuery
|
||||
indexEC2QueryName
|
||||
indexHTTPError
|
||||
indexHTTPHeader
|
||||
indexSensitive
|
||||
indexAWSQueryError
|
||||
indexTimestampFormat
|
||||
indexHTTPPayload
|
||||
indexContextParam
|
||||
indexHTTPResponseCode
|
||||
indexHostLabel
|
||||
indexXMLNamespace
|
||||
indexXMLFlattened
|
||||
indexStreaming
|
||||
indexMediaType
|
||||
indexHTTPQueryParams
|
||||
indexEventPayload
|
||||
indexHTTPPrefixHeaders
|
||||
indexEventHeader
|
||||
indexXMLAttribute
|
||||
indexUnitShape
|
||||
)
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*JSONName) TraitIndex() int { return indexJSONName }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTP) TraitIndex() int { return indexHTTP }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTPLabel) TraitIndex() int { return indexHTTPLabel }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*XMLName) TraitIndex() int { return indexXMLName }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTPQuery) TraitIndex() int { return indexHTTPQuery }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*EC2QueryName) TraitIndex() int { return indexEC2QueryName }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTPError) TraitIndex() int { return indexHTTPError }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTPHeader) TraitIndex() int { return indexHTTPHeader }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*Sensitive) TraitIndex() int { return indexSensitive }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*AWSQueryError) TraitIndex() int { return indexAWSQueryError }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*TimestampFormat) TraitIndex() int { return indexTimestampFormat }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTPPayload) TraitIndex() int { return indexHTTPPayload }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*ContextParam) TraitIndex() int { return indexContextParam }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTPResponseCode) TraitIndex() int { return indexHTTPResponseCode }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HostLabel) TraitIndex() int { return indexHostLabel }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*XMLNamespace) TraitIndex() int { return indexXMLNamespace }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*XMLFlattened) TraitIndex() int { return indexXMLFlattened }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*Streaming) TraitIndex() int { return indexStreaming }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*MediaType) TraitIndex() int { return indexMediaType }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTPQueryParams) TraitIndex() int { return indexHTTPQueryParams }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*EventPayload) TraitIndex() int { return indexEventPayload }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*HTTPPrefixHeaders) TraitIndex() int { return indexHTTPPrefixHeaders }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*EventHeader) TraitIndex() int { return indexEventHeader }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*XMLAttribute) TraitIndex() int { return indexXMLAttribute }
|
||||
|
||||
// TraitIndex implements [smithy.IndexableTrait].
|
||||
func (*UnitShape) TraitIndex() int { return indexUnitShape }
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
package traits
|
||||
|
||||
import smithy "github.com/aws/smithy-go"
|
||||
|
||||
// JSONName represents smithy.api#jsonName.
|
||||
type JSONName struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*JSONName) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "jsonName"} }
|
||||
|
||||
// MediaType represents smithy.api#mediaType.
|
||||
type MediaType struct {
|
||||
Type string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*MediaType) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "mediaType"} }
|
||||
|
||||
// TimestampFormat represents smithy.api#timestampFormat.
|
||||
type TimestampFormat struct {
|
||||
Format string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*TimestampFormat) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "timestampFormat"} }
|
||||
|
||||
// XMLAttribute represents smithy.api#xmlAttribute.
|
||||
type XMLAttribute struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*XMLAttribute) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "xmlAttribute"} }
|
||||
|
||||
// XMLFlattened represents smithy.api#xmlFlattened.
|
||||
type XMLFlattened struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*XMLFlattened) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "xmlFlattened"} }
|
||||
|
||||
// XMLName represents smithy.api#xmlName.
|
||||
type XMLName struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*XMLName) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "xmlName"} }
|
||||
|
||||
// XMLNamespace represents smithy.api#xmlNamespace.
|
||||
type XMLNamespace struct {
|
||||
URI string
|
||||
Prefix string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*XMLNamespace) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "xmlNamespace"} }
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
// Package traits defines representations of Smithy IDL traits that appear in
|
||||
// code-generated schemas.
|
||||
package traits
|
||||
|
||||
import smithy "github.com/aws/smithy-go"
|
||||
|
||||
// Sensitive represents smithy.api#sensitive.
|
||||
type Sensitive struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*Sensitive) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "sensitive"} }
|
||||
|
||||
// Error represents smithy.api#error.
|
||||
type Error struct {
|
||||
Type string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*Error) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "error"} }
|
||||
|
||||
// EventHeader represents smithy.api#eventHeader.
|
||||
type EventHeader struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*EventHeader) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "eventHeader"} }
|
||||
|
||||
// EventPayload represents smithy.api#eventPayload.
|
||||
type EventPayload struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*EventPayload) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "eventPayload"} }
|
||||
|
||||
// Streaming represents smithy.api#streaming.
|
||||
type Streaming struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*Streaming) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "streaming"} }
|
||||
|
||||
// HostLabel represents smithy.api#hostLabel.
|
||||
type HostLabel struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*HostLabel) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.api", Name: "hostLabel"} }
|
||||
|
||||
// ContextParam represents smithy.rules#contextParam.
|
||||
type ContextParam struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*ContextParam) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.rules", Name: "contextParam"} }
|
||||
|
||||
// AWSQueryError represents aws.protocols#awsQueryError.
|
||||
type AWSQueryError struct {
|
||||
ErrorCode string
|
||||
StatusCode int
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*AWSQueryError) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "aws.protocols", Name: "awsQueryError"} }
|
||||
|
||||
// EC2QueryName represents aws.protocols#ec2QueryName.
|
||||
type EC2QueryName struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*EC2QueryName) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "aws.protocols", Name: "ec2QueryName"} }
|
||||
|
||||
// AWSQueryCompatible represents aws.protocols#awsQueryCompatible.
|
||||
type AWSQueryCompatible struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*AWSQueryCompatible) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "aws.protocols", Name: "awsQueryCompatible"} }
|
||||
|
||||
// UnitShape is a synthetic trait applied to input/output shapes that were
|
||||
// backfilled from Unit. It indicates the shape has no defined members and
|
||||
// should be treated as absent for protocol serialization purposes.
|
||||
type UnitShape struct{}
|
||||
|
||||
// TraitID identifies the trait.
|
||||
func (*UnitShape) TraitID() smithy.ShapeID { return smithy.ShapeID{Namespace: "smithy.go", Name: "unitShape"} }
|
||||
Reference in New Issue
Block a user