option.go (611B)
1 package auth 2 3 import "github.com/aws/smithy-go" 4 5 type ( 6 authOptionsKey struct{} 7 ) 8 9 // Option represents a possible authentication method for an operation. 10 type Option struct { 11 SchemeID string 12 IdentityProperties smithy.Properties 13 SignerProperties smithy.Properties 14 } 15 16 // GetAuthOptions gets auth Options from Properties. 17 func GetAuthOptions(p *smithy.Properties) ([]*Option, bool) { 18 v, ok := p.Get(authOptionsKey{}).([]*Option) 19 return v, ok 20 } 21 22 // SetAuthOptions sets auth Options on Properties. 23 func SetAuthOptions(p *smithy.Properties, options []*Option) { 24 p.Set(authOptionsKey{}, options) 25 }