src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

traits.go (2717B)


      1 // Package traits defines representations of Smithy IDL traits that appear in
      2 // code-generated schemas.
      3 package traits
      4 
      5 import smithy "github.com/aws/smithy-go"
      6 
      7 // Sensitive represents smithy.api#sensitive.
      8 type Sensitive struct{}
      9 
     10 // TraitID identifies the trait.
     11 func (*Sensitive) TraitID() smithy.ShapeID {
     12 	return smithy.ShapeID{Namespace: "smithy.api", Name: "sensitive"}
     13 }
     14 
     15 // EventHeader represents smithy.api#eventHeader.
     16 type EventHeader struct{}
     17 
     18 // TraitID identifies the trait.
     19 func (*EventHeader) TraitID() smithy.ShapeID {
     20 	return smithy.ShapeID{Namespace: "smithy.api", Name: "eventHeader"}
     21 }
     22 
     23 // EventPayload represents smithy.api#eventPayload.
     24 type EventPayload struct{}
     25 
     26 // TraitID identifies the trait.
     27 func (*EventPayload) TraitID() smithy.ShapeID {
     28 	return smithy.ShapeID{Namespace: "smithy.api", Name: "eventPayload"}
     29 }
     30 
     31 // Streaming represents smithy.api#streaming.
     32 type Streaming struct{}
     33 
     34 // TraitID identifies the trait.
     35 func (*Streaming) TraitID() smithy.ShapeID {
     36 	return smithy.ShapeID{Namespace: "smithy.api", Name: "streaming"}
     37 }
     38 
     39 // HostLabel represents smithy.api#hostLabel.
     40 type HostLabel struct{}
     41 
     42 // TraitID identifies the trait.
     43 func (*HostLabel) TraitID() smithy.ShapeID {
     44 	return smithy.ShapeID{Namespace: "smithy.api", Name: "hostLabel"}
     45 }
     46 
     47 // ContextParam represents smithy.rules#contextParam.
     48 type ContextParam struct{}
     49 
     50 // TraitID identifies the trait.
     51 func (*ContextParam) TraitID() smithy.ShapeID {
     52 	return smithy.ShapeID{Namespace: "smithy.rules", Name: "contextParam"}
     53 }
     54 
     55 // AWSQueryError represents aws.protocols#awsQueryError.
     56 type AWSQueryError struct {
     57 	ErrorCode  string
     58 	StatusCode int
     59 }
     60 
     61 // TraitID identifies the trait.
     62 func (*AWSQueryError) TraitID() smithy.ShapeID {
     63 	return smithy.ShapeID{Namespace: "aws.protocols", Name: "awsQueryError"}
     64 }
     65 
     66 // EC2QueryName represents aws.protocols#ec2QueryName.
     67 type EC2QueryName struct {
     68 	Name string
     69 }
     70 
     71 // TraitID identifies the trait.
     72 func (*EC2QueryName) TraitID() smithy.ShapeID {
     73 	return smithy.ShapeID{Namespace: "aws.protocols", Name: "ec2QueryName"}
     74 }
     75 
     76 // AWSQueryCompatible represents aws.protocols#awsQueryCompatible.
     77 type AWSQueryCompatible struct{}
     78 
     79 // TraitID identifies the trait.
     80 func (*AWSQueryCompatible) TraitID() smithy.ShapeID {
     81 	return smithy.ShapeID{Namespace: "aws.protocols", Name: "awsQueryCompatible"}
     82 }
     83 
     84 // UnitShape is a synthetic trait applied to input/output shapes that were
     85 // backfilled from Unit. It indicates the shape has no defined members and
     86 // should be treated as absent for protocol serialization purposes.
     87 type UnitShape struct{}
     88 
     89 // TraitID identifies the trait.
     90 func (*UnitShape) TraitID() smithy.ShapeID {
     91 	return smithy.ShapeID{Namespace: "smithy.go", Name: "unitShape"}
     92 }