src

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

properties.go (2610B)


      1 package http
      2 
      3 import smithy "github.com/aws/smithy-go"
      4 
      5 type (
      6 	sigV4SigningNameKey   struct{}
      7 	sigV4SigningRegionKey struct{}
      8 
      9 	sigV4ASigningNameKey    struct{}
     10 	sigV4ASigningRegionsKey struct{}
     11 
     12 	isUnsignedPayloadKey     struct{}
     13 	disableDoubleEncodingKey struct{}
     14 )
     15 
     16 // GetSigV4SigningName gets the signing name from Properties.
     17 func GetSigV4SigningName(p *smithy.Properties) (string, bool) {
     18 	v, ok := p.Get(sigV4SigningNameKey{}).(string)
     19 	return v, ok
     20 }
     21 
     22 // SetSigV4SigningName sets the signing name on Properties.
     23 func SetSigV4SigningName(p *smithy.Properties, name string) {
     24 	p.Set(sigV4SigningNameKey{}, name)
     25 }
     26 
     27 // GetSigV4SigningRegion gets the signing region from Properties.
     28 func GetSigV4SigningRegion(p *smithy.Properties) (string, bool) {
     29 	v, ok := p.Get(sigV4SigningRegionKey{}).(string)
     30 	return v, ok
     31 }
     32 
     33 // SetSigV4SigningRegion sets the signing region on Properties.
     34 func SetSigV4SigningRegion(p *smithy.Properties, region string) {
     35 	p.Set(sigV4SigningRegionKey{}, region)
     36 }
     37 
     38 // GetSigV4ASigningName gets the v4a signing name from Properties.
     39 func GetSigV4ASigningName(p *smithy.Properties) (string, bool) {
     40 	v, ok := p.Get(sigV4ASigningNameKey{}).(string)
     41 	return v, ok
     42 }
     43 
     44 // SetSigV4ASigningName sets the signing name on Properties.
     45 func SetSigV4ASigningName(p *smithy.Properties, name string) {
     46 	p.Set(sigV4ASigningNameKey{}, name)
     47 }
     48 
     49 // GetSigV4ASigningRegion gets the v4a signing region set from Properties.
     50 func GetSigV4ASigningRegions(p *smithy.Properties) ([]string, bool) {
     51 	v, ok := p.Get(sigV4ASigningRegionsKey{}).([]string)
     52 	return v, ok
     53 }
     54 
     55 // SetSigV4ASigningRegions sets the v4a signing region set on Properties.
     56 func SetSigV4ASigningRegions(p *smithy.Properties, regions []string) {
     57 	p.Set(sigV4ASigningRegionsKey{}, regions)
     58 }
     59 
     60 // GetIsUnsignedPayload gets whether the payload is unsigned from Properties.
     61 func GetIsUnsignedPayload(p *smithy.Properties) (bool, bool) {
     62 	v, ok := p.Get(isUnsignedPayloadKey{}).(bool)
     63 	return v, ok
     64 }
     65 
     66 // SetIsUnsignedPayload sets whether the payload is unsigned on Properties.
     67 func SetIsUnsignedPayload(p *smithy.Properties, isUnsignedPayload bool) {
     68 	p.Set(isUnsignedPayloadKey{}, isUnsignedPayload)
     69 }
     70 
     71 // GetDisableDoubleEncoding gets whether the payload is unsigned from Properties.
     72 func GetDisableDoubleEncoding(p *smithy.Properties) (bool, bool) {
     73 	v, ok := p.Get(disableDoubleEncodingKey{}).(bool)
     74 	return v, ok
     75 }
     76 
     77 // SetDisableDoubleEncoding sets whether the payload is unsigned on Properties.
     78 func SetDisableDoubleEncoding(p *smithy.Properties, disableDoubleEncoding bool) {
     79 	p.Set(disableDoubleEncodingKey{}, disableDoubleEncoding)
     80 }