diff --git a/.gitignore b/.gitignore index 8d5d54e..42b2320 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ *~ bin work -*.zip \ No newline at end of file +*.zip +go.work* +.DS_Store \ No newline at end of file diff --git a/Makefile b/Makefile index d99ff51..3fead8f 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ LDFLAGS=-s -w TABLE_PREFIX= ACCOUNTS_DB_URI=awsdynamodb://$(TABLE_PREFIX)accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: +ACTIVITIES_DB_URI=awsdynamodb://$(TABLE_PREFIX)activities?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: FOLLOWING_DB_URI=awsdynamodb://$(TABLE_PREFIX)following?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: FOLLOWERS_DB_URI=awsdynamodb://$(TABLE_PREFIX)followers?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: BLOCKS_DB_URI=awsdynamodb://$(TABLE_PREFIX)blocks?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: @@ -19,6 +20,7 @@ cli: publish: go run cmd/publish-feeds/main.go \ -accounts-database-uri '$(ACCOUNTS_DB_URI)' \ + -activities-database-uri '$(ACTIVITIES_DB_URI)' \ -followers-database-uri '$(FOLLOWERS_DB_URI)' \ -posts-database-uri '$(POSTS_DB_URI)' \ -deliveries-database-uri '$(DELIVERIES_DB_URI)' \ diff --git a/app/dynamodb/tables/create/create.go b/app/dynamodb/tables/create/create.go index 2728fd6..5860de5 100644 --- a/app/dynamodb/tables/create/create.go +++ b/app/dynamodb/tables/create/create.go @@ -12,12 +12,12 @@ import ( ap_dynamodb "github.com/sfomuseum/go-activitypub-feeds/schema/dynamodb" ) -func Run(ctx context.Context, logger *slog.Logger) error { +func Run(ctx context.Context) error { fs := DefaultFlagSet() - return RunWithFlagSet(ctx, fs, logger) + return RunWithFlagSet(ctx, fs) } -func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet, logger *slog.Logger) error { +func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet) error { opts, err := OptionsFromFlagSet(ctx, fs) @@ -25,12 +25,15 @@ func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet, logger *slog.Logger) return fmt.Errorf("Failed to derive options from flagset, %w", err) } - return RunWithOptions(ctx, opts, logger) + return RunWithOptions(ctx, opts) } -func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) error { +func RunWithOptions(ctx context.Context, opts *RunOptions) error { - slog.SetDefault(logger) + if opts.Verbose { + slog.SetLogLoggerLevel(slog.LevelDebug) + slog.Debug("Verbose logging enabled") + } cl, err := aa_dynamodb.NewClient(ctx, opts.DynamodbClientURI) diff --git a/app/dynamodb/tables/create/flags.go b/app/dynamodb/tables/create/flags.go index 0360cd0..ff8d13a 100644 --- a/app/dynamodb/tables/create/flags.go +++ b/app/dynamodb/tables/create/flags.go @@ -10,6 +10,7 @@ var refresh bool var dynamodb_client_uri string var table_prefix string +var verbose bool func DefaultFlagSet() *flag.FlagSet { @@ -18,6 +19,6 @@ func DefaultFlagSet() *flag.FlagSet { fs.BoolVar(&refresh, "refresh", false, "...") fs.StringVar(&dynamodb_client_uri, "dynamodb-client-uri", "", "...") fs.StringVar(&table_prefix, "table-prefix", "", "...") - + fs.BoolVar(&verbose, "verbose", false, "Enable verbose (debug) logging.") return fs } diff --git a/app/dynamodb/tables/create/options.go b/app/dynamodb/tables/create/options.go index 12d6273..190b4d6 100644 --- a/app/dynamodb/tables/create/options.go +++ b/app/dynamodb/tables/create/options.go @@ -12,6 +12,7 @@ type RunOptions struct { Refresh bool DynamodbClientURI string TablePrefix string + Verbose bool } func OptionsFromFlagSet(ctx context.Context, fs *flag.FlagSet) (*RunOptions, error) { @@ -28,6 +29,7 @@ func OptionsFromFlagSet(ctx context.Context, fs *flag.FlagSet) (*RunOptions, err Refresh: refresh, DynamodbClientURI: dynamodb_client_uri, TablePrefix: table_prefix, + Verbose: verbose, } return opts, nil diff --git a/app/feeds/publish/flags.go b/app/feeds/publish/flags.go index 105e502..eddc64e 100644 --- a/app/feeds/publish/flags.go +++ b/app/feeds/publish/flags.go @@ -8,6 +8,7 @@ import ( ) var accounts_database_uri string +var activities_database_uri string var followers_database_uri string var deliveries_database_uri string var posts_database_uri string @@ -29,9 +30,10 @@ var verbose bool func DefaultFlagSet() *flag.FlagSet { - fs := flagset.NewFlagSet("follow") + fs := flagset.NewFlagSet("publish") fs.StringVar(&accounts_database_uri, "accounts-database-uri", "", "...") + fs.StringVar(&activities_database_uri, "activities-database-uri", "", "...") fs.StringVar(&posts_database_uri, "posts-database-uri", "", "...") fs.StringVar(&post_tags_database_uri, "post-tags-database-uri", "", "...") fs.StringVar(&deliveries_database_uri, "deliveries-database-uri", "", "...") diff --git a/app/feeds/publish/options.go b/app/feeds/publish/options.go index 44a4ef4..1a899f0 100644 --- a/app/feeds/publish/options.go +++ b/app/feeds/publish/options.go @@ -13,11 +13,12 @@ import ( type RunOptions struct { AccountsDatabaseURI string - FeedsPublicationLogsDatabaseURI string + ActivitiesDatabaseURI string PostsDatabaseURI string PostTagsDatabaseURI string FollowersDatabaseURI string DeliveriesDatabaseURI string + FeedsPublicationLogsDatabaseURI string DeliveryQueueURI string AccountName string Mode string @@ -25,6 +26,7 @@ type RunOptions struct { URIs *uris.URIs Verbose bool MaxPostsPerFeed int + MaxAttempts int Templates *template.Template } @@ -50,11 +52,12 @@ func OptionsFromFlagSet(ctx context.Context, fs *flag.FlagSet) (*RunOptions, err opts := &RunOptions{ AccountsDatabaseURI: accounts_database_uri, - FeedsPublicationLogsDatabaseURI: feeds_publication_logs_database_uri, + ActivitiesDatabaseURI: activities_database_uri, FollowersDatabaseURI: followers_database_uri, DeliveriesDatabaseURI: deliveries_database_uri, PostsDatabaseURI: posts_database_uri, PostTagsDatabaseURI: post_tags_database_uri, + FeedsPublicationLogsDatabaseURI: feeds_publication_logs_database_uri, DeliveryQueueURI: delivery_queue_uri, AccountName: account_name, Mode: mode, diff --git a/app/feeds/publish/publish.go b/app/feeds/publish/publish.go index 76dd3af..852d5c9 100644 --- a/app/feeds/publish/publish.go +++ b/app/feeds/publish/publish.go @@ -13,7 +13,9 @@ import ( "github.com/mmcdole/gofeed" "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub-feeds" - ap_slog "github.com/sfomuseum/go-activitypub/slog" + "github.com/sfomuseum/go-activitypub/database" + "github.com/sfomuseum/go-activitypub/posts" + "github.com/sfomuseum/go-activitypub/queue" ) type itemTemplateVars struct { @@ -21,12 +23,12 @@ type itemTemplateVars struct { Item *gofeed.Item } -func Run(ctx context.Context, logger *slog.Logger) error { +func Run(ctx context.Context) error { fs := DefaultFlagSet() - return RunWithFlagSet(ctx, fs, logger) + return RunWithFlagSet(ctx, fs) } -func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet, logger *slog.Logger) error { +func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet) error { opts, err := OptionsFromFlagSet(ctx, fs) @@ -34,22 +36,35 @@ func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet, logger *slog.Logger) return fmt.Errorf("Failed to derive options from flagset, %w", err) } - return RunWithOptions(ctx, opts, logger) + return RunWithOptions(ctx, opts) } -func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) error { +func RunWithOptions(ctx context.Context, opts *RunOptions) error { - ap_slog.ConfigureLogger(logger, opts.Verbose) + if opts.Verbose { + slog.SetLogLoggerLevel(slog.LevelDebug) + slog.Debug("Verbose logging enabled") + } + + // logger := slog.Default() - accounts_db, err := activitypub.NewAccountsDatabase(ctx, opts.AccountsDatabaseURI) + accounts_db, err := database.NewAccountsDatabase(ctx, opts.AccountsDatabaseURI) if err != nil { - return fmt.Errorf("Failed to create new database, %w", err) + return fmt.Errorf("Failed to instantiate accounts database, %w", err) } defer accounts_db.Close(ctx) - posts_db, err := activitypub.NewPostsDatabase(ctx, opts.PostsDatabaseURI) + activities_db, err := database.NewActivitiesDatabase(ctx, opts.ActivitiesDatabaseURI) + + if err != nil { + return fmt.Errorf("Failed to instantiate activities database, %w", err) + } + + defer activities_db.Close(ctx) + + posts_db, err := database.NewPostsDatabase(ctx, opts.PostsDatabaseURI) if err != nil { return fmt.Errorf("Failed to create instantiate posts database, %w", err) @@ -57,7 +72,7 @@ func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) defer posts_db.Close(ctx) - post_tags_db, err := activitypub.NewPostTagsDatabase(ctx, opts.PostTagsDatabaseURI) + post_tags_db, err := database.NewPostTagsDatabase(ctx, opts.PostTagsDatabaseURI) if err != nil { return fmt.Errorf("Failed to create instantiate post tags database, %w", err) @@ -65,7 +80,7 @@ func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) defer post_tags_db.Close(ctx) - followers_db, err := activitypub.NewFollowersDatabase(ctx, opts.FollowersDatabaseURI) + followers_db, err := database.NewFollowersDatabase(ctx, opts.FollowersDatabaseURI) if err != nil { return fmt.Errorf("Failed to create instantiate followers database, %w", err) @@ -73,7 +88,7 @@ func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) defer followers_db.Close(ctx) - deliveries_db, err := activitypub.NewDeliveriesDatabase(ctx, opts.DeliveriesDatabaseURI) + deliveries_db, err := database.NewDeliveriesDatabase(ctx, opts.DeliveriesDatabaseURI) if err != nil { return fmt.Errorf("Failed to create instantiate deliveries database, %w", err) @@ -89,7 +104,7 @@ func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) defer feeds_db.Close(ctx) - delivery_q, err := activitypub.NewDeliveryQueue(ctx, opts.DeliveryQueueURI) + delivery_q, err := queue.NewDeliveryQueue(ctx, opts.DeliveryQueueURI) if err != nil { return fmt.Errorf("Failed to create new delivery queue, %w", err) @@ -139,6 +154,10 @@ func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) guid := item.GUID + logger := slog.Default() + logger = logger.With("feed", feed_url) + logger = logger.With("item", guid) + is_published, err := feeds_db.IsPublished(ctx, acct.Id, feed_url, guid) if err != nil { @@ -146,7 +165,7 @@ func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) } if is_published { - logger.Debug("Already published", "feed", feed_url, "item", guid) + logger.Debug("Item already published") continue } @@ -168,31 +187,59 @@ func RunWithOptions(ctx context.Context, opts *RunOptions, logger *slog.Logger) body := buf.String() - slog.Debug("Feed item", "feed", feed_url, "item", guid, "body", body) + logger.Debug("Post item", "body", body) - post_opts := &activitypub.AddPostOptions{ + post_opts := &posts.AddPostOptions{ URIs: opts.URIs, PostsDatabase: posts_db, PostTagsDatabase: post_tags_db, } - post, post_tags, err := activitypub.AddPost(ctx, post_opts, acct, body) + post, mentions, err := posts.AddPost(ctx, post_opts, acct, body) + + if err != nil { + return fmt.Errorf("Failed to add post, %w", err) + } + + logger = logger.With("post id", post.Id) + + ap_activity, err := posts.ActivityFromPost(ctx, opts.URIs, acct, post, mentions) + + if err != nil { + return fmt.Errorf("Failed to create new (create) activity, %w", err) + } + + activity, err := activitypub.NewActivity(ctx, ap_activity) + + if err != nil { + return fmt.Errorf("Failed to create AP wrapper, %w", err) + } + + logger = logger.With("activity id", activity.Id) + + activity.AccountId = acct.Id + activity.ActivityType = activitypub.PostActivityType + activity.ActivityTypeId = post.Id + + err = activities_db.AddActivity(ctx, activity) if err != nil { - return fmt.Errorf("Failed to add new post, %w", err) + return fmt.Errorf("Failed to add new activity, %w", err) } - deliver_opts := &activitypub.DeliverPostToFollowersOptions{ + deliver_opts := &queue.DeliverActivityToFollowersOptions{ AccountsDatabase: accounts_db, FollowersDatabase: followers_db, DeliveriesDatabase: deliveries_db, DeliveryQueue: delivery_q, - Post: post, - PostTags: post_tags, + Activity: activity, + Mentions: mentions, URIs: opts.URIs, } - err = activitypub.DeliverPostToFollowers(ctx, deliver_opts) + logger.Debug("Deliver activity") + + err = queue.DeliverActivityToFollowers(ctx, deliver_opts) if err != nil { return fmt.Errorf("Failed to deliver post, %w", err) diff --git a/cmd/create-dynamodb-tables/main.go b/cmd/create-dynamodb-tables/main.go index ac047fb..33ca89a 100644 --- a/cmd/create-dynamodb-tables/main.go +++ b/cmd/create-dynamodb-tables/main.go @@ -2,21 +2,17 @@ package main import ( "context" - "os" + "log" "github.com/sfomuseum/go-activitypub-feeds/app/dynamodb/tables/create" - "github.com/sfomuseum/go-activitypub/slog" ) func main() { ctx := context.Background() - logger := slog.Default() - - err := create.Run(ctx, logger) + err := create.Run(ctx) if err != nil { - logger.Error("Failed to create tables", "error", err) - os.Exit(1) + log.Fatalf("Failed to create table, %v", err) } } diff --git a/cmd/publish-feeds/main.go b/cmd/publish-feeds/main.go index 3b50b64..c35c36c 100644 --- a/cmd/publish-feeds/main.go +++ b/cmd/publish-feeds/main.go @@ -2,21 +2,17 @@ package main import ( "context" - "os" + "log" "github.com/sfomuseum/go-activitypub-feeds/app/feeds/publish" - "github.com/sfomuseum/go-activitypub/slog" ) func main() { ctx := context.Background() - logger := slog.Default() - - err := publish.Run(ctx, logger) + err := publish.Run(ctx) if err != nil { - logger.Error("Failed to publish feeds", "error", err) - os.Exit(1) + log.Fatalf("Failed to publish feeds, %v", err) } } diff --git a/go.mod b/go.mod index 7839346..1a93eae 100644 --- a/go.mod +++ b/go.mod @@ -3,46 +3,46 @@ module github.com/sfomuseum/go-activitypub-feeds go 1.23 require ( - github.com/aaronland/go-aws-dynamodb v0.4.0 + github.com/aaronland/go-aws-dynamodb v0.4.1 github.com/aaronland/go-roster v1.0.0 github.com/aaronland/gocloud-docstore v0.0.8 github.com/aws/aws-lambda-go v1.47.0 - github.com/aws/aws-sdk-go-v2 v1.31.0 - github.com/aws/aws-sdk-go-v2/service/dynamodb v1.35.4 + github.com/aws/aws-sdk-go-v2 v1.32.4 + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.36.5 github.com/mmcdole/gofeed v1.3.0 - github.com/sfomuseum/go-activitypub v0.0.0-20241003223003-48bbe22fd99a + github.com/sfomuseum/go-activitypub v0.0.2 github.com/sfomuseum/go-flags v0.10.0 github.com/sfomuseum/go-template v1.10.0 - gocloud.dev v0.39.0 + gocloud.dev v0.40.0 ) require ( github.com/PuerkitoBio/goquery v1.8.0 // indirect - github.com/aaronland/go-aws-auth v1.6.4 // indirect + github.com/aaronland/go-aws-auth v1.6.5 // indirect github.com/aaronland/go-aws-session v0.2.1 // indirect github.com/aaronland/go-pagination v0.3.0 // indirect github.com/aaronland/go-pagination-sql v0.2.0 // indirect github.com/aaronland/go-string v1.0.0 // indirect github.com/andybalholm/cascadia v1.3.1 // indirect github.com/aws/aws-sdk-go v1.55.5 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.27 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.27 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect - github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/service/iam v1.34.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.19 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.41 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect + github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.26.3 // indirect + github.com/aws/aws-sdk-go-v2/service/iam v1.36.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect github.com/aws/aws-sdk-go-v2/service/sns v1.31.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sqs v1.34.7 // indirect - github.com/aws/aws-sdk-go-v2/service/ssm v1.52.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.4 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 // indirect - github.com/aws/smithy-go v1.21.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sqs v1.36.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssm v1.54.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect + github.com/aws/smithy-go v1.22.0 // indirect github.com/bwmarrin/snowflake v0.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect @@ -59,8 +59,8 @@ require ( github.com/mmcdole/goxpp v1.1.1-0.20240225020742-a0c311522b23 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/redis/go-redis/v9 v9.6.1 // indirect - github.com/sfomuseum/go-pubsub v0.0.18 // indirect + github.com/redis/go-redis/v9 v9.7.0 // indirect + github.com/sfomuseum/go-pubsub v0.0.19 // indirect github.com/sfomuseum/iso8601duration v1.1.0 // indirect github.com/sfomuseum/runtimevar v1.2.1 // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect @@ -72,7 +72,7 @@ require ( golang.org/x/net v0.28.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.24.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/text v0.19.0 // indirect golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect google.golang.org/api v0.191.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240812133136-8ffd90a71988 // indirect diff --git a/go.sum b/go.sum index 227ee67..7e7b91a 100644 --- a/go.sum +++ b/go.sum @@ -20,10 +20,10 @@ cloud.google.com/go/pubsub v1.41.0/go.mod h1:g+YzC6w/3N91tzG66e2BZtp7WrpBBMXVa3Y github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U= github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI= -github.com/aaronland/go-aws-auth v1.6.4 h1:RQxiSm9b7YAkDNSoea3RNA90GvAPwTmQm/ji/hnhxb4= -github.com/aaronland/go-aws-auth v1.6.4/go.mod h1:+t/vLj8Uq/Sjf13LQOJdgP2GG+/c+dBxQxA7wYad4bQ= -github.com/aaronland/go-aws-dynamodb v0.4.0 h1:1o1SXmIChFPN7SPfj1zVIce/PolNUnQeTuwJRtjmVmA= -github.com/aaronland/go-aws-dynamodb v0.4.0/go.mod h1:PHvETpRXm7Z4d6SlHZf/ZzoffYZ/QKmKidmfGbYwcOw= +github.com/aaronland/go-aws-auth v1.6.5 h1:BlrQzuMfeACgD7AcpUOsdLiIJ2xVQ7GnLnVYRLz70iw= +github.com/aaronland/go-aws-auth v1.6.5/go.mod h1:ZNcrIBhvqTx0JJOYV064NymdDGuopTc6MKoKmO8yJ8M= +github.com/aaronland/go-aws-dynamodb v0.4.1 h1:tj2SEK30ZeRgrTwe8iSK5H18qD7TE8NHWM9hRM+U9NM= +github.com/aaronland/go-aws-dynamodb v0.4.1/go.mod h1:7+QZmiKR9vcId2pLPQsJ+kPm610ZKXPb8vE/CuaqqSU= github.com/aaronland/go-aws-session v0.2.1 h1:sNCuxR1w2ng8fxHsl08AFcAWvZqmN4hmnBbBRNRORd0= github.com/aaronland/go-aws-session v0.2.1/go.mod h1:M5imkutLPvwnI1Bb38minI3TCy1eSvwP6odMtCmBzqk= github.com/aaronland/go-pagination v0.2.0/go.mod h1:zrYVkUTBoe6yJ23l6OyTyfSpTyg6s/cNxZxNztXNQpQ= @@ -43,46 +43,46 @@ github.com/aws/aws-lambda-go v1.47.0 h1:0H8s0vumYx/YKs4sE7YM0ktwL2eWse+kfopsRI1s github.com/aws/aws-lambda-go v1.47.0/go.mod h1:dpMpZgvWx5vuQJfBt0zqBha60q7Dd7RfgJv23DymV8A= github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= -github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= -github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= -github.com/aws/aws-sdk-go-v2/config v1.27.27 h1:HdqgGt1OAP0HkEDDShEl0oSYa9ZZBSOmKpdpsDMdO90= -github.com/aws/aws-sdk-go-v2/config v1.27.27/go.mod h1:MVYamCg76dFNINkZFu4n4RjDixhVr51HLj4ErWzrVwg= -github.com/aws/aws-sdk-go-v2/credentials v1.17.27 h1:2raNba6gr2IfA0eqqiP2XiQ0UVOpGPgDSi0I9iAP+UI= -github.com/aws/aws-sdk-go-v2/credentials v1.17.27/go.mod h1:gniiwbGahQByxan6YjQUMcW4Aov6bLC3m+evgcoN4r4= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 h1:KreluoV8FZDEtI6Co2xuNk/UqI9iwMrOx/87PBNIKqw= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11/go.mod h1:SeSUYBLsMYFoRvHE0Tjvn7kbxaUhl75CJi1sbfhMxkU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.25.5 h1:iMKC49JNJGq0MLvdKU7DSuB5uZUg33bIfcasNZjoMh4= -github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.25.5/go.mod h1:nEqtURWmhc/EXQ1yYIoEtvCqQYgl5yYKxdQU8taJnv0= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.35.4 h1:W2rosR3B1RQb7Uy68AP3v034+ZBNDAhZ6sO+DXyBulI= -github.com/aws/aws-sdk-go-v2/service/dynamodb v1.35.4/go.mod h1:k5XW8MoMxsNZ20RJmsokakvENUwQyjv69R9GqrI4xdQ= -github.com/aws/aws-sdk-go-v2/service/iam v1.34.3 h1:p4L/tixJ3JUIxCteMGT6oMlqCbEv/EzSZoVwdiib8sU= -github.com/aws/aws-sdk-go-v2/service/iam v1.34.3/go.mod h1:rfOWxxwdecWvSC9C2/8K/foW3Blf+aKnIIPP9kQ2DPE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.19 h1:dOxqOlOEa2e2heC/74+ZzcJOa27+F1aXFZpYgY/4QfA= -github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.19/go.mod h1:aV6U1beLFvk3qAgognjS3wnGGoDId8hlPEiBsLHXVZE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18 h1:tJ5RnkHCiSH0jyd6gROjlJtNwov0eGYNz8s8nFcR0jQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18/go.mod h1:++NHzT+nAF7ZPrHPsA+ENvsXkOO8wEu+C6RXltAG4/c= +github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= +github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= +github.com/aws/aws-sdk-go-v2/credentials v1.17.41 h1:7gXo+Axmp+R4Z+AK8YFQO0ZV3L0gizGINCOWxSLY9W8= +github.com/aws/aws-sdk-go-v2/credentials v1.17.41/go.mod h1:u4Eb8d3394YLubphT4jLEwN1rLNq2wFOlT6OuxFwPzU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 h1:TMH3f/SCAWdNtXXVPPu5D6wrr4G5hI1rAxbcocKfC7Q= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17/go.mod h1:1ZRXLdTpzdJb9fwTMXiLipENRxkGMTn1sfKexGllQCw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 h1:A2w6m6Tmr+BNXjDsr7M90zkWjsu4JXHwrzPg235STs4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23/go.mod h1:35EVp9wyeANdujZruvHiQUAo9E3vbhnIO1mTCAxMlY0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 h1:pgYW9FCabt2M25MoHYCfMrVY2ghiiBKYWUVXfwZs+sU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23/go.mod h1:c48kLgzO19wAu3CPkDWC28JbaJ+hfQlsdl7I2+oqIbk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.26.3 h1:lHoc63BbtOfngsrW4yPRwWBmk1vX+uRYJ9W/dV08qsQ= +github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.26.3/go.mod h1:xulrffP9hSEvUGxW6YzICDHncE+YOIaqAJQpZ4oa1lo= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.36.5 h1:VWun/99wjelZZ+d0DGeSrffiCBJhC481geypGc6rfn0= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.36.5/go.mod h1:P+1rrWglInpWvnBpN0pH8jIIhkLkBaolkRVG4X9Kous= +github.com/aws/aws-sdk-go-v2/service/iam v1.36.3 h1:dV9iimLEHKYAz2qTi+tGAD9QCnAG2pLD7HUEHB7m4mI= +github.com/aws/aws-sdk-go-v2/service/iam v1.36.3/go.mod h1:HSvujsK8xeEHMIB18oMXjSfqaN9cVqpo/MtHJIksQRk= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.4 h1:rWKH6IiWDRIxmsTJUB/wEY+EIPp+P3C78Vidl+HXp6w= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.4/go.mod h1:MzOAfuiNZ6asjVrA+dNvXl5lI2nmzXakSpDFLOcOyJ4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8q/5c0wr8477yOPp0z+uBaXBnLE0XYb0POA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= github.com/aws/aws-sdk-go-v2/service/sns v1.31.3 h1:eSTEdxkfle2G98FE+Xl3db/XAXXVTJPNQo9K/Ar8oAI= github.com/aws/aws-sdk-go-v2/service/sns v1.31.3/go.mod h1:1dn0delSO3J69THuty5iwP0US2Glt0mx2qBBlI13pvw= -github.com/aws/aws-sdk-go-v2/service/sqs v1.34.7 h1:RxETYGXhRlRxL96mtab1lQ9fPVPIJFXuOI3uRL/MuHI= -github.com/aws/aws-sdk-go-v2/service/sqs v1.34.7/go.mod h1:zn0Oy7oNni7XIGoAd6bHBTVtX06OrnpvT1kww8jxyi8= -github.com/aws/aws-sdk-go-v2/service/ssm v1.52.4 h1:hgSBvRT7JEWx2+vEGI9/Ld5rZtl7M5lu8PqdvOmbRHw= -github.com/aws/aws-sdk-go-v2/service/ssm v1.52.4/go.mod h1:v7NIzEFIHBiicOMaMTuEmbnzGnqW0d+6ulNALul6fYE= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.4 h1:BXx0ZIxvrJdSgSvKTZ+yRBeSqqgPM89VPlulEcl37tM= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.4/go.mod h1:ooyCOXjvJEsUw7x+ZDHeISPMhtwI3ZCB7ggFMcFfWLU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 h1:yiwVzJW2ZxZTurVbYWA7QOrAaCYQR72t0wrSBfoesUE= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4/go.mod h1:0oxfLkpz3rQ/CHlx5hB7H69YUpFiI1tql6Q6Ne+1bCw= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 h1:ZsDKRLXGWHk8WdtyYMoGNO7bTudrvuKpDKgMVRlepGE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.3/go.mod h1:zwySh8fpFyXp9yOr/KVzxOl8SRqgf/IDw5aUt9UKFcQ= -github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= -github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/service/sqs v1.36.3 h1:H1bCg79Q4PDtxQH8Fn5kASQlbVv2WGP5o5IEFEBNOAs= +github.com/aws/aws-sdk-go-v2/service/sqs v1.36.3/go.mod h1:W6Uy6OWgxF9RZuHoikthB6f+A0oYXqnfWmFl5m7E2G4= +github.com/aws/aws-sdk-go-v2/service/ssm v1.54.3 h1:Ctzev3ppcc46m2FgrLEZhsHMEr1G1lrJcd9Cmoy/QJk= +github.com/aws/aws-sdk-go-v2/service/ssm v1.54.3/go.mod h1:qs3TBNpFEnVubl0WL3jruj7NJMF1RCAPEPQ1f+fLTBE= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.2/go.mod h1:skMqY7JElusiOUjMJMOv1jJsP7YUg7DrhgqZZWuzu1U= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 h1:AhmO1fHINP9vFYUE0LHzCWg/LfUWUF+zFPEcY9QXb7o= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2/go.mod h1:o8aQygT2+MVP0NaV6kbdE1YnnIM8RRVQzoeUH45GOdI= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 h1:CiS7i0+FUe+/YY1GvIBLLrR/XNGZ4CtM1Ll0XavNuVo= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.2/go.mod h1:HtaiBI8CjYoNVde8arShXb94UbQQi9L4EMr6D+xGBwo= +github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= +github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= @@ -178,14 +178,14 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= -github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA= -github.com/sfomuseum/go-activitypub v0.0.0-20241003223003-48bbe22fd99a h1:ye3JCZsn8mgiKxCguhbHhJnjCbHEr00OwK5RCnVe3Ms= -github.com/sfomuseum/go-activitypub v0.0.0-20241003223003-48bbe22fd99a/go.mod h1:4FdEGV8+66+1UWo7EAMuOxtN2M3Q2KmtgjA+36xuGKM= +github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E= +github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= +github.com/sfomuseum/go-activitypub v0.0.2 h1:YQxyCS0wXsvFzPv17NHc67LwmFvneH96Dn3jnjvb+AU= +github.com/sfomuseum/go-activitypub v0.0.2/go.mod h1:6PpWgq44ap+EKdWvY9kSGPZUQ2MFGoRfjphkis7lNLM= github.com/sfomuseum/go-flags v0.10.0 h1:1OC1ACxpWMsl3XQ9OeNVMQj7Zi2CzufP3Rym3mPI8HU= github.com/sfomuseum/go-flags v0.10.0/go.mod h1:VXOnnX1/yxQpX2yiwHaBV6aCmhtszQOL5bL1/nNo3co= -github.com/sfomuseum/go-pubsub v0.0.18 h1:XRQOtzwY17gSDrQ17Y67K6zznqMd8cB4I1ITeIbdPJg= -github.com/sfomuseum/go-pubsub v0.0.18/go.mod h1:DE1+g2UTl1zx38A9xYNQ6X0I284mpGlWdV+tX+9ugrM= +github.com/sfomuseum/go-pubsub v0.0.19 h1:owHHJeiIfk0uBLf6UEehz5OpSAt38TXOaN0Y/lCjDIA= +github.com/sfomuseum/go-pubsub v0.0.19/go.mod h1:VGfFsgHVkEGeYPJ1OXA/bQcky0lznuk6Ard9pa3FKgs= github.com/sfomuseum/go-template v1.10.0 h1:hMprALSEzckBrJR6Cv3FYSN9qA9EH1uiStVqXuG/vHk= github.com/sfomuseum/go-template v1.10.0/go.mod h1:8z9k8QHNrUSoDdjZHfIw0Gnmuq4Cy2ZQ4XgLoqQab/0= github.com/sfomuseum/iso8601duration v1.1.0 h1:kMYzbamrZp9dRxi5iFuhjl5CzHXK6s6Bzz/c75wsq8Q= @@ -222,8 +222,8 @@ go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6b go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= -gocloud.dev v0.39.0 h1:EYABYGhAalPUaMrbSKOr5lejxoxvXj99nE8XFtsDgds= -gocloud.dev v0.39.0/go.mod h1:drz+VyYNBvrMTW0KZiBAYEdl8lbNZx+OQ7oQvdrFmSQ= +gocloud.dev v0.40.0 h1:f8LgP+4WDqOG/RXoUcyLpeIAGOcAbZrZbDQCUee10ng= +gocloud.dev v0.40.0/go.mod h1:drz+VyYNBvrMTW0KZiBAYEdl8lbNZx+OQ7oQvdrFmSQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -298,8 +298,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -348,9 +348,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/github.com/aaronland/go-aws-auth/README.md b/vendor/github.com/aaronland/go-aws-auth/README.md index d991b4f..9884a10 100644 --- a/vendor/github.com/aaronland/go-aws-auth/README.md +++ b/vendor/github.com/aaronland/go-aws-auth/README.md @@ -231,6 +231,25 @@ $> bin/aws-sign-request \ } ``` +## Credentials + +Credentials for URIs are defined as string labels. They are: + +| Label | Description | +| --- | --- | +| `anon:` | Empty or anonymous credentials. | +| `env:` | Read credentials from AWS defined environment variables. | +| `iam:` | Assume AWS IAM credentials are in effect. | +| `sts:{ARN}` | Assume the role defined by `{ARN}` using STS credentials. | +| `{AWS_PROFILE_NAME}` | This this profile from the default AWS credentials location. | +| `{AWS_CREDENTIALS_PATH}:{AWS_PROFILE_NAME}` | This this profile from a user-defined AWS credentials location. | + +For example: + +``` +aws:///us-east-1?credentials=iam: +``` + ## See also: * https://github.com/aws/aws-sdk-go-v2/ diff --git a/vendor/github.com/aaronland/go-aws-dynamodb/Makefile b/vendor/github.com/aaronland/go-aws-dynamodb/Makefile index fb0ae3b..9f9004e 100644 --- a/vendor/github.com/aaronland/go-aws-dynamodb/Makefile +++ b/vendor/github.com/aaronland/go-aws-dynamodb/Makefile @@ -1,2 +1,2 @@ -dynamo-local: +local: docker run --rm -it -p 8000:8000 amazon/dynamodb-local diff --git a/vendor/github.com/aaronland/go-aws-dynamodb/tables.go b/vendor/github.com/aaronland/go-aws-dynamodb/tables.go index e60a2e8..71eb5f0 100644 --- a/vendor/github.com/aaronland/go-aws-dynamodb/tables.go +++ b/vendor/github.com/aaronland/go-aws-dynamodb/tables.go @@ -16,6 +16,8 @@ type CreateTablesOptions struct { Tables map[string]*aws_dynamodb.CreateTableInput // If true and the table already exists, delete and recreate the table Refresh bool + // An optional string to append to each table name as it is created. + Prefix string } // Create one or more tables associated with the dynamodb.DynamoDB instance. @@ -23,6 +25,11 @@ func CreateTables(ctx context.Context, client *aws_dynamodb.Client, opts *Create for table_name, def := range opts.Tables { + if opts.Prefix != "" { + slog.Debug("Assign prefix to table name", "table", table_name, "prefix", opts.Prefix) + table_name = opts.Prefix + table_name + } + // To do: Do this concurrently because of the delay waiting for table deletion to complete has_table, err := HasTable(ctx, client, table_name) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index 4321d2f..1d54fc7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.31.0" +const goModuleVersion = "1.32.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go deleted file mode 100644 index 19d6107..0000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go +++ /dev/null @@ -1,320 +0,0 @@ -// Package metrics implements metrics gathering for SDK development purposes. -// -// This package is designated as private and is intended for use only by the -// AWS client runtime. The exported API therein is not considered stable and -// is subject to breaking changes without notice. -package metrics - -import ( - "context" - "encoding/json" - "fmt" - "sync" - "time" - - "github.com/aws/smithy-go/middleware" -) - -const ( - // ServiceIDKey is the key for the service ID metric. - ServiceIDKey = "ServiceId" - // OperationNameKey is the key for the operation name metric. - OperationNameKey = "OperationName" - // ClientRequestIDKey is the key for the client request ID metric. - ClientRequestIDKey = "ClientRequestId" - // APICallDurationKey is the key for the API call duration metric. - APICallDurationKey = "ApiCallDuration" - // APICallSuccessfulKey is the key for the API call successful metric. - APICallSuccessfulKey = "ApiCallSuccessful" - // MarshallingDurationKey is the key for the marshalling duration metric. - MarshallingDurationKey = "MarshallingDuration" - // InThroughputKey is the key for the input throughput metric. - InThroughputKey = "InThroughput" - // OutThroughputKey is the key for the output throughput metric. - OutThroughputKey = "OutThroughput" - // RetryCountKey is the key for the retry count metric. - RetryCountKey = "RetryCount" - // HTTPStatusCodeKey is the key for the HTTP status code metric. - HTTPStatusCodeKey = "HttpStatusCode" - // AWSExtendedRequestIDKey is the key for the AWS extended request ID metric. - AWSExtendedRequestIDKey = "AwsExtendedRequestId" - // AWSRequestIDKey is the key for the AWS request ID metric. - AWSRequestIDKey = "AwsRequestId" - // BackoffDelayDurationKey is the key for the backoff delay duration metric. - BackoffDelayDurationKey = "BackoffDelayDuration" - // StreamThroughputKey is the key for the stream throughput metric. - StreamThroughputKey = "Throughput" - // ConcurrencyAcquireDurationKey is the key for the concurrency acquire duration metric. - ConcurrencyAcquireDurationKey = "ConcurrencyAcquireDuration" - // PendingConcurrencyAcquiresKey is the key for the pending concurrency acquires metric. - PendingConcurrencyAcquiresKey = "PendingConcurrencyAcquires" - // SigningDurationKey is the key for the signing duration metric. - SigningDurationKey = "SigningDuration" - // UnmarshallingDurationKey is the key for the unmarshalling duration metric. - UnmarshallingDurationKey = "UnmarshallingDuration" - // TimeToFirstByteKey is the key for the time to first byte metric. - TimeToFirstByteKey = "TimeToFirstByte" - // ServiceCallDurationKey is the key for the service call duration metric. - ServiceCallDurationKey = "ServiceCallDuration" - // EndpointResolutionDurationKey is the key for the endpoint resolution duration metric. - EndpointResolutionDurationKey = "EndpointResolutionDuration" - // AttemptNumberKey is the key for the attempt number metric. - AttemptNumberKey = "AttemptNumber" - // MaxConcurrencyKey is the key for the max concurrency metric. - MaxConcurrencyKey = "MaxConcurrency" - // AvailableConcurrencyKey is the key for the available concurrency metric. - AvailableConcurrencyKey = "AvailableConcurrency" -) - -// MetricPublisher provides the interface to provide custom MetricPublishers. -// PostRequestMetrics will be invoked by the MetricCollection middleware to post request. -// PostStreamMetrics will be invoked by ReadCloserWithMetrics to post stream metrics. -type MetricPublisher interface { - PostRequestMetrics(*MetricData) error - PostStreamMetrics(*MetricData) error -} - -// Serializer provides the interface to provide custom Serializers. -// Serialize will transform any input object in its corresponding string representation. -type Serializer interface { - Serialize(obj interface{}) (string, error) -} - -// DefaultSerializer is an implementation of the Serializer interface. -type DefaultSerializer struct{} - -// Serialize uses the default JSON serializer to obtain the string representation of an object. -func (DefaultSerializer) Serialize(obj interface{}) (string, error) { - bytes, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(bytes), nil -} - -type metricContextKey struct{} - -// MetricContext contains fields to store metric-related information. -type MetricContext struct { - connectionCounter *SharedConnectionCounter - publisher MetricPublisher - data *MetricData -} - -// MetricData stores the collected metric data. -type MetricData struct { - RequestStartTime time.Time - RequestEndTime time.Time - APICallDuration time.Duration - SerializeStartTime time.Time - SerializeEndTime time.Time - MarshallingDuration time.Duration - ResolveEndpointStartTime time.Time - ResolveEndpointEndTime time.Time - EndpointResolutionDuration time.Duration - GetIdentityStartTime time.Time - GetIdentityEndTime time.Time - InThroughput float64 - OutThroughput float64 - RetryCount int - Success uint8 - StatusCode int - ClientRequestID string - ServiceID string - OperationName string - PartitionID string - Region string - UserAgent string - RequestContentLength int64 - Stream StreamMetrics - Attempts []AttemptMetrics -} - -// StreamMetrics stores metrics related to streaming data. -type StreamMetrics struct { - ReadDuration time.Duration - ReadBytes int64 - Throughput float64 -} - -// AttemptMetrics stores metrics related to individual attempts. -type AttemptMetrics struct { - ServiceCallStart time.Time - ServiceCallEnd time.Time - ServiceCallDuration time.Duration - FirstByteTime time.Time - TimeToFirstByte time.Duration - ConnRequestedTime time.Time - ConnObtainedTime time.Time - ConcurrencyAcquireDuration time.Duration - SignStartTime time.Time - SignEndTime time.Time - SigningDuration time.Duration - DeserializeStartTime time.Time - DeserializeEndTime time.Time - UnMarshallingDuration time.Duration - RetryDelay time.Duration - ResponseContentLength int64 - StatusCode int - RequestID string - ExtendedRequestID string - HTTPClient string - MaxConcurrency int - PendingConnectionAcquires int - AvailableConcurrency int - ActiveRequests int - ReusedConnection bool -} - -// Data returns the MetricData associated with the MetricContext. -func (mc *MetricContext) Data() *MetricData { - return mc.data -} - -// ConnectionCounter returns the SharedConnectionCounter associated with the MetricContext. -func (mc *MetricContext) ConnectionCounter() *SharedConnectionCounter { - return mc.connectionCounter -} - -// Publisher returns the MetricPublisher associated with the MetricContext. -func (mc *MetricContext) Publisher() MetricPublisher { - return mc.publisher -} - -// ComputeRequestMetrics calculates and populates derived metrics based on the collected data. -func (md *MetricData) ComputeRequestMetrics() { - - for idx := range md.Attempts { - attempt := &md.Attempts[idx] - attempt.ConcurrencyAcquireDuration = attempt.ConnObtainedTime.Sub(attempt.ConnRequestedTime) - attempt.SigningDuration = attempt.SignEndTime.Sub(attempt.SignStartTime) - attempt.UnMarshallingDuration = attempt.DeserializeEndTime.Sub(attempt.DeserializeStartTime) - attempt.TimeToFirstByte = attempt.FirstByteTime.Sub(attempt.ServiceCallStart) - attempt.ServiceCallDuration = attempt.ServiceCallEnd.Sub(attempt.ServiceCallStart) - } - - md.APICallDuration = md.RequestEndTime.Sub(md.RequestStartTime) - md.MarshallingDuration = md.SerializeEndTime.Sub(md.SerializeStartTime) - md.EndpointResolutionDuration = md.ResolveEndpointEndTime.Sub(md.ResolveEndpointStartTime) - - md.RetryCount = len(md.Attempts) - 1 - - latestAttempt, err := md.LatestAttempt() - - if err != nil { - fmt.Printf("error retrieving attempts data due to: %s. Skipping Throughput metrics", err.Error()) - } else { - - md.StatusCode = latestAttempt.StatusCode - - if md.Success == 1 { - if latestAttempt.ResponseContentLength > 0 && latestAttempt.ServiceCallDuration > 0 { - md.InThroughput = float64(latestAttempt.ResponseContentLength) / latestAttempt.ServiceCallDuration.Seconds() - } - if md.RequestContentLength > 0 && latestAttempt.ServiceCallDuration > 0 { - md.OutThroughput = float64(md.RequestContentLength) / latestAttempt.ServiceCallDuration.Seconds() - } - } - } -} - -// LatestAttempt returns the latest attempt metrics. -// It returns an error if no attempts are initialized. -func (md *MetricData) LatestAttempt() (*AttemptMetrics, error) { - if md.Attempts == nil || len(md.Attempts) == 0 { - return nil, fmt.Errorf("no attempts initialized. NewAttempt() should be called first") - } - return &md.Attempts[len(md.Attempts)-1], nil -} - -// NewAttempt initializes new attempt metrics. -func (md *MetricData) NewAttempt() { - if md.Attempts == nil { - md.Attempts = []AttemptMetrics{} - } - md.Attempts = append(md.Attempts, AttemptMetrics{}) -} - -// SharedConnectionCounter is a counter shared across API calls. -type SharedConnectionCounter struct { - mu sync.Mutex - - activeRequests int - pendingConnectionAcquire int -} - -// ActiveRequests returns the count of active requests. -func (cc *SharedConnectionCounter) ActiveRequests() int { - cc.mu.Lock() - defer cc.mu.Unlock() - - return cc.activeRequests -} - -// PendingConnectionAcquire returns the count of pending connection acquires. -func (cc *SharedConnectionCounter) PendingConnectionAcquire() int { - cc.mu.Lock() - defer cc.mu.Unlock() - - return cc.pendingConnectionAcquire -} - -// AddActiveRequest increments the count of active requests. -func (cc *SharedConnectionCounter) AddActiveRequest() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.activeRequests++ -} - -// RemoveActiveRequest decrements the count of active requests. -func (cc *SharedConnectionCounter) RemoveActiveRequest() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.activeRequests-- -} - -// AddPendingConnectionAcquire increments the count of pending connection acquires. -func (cc *SharedConnectionCounter) AddPendingConnectionAcquire() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.pendingConnectionAcquire++ -} - -// RemovePendingConnectionAcquire decrements the count of pending connection acquires. -func (cc *SharedConnectionCounter) RemovePendingConnectionAcquire() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.pendingConnectionAcquire-- -} - -// InitMetricContext initializes the metric context with the provided counter and publisher. -// It returns the updated context. -func InitMetricContext( - ctx context.Context, counter *SharedConnectionCounter, publisher MetricPublisher, -) context.Context { - if middleware.GetStackValue(ctx, metricContextKey{}) == nil { - ctx = middleware.WithStackValue(ctx, metricContextKey{}, &MetricContext{ - connectionCounter: counter, - publisher: publisher, - data: &MetricData{ - Attempts: []AttemptMetrics{}, - Stream: StreamMetrics{}, - }, - }) - } - return ctx -} - -// Context returns the metric context from the given context. -// It returns nil if the metric context is not found. -func Context(ctx context.Context) *MetricContext { - mctx := middleware.GetStackValue(ctx, metricContextKey{}) - if mctx == nil { - return nil - } - return mctx.(*MetricContext) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go index ff0bc92..67aaa02 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go @@ -85,6 +85,7 @@ const ( UserAgentFeatureS3ExpressBucket = "J" UserAgentFeatureS3AccessGrants = "K" // not yet implemented UserAgentFeatureGZIPRequestCompression = "L" + UserAgentFeatureProtocolRPCV2CBOR = "M" ) // RequestUserAgent is a build middleware that set the User-Agent for the request. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go index 286892a..52d59b0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go @@ -8,7 +8,6 @@ import ( "strings" "time" - privatemetrics "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" "github.com/aws/smithy-go" @@ -271,13 +270,6 @@ func (r *Attempt) handleAttempt( // that time. Potentially early exist if the sleep is canceled via the // context. retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err) - mctx := privatemetrics.Context(ctx) - if mctx != nil { - attempt, err := mctx.Data().LatestAttempt() - if err != nil { - attempt.RetryDelay = retryDelay - } - } if reqErr != nil { return out, attemptResult, releaseRetryToken, reqErr } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go index a10ee51..8a46220 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go @@ -372,8 +372,9 @@ func GetSignedRequestSignature(r *http.Request) ([]byte, error) { const authHeaderSignatureElem = "Signature=" if auth := r.Header.Get(authorizationHeader); len(auth) != 0 { - ps := strings.Split(auth, ", ") + ps := strings.Split(auth, ",") for _, p := range ps { + p = strings.TrimSpace(p) if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 { sig := p[len(authHeaderSignatureElem):] if len(sig) == 0 { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md index 6977bdb..d6653fc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md @@ -1,3 +1,52 @@ +# v1.27.39 (2024-09-27) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.38 (2024-09-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.37 (2024-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.36 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.35 (2024-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.34 (2024-09-16) + +* **Bug Fix**: Read `AWS_CONTAINER_CREDENTIALS_FULL_URI` env variable if set when reading a profile with `credential_source`. Also ensure `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` is always read before it + +# v1.27.33 (2024-09-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.32 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.31 (2024-08-26) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.30 (2024-08-23) + +* **Bug Fix**: Don't fail credentials unit tests if credentials are found on a file + +# v1.27.29 (2024-08-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.28 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.27.27 (2024-07-18) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go index a8fe2a2..eaa7298 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go @@ -3,4 +3,4 @@ package config // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.27.27" +const goModuleVersion = "1.27.39" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go index 8936852..7ae252e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go @@ -162,12 +162,12 @@ func resolveCredsFromProfile(ctx context.Context, cfg *aws.Config, envConfig *En // Get credentials from CredentialProcess err = processCredentials(ctx, cfg, sharedConfig, configs) - case len(envConfig.ContainerCredentialsEndpoint) != 0: - err = resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs) - case len(envConfig.ContainerCredentialsRelativePath) != 0: err = resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs) + case len(envConfig.ContainerCredentialsEndpoint) != 0: + err = resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs) + default: err = resolveEC2RoleCredentials(ctx, cfg, configs) } @@ -355,10 +355,13 @@ func resolveCredsFromSource(ctx context.Context, cfg *aws.Config, envConfig *Env cfg.Credentials = credentials.StaticCredentialsProvider{Value: envConfig.Credentials} case credSourceECSContainer: - if len(envConfig.ContainerCredentialsRelativePath) == 0 { - return fmt.Errorf("EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set") + if len(envConfig.ContainerCredentialsRelativePath) != 0 { + return resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs) + } + if len(envConfig.ContainerCredentialsEndpoint) != 0 { + return resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs) } - return resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs) + return fmt.Errorf("EcsContainer was specified as the credential_source, but neither 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' or AWS_CONTAINER_CREDENTIALS_FULL_URI' was set") default: return fmt.Errorf("credential_source values must be EcsContainer, Ec2InstanceMetadata, or Environment") diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md index 66b7868..911a4e7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md @@ -1,3 +1,60 @@ +# v1.17.41 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.40 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.39 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.38 (2024-10-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.37 (2024-09-27) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.36 (2024-09-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.35 (2024-09-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.34 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.33 (2024-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.32 (2024-09-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.31 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.30 (2024-08-26) + +* **Bug Fix**: Save SSO cached token expiry in UTC to ensure cross-SDK compatibility. + +# v1.17.29 (2024-08-22) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.28 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.17.27 (2024-07-18) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go index aaed530..866fe0b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go @@ -3,4 +3,4 @@ package credentials // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.27" +const goModuleVersion = "1.17.41" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go index 3b97e6d..46ae2f9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go @@ -225,7 +225,7 @@ func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) { } func (r *rfc3339) MarshalJSON() ([]byte, error) { - value := time.Time(*r).Format(time.RFC3339) + value := time.Time(*r).UTC().Format(time.RFC3339) // Use JSON unmarshal to unescape the quoted value making use of JSON's // quoting rules. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md index 3584159..235e081 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md @@ -1,3 +1,28 @@ +# v1.16.17 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.16 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.15 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.14 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.13 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.12 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.16.11 (2024-07-10.2) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go index 1cd7560..fdc8330 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go @@ -3,4 +3,4 @@ package imds // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.16.11" +const goModuleVersion = "1.16.17" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 4370f94..669d69a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,23 @@ +# v1.3.23 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.22 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.21 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.20 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.19 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.3.18 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 236805e..6a89827 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.18" +const goModuleVersion = "1.3.23" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index 351e4f2..ac71e1c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,23 @@ +# v2.6.23 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.22 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.21 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.20 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.6.19 (2024-10-04) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.6.18 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index 7b257d3..460fef7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.6.18" +const goModuleVersion = "2.6.23" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md index c0e54fa..be61098 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.8.1 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. + # v1.8.0 (2024-02-13) * **Feature**: Bump minimum Go version to 1.20 per our language support policy. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go index 6e0b906..ef6a381 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go @@ -3,4 +3,4 @@ package ini // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.8.0" +const goModuleVersion = "1.8.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/CHANGELOG.md index 006c756..1720732 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/CHANGELOG.md @@ -1,3 +1,37 @@ +# v1.26.3 (2024-09-27) + +* No change notes available for this release. + +# v1.26.2 (2024-09-25) + +* No change notes available for this release. + +# v1.26.1 (2024-09-23) + +* No change notes available for this release. + +# v1.26.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.9 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.25.8 (2024-09-04) + +* No change notes available for this release. + +# v1.25.7 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.6 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.25.5 (2024-07-10.2) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_client.go index 0a788dc..556a0fb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_client.go @@ -4,6 +4,7 @@ package cognitoidentity import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -30,6 +33,133 @@ import ( const ServiceID = "Cognito Identity" const ServiceAPIVersion = "2014-06-30" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/cognitoidentity") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/cognitoidentity") +} + // Client provides the API client to make operations call for Amazon Cognito // Identity. type Client struct { @@ -57,6 +187,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveMeterProvider(&options) + + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -89,8 +223,15 @@ func (c *Client) Options() Options { return c.options.Copy() } -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() @@ -114,15 +255,54 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandler(options.HTTPClient) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + return result, metadata, err } @@ -160,7 +340,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { return fmt.Errorf("add ResolveEndpointV2: %v", err) } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -238,16 +418,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -435,6 +614,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) } @@ -478,6 +681,7 @@ func addIsPaginatorUserAgent(o *Options) { func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/cognitoidentity") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -541,25 +745,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -575,6 +760,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } @@ -626,3 +823,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_CreateIdentityPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_CreateIdentityPool.go index ba7b8e8..be4bc01 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_CreateIdentityPool.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_CreateIdentityPool.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateIdentityPoolMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -223,6 +226,18 @@ func (c *Client) addOperationCreateIdentityPoolMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentities.go index aa05900..eabe61c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentities.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDeleteIdentitiesMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -136,6 +139,18 @@ func (c *Client) addOperationDeleteIdentitiesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentityPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentityPool.go index e023e23..408e20c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentityPool.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DeleteIdentityPool.go @@ -90,6 +90,9 @@ func (c *Client) addOperationDeleteIdentityPoolMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,18 @@ func (c *Client) addOperationDeleteIdentityPoolMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentity.go index 4306494..58d2868 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentity.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeIdentityMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -144,6 +147,18 @@ func (c *Client) addOperationDescribeIdentityMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentityPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentityPool.go index 57c4344..ad733ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentityPool.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_DescribeIdentityPool.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeIdentityPoolMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationDescribeIdentityPoolMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetCredentialsForIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetCredentialsForIdentity.go index cccf4a2..5b1d4c1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetCredentialsForIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetCredentialsForIdentity.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetCredentialsForIdentityMiddlewares(stack *middlew if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -157,6 +160,18 @@ func (c *Client) addOperationGetCredentialsForIdentityMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetId.go index 4d63612..9842248 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetId.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetId.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetIdMiddlewares(stack *middleware.Stack, options O if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -151,6 +154,18 @@ func (c *Client) addOperationGetIdMiddlewares(stack *middleware.Stack, options O if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetIdentityPoolRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetIdentityPoolRoles.go index 6244b4c..f1af38a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetIdentityPoolRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetIdentityPoolRoles.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetIdentityPoolRolesMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -144,6 +147,18 @@ func (c *Client) addOperationGetIdentityPoolRolesMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdToken.go index 607133f..f0e848e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdToken.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetOpenIdTokenMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationGetOpenIdTokenMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go index d689b71..256bb20 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetOpenIdTokenForDeveloperIdentityMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -181,6 +184,18 @@ func (c *Client) addOperationGetOpenIdTokenForDeveloperIdentityMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go index 301bf00..ca6f1e3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetPrincipalTagAttributeMapMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -147,6 +150,18 @@ func (c *Client) addOperationGetPrincipalTagAttributeMapMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentities.go index 76a23fe..c39abb6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentities.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListIdentitiesMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationListIdentitiesMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentityPools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentityPools.go index d08aa8f..d5303b1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentityPools.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListIdentityPools.go @@ -101,6 +101,9 @@ func (c *Client) addOperationListIdentityPoolsMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationListIdentityPoolsMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListTagsForResource.go index 4864429..b8c7a4a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListTagsForResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_ListTagsForResource.go @@ -97,6 +97,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -136,6 +139,18 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_LookupDeveloperIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_LookupDeveloperIdentity.go index 10810b2..e46f4b3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_LookupDeveloperIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_LookupDeveloperIdentity.go @@ -139,6 +139,9 @@ func (c *Client) addOperationLookupDeveloperIdentityMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -178,6 +181,18 @@ func (c *Client) addOperationLookupDeveloperIdentityMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_MergeDeveloperIdentities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_MergeDeveloperIdentities.go index 6a60dc7..d44c0e0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_MergeDeveloperIdentities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_MergeDeveloperIdentities.go @@ -127,6 +127,9 @@ func (c *Client) addOperationMergeDeveloperIdentitiesMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -166,6 +169,18 @@ func (c *Client) addOperationMergeDeveloperIdentitiesMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetIdentityPoolRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetIdentityPoolRoles.go index 3f8edc2..ecbb875 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetIdentityPoolRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetIdentityPoolRoles.go @@ -105,6 +105,9 @@ func (c *Client) addOperationSetIdentityPoolRolesMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -144,6 +147,18 @@ func (c *Client) addOperationSetIdentityPoolRolesMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go index 7cc8230..02d7231 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go @@ -114,6 +114,9 @@ func (c *Client) addOperationSetPrincipalTagAttributeMapMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationSetPrincipalTagAttributeMapMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_TagResource.go index 7290c38..1d2ba53 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_TagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -147,6 +150,18 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go index 603133b..a66ec71 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUnlinkDeveloperIdentityMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationUnlinkDeveloperIdentityMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkIdentity.go index 806fcfc..b651e0e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UnlinkIdentity.go @@ -98,6 +98,9 @@ func (c *Client) addOperationUnlinkIdentityMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationUnlinkIdentityMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UntagResource.go index 71ccf83..32d8e8c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UntagResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UntagResource.go @@ -92,6 +92,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -131,6 +134,18 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UpdateIdentityPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UpdateIdentityPool.go index b509110..562a92b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UpdateIdentityPool.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/api_op_UpdateIdentityPool.go @@ -171,6 +171,9 @@ func (c *Client) addOperationUpdateIdentityPoolMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -210,6 +213,18 @@ func (c *Client) addOperationUpdateIdentityPoolMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/auth.go index 9e7ad82..edc9898 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/auth.go @@ -8,7 +8,9 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -169,6 +171,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -181,6 +186,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -240,7 +248,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -250,12 +261,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) if err != nil { return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) + + span.End() return next.HandleFinalize(ctx, in) } @@ -271,6 +290,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -280,6 +300,9 @@ func (*signRequestMiddleware) ID() string { func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) @@ -300,9 +323,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { return out, metadata, fmt.Errorf("sign request: %w", err) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/deserializers.go index f64a52b..40ef576 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/deserializers.go @@ -14,6 +14,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" @@ -44,6 +45,10 @@ func (m *awsAwsjson11_deserializeOpCreateIdentityPool) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -166,6 +171,10 @@ func (m *awsAwsjson11_deserializeOpDeleteIdentities) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -279,6 +288,10 @@ func (m *awsAwsjson11_deserializeOpDeleteIdentityPool) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -376,6 +389,10 @@ func (m *awsAwsjson11_deserializeOpDescribeIdentity) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -495,6 +512,10 @@ func (m *awsAwsjson11_deserializeOpDescribeIdentityPool) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -614,6 +635,10 @@ func (m *awsAwsjson11_deserializeOpGetCredentialsForIdentity) HandleDeserialize( return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -742,6 +767,10 @@ func (m *awsAwsjson11_deserializeOpGetId) HandleDeserialize(ctx context.Context, return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -870,6 +899,10 @@ func (m *awsAwsjson11_deserializeOpGetIdentityPoolRoles) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -992,6 +1025,10 @@ func (m *awsAwsjson11_deserializeOpGetOpenIdToken) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1117,6 +1154,10 @@ func (m *awsAwsjson11_deserializeOpGetOpenIdTokenForDeveloperIdentity) HandleDes return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1242,6 +1283,10 @@ func (m *awsAwsjson11_deserializeOpGetPrincipalTagAttributeMap) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1361,6 +1406,10 @@ func (m *awsAwsjson11_deserializeOpListIdentities) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1480,6 +1529,10 @@ func (m *awsAwsjson11_deserializeOpListIdentityPools) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1599,6 +1652,10 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1718,6 +1775,10 @@ func (m *awsAwsjson11_deserializeOpLookupDeveloperIdentity) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1840,6 +1901,10 @@ func (m *awsAwsjson11_deserializeOpMergeDeveloperIdentities) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1962,6 +2027,10 @@ func (m *awsAwsjson11_deserializeOpSetIdentityPoolRoles) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2065,6 +2134,10 @@ func (m *awsAwsjson11_deserializeOpSetPrincipalTagAttributeMap) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2184,6 +2257,10 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2303,6 +2380,10 @@ func (m *awsAwsjson11_deserializeOpUnlinkDeveloperIdentity) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2403,6 +2484,10 @@ func (m *awsAwsjson11_deserializeOpUnlinkIdentity) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2506,6 +2591,10 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2625,6 +2714,10 @@ func (m *awsAwsjson11_deserializeOpUpdateIdentityPool) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/endpoints.go index 68d2fb1..b2f3744 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/endpoints.go @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -483,14 +484,13 @@ func (*resolveEndpointV2Middleware) ID() string { func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { return next.HandleFinalize(ctx, in) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -501,11 +501,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { endpt.URI.RawPath = endpt.URI.Path } @@ -527,5 +532,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/go_module_metadata.go index bf7ef78..541afc2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/go_module_metadata.go @@ -3,4 +3,4 @@ package cognitoidentity // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.25.5" +const goModuleVersion = "1.26.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints/endpoints.go index c0a11d2..173af6c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/options.go index 48767e6..e06d02b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/options.go @@ -9,7 +9,9 @@ import ( internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" smithyauth "github.com/aws/smithy-go/auth" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // The logger writer interface to write logging messages to. Logger logging.Logger + // The client meter provider. + MeterProvider metrics.MeterProvider + // The region to send requests to. (Required) Region string @@ -103,6 +105,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/serializers.go index 8ef11b5..08d1cb6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/cognitoidentity/serializers.go @@ -11,6 +11,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -25,6 +26,10 @@ func (*awsAwsjson11_serializeOpCreateIdentityPool) ID() string { func (m *awsAwsjson11_serializeOpCreateIdentityPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -67,6 +72,8 @@ func (m *awsAwsjson11_serializeOpCreateIdentityPool) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -80,6 +87,10 @@ func (*awsAwsjson11_serializeOpDeleteIdentities) ID() string { func (m *awsAwsjson11_serializeOpDeleteIdentities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -122,6 +133,8 @@ func (m *awsAwsjson11_serializeOpDeleteIdentities) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -135,6 +148,10 @@ func (*awsAwsjson11_serializeOpDeleteIdentityPool) ID() string { func (m *awsAwsjson11_serializeOpDeleteIdentityPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -177,6 +194,8 @@ func (m *awsAwsjson11_serializeOpDeleteIdentityPool) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -190,6 +209,10 @@ func (*awsAwsjson11_serializeOpDescribeIdentity) ID() string { func (m *awsAwsjson11_serializeOpDescribeIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -232,6 +255,8 @@ func (m *awsAwsjson11_serializeOpDescribeIdentity) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -245,6 +270,10 @@ func (*awsAwsjson11_serializeOpDescribeIdentityPool) ID() string { func (m *awsAwsjson11_serializeOpDescribeIdentityPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -287,6 +316,8 @@ func (m *awsAwsjson11_serializeOpDescribeIdentityPool) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -300,6 +331,10 @@ func (*awsAwsjson11_serializeOpGetCredentialsForIdentity) ID() string { func (m *awsAwsjson11_serializeOpGetCredentialsForIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -342,6 +377,8 @@ func (m *awsAwsjson11_serializeOpGetCredentialsForIdentity) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -355,6 +392,10 @@ func (*awsAwsjson11_serializeOpGetId) ID() string { func (m *awsAwsjson11_serializeOpGetId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -397,6 +438,8 @@ func (m *awsAwsjson11_serializeOpGetId) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -410,6 +453,10 @@ func (*awsAwsjson11_serializeOpGetIdentityPoolRoles) ID() string { func (m *awsAwsjson11_serializeOpGetIdentityPoolRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -452,6 +499,8 @@ func (m *awsAwsjson11_serializeOpGetIdentityPoolRoles) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -465,6 +514,10 @@ func (*awsAwsjson11_serializeOpGetOpenIdToken) ID() string { func (m *awsAwsjson11_serializeOpGetOpenIdToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -507,6 +560,8 @@ func (m *awsAwsjson11_serializeOpGetOpenIdToken) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -520,6 +575,10 @@ func (*awsAwsjson11_serializeOpGetOpenIdTokenForDeveloperIdentity) ID() string { func (m *awsAwsjson11_serializeOpGetOpenIdTokenForDeveloperIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -562,6 +621,8 @@ func (m *awsAwsjson11_serializeOpGetOpenIdTokenForDeveloperIdentity) HandleSeria } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -575,6 +636,10 @@ func (*awsAwsjson11_serializeOpGetPrincipalTagAttributeMap) ID() string { func (m *awsAwsjson11_serializeOpGetPrincipalTagAttributeMap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -617,6 +682,8 @@ func (m *awsAwsjson11_serializeOpGetPrincipalTagAttributeMap) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -630,6 +697,10 @@ func (*awsAwsjson11_serializeOpListIdentities) ID() string { func (m *awsAwsjson11_serializeOpListIdentities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -672,6 +743,8 @@ func (m *awsAwsjson11_serializeOpListIdentities) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -685,6 +758,10 @@ func (*awsAwsjson11_serializeOpListIdentityPools) ID() string { func (m *awsAwsjson11_serializeOpListIdentityPools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -727,6 +804,8 @@ func (m *awsAwsjson11_serializeOpListIdentityPools) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -740,6 +819,10 @@ func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -782,6 +865,8 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -795,6 +880,10 @@ func (*awsAwsjson11_serializeOpLookupDeveloperIdentity) ID() string { func (m *awsAwsjson11_serializeOpLookupDeveloperIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -837,6 +926,8 @@ func (m *awsAwsjson11_serializeOpLookupDeveloperIdentity) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -850,6 +941,10 @@ func (*awsAwsjson11_serializeOpMergeDeveloperIdentities) ID() string { func (m *awsAwsjson11_serializeOpMergeDeveloperIdentities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -892,6 +987,8 @@ func (m *awsAwsjson11_serializeOpMergeDeveloperIdentities) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -905,6 +1002,10 @@ func (*awsAwsjson11_serializeOpSetIdentityPoolRoles) ID() string { func (m *awsAwsjson11_serializeOpSetIdentityPoolRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -947,6 +1048,8 @@ func (m *awsAwsjson11_serializeOpSetIdentityPoolRoles) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -960,6 +1063,10 @@ func (*awsAwsjson11_serializeOpSetPrincipalTagAttributeMap) ID() string { func (m *awsAwsjson11_serializeOpSetPrincipalTagAttributeMap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1002,6 +1109,8 @@ func (m *awsAwsjson11_serializeOpSetPrincipalTagAttributeMap) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1015,6 +1124,10 @@ func (*awsAwsjson11_serializeOpTagResource) ID() string { func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1057,6 +1170,8 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1070,6 +1185,10 @@ func (*awsAwsjson11_serializeOpUnlinkDeveloperIdentity) ID() string { func (m *awsAwsjson11_serializeOpUnlinkDeveloperIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1112,6 +1231,8 @@ func (m *awsAwsjson11_serializeOpUnlinkDeveloperIdentity) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1125,6 +1246,10 @@ func (*awsAwsjson11_serializeOpUnlinkIdentity) ID() string { func (m *awsAwsjson11_serializeOpUnlinkIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1167,6 +1292,8 @@ func (m *awsAwsjson11_serializeOpUnlinkIdentity) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1180,6 +1307,10 @@ func (*awsAwsjson11_serializeOpUntagResource) ID() string { func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1222,6 +1353,8 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1235,6 +1368,10 @@ func (*awsAwsjson11_serializeOpUpdateIdentityPool) ID() string { func (m *awsAwsjson11_serializeOpUpdateIdentityPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1277,6 +1414,8 @@ func (m *awsAwsjson11_serializeOpUpdateIdentityPool) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentCognitoIdentityProvider(v *types.CognitoIdentityProvider, value smithyjson.Value) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/CHANGELOG.md index fedaa8f..35be460 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/CHANGELOG.md @@ -1,3 +1,28 @@ +# v1.36.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.36.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.35.4 (2024-10-03) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_client.go index c340289..ac5e2f4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/api_client.go @@ -290,7 +290,9 @@ func (c *Client) invokeOperation( defer endTimer() defer span.End() - handler := smithyhttp.NewClientHandler(options.HTTPClient) + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/dynamodb") + }) decorated := middleware.DecorateHandler(handler, stack) result, metadata, err = decorated.Handle(ctx, params) if err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/deserializers.go index 2ef4bf2..78f8e97 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/deserializers.go @@ -8840,7 +8840,7 @@ func awsAwsjson10_deserializeDocumentBackupInUseException(v **types.BackupInUseE for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -8880,7 +8880,7 @@ func awsAwsjson10_deserializeDocumentBackupNotFoundException(v **types.BackupNot for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -9622,7 +9622,7 @@ func awsAwsjson10_deserializeDocumentConditionalCheckFailedException(v **types.C return err } - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -9898,7 +9898,7 @@ func awsAwsjson10_deserializeDocumentContinuousBackupsUnavailableException(v **t for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -10183,7 +10183,7 @@ func awsAwsjson10_deserializeDocumentDuplicateItemException(v **types.DuplicateI for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -10350,7 +10350,7 @@ func awsAwsjson10_deserializeDocumentExportConflictException(v **types.ExportCon for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -10635,7 +10635,7 @@ func awsAwsjson10_deserializeDocumentExportNotFoundException(v **types.ExportNot for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -11232,7 +11232,7 @@ func awsAwsjson10_deserializeDocumentGlobalTableAlreadyExistsException(v **types for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -11385,7 +11385,7 @@ func awsAwsjson10_deserializeDocumentGlobalTableNotFoundException(v **types.Glob for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -11425,7 +11425,7 @@ func awsAwsjson10_deserializeDocumentIdempotentParameterMismatchException(v **ty for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -11465,7 +11465,7 @@ func awsAwsjson10_deserializeDocumentImportConflictException(v **types.ImportCon for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -11505,7 +11505,7 @@ func awsAwsjson10_deserializeDocumentImportNotFoundException(v **types.ImportNot for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -11984,7 +11984,7 @@ func awsAwsjson10_deserializeDocumentIndexNotFoundException(v **types.IndexNotFo for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -12060,7 +12060,7 @@ func awsAwsjson10_deserializeDocumentInternalServerError(v **types.InternalServe for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -12100,7 +12100,7 @@ func awsAwsjson10_deserializeDocumentInvalidEndpointException(v **types.InvalidE for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -12140,7 +12140,7 @@ func awsAwsjson10_deserializeDocumentInvalidExportTimeException(v **types.Invali for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -12180,7 +12180,7 @@ func awsAwsjson10_deserializeDocumentInvalidRestoreTimeException(v **types.Inval for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -12424,7 +12424,7 @@ func awsAwsjson10_deserializeDocumentItemCollectionSizeLimitExceededException(v for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -12880,7 +12880,7 @@ func awsAwsjson10_deserializeDocumentLimitExceededException(v **types.LimitExcee for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -13468,7 +13468,7 @@ func awsAwsjson10_deserializeDocumentPointInTimeRecoveryUnavailableException(v * for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -13508,7 +13508,7 @@ func awsAwsjson10_deserializeDocumentPolicyNotFoundException(v **types.PolicyNot for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -13752,7 +13752,7 @@ func awsAwsjson10_deserializeDocumentProvisionedThroughputExceededException(v ** for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -13946,7 +13946,7 @@ func awsAwsjson10_deserializeDocumentReplicaAlreadyExistsException(v **types.Rep for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -14560,7 +14560,7 @@ func awsAwsjson10_deserializeDocumentReplicaNotFoundException(v **types.ReplicaN for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -14734,7 +14734,7 @@ func awsAwsjson10_deserializeDocumentRequestLimitExceeded(v **types.RequestLimit for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -14774,7 +14774,7 @@ func awsAwsjson10_deserializeDocumentResourceInUseException(v **types.ResourceIn for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -14814,7 +14814,7 @@ func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.Resourc for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -15418,7 +15418,7 @@ func awsAwsjson10_deserializeDocumentTableAlreadyExistsException(v **types.Table for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -15857,7 +15857,7 @@ func awsAwsjson10_deserializeDocumentTableInUseException(v **types.TableInUseExc for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -15933,7 +15933,7 @@ func awsAwsjson10_deserializeDocumentTableNotFoundException(v **types.TableNotFo for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -16159,7 +16159,7 @@ func awsAwsjson10_deserializeDocumentTransactionCanceledException(v **types.Tran return err } - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -16199,7 +16199,7 @@ func awsAwsjson10_deserializeDocumentTransactionConflictException(v **types.Tran for key, value := range shape { switch key { - case "message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { @@ -16239,7 +16239,7 @@ func awsAwsjson10_deserializeDocumentTransactionInProgressException(v **types.Tr for key, value := range shape { switch key { - case "Message": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/go_module_metadata.go index ddcb618..c6146ac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/dynamodb/go_module_metadata.go @@ -3,4 +3,4 @@ package dynamodb // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.35.4" +const goModuleVersion = "1.36.5" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md index 7afc533..e6307c2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/CHANGELOG.md @@ -1,3 +1,38 @@ +# v1.36.3 (2024-09-27) + +* No change notes available for this release. + +# v1.36.2 (2024-09-25) + +* No change notes available for this release. + +# v1.36.1 (2024-09-23) + +* No change notes available for this release. + +# v1.36.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.3 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.35.2 (2024-09-04) + +* No change notes available for this release. + +# v1.35.1 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.0 (2024-08-15) + +* **Feature**: Make the LastUsedDate field in the GetAccessKeyLastUsed response optional. This may break customers who only call the API for access keys with a valid LastUsedDate. This fixes a deserialization issue for access keys without a LastUsedDate, because the field was marked as required but could be null. +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.34.3 (2024-07-10.2) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go index 17e2f3a..4bfff9e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_client.go @@ -4,6 +4,7 @@ package iam import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -30,6 +33,133 @@ import ( const ServiceID = "IAM" const ServiceAPIVersion = "2010-05-08" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/iam") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/iam") +} + // Client provides the API client to make operations call for AWS Identity and // Access Management. type Client struct { @@ -57,6 +187,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveMeterProvider(&options) + + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -89,8 +223,15 @@ func (c *Client) Options() Options { return c.options.Copy() } -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() @@ -114,15 +255,54 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandler(options.HTTPClient) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + return result, metadata, err } @@ -160,7 +340,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { return fmt.Errorf("add ResolveEndpointV2: %v", err) } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -238,16 +418,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -435,6 +614,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) } @@ -478,6 +681,7 @@ func addIsPaginatorUserAgent(o *Options) { func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/iam") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -541,25 +745,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -575,6 +760,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } @@ -626,3 +823,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go index ab2ac88..d0079c9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go @@ -98,6 +98,9 @@ func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go index a7e2951..0b4c3e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddRoleToInstanceProfile.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -159,6 +162,18 @@ func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go index 48fa5fe..5064d13 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AddUserToGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go index ed638d9..5311a28 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachGroupPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go index 4e75732..911d434 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachRolePolicy.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -160,6 +163,18 @@ func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go index 9791f0f..95a79d0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_AttachUserPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go index ef04c74..0aed4dc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ChangePassword.go @@ -113,6 +113,9 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -152,6 +155,18 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go index 1d3f96c..939a171 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccessKey.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -155,6 +158,18 @@ func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go index f36dd0f..6befed3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateAccountAlias.go @@ -96,6 +96,9 @@ func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -135,6 +138,18 @@ func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go index d289c04..b6f1079 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -157,6 +160,18 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go index c3b199c..26b50cf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateInstanceProfile.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go index 66dbdb0..10228a0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateLoginProfile.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -169,6 +172,18 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go index 59f9a14..dcb772c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateOpenIDConnectProvider.go @@ -37,13 +37,11 @@ import ( // You get all of this information from the OIDC IdP you want to use to access // Amazon Web Services. // -// Amazon Web Services secures communication with some OIDC identity providers -// (IdPs) through our library of trusted root certificate authorities (CAs) instead -// of using a certificate thumbprint to verify your IdP server certificate. In -// these cases, your legacy thumbprint remains in your configuration, but is no -// longer used for validation. These OIDC IdPs include Auth0, GitHub, GitLab, -// Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) -// endpoint. +// Amazon Web Services secures communication with OIDC identity providers (IdPs) +// using our library of trusted root certificate authorities (CAs) to verify the +// JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a +// certificate that is not signed by one of these trusted CAs, only then we secure +// communication using the thumbprints set in the IdP's configuration. // // The trust for the OIDC provider is derived from the IAM provider that this // operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvideroperation to @@ -197,6 +195,9 @@ func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -236,6 +237,18 @@ func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go index 79962ac..691c649 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicy.go @@ -179,6 +179,9 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -218,6 +221,18 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go index a4f8aaf..5943f98 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreatePolicyVersion.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -189,6 +192,18 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go index 3105cd8..2c0fcf7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateRole.go @@ -199,6 +199,9 @@ func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -238,6 +241,18 @@ func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go index b807221..28dfe33 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateSAMLProvider.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -189,6 +192,18 @@ func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go index b3d3f15..5d9f504 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceLinkedRole.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -164,6 +167,18 @@ func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go index a5290f0..3b74e85 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateServiceSpecificCredential.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *m if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -164,6 +167,18 @@ func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *m if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go index 8c40fb8..6c18ad2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateUser.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -180,6 +183,18 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go index 512e34d..4f8233b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_CreateVirtualMFADevice.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -180,6 +183,18 @@ func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go index 390dc81..4e0a893 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeactivateMFADevice.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go index 0441f5b..9722f39 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccessKey.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -147,6 +150,18 @@ func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go index d84bc42..5de7490 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountAlias.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -136,6 +139,18 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go index 3095a5a..498c883 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteAccountPasswordPolicy.go @@ -81,6 +81,9 @@ func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -117,6 +120,18 @@ func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go index a1dde6d..e133fbc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroup.go @@ -93,6 +93,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -132,6 +135,18 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go index 746693c..d38f19b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteGroupPolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go index fc18e6b..09d9747 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteInstanceProfile.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -141,6 +144,18 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go index d1061e5..aabc6c0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteLoginProfile.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -143,6 +146,18 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go index 38c6dc8..0daf8d8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteOpenIDConnectProvider.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -134,6 +137,18 @@ func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go index 4a9cf7f..5c0aa80 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -151,6 +154,18 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go index a136ef8..0476768 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeletePolicyVersion.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go index cae15f3..c8d2320 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRole.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go index 7f172b1..89d0631 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePermissionsBoundary.go @@ -93,6 +93,9 @@ func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -132,6 +135,18 @@ func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go index 85fdf9e..267a3fb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteRolePolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go index d76a021..8ad85a5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSAMLProvider.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -134,6 +137,18 @@ func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go index 08f4f66..7c4f9aa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSSHPublicKey.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go index b576da9..bd00895 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServerCertificate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go index 6ce0f1a..e4cac12 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceLinkedRole.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -151,6 +154,18 @@ func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go index 5e8ede9..75fc1a7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteServiceSpecificCredential.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *m if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *m if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go index 3a0f71a..cd67380 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteSigningCertificate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go index 753e9a8..98fd67e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUser.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -154,6 +157,18 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go index c5a082c..f00eb36 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPermissionsBoundary.go @@ -91,6 +91,9 @@ func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -130,6 +133,18 @@ func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go index 4adfc7d..ba27de1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteUserPolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -149,6 +152,18 @@ func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go index 1298b29..e1becfb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DeleteVirtualMFADevice.go @@ -96,6 +96,9 @@ func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -135,6 +138,18 @@ func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go index 5d2456b..6f5d9f0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachGroupPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go index 1450d98..3252122 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachRolePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go index 067db8a..f627c04 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_DetachUserPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go index 20054bc..34916c2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_EnableMFADevice.go @@ -136,6 +136,9 @@ func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -175,6 +178,18 @@ func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go index 96296dc..30e2108 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateCredentialReport.go @@ -93,6 +93,9 @@ func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,18 @@ func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go index 6b3ce12..b9c2b93 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateOrganizationsAccessReport.go @@ -213,6 +213,9 @@ func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -252,6 +255,18 @@ func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go index 9dec730..1be261c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GenerateServiceLastAccessedDetails.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -201,6 +204,18 @@ func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go index e39438c..748c5f2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccessKeyLastUsed.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -143,6 +146,18 @@ func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go index c55c15c..2162fdb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountAuthorizationDetails.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -184,6 +187,18 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go index effb872..aa50f44 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountPasswordPolicy.go @@ -93,6 +93,9 @@ func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,18 @@ func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go index 3ea7169..f37d86a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetAccountSummary.go @@ -91,6 +91,9 @@ func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -127,6 +130,18 @@ func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go index 7dc7c48..a506e93 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForCustomPolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -156,6 +159,18 @@ func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go index 5d47169..10cd3ff 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetContextKeysForPrincipalPolicy.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack * if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -175,6 +178,18 @@ func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go index abf7df4..d75d50d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetCredentialReport.go @@ -99,6 +99,9 @@ func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -135,6 +138,18 @@ func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go index ab844d0..f10ee89 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -175,6 +178,18 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go index fd01808..3a3db54 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetGroupPolicy.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -179,6 +182,18 @@ func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go index 618689e..0793563 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetInstanceProfile.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go index a67e985..51d7868 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetLoginProfile.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -151,6 +154,18 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go index 45d7723..92e6293 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetMFADevice.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go index 4f5cf74..aca71da 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOpenIDConnectProvider.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -160,6 +163,18 @@ func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go index 60e6b98..adc980b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetOrganizationsAccessReport.go @@ -180,6 +180,9 @@ func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *midd if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -219,6 +222,18 @@ func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go index 97bb0a5..19d1f11 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -155,6 +158,18 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go index a61c280..e8ca347 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetPolicyVersion.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -169,6 +172,18 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go index 6d2312d..e498e92 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRole.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -155,6 +158,18 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go index d3cd287..9830349 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetRolePolicy.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -182,6 +185,18 @@ func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go index 08fa99e..78aab00 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSAMLProvider.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -156,6 +159,18 @@ func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go index 7bc9673..f9c1cb8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetSSHPublicKey.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -161,6 +164,18 @@ func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go index 22cb7b8..583841b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServerCertificate.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go index f16423d..da2b5e1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetails.go @@ -203,6 +203,9 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -242,6 +245,18 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go index 3fa77e9..22266fa 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go @@ -188,6 +188,9 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -227,6 +230,18 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go index 59a4503..0bb8fd4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go index f4d8b71..daa4ca3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUser.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -164,6 +167,18 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go index 05d46d6..387888a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_GetUserPolicy.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -179,6 +182,18 @@ func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go index 5b5f619..de39bf7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccessKeys.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -179,6 +182,18 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go index af5c0d4..a65d49f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAccountAliases.go @@ -12,9 +12,9 @@ import ( // Lists the account alias associated with the Amazon Web Services account (Note: // you can have only one). For information about using an Amazon Web Services -// account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the Amazon Web Services Sign-In User Guide. +// account alias, see [Creating, deleting, and listing an Amazon Web Services account alias]in the IAM User Guide. // -// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/signin/latest/userguide/CreateAccountAlias.html +// [Creating, deleting, and listing an Amazon Web Services account alias]: https://docs.aws.amazon.com/IAM/latest/UserGuide/console_account-alias.html#CreateAccountAlias func (c *Client) ListAccountAliases(ctx context.Context, params *ListAccountAliasesInput, optFns ...func(*Options)) (*ListAccountAliasesOutput, error) { if params == nil { params = &ListAccountAliasesInput{} @@ -122,6 +122,9 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -158,6 +161,18 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go index 1be507e..fe9de8b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedGroupPolicies.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -190,6 +193,18 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go index ed7f5a5..f767a16 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedRolePolicies.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -190,6 +193,18 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go index b71e034..46cfe41 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListAttachedUserPolicies.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -190,6 +193,18 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go index 17a4bac..0844ac6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListEntitiesForPolicy.go @@ -169,6 +169,9 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -208,6 +211,18 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go index 1949a11..5513f48 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupPolicies.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -184,6 +187,18 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go index 74bfed3..13be88a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroups.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -170,6 +173,18 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go index 50d2702..7aa47cf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListGroupsForUser.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -170,6 +173,18 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go index 8f20f6b..bf2efc8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfileTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -173,6 +176,18 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go index 939b1a1..257da59 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfiles.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -179,6 +182,18 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go index 83237fa..7815e54 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListInstanceProfilesForRole.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go index 3807505..bdac50b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADeviceTags.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go index 7a4ed1e..74b5b61 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListMFADevices.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -169,6 +172,18 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go index 2deb644..acad2e8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviderTags.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -178,6 +181,18 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go index 54fc865..bc88dac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListOpenIDConnectProviders.go @@ -93,6 +93,9 @@ func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,18 @@ func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go index 10b13b1..9c40614 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicies.go @@ -171,6 +171,9 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -207,6 +210,18 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go index 4fd6f3a..b7b5a8f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPoliciesGrantingServiceAccess.go @@ -159,6 +159,9 @@ func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -198,6 +201,18 @@ func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go index c1f0a55..ddbfc06 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -173,6 +176,18 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go index f4f5ef1..943983f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListPolicyVersions.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -175,6 +178,18 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go index 15a17eb..1af1328 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRolePolicies.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -178,6 +181,18 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go index e24e37e..f91e039 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoleTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -173,6 +176,18 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go index 6aea245..9d3fc4a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListRoles.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -186,6 +189,18 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go index 4bc8b0d..8c677d3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviderTags.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -178,6 +181,18 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go index 6fa3322..acd4d43 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSAMLProviders.go @@ -95,6 +95,9 @@ func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -131,6 +134,18 @@ func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go index 5fbd400..c9a6094 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSSHPublicKeys.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go index fd09b36..4683f39 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificateTags.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -179,6 +182,18 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go index 76fec0e..638d016 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServerCertificates.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -182,6 +185,18 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go index 74d617e..d48c3c4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListServiceSpecificCredentials.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *mi if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go index b5ae2b2..95a5455 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListSigningCertificates.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go index 11b7db9..3f633c2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserPolicies.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -177,6 +180,18 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go index 7dc9c05..a402c64 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUserTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -173,6 +176,18 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go index f6366f9..d4a29cf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListUsers.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -182,6 +185,18 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go index 299faff..2e27bee 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ListVirtualMFADevices.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -170,6 +173,18 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go index 2f1e8c5..76011d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutGroupPolicy.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -184,6 +187,18 @@ func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go index a606557..7535a37 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePermissionsBoundary.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -155,6 +158,18 @@ func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go index 7977a8f..b81b5b4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutRolePolicy.go @@ -154,6 +154,9 @@ func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -193,6 +196,18 @@ func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go index b076030..b90d153 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPermissionsBoundary.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go index eb2e137..fcd2350 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_PutUserPolicy.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -184,6 +187,18 @@ func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go index 71975b0..c045b50 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares( if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares( if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go index 02ee3aa..ee73f61 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveRoleFromInstanceProfile.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go index 0640669..ae4a5d5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_RemoveUserFromGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go index 85f0710..7e58651 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResetServiceSpecificCredential.go @@ -114,6 +114,9 @@ func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *mi if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go index bd53a03..d961630 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_ResyncMFADevice.go @@ -123,6 +123,9 @@ func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -162,6 +165,18 @@ func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go index 5aa954a..408879a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetDefaultPolicyVersion.go @@ -109,6 +109,9 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go index e0ffc10..999933e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SetSecurityTokenServicePreferences.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -155,6 +158,18 @@ func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go index dc49d9b..532d40f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulateCustomPolicy.go @@ -322,6 +322,9 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -361,6 +364,18 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go index af3a3fe..13b95b4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_SimulatePrincipalPolicy.go @@ -347,6 +347,9 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -386,6 +389,18 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go index d191802..9eded37 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagInstanceProfile.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -163,6 +166,18 @@ func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go index 9a41c68..44ce7fe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagMFADevice.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -165,6 +168,18 @@ func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go index 6a98eaf..15f7a20 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagOpenIDConnectProvider.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -165,6 +168,18 @@ func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go index 5a012ef..3b13ad9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagPolicy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, optio if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -163,6 +166,18 @@ func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go index 6ed2bac..fc89f5a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagRole.go @@ -132,6 +132,9 @@ func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -171,6 +174,18 @@ func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go index 797d4af..fd16e68 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagSAMLProvider.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -165,6 +168,18 @@ func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go index c23d234..9b993e4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagServerCertificate.go @@ -133,6 +133,9 @@ func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -172,6 +175,18 @@ func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go index a728604..6f99ac6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_TagUser.go @@ -131,6 +131,9 @@ func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -170,6 +173,18 @@ func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go index 37e6095..947da74 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagInstanceProfile.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go index 1c69ae3..5bdfcf4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagMFADevice.go @@ -102,6 +102,9 @@ func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -141,6 +144,18 @@ func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go index 4797c50..66d67cb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagOpenIDConnectProvider.go @@ -103,6 +103,9 @@ func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go index 5e2f225..9197933 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagPolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go index ce486e0..3d5a54a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagRole.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, optio if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go index bbd0d11..bc82fa5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagSAMLProvider.go @@ -103,6 +103,9 @@ func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go index f0b2edc..49070c8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagServerCertificate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go index 718b9d3..24d47ca 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UntagUser.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, optio if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, optio if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go index 20bab54..9b4ce80 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccessKey.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -161,6 +164,18 @@ func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go index b386b6e..d501b71 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAccountPasswordPolicy.go @@ -175,6 +175,9 @@ func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -211,6 +214,18 @@ func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go index d02c0d8..26fe6cd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateAssumeRolePolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -159,6 +162,18 @@ func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go index a5ca9f0..c11cf78 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateGroup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -163,6 +166,18 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go index 406fa0a..b2de7ba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateLoginProfile.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -163,6 +166,18 @@ func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go index 2b34f75..b8087b0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go @@ -21,13 +21,11 @@ import ( // does change, any attempt to assume an IAM role that specifies the OIDC provider // as a principal fails until the certificate thumbprint is updated. // -// Amazon Web Services secures communication with some OIDC identity providers -// (IdPs) through our library of trusted root certificate authorities (CAs) instead -// of using a certificate thumbprint to verify your IdP server certificate. In -// these cases, your legacy thumbprint remains in your configuration, but is no -// longer used for validation. These OIDC IdPs include Auth0, GitHub, GitLab, -// Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) -// endpoint. +// Amazon Web Services secures communication with OIDC identity providers (IdPs) +// using our library of trusted root certificate authorities (CAs) to verify the +// JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a +// certificate that is not signed by one of these trusted CAs, only then we secure +// communication using the thumbprints set in the IdP's configuration. // // Trust for the OIDC provider is derived from the provider certificate and is // validated by the thumbprint. Therefore, it is best to limit access to the @@ -120,6 +118,9 @@ func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(st if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -159,6 +160,18 @@ func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(st if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go index ce439ad..85c5ee1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRole.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -149,6 +152,18 @@ func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go index afff26b..9837bbc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateRoleDescription.go @@ -99,6 +99,9 @@ func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -138,6 +141,18 @@ func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go index a7e7135..757d899 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSAMLProvider.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go index eee0fd4..0523f33 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSSHPublicKey.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -159,6 +162,18 @@ func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go index 587c233..5d4b55f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServerCertificate.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go index 251aa83..dfafeeb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateServiceSpecificCredential.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *m if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -150,6 +153,18 @@ func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *m if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go index 7f67041..5019ce6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateSigningCertificate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -156,6 +159,18 @@ func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go index fc494f2..2c59d59 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UpdateUser.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -164,6 +167,18 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go index f15c726..4782750 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSSHPublicKey.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -165,6 +168,18 @@ func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go index c3a9eb0..ea45b95 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadServerCertificate.go @@ -221,6 +221,9 @@ func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -260,6 +263,18 @@ func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go index db7f07b..a22a48f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/api_op_UploadSigningCertificate.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -179,6 +182,18 @@ func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go index 27aaba1..e9442c0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/auth.go @@ -8,7 +8,9 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -145,6 +147,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -157,6 +162,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -216,7 +224,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -226,12 +237,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) if err != nil { return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) + + span.End() return next.HandleFinalize(ctx, in) } @@ -247,6 +266,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -256,6 +276,9 @@ func (*signRequestMiddleware) ID() string { func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) @@ -276,9 +299,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { return out, metadata, fmt.Errorf("sign request: %w", err) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go index 4f310b7..7532c0e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/deserializers.go @@ -17,6 +17,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" @@ -48,6 +49,10 @@ func (m *awsAwsquery_deserializeOpAddClientIDToOpenIDConnectProvider) HandleDese return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -130,6 +135,10 @@ func (m *awsAwsquery_deserializeOpAddRoleToInstanceProfile) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -215,6 +224,10 @@ func (m *awsAwsquery_deserializeOpAddUserToGroup) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -294,6 +307,10 @@ func (m *awsAwsquery_deserializeOpAttachGroupPolicy) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -379,6 +396,10 @@ func (m *awsAwsquery_deserializeOpAttachRolePolicy) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -467,6 +488,10 @@ func (m *awsAwsquery_deserializeOpAttachUserPolicy) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -552,6 +577,10 @@ func (m *awsAwsquery_deserializeOpChangePassword) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -640,6 +669,10 @@ func (m *awsAwsquery_deserializeOpCreateAccessKey) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -754,6 +787,10 @@ func (m *awsAwsquery_deserializeOpCreateAccountAlias) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -836,6 +873,10 @@ func (m *awsAwsquery_deserializeOpCreateGroup) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -953,6 +994,10 @@ func (m *awsAwsquery_deserializeOpCreateInstanceProfile) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1073,6 +1118,10 @@ func (m *awsAwsquery_deserializeOpCreateLoginProfile) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1193,6 +1242,10 @@ func (m *awsAwsquery_deserializeOpCreateOpenIDConnectProvider) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1316,6 +1369,10 @@ func (m *awsAwsquery_deserializeOpCreatePolicy) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1439,6 +1496,10 @@ func (m *awsAwsquery_deserializeOpCreatePolicyVersion) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1559,6 +1620,10 @@ func (m *awsAwsquery_deserializeOpCreateRole) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1682,6 +1747,10 @@ func (m *awsAwsquery_deserializeOpCreateSAMLProvider) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1802,6 +1871,10 @@ func (m *awsAwsquery_deserializeOpCreateServiceLinkedRole) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1919,6 +1992,10 @@ func (m *awsAwsquery_deserializeOpCreateServiceSpecificCredential) HandleDeseria return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2033,6 +2110,10 @@ func (m *awsAwsquery_deserializeOpCreateUser) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2156,6 +2237,10 @@ func (m *awsAwsquery_deserializeOpCreateVirtualMFADevice) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2276,6 +2361,10 @@ func (m *awsAwsquery_deserializeOpDeactivateMFADevice) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2361,6 +2450,10 @@ func (m *awsAwsquery_deserializeOpDeleteAccessKey) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2440,6 +2533,10 @@ func (m *awsAwsquery_deserializeOpDeleteAccountAlias) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2522,6 +2619,10 @@ func (m *awsAwsquery_deserializeOpDeleteAccountPasswordPolicy) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2601,6 +2702,10 @@ func (m *awsAwsquery_deserializeOpDeleteGroup) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2683,6 +2788,10 @@ func (m *awsAwsquery_deserializeOpDeleteGroupPolicy) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2762,6 +2871,10 @@ func (m *awsAwsquery_deserializeOpDeleteInstanceProfile) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2844,6 +2957,10 @@ func (m *awsAwsquery_deserializeOpDeleteLoginProfile) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2926,6 +3043,10 @@ func (m *awsAwsquery_deserializeOpDeleteOpenIDConnectProvider) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3005,6 +3126,10 @@ func (m *awsAwsquery_deserializeOpDeletePolicy) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3090,6 +3215,10 @@ func (m *awsAwsquery_deserializeOpDeletePolicyVersion) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3175,6 +3304,10 @@ func (m *awsAwsquery_deserializeOpDeleteRole) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3263,6 +3396,10 @@ func (m *awsAwsquery_deserializeOpDeleteRolePermissionsBoundary) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3342,6 +3479,10 @@ func (m *awsAwsquery_deserializeOpDeleteRolePolicy) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3424,6 +3565,10 @@ func (m *awsAwsquery_deserializeOpDeleteSAMLProvider) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3506,6 +3651,10 @@ func (m *awsAwsquery_deserializeOpDeleteServerCertificate) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3588,6 +3737,10 @@ func (m *awsAwsquery_deserializeOpDeleteServiceLinkedRole) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3702,6 +3855,10 @@ func (m *awsAwsquery_deserializeOpDeleteServiceSpecificCredential) HandleDeseria return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3775,6 +3932,10 @@ func (m *awsAwsquery_deserializeOpDeleteSigningCertificate) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3857,6 +4018,10 @@ func (m *awsAwsquery_deserializeOpDeleteSSHPublicKey) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3930,6 +4095,10 @@ func (m *awsAwsquery_deserializeOpDeleteUser) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4015,6 +4184,10 @@ func (m *awsAwsquery_deserializeOpDeleteUserPermissionsBoundary) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4091,6 +4264,10 @@ func (m *awsAwsquery_deserializeOpDeleteUserPolicy) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4170,6 +4347,10 @@ func (m *awsAwsquery_deserializeOpDeleteVirtualMFADevice) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4255,6 +4436,10 @@ func (m *awsAwsquery_deserializeOpDetachGroupPolicy) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4337,6 +4522,10 @@ func (m *awsAwsquery_deserializeOpDetachRolePolicy) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4422,6 +4611,10 @@ func (m *awsAwsquery_deserializeOpDetachUserPolicy) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4504,6 +4697,10 @@ func (m *awsAwsquery_deserializeOpEnableMFADevice) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4595,6 +4792,10 @@ func (m *awsAwsquery_deserializeOpGenerateCredentialReport) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4706,6 +4907,10 @@ func (m *awsAwsquery_deserializeOpGenerateOrganizationsAccessReport) HandleDeser return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4814,6 +5019,10 @@ func (m *awsAwsquery_deserializeOpGenerateServiceLastAccessedDetails) HandleDese return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4925,6 +5134,10 @@ func (m *awsAwsquery_deserializeOpGetAccessKeyLastUsed) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5030,6 +5243,10 @@ func (m *awsAwsquery_deserializeOpGetAccountAuthorizationDetails) HandleDeserial return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5138,6 +5355,10 @@ func (m *awsAwsquery_deserializeOpGetAccountPasswordPolicy) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5249,6 +5470,10 @@ func (m *awsAwsquery_deserializeOpGetAccountSummary) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5357,6 +5582,10 @@ func (m *awsAwsquery_deserializeOpGetContextKeysForCustomPolicy) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5465,6 +5694,10 @@ func (m *awsAwsquery_deserializeOpGetContextKeysForPrincipalPolicy) HandleDeseri return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5576,6 +5809,10 @@ func (m *awsAwsquery_deserializeOpGetCredentialReport) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5693,6 +5930,10 @@ func (m *awsAwsquery_deserializeOpGetGroup) HandleDeserialize(ctx context.Contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5804,6 +6045,10 @@ func (m *awsAwsquery_deserializeOpGetGroupPolicy) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5915,6 +6160,10 @@ func (m *awsAwsquery_deserializeOpGetInstanceProfile) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6026,6 +6275,10 @@ func (m *awsAwsquery_deserializeOpGetLoginProfile) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6137,6 +6390,10 @@ func (m *awsAwsquery_deserializeOpGetMFADevice) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6248,6 +6505,10 @@ func (m *awsAwsquery_deserializeOpGetOpenIDConnectProvider) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6362,6 +6623,10 @@ func (m *awsAwsquery_deserializeOpGetOrganizationsAccessReport) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6470,6 +6735,10 @@ func (m *awsAwsquery_deserializeOpGetPolicy) HandleDeserialize(ctx context.Conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6584,6 +6853,10 @@ func (m *awsAwsquery_deserializeOpGetPolicyVersion) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6698,6 +6971,10 @@ func (m *awsAwsquery_deserializeOpGetRole) HandleDeserialize(ctx context.Context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6809,6 +7086,10 @@ func (m *awsAwsquery_deserializeOpGetRolePolicy) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6920,6 +7201,10 @@ func (m *awsAwsquery_deserializeOpGetSAMLProvider) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7034,6 +7319,10 @@ func (m *awsAwsquery_deserializeOpGetServerCertificate) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7145,6 +7434,10 @@ func (m *awsAwsquery_deserializeOpGetServiceLastAccessedDetails) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7256,6 +7549,10 @@ func (m *awsAwsquery_deserializeOpGetServiceLastAccessedDetailsWithEntities) Han return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7367,6 +7664,10 @@ func (m *awsAwsquery_deserializeOpGetServiceLinkedRoleDeletionStatus) HandleDese return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7481,6 +7782,10 @@ func (m *awsAwsquery_deserializeOpGetSSHPublicKey) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7592,6 +7897,10 @@ func (m *awsAwsquery_deserializeOpGetUser) HandleDeserialize(ctx context.Context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7703,6 +8012,10 @@ func (m *awsAwsquery_deserializeOpGetUserPolicy) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7814,6 +8127,10 @@ func (m *awsAwsquery_deserializeOpListAccessKeys) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7925,6 +8242,10 @@ func (m *awsAwsquery_deserializeOpListAccountAliases) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8033,6 +8354,10 @@ func (m *awsAwsquery_deserializeOpListAttachedGroupPolicies) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8147,6 +8472,10 @@ func (m *awsAwsquery_deserializeOpListAttachedRolePolicies) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8261,6 +8590,10 @@ func (m *awsAwsquery_deserializeOpListAttachedUserPolicies) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8375,6 +8708,10 @@ func (m *awsAwsquery_deserializeOpListEntitiesForPolicy) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8489,6 +8826,10 @@ func (m *awsAwsquery_deserializeOpListGroupPolicies) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8600,6 +8941,10 @@ func (m *awsAwsquery_deserializeOpListGroups) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8708,6 +9053,10 @@ func (m *awsAwsquery_deserializeOpListGroupsForUser) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8819,6 +9168,10 @@ func (m *awsAwsquery_deserializeOpListInstanceProfiles) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8927,6 +9280,10 @@ func (m *awsAwsquery_deserializeOpListInstanceProfilesForRole) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9038,6 +9395,10 @@ func (m *awsAwsquery_deserializeOpListInstanceProfileTags) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9149,6 +9510,10 @@ func (m *awsAwsquery_deserializeOpListMFADevices) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9260,6 +9625,10 @@ func (m *awsAwsquery_deserializeOpListMFADeviceTags) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9374,6 +9743,10 @@ func (m *awsAwsquery_deserializeOpListOpenIDConnectProviders) HandleDeserialize( return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9482,6 +9855,10 @@ func (m *awsAwsquery_deserializeOpListOpenIDConnectProviderTags) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9596,6 +9973,10 @@ func (m *awsAwsquery_deserializeOpListPolicies) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9704,6 +10085,10 @@ func (m *awsAwsquery_deserializeOpListPoliciesGrantingServiceAccess) HandleDeser return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9815,6 +10200,10 @@ func (m *awsAwsquery_deserializeOpListPolicyTags) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9929,6 +10318,10 @@ func (m *awsAwsquery_deserializeOpListPolicyVersions) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10043,6 +10436,10 @@ func (m *awsAwsquery_deserializeOpListRolePolicies) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10154,6 +10551,10 @@ func (m *awsAwsquery_deserializeOpListRoles) HandleDeserialize(ctx context.Conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10262,6 +10663,10 @@ func (m *awsAwsquery_deserializeOpListRoleTags) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10373,6 +10778,10 @@ func (m *awsAwsquery_deserializeOpListSAMLProviders) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10481,6 +10890,10 @@ func (m *awsAwsquery_deserializeOpListSAMLProviderTags) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10595,6 +11008,10 @@ func (m *awsAwsquery_deserializeOpListServerCertificates) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10703,6 +11120,10 @@ func (m *awsAwsquery_deserializeOpListServerCertificateTags) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10814,6 +11235,10 @@ func (m *awsAwsquery_deserializeOpListServiceSpecificCredentials) HandleDeserial return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10925,6 +11350,10 @@ func (m *awsAwsquery_deserializeOpListSigningCertificates) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11036,6 +11465,10 @@ func (m *awsAwsquery_deserializeOpListSSHPublicKeys) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11144,6 +11577,10 @@ func (m *awsAwsquery_deserializeOpListUserPolicies) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11255,6 +11692,10 @@ func (m *awsAwsquery_deserializeOpListUsers) HandleDeserialize(ctx context.Conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11363,6 +11804,10 @@ func (m *awsAwsquery_deserializeOpListUserTags) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11474,6 +11919,10 @@ func (m *awsAwsquery_deserializeOpListVirtualMFADevices) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11579,6 +12028,10 @@ func (m *awsAwsquery_deserializeOpPutGroupPolicy) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11661,6 +12114,10 @@ func (m *awsAwsquery_deserializeOpPutRolePermissionsBoundary) HandleDeserialize( return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11746,6 +12203,10 @@ func (m *awsAwsquery_deserializeOpPutRolePolicy) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11831,6 +12292,10 @@ func (m *awsAwsquery_deserializeOpPutUserPermissionsBoundary) HandleDeserialize( return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11913,6 +12378,10 @@ func (m *awsAwsquery_deserializeOpPutUserPolicy) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11995,6 +12464,10 @@ func (m *awsAwsquery_deserializeOpRemoveClientIDFromOpenIDConnectProvider) Handl return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12074,6 +12547,10 @@ func (m *awsAwsquery_deserializeOpRemoveRoleFromInstanceProfile) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12156,6 +12633,10 @@ func (m *awsAwsquery_deserializeOpRemoveUserFromGroup) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12235,6 +12716,10 @@ func (m *awsAwsquery_deserializeOpResetServiceSpecificCredential) HandleDeserial return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12343,6 +12828,10 @@ func (m *awsAwsquery_deserializeOpResyncMFADevice) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12428,6 +12917,10 @@ func (m *awsAwsquery_deserializeOpSetDefaultPolicyVersion) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12510,6 +13003,10 @@ func (m *awsAwsquery_deserializeOpSetSecurityTokenServicePreferences) HandleDese return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12583,6 +13080,10 @@ func (m *awsAwsquery_deserializeOpSimulateCustomPolicy) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12694,6 +13195,10 @@ func (m *awsAwsquery_deserializeOpSimulatePrincipalPolicy) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12808,6 +13313,10 @@ func (m *awsAwsquery_deserializeOpTagInstanceProfile) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12893,6 +13402,10 @@ func (m *awsAwsquery_deserializeOpTagMFADevice) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12978,6 +13491,10 @@ func (m *awsAwsquery_deserializeOpTagOpenIDConnectProvider) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13063,6 +13580,10 @@ func (m *awsAwsquery_deserializeOpTagPolicy) HandleDeserialize(ctx context.Conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13148,6 +13669,10 @@ func (m *awsAwsquery_deserializeOpTagRole) HandleDeserialize(ctx context.Context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13233,6 +13758,10 @@ func (m *awsAwsquery_deserializeOpTagSAMLProvider) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13318,6 +13847,10 @@ func (m *awsAwsquery_deserializeOpTagServerCertificate) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13403,6 +13936,10 @@ func (m *awsAwsquery_deserializeOpTagUser) HandleDeserialize(ctx context.Context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13488,6 +14025,10 @@ func (m *awsAwsquery_deserializeOpUntagInstanceProfile) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13570,6 +14111,10 @@ func (m *awsAwsquery_deserializeOpUntagMFADevice) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13652,6 +14197,10 @@ func (m *awsAwsquery_deserializeOpUntagOpenIDConnectProvider) HandleDeserialize( return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13734,6 +14283,10 @@ func (m *awsAwsquery_deserializeOpUntagPolicy) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13816,6 +14369,10 @@ func (m *awsAwsquery_deserializeOpUntagRole) HandleDeserialize(ctx context.Conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13895,6 +14452,10 @@ func (m *awsAwsquery_deserializeOpUntagSAMLProvider) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13977,6 +14538,10 @@ func (m *awsAwsquery_deserializeOpUntagServerCertificate) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14059,6 +14624,10 @@ func (m *awsAwsquery_deserializeOpUntagUser) HandleDeserialize(ctx context.Conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14138,6 +14707,10 @@ func (m *awsAwsquery_deserializeOpUpdateAccessKey) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14217,6 +14790,10 @@ func (m *awsAwsquery_deserializeOpUpdateAccountPasswordPolicy) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14299,6 +14876,10 @@ func (m *awsAwsquery_deserializeOpUpdateAssumeRolePolicy) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14384,6 +14965,10 @@ func (m *awsAwsquery_deserializeOpUpdateGroup) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14466,6 +15051,10 @@ func (m *awsAwsquery_deserializeOpUpdateLoginProfile) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14551,6 +15140,10 @@ func (m *awsAwsquery_deserializeOpUpdateOpenIDConnectProviderThumbprint) HandleD return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14630,6 +15223,10 @@ func (m *awsAwsquery_deserializeOpUpdateRole) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14744,6 +15341,10 @@ func (m *awsAwsquery_deserializeOpUpdateRoleDescription) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14858,6 +15459,10 @@ func (m *awsAwsquery_deserializeOpUpdateSAMLProvider) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14975,6 +15580,10 @@ func (m *awsAwsquery_deserializeOpUpdateServerCertificate) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15057,6 +15666,10 @@ func (m *awsAwsquery_deserializeOpUpdateServiceSpecificCredential) HandleDeseria return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15130,6 +15743,10 @@ func (m *awsAwsquery_deserializeOpUpdateSigningCertificate) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15209,6 +15826,10 @@ func (m *awsAwsquery_deserializeOpUpdateSSHPublicKey) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15282,6 +15903,10 @@ func (m *awsAwsquery_deserializeOpUpdateUser) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15370,6 +15995,10 @@ func (m *awsAwsquery_deserializeOpUploadServerCertificate) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15496,6 +16125,10 @@ func (m *awsAwsquery_deserializeOpUploadSigningCertificate) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15625,6 +16258,10 @@ func (m *awsAwsquery_deserializeOpUploadSSHPublicKey) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go index 3c0775b..16261bb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/endpoints.go @@ -17,6 +17,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -790,14 +791,13 @@ func (*resolveEndpointV2Middleware) ID() string { func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { return next.HandleFinalize(ctx, in) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -808,11 +808,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { endpt.URI.RawPath = endpt.URI.Path } @@ -834,5 +839,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go index 28ed070..85e7c97 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/go_module_metadata.go @@ -3,4 +3,4 @@ package iam // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.34.3" +const goModuleVersion = "1.36.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go index 88ab704..73d5e4e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go index e4abdd7..3b02216 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/options.go @@ -9,7 +9,9 @@ import ( internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" smithyauth "github.com/aws/smithy-go/auth" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // The logger writer interface to write logging messages to. Logger logging.Logger + // The client meter provider. + MeterProvider metrics.MeterProvider + // The region to send requests to. (Required) Region string @@ -103,6 +105,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go index fecaa9d..1490248 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/serializers.go @@ -11,6 +11,7 @@ import ( smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -25,6 +26,10 @@ func (*awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -76,6 +81,8 @@ func (m *awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -89,6 +96,10 @@ func (*awsAwsquery_serializeOpAddRoleToInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpAddRoleToInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -140,6 +151,8 @@ func (m *awsAwsquery_serializeOpAddRoleToInstanceProfile) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -153,6 +166,10 @@ func (*awsAwsquery_serializeOpAddUserToGroup) ID() string { func (m *awsAwsquery_serializeOpAddUserToGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -204,6 +221,8 @@ func (m *awsAwsquery_serializeOpAddUserToGroup) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -217,6 +236,10 @@ func (*awsAwsquery_serializeOpAttachGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpAttachGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -268,6 +291,8 @@ func (m *awsAwsquery_serializeOpAttachGroupPolicy) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -281,6 +306,10 @@ func (*awsAwsquery_serializeOpAttachRolePolicy) ID() string { func (m *awsAwsquery_serializeOpAttachRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -332,6 +361,8 @@ func (m *awsAwsquery_serializeOpAttachRolePolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -345,6 +376,10 @@ func (*awsAwsquery_serializeOpAttachUserPolicy) ID() string { func (m *awsAwsquery_serializeOpAttachUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -396,6 +431,8 @@ func (m *awsAwsquery_serializeOpAttachUserPolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -409,6 +446,10 @@ func (*awsAwsquery_serializeOpChangePassword) ID() string { func (m *awsAwsquery_serializeOpChangePassword) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -460,6 +501,8 @@ func (m *awsAwsquery_serializeOpChangePassword) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -473,6 +516,10 @@ func (*awsAwsquery_serializeOpCreateAccessKey) ID() string { func (m *awsAwsquery_serializeOpCreateAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -524,6 +571,8 @@ func (m *awsAwsquery_serializeOpCreateAccessKey) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -537,6 +586,10 @@ func (*awsAwsquery_serializeOpCreateAccountAlias) ID() string { func (m *awsAwsquery_serializeOpCreateAccountAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -588,6 +641,8 @@ func (m *awsAwsquery_serializeOpCreateAccountAlias) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -601,6 +656,10 @@ func (*awsAwsquery_serializeOpCreateGroup) ID() string { func (m *awsAwsquery_serializeOpCreateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -652,6 +711,8 @@ func (m *awsAwsquery_serializeOpCreateGroup) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -665,6 +726,10 @@ func (*awsAwsquery_serializeOpCreateInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpCreateInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -716,6 +781,8 @@ func (m *awsAwsquery_serializeOpCreateInstanceProfile) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -729,6 +796,10 @@ func (*awsAwsquery_serializeOpCreateLoginProfile) ID() string { func (m *awsAwsquery_serializeOpCreateLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -780,6 +851,8 @@ func (m *awsAwsquery_serializeOpCreateLoginProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -793,6 +866,10 @@ func (*awsAwsquery_serializeOpCreateOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpCreateOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -844,6 +921,8 @@ func (m *awsAwsquery_serializeOpCreateOpenIDConnectProvider) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -857,6 +936,10 @@ func (*awsAwsquery_serializeOpCreatePolicy) ID() string { func (m *awsAwsquery_serializeOpCreatePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -908,6 +991,8 @@ func (m *awsAwsquery_serializeOpCreatePolicy) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -921,6 +1006,10 @@ func (*awsAwsquery_serializeOpCreatePolicyVersion) ID() string { func (m *awsAwsquery_serializeOpCreatePolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -972,6 +1061,8 @@ func (m *awsAwsquery_serializeOpCreatePolicyVersion) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -985,6 +1076,10 @@ func (*awsAwsquery_serializeOpCreateRole) ID() string { func (m *awsAwsquery_serializeOpCreateRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1036,6 +1131,8 @@ func (m *awsAwsquery_serializeOpCreateRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1049,6 +1146,10 @@ func (*awsAwsquery_serializeOpCreateSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpCreateSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1100,6 +1201,8 @@ func (m *awsAwsquery_serializeOpCreateSAMLProvider) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1113,6 +1216,10 @@ func (*awsAwsquery_serializeOpCreateServiceLinkedRole) ID() string { func (m *awsAwsquery_serializeOpCreateServiceLinkedRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1164,6 +1271,8 @@ func (m *awsAwsquery_serializeOpCreateServiceLinkedRole) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1177,6 +1286,10 @@ func (*awsAwsquery_serializeOpCreateServiceSpecificCredential) ID() string { func (m *awsAwsquery_serializeOpCreateServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1228,6 +1341,8 @@ func (m *awsAwsquery_serializeOpCreateServiceSpecificCredential) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1241,6 +1356,10 @@ func (*awsAwsquery_serializeOpCreateUser) ID() string { func (m *awsAwsquery_serializeOpCreateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1292,6 +1411,8 @@ func (m *awsAwsquery_serializeOpCreateUser) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1305,6 +1426,10 @@ func (*awsAwsquery_serializeOpCreateVirtualMFADevice) ID() string { func (m *awsAwsquery_serializeOpCreateVirtualMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1356,6 +1481,8 @@ func (m *awsAwsquery_serializeOpCreateVirtualMFADevice) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1369,6 +1496,10 @@ func (*awsAwsquery_serializeOpDeactivateMFADevice) ID() string { func (m *awsAwsquery_serializeOpDeactivateMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1420,6 +1551,8 @@ func (m *awsAwsquery_serializeOpDeactivateMFADevice) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1433,6 +1566,10 @@ func (*awsAwsquery_serializeOpDeleteAccessKey) ID() string { func (m *awsAwsquery_serializeOpDeleteAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1484,6 +1621,8 @@ func (m *awsAwsquery_serializeOpDeleteAccessKey) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1497,6 +1636,10 @@ func (*awsAwsquery_serializeOpDeleteAccountAlias) ID() string { func (m *awsAwsquery_serializeOpDeleteAccountAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1548,6 +1691,8 @@ func (m *awsAwsquery_serializeOpDeleteAccountAlias) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1561,6 +1706,10 @@ func (*awsAwsquery_serializeOpDeleteAccountPasswordPolicy) ID() string { func (m *awsAwsquery_serializeOpDeleteAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1608,6 +1757,8 @@ func (m *awsAwsquery_serializeOpDeleteAccountPasswordPolicy) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1621,6 +1772,10 @@ func (*awsAwsquery_serializeOpDeleteGroup) ID() string { func (m *awsAwsquery_serializeOpDeleteGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1672,6 +1827,8 @@ func (m *awsAwsquery_serializeOpDeleteGroup) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1685,6 +1842,10 @@ func (*awsAwsquery_serializeOpDeleteGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpDeleteGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1736,6 +1897,8 @@ func (m *awsAwsquery_serializeOpDeleteGroupPolicy) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1749,6 +1912,10 @@ func (*awsAwsquery_serializeOpDeleteInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpDeleteInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1800,6 +1967,8 @@ func (m *awsAwsquery_serializeOpDeleteInstanceProfile) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1813,6 +1982,10 @@ func (*awsAwsquery_serializeOpDeleteLoginProfile) ID() string { func (m *awsAwsquery_serializeOpDeleteLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1864,6 +2037,8 @@ func (m *awsAwsquery_serializeOpDeleteLoginProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1877,6 +2052,10 @@ func (*awsAwsquery_serializeOpDeleteOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpDeleteOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1928,6 +2107,8 @@ func (m *awsAwsquery_serializeOpDeleteOpenIDConnectProvider) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1941,6 +2122,10 @@ func (*awsAwsquery_serializeOpDeletePolicy) ID() string { func (m *awsAwsquery_serializeOpDeletePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1992,6 +2177,8 @@ func (m *awsAwsquery_serializeOpDeletePolicy) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2005,6 +2192,10 @@ func (*awsAwsquery_serializeOpDeletePolicyVersion) ID() string { func (m *awsAwsquery_serializeOpDeletePolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2056,6 +2247,8 @@ func (m *awsAwsquery_serializeOpDeletePolicyVersion) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2069,6 +2262,10 @@ func (*awsAwsquery_serializeOpDeleteRole) ID() string { func (m *awsAwsquery_serializeOpDeleteRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2120,6 +2317,8 @@ func (m *awsAwsquery_serializeOpDeleteRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2133,6 +2332,10 @@ func (*awsAwsquery_serializeOpDeleteRolePermissionsBoundary) ID() string { func (m *awsAwsquery_serializeOpDeleteRolePermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2184,6 +2387,8 @@ func (m *awsAwsquery_serializeOpDeleteRolePermissionsBoundary) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2197,6 +2402,10 @@ func (*awsAwsquery_serializeOpDeleteRolePolicy) ID() string { func (m *awsAwsquery_serializeOpDeleteRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2248,6 +2457,8 @@ func (m *awsAwsquery_serializeOpDeleteRolePolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2261,6 +2472,10 @@ func (*awsAwsquery_serializeOpDeleteSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpDeleteSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2312,6 +2527,8 @@ func (m *awsAwsquery_serializeOpDeleteSAMLProvider) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2325,6 +2542,10 @@ func (*awsAwsquery_serializeOpDeleteServerCertificate) ID() string { func (m *awsAwsquery_serializeOpDeleteServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2376,6 +2597,8 @@ func (m *awsAwsquery_serializeOpDeleteServerCertificate) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2389,6 +2612,10 @@ func (*awsAwsquery_serializeOpDeleteServiceLinkedRole) ID() string { func (m *awsAwsquery_serializeOpDeleteServiceLinkedRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2440,6 +2667,8 @@ func (m *awsAwsquery_serializeOpDeleteServiceLinkedRole) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2453,6 +2682,10 @@ func (*awsAwsquery_serializeOpDeleteServiceSpecificCredential) ID() string { func (m *awsAwsquery_serializeOpDeleteServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2504,6 +2737,8 @@ func (m *awsAwsquery_serializeOpDeleteServiceSpecificCredential) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2517,6 +2752,10 @@ func (*awsAwsquery_serializeOpDeleteSigningCertificate) ID() string { func (m *awsAwsquery_serializeOpDeleteSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2568,6 +2807,8 @@ func (m *awsAwsquery_serializeOpDeleteSigningCertificate) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2581,6 +2822,10 @@ func (*awsAwsquery_serializeOpDeleteSSHPublicKey) ID() string { func (m *awsAwsquery_serializeOpDeleteSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2632,6 +2877,8 @@ func (m *awsAwsquery_serializeOpDeleteSSHPublicKey) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2645,6 +2892,10 @@ func (*awsAwsquery_serializeOpDeleteUser) ID() string { func (m *awsAwsquery_serializeOpDeleteUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2696,6 +2947,8 @@ func (m *awsAwsquery_serializeOpDeleteUser) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2709,6 +2962,10 @@ func (*awsAwsquery_serializeOpDeleteUserPermissionsBoundary) ID() string { func (m *awsAwsquery_serializeOpDeleteUserPermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2760,6 +3017,8 @@ func (m *awsAwsquery_serializeOpDeleteUserPermissionsBoundary) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2773,6 +3032,10 @@ func (*awsAwsquery_serializeOpDeleteUserPolicy) ID() string { func (m *awsAwsquery_serializeOpDeleteUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2824,6 +3087,8 @@ func (m *awsAwsquery_serializeOpDeleteUserPolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2837,6 +3102,10 @@ func (*awsAwsquery_serializeOpDeleteVirtualMFADevice) ID() string { func (m *awsAwsquery_serializeOpDeleteVirtualMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2888,6 +3157,8 @@ func (m *awsAwsquery_serializeOpDeleteVirtualMFADevice) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2901,6 +3172,10 @@ func (*awsAwsquery_serializeOpDetachGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpDetachGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2952,6 +3227,8 @@ func (m *awsAwsquery_serializeOpDetachGroupPolicy) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2965,6 +3242,10 @@ func (*awsAwsquery_serializeOpDetachRolePolicy) ID() string { func (m *awsAwsquery_serializeOpDetachRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3016,6 +3297,8 @@ func (m *awsAwsquery_serializeOpDetachRolePolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3029,6 +3312,10 @@ func (*awsAwsquery_serializeOpDetachUserPolicy) ID() string { func (m *awsAwsquery_serializeOpDetachUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3080,6 +3367,8 @@ func (m *awsAwsquery_serializeOpDetachUserPolicy) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3093,6 +3382,10 @@ func (*awsAwsquery_serializeOpEnableMFADevice) ID() string { func (m *awsAwsquery_serializeOpEnableMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3144,6 +3437,8 @@ func (m *awsAwsquery_serializeOpEnableMFADevice) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3157,6 +3452,10 @@ func (*awsAwsquery_serializeOpGenerateCredentialReport) ID() string { func (m *awsAwsquery_serializeOpGenerateCredentialReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3204,6 +3503,8 @@ func (m *awsAwsquery_serializeOpGenerateCredentialReport) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3217,6 +3518,10 @@ func (*awsAwsquery_serializeOpGenerateOrganizationsAccessReport) ID() string { func (m *awsAwsquery_serializeOpGenerateOrganizationsAccessReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3268,6 +3573,8 @@ func (m *awsAwsquery_serializeOpGenerateOrganizationsAccessReport) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3281,6 +3588,10 @@ func (*awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) ID() string { func (m *awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3332,6 +3643,8 @@ func (m *awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3345,6 +3658,10 @@ func (*awsAwsquery_serializeOpGetAccessKeyLastUsed) ID() string { func (m *awsAwsquery_serializeOpGetAccessKeyLastUsed) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3396,6 +3713,8 @@ func (m *awsAwsquery_serializeOpGetAccessKeyLastUsed) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3409,6 +3728,10 @@ func (*awsAwsquery_serializeOpGetAccountAuthorizationDetails) ID() string { func (m *awsAwsquery_serializeOpGetAccountAuthorizationDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3460,6 +3783,8 @@ func (m *awsAwsquery_serializeOpGetAccountAuthorizationDetails) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3473,6 +3798,10 @@ func (*awsAwsquery_serializeOpGetAccountPasswordPolicy) ID() string { func (m *awsAwsquery_serializeOpGetAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3520,6 +3849,8 @@ func (m *awsAwsquery_serializeOpGetAccountPasswordPolicy) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3533,6 +3864,10 @@ func (*awsAwsquery_serializeOpGetAccountSummary) ID() string { func (m *awsAwsquery_serializeOpGetAccountSummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3580,6 +3915,8 @@ func (m *awsAwsquery_serializeOpGetAccountSummary) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3593,6 +3930,10 @@ func (*awsAwsquery_serializeOpGetContextKeysForCustomPolicy) ID() string { func (m *awsAwsquery_serializeOpGetContextKeysForCustomPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3644,6 +3985,8 @@ func (m *awsAwsquery_serializeOpGetContextKeysForCustomPolicy) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3657,6 +4000,10 @@ func (*awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) ID() string { func (m *awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3708,6 +4055,8 @@ func (m *awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) HandleSerializ } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3721,6 +4070,10 @@ func (*awsAwsquery_serializeOpGetCredentialReport) ID() string { func (m *awsAwsquery_serializeOpGetCredentialReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3768,6 +4121,8 @@ func (m *awsAwsquery_serializeOpGetCredentialReport) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3781,6 +4136,10 @@ func (*awsAwsquery_serializeOpGetGroup) ID() string { func (m *awsAwsquery_serializeOpGetGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3832,6 +4191,8 @@ func (m *awsAwsquery_serializeOpGetGroup) HandleSerialize(ctx context.Context, i } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3845,6 +4206,10 @@ func (*awsAwsquery_serializeOpGetGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpGetGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3896,6 +4261,8 @@ func (m *awsAwsquery_serializeOpGetGroupPolicy) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3909,6 +4276,10 @@ func (*awsAwsquery_serializeOpGetInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpGetInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3960,6 +4331,8 @@ func (m *awsAwsquery_serializeOpGetInstanceProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3973,6 +4346,10 @@ func (*awsAwsquery_serializeOpGetLoginProfile) ID() string { func (m *awsAwsquery_serializeOpGetLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4024,6 +4401,8 @@ func (m *awsAwsquery_serializeOpGetLoginProfile) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4037,6 +4416,10 @@ func (*awsAwsquery_serializeOpGetMFADevice) ID() string { func (m *awsAwsquery_serializeOpGetMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4088,6 +4471,8 @@ func (m *awsAwsquery_serializeOpGetMFADevice) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4101,6 +4486,10 @@ func (*awsAwsquery_serializeOpGetOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpGetOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4152,6 +4541,8 @@ func (m *awsAwsquery_serializeOpGetOpenIDConnectProvider) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4165,6 +4556,10 @@ func (*awsAwsquery_serializeOpGetOrganizationsAccessReport) ID() string { func (m *awsAwsquery_serializeOpGetOrganizationsAccessReport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4216,6 +4611,8 @@ func (m *awsAwsquery_serializeOpGetOrganizationsAccessReport) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4229,6 +4626,10 @@ func (*awsAwsquery_serializeOpGetPolicy) ID() string { func (m *awsAwsquery_serializeOpGetPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4280,6 +4681,8 @@ func (m *awsAwsquery_serializeOpGetPolicy) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4293,6 +4696,10 @@ func (*awsAwsquery_serializeOpGetPolicyVersion) ID() string { func (m *awsAwsquery_serializeOpGetPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4344,6 +4751,8 @@ func (m *awsAwsquery_serializeOpGetPolicyVersion) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4357,6 +4766,10 @@ func (*awsAwsquery_serializeOpGetRole) ID() string { func (m *awsAwsquery_serializeOpGetRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4408,6 +4821,8 @@ func (m *awsAwsquery_serializeOpGetRole) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4421,6 +4836,10 @@ func (*awsAwsquery_serializeOpGetRolePolicy) ID() string { func (m *awsAwsquery_serializeOpGetRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4472,6 +4891,8 @@ func (m *awsAwsquery_serializeOpGetRolePolicy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4485,6 +4906,10 @@ func (*awsAwsquery_serializeOpGetSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpGetSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4536,6 +4961,8 @@ func (m *awsAwsquery_serializeOpGetSAMLProvider) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4549,6 +4976,10 @@ func (*awsAwsquery_serializeOpGetServerCertificate) ID() string { func (m *awsAwsquery_serializeOpGetServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4600,6 +5031,8 @@ func (m *awsAwsquery_serializeOpGetServerCertificate) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4613,6 +5046,10 @@ func (*awsAwsquery_serializeOpGetServiceLastAccessedDetails) ID() string { func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4664,6 +5101,8 @@ func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetails) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4677,6 +5116,10 @@ func (*awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) ID() st func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4728,6 +5171,8 @@ func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) Handl } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4741,6 +5186,10 @@ func (*awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) ID() string { func (m *awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4792,6 +5241,8 @@ func (m *awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4805,6 +5256,10 @@ func (*awsAwsquery_serializeOpGetSSHPublicKey) ID() string { func (m *awsAwsquery_serializeOpGetSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4856,6 +5311,8 @@ func (m *awsAwsquery_serializeOpGetSSHPublicKey) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4869,6 +5326,10 @@ func (*awsAwsquery_serializeOpGetUser) ID() string { func (m *awsAwsquery_serializeOpGetUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4920,6 +5381,8 @@ func (m *awsAwsquery_serializeOpGetUser) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4933,6 +5396,10 @@ func (*awsAwsquery_serializeOpGetUserPolicy) ID() string { func (m *awsAwsquery_serializeOpGetUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4984,6 +5451,8 @@ func (m *awsAwsquery_serializeOpGetUserPolicy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4997,6 +5466,10 @@ func (*awsAwsquery_serializeOpListAccessKeys) ID() string { func (m *awsAwsquery_serializeOpListAccessKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5048,6 +5521,8 @@ func (m *awsAwsquery_serializeOpListAccessKeys) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5061,6 +5536,10 @@ func (*awsAwsquery_serializeOpListAccountAliases) ID() string { func (m *awsAwsquery_serializeOpListAccountAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5112,6 +5591,8 @@ func (m *awsAwsquery_serializeOpListAccountAliases) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5125,6 +5606,10 @@ func (*awsAwsquery_serializeOpListAttachedGroupPolicies) ID() string { func (m *awsAwsquery_serializeOpListAttachedGroupPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5176,6 +5661,8 @@ func (m *awsAwsquery_serializeOpListAttachedGroupPolicies) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5189,6 +5676,10 @@ func (*awsAwsquery_serializeOpListAttachedRolePolicies) ID() string { func (m *awsAwsquery_serializeOpListAttachedRolePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5240,6 +5731,8 @@ func (m *awsAwsquery_serializeOpListAttachedRolePolicies) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5253,6 +5746,10 @@ func (*awsAwsquery_serializeOpListAttachedUserPolicies) ID() string { func (m *awsAwsquery_serializeOpListAttachedUserPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5304,6 +5801,8 @@ func (m *awsAwsquery_serializeOpListAttachedUserPolicies) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5317,6 +5816,10 @@ func (*awsAwsquery_serializeOpListEntitiesForPolicy) ID() string { func (m *awsAwsquery_serializeOpListEntitiesForPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5368,6 +5871,8 @@ func (m *awsAwsquery_serializeOpListEntitiesForPolicy) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5381,6 +5886,10 @@ func (*awsAwsquery_serializeOpListGroupPolicies) ID() string { func (m *awsAwsquery_serializeOpListGroupPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5432,6 +5941,8 @@ func (m *awsAwsquery_serializeOpListGroupPolicies) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5445,6 +5956,10 @@ func (*awsAwsquery_serializeOpListGroups) ID() string { func (m *awsAwsquery_serializeOpListGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5496,6 +6011,8 @@ func (m *awsAwsquery_serializeOpListGroups) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5509,6 +6026,10 @@ func (*awsAwsquery_serializeOpListGroupsForUser) ID() string { func (m *awsAwsquery_serializeOpListGroupsForUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5560,6 +6081,8 @@ func (m *awsAwsquery_serializeOpListGroupsForUser) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5573,6 +6096,10 @@ func (*awsAwsquery_serializeOpListInstanceProfiles) ID() string { func (m *awsAwsquery_serializeOpListInstanceProfiles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5624,6 +6151,8 @@ func (m *awsAwsquery_serializeOpListInstanceProfiles) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5637,6 +6166,10 @@ func (*awsAwsquery_serializeOpListInstanceProfilesForRole) ID() string { func (m *awsAwsquery_serializeOpListInstanceProfilesForRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5688,6 +6221,8 @@ func (m *awsAwsquery_serializeOpListInstanceProfilesForRole) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5701,6 +6236,10 @@ func (*awsAwsquery_serializeOpListInstanceProfileTags) ID() string { func (m *awsAwsquery_serializeOpListInstanceProfileTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5752,6 +6291,8 @@ func (m *awsAwsquery_serializeOpListInstanceProfileTags) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5765,6 +6306,10 @@ func (*awsAwsquery_serializeOpListMFADevices) ID() string { func (m *awsAwsquery_serializeOpListMFADevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5816,6 +6361,8 @@ func (m *awsAwsquery_serializeOpListMFADevices) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5829,6 +6376,10 @@ func (*awsAwsquery_serializeOpListMFADeviceTags) ID() string { func (m *awsAwsquery_serializeOpListMFADeviceTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5880,6 +6431,8 @@ func (m *awsAwsquery_serializeOpListMFADeviceTags) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5893,6 +6446,10 @@ func (*awsAwsquery_serializeOpListOpenIDConnectProviders) ID() string { func (m *awsAwsquery_serializeOpListOpenIDConnectProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5940,6 +6497,8 @@ func (m *awsAwsquery_serializeOpListOpenIDConnectProviders) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5953,6 +6512,10 @@ func (*awsAwsquery_serializeOpListOpenIDConnectProviderTags) ID() string { func (m *awsAwsquery_serializeOpListOpenIDConnectProviderTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6004,6 +6567,8 @@ func (m *awsAwsquery_serializeOpListOpenIDConnectProviderTags) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6017,6 +6582,10 @@ func (*awsAwsquery_serializeOpListPolicies) ID() string { func (m *awsAwsquery_serializeOpListPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6068,6 +6637,8 @@ func (m *awsAwsquery_serializeOpListPolicies) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6081,6 +6652,10 @@ func (*awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) ID() string { func (m *awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6132,6 +6707,8 @@ func (m *awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6145,6 +6722,10 @@ func (*awsAwsquery_serializeOpListPolicyTags) ID() string { func (m *awsAwsquery_serializeOpListPolicyTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6196,6 +6777,8 @@ func (m *awsAwsquery_serializeOpListPolicyTags) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6209,6 +6792,10 @@ func (*awsAwsquery_serializeOpListPolicyVersions) ID() string { func (m *awsAwsquery_serializeOpListPolicyVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6260,6 +6847,8 @@ func (m *awsAwsquery_serializeOpListPolicyVersions) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6273,6 +6862,10 @@ func (*awsAwsquery_serializeOpListRolePolicies) ID() string { func (m *awsAwsquery_serializeOpListRolePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6324,6 +6917,8 @@ func (m *awsAwsquery_serializeOpListRolePolicies) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6337,6 +6932,10 @@ func (*awsAwsquery_serializeOpListRoles) ID() string { func (m *awsAwsquery_serializeOpListRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6388,6 +6987,8 @@ func (m *awsAwsquery_serializeOpListRoles) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6401,6 +7002,10 @@ func (*awsAwsquery_serializeOpListRoleTags) ID() string { func (m *awsAwsquery_serializeOpListRoleTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6452,6 +7057,8 @@ func (m *awsAwsquery_serializeOpListRoleTags) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6465,6 +7072,10 @@ func (*awsAwsquery_serializeOpListSAMLProviders) ID() string { func (m *awsAwsquery_serializeOpListSAMLProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6512,6 +7123,8 @@ func (m *awsAwsquery_serializeOpListSAMLProviders) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6525,6 +7138,10 @@ func (*awsAwsquery_serializeOpListSAMLProviderTags) ID() string { func (m *awsAwsquery_serializeOpListSAMLProviderTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6576,6 +7193,8 @@ func (m *awsAwsquery_serializeOpListSAMLProviderTags) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6589,6 +7208,10 @@ func (*awsAwsquery_serializeOpListServerCertificates) ID() string { func (m *awsAwsquery_serializeOpListServerCertificates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6640,6 +7263,8 @@ func (m *awsAwsquery_serializeOpListServerCertificates) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6653,6 +7278,10 @@ func (*awsAwsquery_serializeOpListServerCertificateTags) ID() string { func (m *awsAwsquery_serializeOpListServerCertificateTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6704,6 +7333,8 @@ func (m *awsAwsquery_serializeOpListServerCertificateTags) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6717,6 +7348,10 @@ func (*awsAwsquery_serializeOpListServiceSpecificCredentials) ID() string { func (m *awsAwsquery_serializeOpListServiceSpecificCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6768,6 +7403,8 @@ func (m *awsAwsquery_serializeOpListServiceSpecificCredentials) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6781,6 +7418,10 @@ func (*awsAwsquery_serializeOpListSigningCertificates) ID() string { func (m *awsAwsquery_serializeOpListSigningCertificates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6832,6 +7473,8 @@ func (m *awsAwsquery_serializeOpListSigningCertificates) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6845,6 +7488,10 @@ func (*awsAwsquery_serializeOpListSSHPublicKeys) ID() string { func (m *awsAwsquery_serializeOpListSSHPublicKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6896,6 +7543,8 @@ func (m *awsAwsquery_serializeOpListSSHPublicKeys) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6909,6 +7558,10 @@ func (*awsAwsquery_serializeOpListUserPolicies) ID() string { func (m *awsAwsquery_serializeOpListUserPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6960,6 +7613,8 @@ func (m *awsAwsquery_serializeOpListUserPolicies) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6973,6 +7628,10 @@ func (*awsAwsquery_serializeOpListUsers) ID() string { func (m *awsAwsquery_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7024,6 +7683,8 @@ func (m *awsAwsquery_serializeOpListUsers) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7037,6 +7698,10 @@ func (*awsAwsquery_serializeOpListUserTags) ID() string { func (m *awsAwsquery_serializeOpListUserTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7088,6 +7753,8 @@ func (m *awsAwsquery_serializeOpListUserTags) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7101,6 +7768,10 @@ func (*awsAwsquery_serializeOpListVirtualMFADevices) ID() string { func (m *awsAwsquery_serializeOpListVirtualMFADevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7152,6 +7823,8 @@ func (m *awsAwsquery_serializeOpListVirtualMFADevices) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7165,6 +7838,10 @@ func (*awsAwsquery_serializeOpPutGroupPolicy) ID() string { func (m *awsAwsquery_serializeOpPutGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7216,6 +7893,8 @@ func (m *awsAwsquery_serializeOpPutGroupPolicy) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7229,6 +7908,10 @@ func (*awsAwsquery_serializeOpPutRolePermissionsBoundary) ID() string { func (m *awsAwsquery_serializeOpPutRolePermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7280,6 +7963,8 @@ func (m *awsAwsquery_serializeOpPutRolePermissionsBoundary) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7293,6 +7978,10 @@ func (*awsAwsquery_serializeOpPutRolePolicy) ID() string { func (m *awsAwsquery_serializeOpPutRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7344,6 +8033,8 @@ func (m *awsAwsquery_serializeOpPutRolePolicy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7357,6 +8048,10 @@ func (*awsAwsquery_serializeOpPutUserPermissionsBoundary) ID() string { func (m *awsAwsquery_serializeOpPutUserPermissionsBoundary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7408,6 +8103,8 @@ func (m *awsAwsquery_serializeOpPutUserPermissionsBoundary) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7421,6 +8118,10 @@ func (*awsAwsquery_serializeOpPutUserPolicy) ID() string { func (m *awsAwsquery_serializeOpPutUserPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7472,6 +8173,8 @@ func (m *awsAwsquery_serializeOpPutUserPolicy) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7485,6 +8188,10 @@ func (*awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) ID() stri func (m *awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7536,6 +8243,8 @@ func (m *awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) HandleS } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7549,6 +8258,10 @@ func (*awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7600,6 +8313,8 @@ func (m *awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7613,6 +8328,10 @@ func (*awsAwsquery_serializeOpRemoveUserFromGroup) ID() string { func (m *awsAwsquery_serializeOpRemoveUserFromGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7664,6 +8383,8 @@ func (m *awsAwsquery_serializeOpRemoveUserFromGroup) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7677,6 +8398,10 @@ func (*awsAwsquery_serializeOpResetServiceSpecificCredential) ID() string { func (m *awsAwsquery_serializeOpResetServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7728,6 +8453,8 @@ func (m *awsAwsquery_serializeOpResetServiceSpecificCredential) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7741,6 +8468,10 @@ func (*awsAwsquery_serializeOpResyncMFADevice) ID() string { func (m *awsAwsquery_serializeOpResyncMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7792,6 +8523,8 @@ func (m *awsAwsquery_serializeOpResyncMFADevice) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7805,6 +8538,10 @@ func (*awsAwsquery_serializeOpSetDefaultPolicyVersion) ID() string { func (m *awsAwsquery_serializeOpSetDefaultPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7856,6 +8593,8 @@ func (m *awsAwsquery_serializeOpSetDefaultPolicyVersion) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7869,6 +8608,10 @@ func (*awsAwsquery_serializeOpSetSecurityTokenServicePreferences) ID() string { func (m *awsAwsquery_serializeOpSetSecurityTokenServicePreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7920,6 +8663,8 @@ func (m *awsAwsquery_serializeOpSetSecurityTokenServicePreferences) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7933,6 +8678,10 @@ func (*awsAwsquery_serializeOpSimulateCustomPolicy) ID() string { func (m *awsAwsquery_serializeOpSimulateCustomPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7984,6 +8733,8 @@ func (m *awsAwsquery_serializeOpSimulateCustomPolicy) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7997,6 +8748,10 @@ func (*awsAwsquery_serializeOpSimulatePrincipalPolicy) ID() string { func (m *awsAwsquery_serializeOpSimulatePrincipalPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8048,6 +8803,8 @@ func (m *awsAwsquery_serializeOpSimulatePrincipalPolicy) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8061,6 +8818,10 @@ func (*awsAwsquery_serializeOpTagInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpTagInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8112,6 +8873,8 @@ func (m *awsAwsquery_serializeOpTagInstanceProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8125,6 +8888,10 @@ func (*awsAwsquery_serializeOpTagMFADevice) ID() string { func (m *awsAwsquery_serializeOpTagMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8176,6 +8943,8 @@ func (m *awsAwsquery_serializeOpTagMFADevice) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8189,6 +8958,10 @@ func (*awsAwsquery_serializeOpTagOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpTagOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8240,6 +9013,8 @@ func (m *awsAwsquery_serializeOpTagOpenIDConnectProvider) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8253,6 +9028,10 @@ func (*awsAwsquery_serializeOpTagPolicy) ID() string { func (m *awsAwsquery_serializeOpTagPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8304,6 +9083,8 @@ func (m *awsAwsquery_serializeOpTagPolicy) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8317,6 +9098,10 @@ func (*awsAwsquery_serializeOpTagRole) ID() string { func (m *awsAwsquery_serializeOpTagRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8368,6 +9153,8 @@ func (m *awsAwsquery_serializeOpTagRole) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8381,6 +9168,10 @@ func (*awsAwsquery_serializeOpTagSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpTagSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8432,6 +9223,8 @@ func (m *awsAwsquery_serializeOpTagSAMLProvider) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8445,6 +9238,10 @@ func (*awsAwsquery_serializeOpTagServerCertificate) ID() string { func (m *awsAwsquery_serializeOpTagServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8496,6 +9293,8 @@ func (m *awsAwsquery_serializeOpTagServerCertificate) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8509,6 +9308,10 @@ func (*awsAwsquery_serializeOpTagUser) ID() string { func (m *awsAwsquery_serializeOpTagUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8560,6 +9363,8 @@ func (m *awsAwsquery_serializeOpTagUser) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8573,6 +9378,10 @@ func (*awsAwsquery_serializeOpUntagInstanceProfile) ID() string { func (m *awsAwsquery_serializeOpUntagInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8624,6 +9433,8 @@ func (m *awsAwsquery_serializeOpUntagInstanceProfile) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8637,6 +9448,10 @@ func (*awsAwsquery_serializeOpUntagMFADevice) ID() string { func (m *awsAwsquery_serializeOpUntagMFADevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8688,6 +9503,8 @@ func (m *awsAwsquery_serializeOpUntagMFADevice) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8701,6 +9518,10 @@ func (*awsAwsquery_serializeOpUntagOpenIDConnectProvider) ID() string { func (m *awsAwsquery_serializeOpUntagOpenIDConnectProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8752,6 +9573,8 @@ func (m *awsAwsquery_serializeOpUntagOpenIDConnectProvider) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8765,6 +9588,10 @@ func (*awsAwsquery_serializeOpUntagPolicy) ID() string { func (m *awsAwsquery_serializeOpUntagPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8816,6 +9643,8 @@ func (m *awsAwsquery_serializeOpUntagPolicy) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8829,6 +9658,10 @@ func (*awsAwsquery_serializeOpUntagRole) ID() string { func (m *awsAwsquery_serializeOpUntagRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8880,6 +9713,8 @@ func (m *awsAwsquery_serializeOpUntagRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8893,6 +9728,10 @@ func (*awsAwsquery_serializeOpUntagSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpUntagSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -8944,6 +9783,8 @@ func (m *awsAwsquery_serializeOpUntagSAMLProvider) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -8957,6 +9798,10 @@ func (*awsAwsquery_serializeOpUntagServerCertificate) ID() string { func (m *awsAwsquery_serializeOpUntagServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9008,6 +9853,8 @@ func (m *awsAwsquery_serializeOpUntagServerCertificate) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9021,6 +9868,10 @@ func (*awsAwsquery_serializeOpUntagUser) ID() string { func (m *awsAwsquery_serializeOpUntagUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9072,6 +9923,8 @@ func (m *awsAwsquery_serializeOpUntagUser) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9085,6 +9938,10 @@ func (*awsAwsquery_serializeOpUpdateAccessKey) ID() string { func (m *awsAwsquery_serializeOpUpdateAccessKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9136,6 +9993,8 @@ func (m *awsAwsquery_serializeOpUpdateAccessKey) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9149,6 +10008,10 @@ func (*awsAwsquery_serializeOpUpdateAccountPasswordPolicy) ID() string { func (m *awsAwsquery_serializeOpUpdateAccountPasswordPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9200,6 +10063,8 @@ func (m *awsAwsquery_serializeOpUpdateAccountPasswordPolicy) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9213,6 +10078,10 @@ func (*awsAwsquery_serializeOpUpdateAssumeRolePolicy) ID() string { func (m *awsAwsquery_serializeOpUpdateAssumeRolePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9264,6 +10133,8 @@ func (m *awsAwsquery_serializeOpUpdateAssumeRolePolicy) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9277,6 +10148,10 @@ func (*awsAwsquery_serializeOpUpdateGroup) ID() string { func (m *awsAwsquery_serializeOpUpdateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9328,6 +10203,8 @@ func (m *awsAwsquery_serializeOpUpdateGroup) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9341,6 +10218,10 @@ func (*awsAwsquery_serializeOpUpdateLoginProfile) ID() string { func (m *awsAwsquery_serializeOpUpdateLoginProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9392,6 +10273,8 @@ func (m *awsAwsquery_serializeOpUpdateLoginProfile) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9405,6 +10288,10 @@ func (*awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) ID() string func (m *awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9456,6 +10343,8 @@ func (m *awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) HandleSer } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9469,6 +10358,10 @@ func (*awsAwsquery_serializeOpUpdateRole) ID() string { func (m *awsAwsquery_serializeOpUpdateRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9520,6 +10413,8 @@ func (m *awsAwsquery_serializeOpUpdateRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9533,6 +10428,10 @@ func (*awsAwsquery_serializeOpUpdateRoleDescription) ID() string { func (m *awsAwsquery_serializeOpUpdateRoleDescription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9584,6 +10483,8 @@ func (m *awsAwsquery_serializeOpUpdateRoleDescription) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9597,6 +10498,10 @@ func (*awsAwsquery_serializeOpUpdateSAMLProvider) ID() string { func (m *awsAwsquery_serializeOpUpdateSAMLProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9648,6 +10553,8 @@ func (m *awsAwsquery_serializeOpUpdateSAMLProvider) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9661,6 +10568,10 @@ func (*awsAwsquery_serializeOpUpdateServerCertificate) ID() string { func (m *awsAwsquery_serializeOpUpdateServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9712,6 +10623,8 @@ func (m *awsAwsquery_serializeOpUpdateServerCertificate) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9725,6 +10638,10 @@ func (*awsAwsquery_serializeOpUpdateServiceSpecificCredential) ID() string { func (m *awsAwsquery_serializeOpUpdateServiceSpecificCredential) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9776,6 +10693,8 @@ func (m *awsAwsquery_serializeOpUpdateServiceSpecificCredential) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9789,6 +10708,10 @@ func (*awsAwsquery_serializeOpUpdateSigningCertificate) ID() string { func (m *awsAwsquery_serializeOpUpdateSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9840,6 +10763,8 @@ func (m *awsAwsquery_serializeOpUpdateSigningCertificate) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9853,6 +10778,10 @@ func (*awsAwsquery_serializeOpUpdateSSHPublicKey) ID() string { func (m *awsAwsquery_serializeOpUpdateSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9904,6 +10833,8 @@ func (m *awsAwsquery_serializeOpUpdateSSHPublicKey) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9917,6 +10848,10 @@ func (*awsAwsquery_serializeOpUpdateUser) ID() string { func (m *awsAwsquery_serializeOpUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -9968,6 +10903,8 @@ func (m *awsAwsquery_serializeOpUpdateUser) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -9981,6 +10918,10 @@ func (*awsAwsquery_serializeOpUploadServerCertificate) ID() string { func (m *awsAwsquery_serializeOpUploadServerCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -10032,6 +10973,8 @@ func (m *awsAwsquery_serializeOpUploadServerCertificate) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -10045,6 +10988,10 @@ func (*awsAwsquery_serializeOpUploadSigningCertificate) ID() string { func (m *awsAwsquery_serializeOpUploadSigningCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -10096,6 +11043,8 @@ func (m *awsAwsquery_serializeOpUploadSigningCertificate) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -10109,6 +11058,10 @@ func (*awsAwsquery_serializeOpUploadSSHPublicKey) ID() string { func (m *awsAwsquery_serializeOpUploadSSHPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -10160,6 +11113,8 @@ func (m *awsAwsquery_serializeOpUploadSSHPublicKey) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsquery_serializeDocumentActionNameListType(v []string, value query.Value) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go index a3f8b4e..e3798d8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/iam/types/types.go @@ -113,21 +113,6 @@ type AccessKey struct { // This data type is used as a response element in the GetAccessKeyLastUsed operation. type AccessKeyLastUsed struct { - // The date and time, in [ISO 8601 date-time format], when the access key was most recently used. This field - // is null in the following situations: - // - // - The user does not have an access key. - // - // - An access key exists but has not been used since IAM began tracking this - // information. - // - // - There is no sign-in data associated with the user. - // - // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 - // - // This member is required. - LastUsedDate *time.Time - // The Amazon Web Services Region where this access key was most recently used. // The value for this field is "N/A" in the following situations: // @@ -159,6 +144,19 @@ type AccessKeyLastUsed struct { // This member is required. ServiceName *string + // The date and time, in [ISO 8601 date-time format], when the access key was most recently used. This field + // is null in the following situations: + // + // - The user does not have an access key. + // + // - An access key exists but has not been used since IAM began tracking this + // information. + // + // - There is no sign-in data associated with the user. + // + // [ISO 8601 date-time format]: http://www.iso.org/iso/iso8601 + LastUsedDate *time.Time + noSmithyDocumentSerde } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md index d4bc00f..297618f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md @@ -1,3 +1,7 @@ +# v1.12.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. + # v1.11.5 (2024-09-20) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go index 823c5f1..4e50b25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go @@ -3,4 +3,4 @@ package acceptencoding // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.5" +const goModuleVersion = "1.12.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/CHANGELOG.md index d34477c..0bbee65 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/CHANGELOG.md @@ -1,3 +1,24 @@ +# v1.10.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.9.19 (2024-09-20) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/go_module_metadata.go index 56cfd77..5fd8b7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery/go_module_metadata.go @@ -3,4 +3,4 @@ package endpointdiscovery // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.9.19" +const goModuleVersion = "1.10.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md index 2876433..64a3e05 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md @@ -1,3 +1,24 @@ +# v1.12.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.20 (2024-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.19 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.11.18 (2024-08-15) * **Dependency Update**: Bump minimum Go version to 1.21. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go index 4c93989..10981a5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go @@ -3,4 +3,4 @@ package presignedurl // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.18" +const goModuleVersion = "1.12.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/CHANGELOG.md index df777a4..d0be1c5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/CHANGELOG.md @@ -1,3 +1,49 @@ +# v1.36.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.35.4 (2024-10-03) + +* No change notes available for this release. + +# v1.35.3 (2024-09-27) + +* No change notes available for this release. + +# v1.35.2 (2024-09-25) + +* No change notes available for this release. + +# v1.35.1 (2024-09-23) + +* No change notes available for this release. + +# v1.35.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.9 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.34.8 (2024-09-04) + +* No change notes available for this release. + # v1.34.7 (2024-09-03) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_client.go index e6bf506..5a45cad 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_client.go @@ -4,6 +4,7 @@ package sqs import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -30,6 +33,133 @@ import ( const ServiceID = "SQS" const ServiceAPIVersion = "2012-11-05" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sqs") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/sqs") +} + // Client provides the API client to make operations call for Amazon Simple Queue // Service. type Client struct { @@ -57,6 +187,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -89,8 +223,15 @@ func (c *Client) Options() Options { return c.options.Copy() } -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() @@ -114,15 +255,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + ctx, err = withOperationMetrics(ctx, options.MeterProvider) if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sqs") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + return result, metadata, err } @@ -160,7 +342,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { return fmt.Errorf("add ResolveEndpointV2: %v", err) } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -238,16 +420,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -435,6 +616,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) } @@ -478,6 +683,7 @@ func addIsPaginatorUserAgent(o *Options) { func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sqs") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -541,25 +747,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -575,6 +762,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } @@ -626,3 +825,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_AddPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_AddPermission.go index 0577750..aa538e1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_AddPermission.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_AddPermission.go @@ -146,6 +146,9 @@ func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -185,6 +188,18 @@ func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CancelMessageMoveTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CancelMessageMoveTask.go index c88b798..7063f31 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CancelMessageMoveTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CancelMessageMoveTask.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCancelMessageMoveTaskMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationCancelMessageMoveTaskMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibility.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibility.go index 163f080..b0ba3f4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibility.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibility.go @@ -155,6 +155,9 @@ func (c *Client) addOperationChangeMessageVisibilityMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -194,6 +197,18 @@ func (c *Client) addOperationChangeMessageVisibilityMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibilityBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibilityBatch.go index 2b031c9..df8b93c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibilityBatch.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ChangeMessageVisibilityBatch.go @@ -115,6 +115,9 @@ func (c *Client) addOperationChangeMessageVisibilityBatchMiddlewares(stack *midd if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -154,6 +157,18 @@ func (c *Client) addOperationChangeMessageVisibilityBatchMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CreateQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CreateQueue.go index 4d8d1c7..9fb6d58 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CreateQueue.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_CreateQueue.go @@ -339,6 +339,9 @@ func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -378,6 +381,18 @@ func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessage.go index c365e5a..f650497 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessage.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteMessageMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -150,6 +153,18 @@ func (c *Client) addOperationDeleteMessageMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessageBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessageBatch.go index 8b35d18..957a661 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessageBatch.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteMessageBatch.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteMessageBatchMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -152,6 +155,18 @@ func (c *Client) addOperationDeleteMessageBatchMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteQueue.go index c25d766..bb6c68c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteQueue.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_DeleteQueue.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueAttributes.go index 5b64a2b..8e0894a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueAttributes.go @@ -263,6 +263,9 @@ func (c *Client) addOperationGetQueueAttributesMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -302,6 +305,18 @@ func (c *Client) addOperationGetQueueAttributesMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueUrl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueUrl.go index 4464105..b5bf563 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueUrl.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_GetQueueUrl.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetQueueUrlMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationGetQueueUrlMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListDeadLetterSourceQueues.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListDeadLetterSourceQueues.go index e6ad745..a66822f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListDeadLetterSourceQueues.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListDeadLetterSourceQueues.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDeadLetterSourceQueuesMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -161,6 +164,18 @@ func (c *Client) addOperationListDeadLetterSourceQueuesMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListMessageMoveTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListMessageMoveTasks.go index c315f91..b1b2eb3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListMessageMoveTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListMessageMoveTasks.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListMessageMoveTasksMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationListMessageMoveTasksMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueueTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueueTags.go index a84da75..b591fbd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueueTags.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueueTags.go @@ -97,6 +97,9 @@ func (c *Client) addOperationListQueueTagsMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -136,6 +139,18 @@ func (c *Client) addOperationListQueueTagsMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueues.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueues.go index 5ebf564..81bb939 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueues.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ListQueues.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -156,6 +159,18 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_PurgeQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_PurgeQueue.go index 4781c01..7e40b78 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_PurgeQueue.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_PurgeQueue.go @@ -101,6 +101,9 @@ func (c *Client) addOperationPurgeQueueMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationPurgeQueueMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ReceiveMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ReceiveMessage.go index 3245a40..b48d323 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ReceiveMessage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_ReceiveMessage.go @@ -326,6 +326,9 @@ func (c *Client) addOperationReceiveMessageMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -368,6 +371,18 @@ func (c *Client) addOperationReceiveMessageMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_RemovePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_RemovePermission.go index a83f4d9..f5b2458 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_RemovePermission.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_RemovePermission.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessage.go index 739dcdb..e040255 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessage.go @@ -264,6 +264,9 @@ func (c *Client) addOperationSendMessageMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -306,6 +309,18 @@ func (c *Client) addOperationSendMessageMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessageBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessageBatch.go index cd32a31..55c8727 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessageBatch.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SendMessageBatch.go @@ -134,6 +134,9 @@ func (c *Client) addOperationSendMessageBatchMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -176,6 +179,18 @@ func (c *Client) addOperationSendMessageBatchMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SetQueueAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SetQueueAttributes.go index 0a20b06..a409d75 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SetQueueAttributes.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_SetQueueAttributes.go @@ -271,6 +271,9 @@ func (c *Client) addOperationSetQueueAttributesMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -310,6 +313,18 @@ func (c *Client) addOperationSetQueueAttributesMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_StartMessageMoveTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_StartMessageMoveTask.go index 378e78c..a0944ca 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_StartMessageMoveTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_StartMessageMoveTask.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStartMessageMoveTaskMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -163,6 +166,18 @@ func (c *Client) addOperationStartMessageMoveTaskMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_TagQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_TagQueue.go index 8a062de..40e0e95 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_TagQueue.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_TagQueue.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagQueueMiddlewares(stack *middleware.Stack, option if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -152,6 +155,18 @@ func (c *Client) addOperationTagQueueMiddlewares(stack *middleware.Stack, option if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_UntagQueue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_UntagQueue.go index 3129e81..a4fdb29 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_UntagQueue.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/api_op_UntagQueue.go @@ -98,6 +98,9 @@ func (c *Client) addOperationUntagQueueMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationUntagQueueMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/auth.go index 820536c..f1f4188 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/auth.go @@ -8,7 +8,9 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -145,6 +147,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -157,6 +162,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -216,7 +224,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -226,12 +237,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) if err != nil { return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) + + span.End() return next.HandleFinalize(ctx, in) } @@ -247,6 +266,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -256,6 +276,9 @@ func (*signRequestMiddleware) ID() string { func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) @@ -276,9 +299,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { return out, metadata, fmt.Errorf("sign request: %w", err) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/deserializers.go index dc5eeae..cf56cbe 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/deserializers.go @@ -15,6 +15,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" @@ -45,6 +46,10 @@ func (m *awsAwsjson10_deserializeOpAddPermission) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -149,6 +154,10 @@ func (m *awsAwsjson10_deserializeOpCancelMessageMoveTask) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -272,6 +281,10 @@ func (m *awsAwsjson10_deserializeOpChangeMessageVisibility) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -379,6 +392,10 @@ func (m *awsAwsjson10_deserializeOpChangeMessageVisibilityBatch) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -514,6 +531,10 @@ func (m *awsAwsjson10_deserializeOpCreateQueue) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -646,6 +667,10 @@ func (m *awsAwsjson10_deserializeOpDeleteMessage) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -753,6 +778,10 @@ func (m *awsAwsjson10_deserializeOpDeleteMessageBatch) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -888,6 +917,10 @@ func (m *awsAwsjson10_deserializeOpDeleteQueue) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -989,6 +1022,10 @@ func (m *awsAwsjson10_deserializeOpGetQueueAttributes) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1115,6 +1152,10 @@ func (m *awsAwsjson10_deserializeOpGetQueueUrl) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1238,6 +1279,10 @@ func (m *awsAwsjson10_deserializeOpListDeadLetterSourceQueues) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1361,6 +1406,10 @@ func (m *awsAwsjson10_deserializeOpListMessageMoveTasks) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1484,6 +1533,10 @@ func (m *awsAwsjson10_deserializeOpListQueues) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1604,6 +1657,10 @@ func (m *awsAwsjson10_deserializeOpListQueueTags) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1727,6 +1784,10 @@ func (m *awsAwsjson10_deserializeOpPurgeQueue) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1831,6 +1892,10 @@ func (m *awsAwsjson10_deserializeOpReceiveMessage) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1978,6 +2043,10 @@ func (m *awsAwsjson10_deserializeOpRemovePermission) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2079,6 +2148,10 @@ func (m *awsAwsjson10_deserializeOpSendMessage) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2226,6 +2299,10 @@ func (m *awsAwsjson10_deserializeOpSendMessageBatch) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2385,6 +2462,10 @@ func (m *awsAwsjson10_deserializeOpSetQueueAttributes) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2495,6 +2576,10 @@ func (m *awsAwsjson10_deserializeOpStartMessageMoveTask) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2618,6 +2703,10 @@ func (m *awsAwsjson10_deserializeOpTagQueue) HandleDeserialize(ctx context.Conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2719,6 +2808,10 @@ func (m *awsAwsjson10_deserializeOpUntagQueue) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/endpoints.go index 64e7a3f..ae64e93 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/endpoints.go @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -502,14 +503,13 @@ func (*resolveEndpointV2Middleware) ID() string { func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { return next.HandleFinalize(ctx, in) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -520,11 +520,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { endpt.URI.RawPath = endpt.URI.Path } @@ -546,5 +551,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/go_module_metadata.go index 319b200..c2cbba0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/go_module_metadata.go @@ -3,4 +3,4 @@ package sqs // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.34.7" +const goModuleVersion = "1.36.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints/endpoints.go index 91790a2..a818239 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/options.go index 92bc97d..5ff1727 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/options.go @@ -9,7 +9,9 @@ import ( internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" smithyauth "github.com/aws/smithy-go/auth" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -73,6 +72,9 @@ type Options struct { // The logger writer interface to write logging messages to. Logger logging.Logger + // The client meter provider. + MeterProvider metrics.MeterProvider + // The region to send requests to. (Required) Region string @@ -107,6 +109,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/serializers.go index 90d8492..14dd99c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sqs/serializers.go @@ -11,6 +11,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -25,6 +26,10 @@ func (*awsAwsjson10_serializeOpAddPermission) ID() string { func (m *awsAwsjson10_serializeOpAddPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -67,6 +72,8 @@ func (m *awsAwsjson10_serializeOpAddPermission) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -80,6 +87,10 @@ func (*awsAwsjson10_serializeOpCancelMessageMoveTask) ID() string { func (m *awsAwsjson10_serializeOpCancelMessageMoveTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -122,6 +133,8 @@ func (m *awsAwsjson10_serializeOpCancelMessageMoveTask) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -135,6 +148,10 @@ func (*awsAwsjson10_serializeOpChangeMessageVisibility) ID() string { func (m *awsAwsjson10_serializeOpChangeMessageVisibility) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -177,6 +194,8 @@ func (m *awsAwsjson10_serializeOpChangeMessageVisibility) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -190,6 +209,10 @@ func (*awsAwsjson10_serializeOpChangeMessageVisibilityBatch) ID() string { func (m *awsAwsjson10_serializeOpChangeMessageVisibilityBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -232,6 +255,8 @@ func (m *awsAwsjson10_serializeOpChangeMessageVisibilityBatch) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -245,6 +270,10 @@ func (*awsAwsjson10_serializeOpCreateQueue) ID() string { func (m *awsAwsjson10_serializeOpCreateQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -287,6 +316,8 @@ func (m *awsAwsjson10_serializeOpCreateQueue) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -300,6 +331,10 @@ func (*awsAwsjson10_serializeOpDeleteMessage) ID() string { func (m *awsAwsjson10_serializeOpDeleteMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -342,6 +377,8 @@ func (m *awsAwsjson10_serializeOpDeleteMessage) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -355,6 +392,10 @@ func (*awsAwsjson10_serializeOpDeleteMessageBatch) ID() string { func (m *awsAwsjson10_serializeOpDeleteMessageBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -397,6 +438,8 @@ func (m *awsAwsjson10_serializeOpDeleteMessageBatch) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -410,6 +453,10 @@ func (*awsAwsjson10_serializeOpDeleteQueue) ID() string { func (m *awsAwsjson10_serializeOpDeleteQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -452,6 +499,8 @@ func (m *awsAwsjson10_serializeOpDeleteQueue) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -465,6 +514,10 @@ func (*awsAwsjson10_serializeOpGetQueueAttributes) ID() string { func (m *awsAwsjson10_serializeOpGetQueueAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -507,6 +560,8 @@ func (m *awsAwsjson10_serializeOpGetQueueAttributes) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -520,6 +575,10 @@ func (*awsAwsjson10_serializeOpGetQueueUrl) ID() string { func (m *awsAwsjson10_serializeOpGetQueueUrl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -562,6 +621,8 @@ func (m *awsAwsjson10_serializeOpGetQueueUrl) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -575,6 +636,10 @@ func (*awsAwsjson10_serializeOpListDeadLetterSourceQueues) ID() string { func (m *awsAwsjson10_serializeOpListDeadLetterSourceQueues) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -617,6 +682,8 @@ func (m *awsAwsjson10_serializeOpListDeadLetterSourceQueues) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -630,6 +697,10 @@ func (*awsAwsjson10_serializeOpListMessageMoveTasks) ID() string { func (m *awsAwsjson10_serializeOpListMessageMoveTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -672,6 +743,8 @@ func (m *awsAwsjson10_serializeOpListMessageMoveTasks) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -685,6 +758,10 @@ func (*awsAwsjson10_serializeOpListQueues) ID() string { func (m *awsAwsjson10_serializeOpListQueues) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -727,6 +804,8 @@ func (m *awsAwsjson10_serializeOpListQueues) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -740,6 +819,10 @@ func (*awsAwsjson10_serializeOpListQueueTags) ID() string { func (m *awsAwsjson10_serializeOpListQueueTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -782,6 +865,8 @@ func (m *awsAwsjson10_serializeOpListQueueTags) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -795,6 +880,10 @@ func (*awsAwsjson10_serializeOpPurgeQueue) ID() string { func (m *awsAwsjson10_serializeOpPurgeQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -837,6 +926,8 @@ func (m *awsAwsjson10_serializeOpPurgeQueue) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -850,6 +941,10 @@ func (*awsAwsjson10_serializeOpReceiveMessage) ID() string { func (m *awsAwsjson10_serializeOpReceiveMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -892,6 +987,8 @@ func (m *awsAwsjson10_serializeOpReceiveMessage) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -905,6 +1002,10 @@ func (*awsAwsjson10_serializeOpRemovePermission) ID() string { func (m *awsAwsjson10_serializeOpRemovePermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -947,6 +1048,8 @@ func (m *awsAwsjson10_serializeOpRemovePermission) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -960,6 +1063,10 @@ func (*awsAwsjson10_serializeOpSendMessage) ID() string { func (m *awsAwsjson10_serializeOpSendMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1002,6 +1109,8 @@ func (m *awsAwsjson10_serializeOpSendMessage) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1015,6 +1124,10 @@ func (*awsAwsjson10_serializeOpSendMessageBatch) ID() string { func (m *awsAwsjson10_serializeOpSendMessageBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1057,6 +1170,8 @@ func (m *awsAwsjson10_serializeOpSendMessageBatch) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1070,6 +1185,10 @@ func (*awsAwsjson10_serializeOpSetQueueAttributes) ID() string { func (m *awsAwsjson10_serializeOpSetQueueAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1112,6 +1231,8 @@ func (m *awsAwsjson10_serializeOpSetQueueAttributes) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1125,6 +1246,10 @@ func (*awsAwsjson10_serializeOpStartMessageMoveTask) ID() string { func (m *awsAwsjson10_serializeOpStartMessageMoveTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1167,6 +1292,8 @@ func (m *awsAwsjson10_serializeOpStartMessageMoveTask) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1180,6 +1307,10 @@ func (*awsAwsjson10_serializeOpTagQueue) ID() string { func (m *awsAwsjson10_serializeOpTagQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1222,6 +1353,8 @@ func (m *awsAwsjson10_serializeOpTagQueue) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1235,6 +1368,10 @@ func (*awsAwsjson10_serializeOpUntagQueue) ID() string { func (m *awsAwsjson10_serializeOpUntagQueue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1277,6 +1414,8 @@ func (m *awsAwsjson10_serializeOpUntagQueue) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsjson10_serializeDocumentActionNameList(v []string, value smithyjson.Value) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md index 6c02a08..85f9f2c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/CHANGELOG.md @@ -1,3 +1,42 @@ +# v1.54.3 (2024-09-27) + +* No change notes available for this release. + +# v1.54.2 (2024-09-25) + +* No change notes available for this release. + +# v1.54.1 (2024-09-23) + +* No change notes available for this release. + +# v1.54.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.53.0 (2024-09-17) + +* **Feature**: Support for additional levels of cross-account, cross-Region organizational units in Automation. Various documentation updates. +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.52.8 (2024-09-04) + +* No change notes available for this release. + +# v1.52.7 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.52.6 (2024-08-22) + +* No change notes available for this release. + +# v1.52.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.52.4 (2024-08-09) * **Documentation**: Systems Manager doc-only updates for August 2024. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go index 353d5b0..a158aa7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_client.go @@ -5,6 +5,7 @@ package ssm import ( "context" cryptorand "crypto/rand" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -20,8 +21,10 @@ import ( smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" smithyrand "github.com/aws/smithy-go/rand" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -32,6 +35,133 @@ import ( const ServiceID = "SSM" const ServiceAPIVersion = "2014-11-06" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/ssm") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/ssm") +} + // Client provides the API client to make operations call for Amazon Simple // Systems Manager (SSM). type Client struct { @@ -61,6 +191,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveMeterProvider(&options) + + resolveTracerProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -93,8 +227,15 @@ func (c *Client) Options() Options { return c.options.Copy() } -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() @@ -118,15 +259,54 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandler(options.HTTPClient) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + return result, metadata, err } @@ -164,7 +344,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { return fmt.Errorf("add ResolveEndpointV2: %v", err) } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -242,16 +422,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -439,6 +618,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) } @@ -489,6 +692,7 @@ func resolveIdempotencyTokenProvider(o *Options) { func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssm") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -552,25 +756,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -586,6 +771,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) @@ -642,3 +839,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go index 0754fc2..1f0ee20 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AddTagsToResource.go @@ -160,6 +160,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -199,6 +202,18 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go index 65a471b..5e030e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_AssociateOpsItemRelatedItem.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAssociateOpsItemRelatedItemMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -155,6 +158,18 @@ func (c *Client) addOperationAssociateOpsItemRelatedItemMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go index 007417b..c1fa3f1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelCommand.go @@ -95,6 +95,9 @@ func (c *Client) addOperationCancelCommandMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -134,6 +137,18 @@ func (c *Client) addOperationCancelCommandMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go index 08c9349..6d8277a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CancelMaintenanceWindowExecution.go @@ -92,6 +92,9 @@ func (c *Client) addOperationCancelMaintenanceWindowExecutionMiddlewares(stack * if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -131,6 +134,18 @@ func (c *Client) addOperationCancelMaintenanceWindowExecutionMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go index 8df00eb..751cd09 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateActivation.go @@ -18,14 +18,14 @@ import ( // it possible to manage them using Systems Manager capabilities. You use the // activation code and ID when installing SSM Agent on machines in your hybrid // environment. For more information about requirements for managing on-premises -// machines using Systems Manager, see [Setting up Amazon Web Services Systems Manager for hybrid and multicloud environments]in the Amazon Web Services Systems Manager +// machines using Systems Manager, see [Using Amazon Web Services Systems Manager in hybrid and multicloud environments]in the Amazon Web Services Systems Manager // User Guide. // // Amazon Elastic Compute Cloud (Amazon EC2) instances, edge devices, and // on-premises servers and VMs that are configured for Systems Manager are all // called managed nodes. // -// [Setting up Amazon Web Services Systems Manager for hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-managedinstances.html +// [Using Amazon Web Services Systems Manager in hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-hybrid-multicloud.html func (c *Client) CreateActivation(ctx context.Context, params *CreateActivationInput, optFns ...func(*Options)) (*CreateActivationOutput, error) { if params == nil { params = &CreateActivationInput{} @@ -46,13 +46,13 @@ type CreateActivationInput struct { // The name of the Identity and Access Management (IAM) role that you want to // assign to the managed node. This IAM role must provide AssumeRole permissions // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com - // . For more information, see [Create an IAM service role for a hybrid and multicloud environment]in the Amazon Web Services Systems Manager User + // . For more information, see [Create the IAM service role required for Systems Manager in a hybrid and multicloud environments]in the Amazon Web Services Systems Manager User // Guide. // // You can't specify an IAM service-linked role for this parameter. You must // create a unique role. // - // [Create an IAM service role for a hybrid and multicloud environment]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html + // [Create the IAM service role required for Systems Manager in a hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html // // This member is required. IamRole *string @@ -71,7 +71,7 @@ type CreateActivationInput struct { Description *string // The date by which this activation request should expire, in timestamp format, - // such as "2021-07-07T00:00:00". You can specify a date up to 30 days in advance. + // such as "2024-07-07T00:00:00". You can specify a date up to 30 days in advance. // If you don't provide an expiration date, the activation code expires in 24 // hours. ExpirationDate *time.Time @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateActivationMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -208,6 +211,18 @@ func (c *Client) addOperationCreateActivationMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go index 7ceb3a5..22b5ef2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociation.go @@ -215,10 +215,10 @@ type CreateAssociationInput struct { // Amazon Web Services resource groups, all managed nodes in an Amazon Web Services // account, or individual managed node IDs. You can target all managed nodes in an // Amazon Web Services account by specifying the InstanceIds key with a value of * - // . For more information about choosing targets for an association, see [About targets and rate controls in State Manager associations]in the + // . For more information about choosing targets for an association, see [Understanding targets and rate controls in State Manager associations]in the // Amazon Web Services Systems Manager User Guide. // - // [About targets and rate controls in State Manager associations]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html + // [Understanding targets and rate controls in State Manager associations]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html Targets []types.Target noSmithyDocumentSerde @@ -278,6 +278,9 @@ func (c *Client) addOperationCreateAssociationMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -317,6 +320,18 @@ func (c *Client) addOperationCreateAssociationMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go index d273202..f3fa657 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateAssociationBatch.go @@ -102,6 +102,9 @@ func (c *Client) addOperationCreateAssociationBatchMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -141,6 +144,18 @@ func (c *Client) addOperationCreateAssociationBatchMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go index 3278ea0..c7ec58b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateDocument.go @@ -17,7 +17,7 @@ import ( // schemas, features, and syntax, see [Amazon Web Services Systems Manager Documents]in the Amazon Web Services Systems Manager // User Guide. // -// [Amazon Web Services Systems Manager Documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-ssm-docs.html +// [Amazon Web Services Systems Manager Documents]: https://docs.aws.amazon.com/systems-manager/latest/userguide/documents.html func (c *Client) CreateDocument(ctx context.Context, params *CreateDocumentInput, optFns ...func(*Options)) (*CreateDocumentOutput, error) { if params == nil { params = &CreateDocumentInput{} @@ -189,6 +189,9 @@ func (c *Client) addOperationCreateDocumentMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -228,6 +231,18 @@ func (c *Client) addOperationCreateDocumentMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go index fc560cb..112ac24 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateMaintenanceWindow.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateMaintenanceWindowMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -222,6 +225,18 @@ func (c *Client) addOperationCreateMaintenanceWindowMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go index 9232382..1688d25 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsItem.go @@ -218,6 +218,9 @@ func (c *Client) addOperationCreateOpsItemMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -257,6 +260,18 @@ func (c *Client) addOperationCreateOpsItemMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go index 60eebb0..491531b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateOpsMetadata.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateOpsMetadataMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationCreateOpsMetadataMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go index 88cd48a..f2f8b51 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreatePatchBaseline.go @@ -43,9 +43,9 @@ type CreatePatchBaselineInput struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Defines the compliance level for approved patches. When an approved patch is @@ -74,9 +74,9 @@ type CreatePatchBaselineInput struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages @@ -176,6 +176,9 @@ func (c *Client) addOperationCreatePatchBaselineMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -218,6 +221,18 @@ func (c *Client) addOperationCreatePatchBaselineMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go index 0207574..24cbc5d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_CreateResourceDataSync.go @@ -18,7 +18,7 @@ import ( // You can configure Systems Manager Inventory to use the SyncToDestination type // to synchronize Inventory data from multiple Amazon Web Services Regions to a // single Amazon Simple Storage Service (Amazon S3) bucket. For more information, -// see [Configuring resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. +// see [Creatinga a resource data sync for Inventory]in the Amazon Web Services Systems Manager User Guide. // // You can configure Systems Manager Explorer to use the SyncFromSource type to // synchronize operational work items (OpsItems) and operational data (OpsData) @@ -38,7 +38,7 @@ import ( // policy. // // [Setting up Systems Manager Explorer to display data from multiple accounts and Regions]: https://docs.aws.amazon.com/systems-manager/latest/userguide/Explorer-resource-data-sync.html -// [Configuring resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-datasync.html +// [Creatinga a resource data sync for Inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-create-resource-data-sync.html func (c *Client) CreateResourceDataSync(ctx context.Context, params *CreateResourceDataSyncInput, optFns ...func(*Options)) (*CreateResourceDataSyncOutput, error) { if params == nil { params = &CreateResourceDataSyncInput{} @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateResourceDataSyncMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -170,6 +173,18 @@ func (c *Client) addOperationCreateResourceDataSyncMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go index 9f5bc17..d8456d8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteActivation.go @@ -89,6 +89,9 @@ func (c *Client) addOperationDeleteActivationMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -128,6 +131,18 @@ func (c *Client) addOperationDeleteActivationMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go index ce9dcb7..b704085 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteAssociation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAssociationMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationDeleteAssociationMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go index abf07ac..2352e41 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteDocument.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteDocumentMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -143,6 +146,18 @@ func (c *Client) addOperationDeleteDocumentMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go index 0545461..894b2f3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteInventory.go @@ -71,10 +71,10 @@ type DeleteInventoryOutput struct { // begin other operations. DeletionId *string - // A summary of the delete operation. For more information about this summary, see [Understanding the delete inventory summary] + // A summary of the delete operation. For more information about this summary, see [Deleting custom inventory] // in the Amazon Web Services Systems Manager User Guide. // - // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete-summary + // [Deleting custom inventory]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory-summary DeletionSummary *types.InventoryDeletionSummary // The name of the inventory data type specified in the request. @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteInventoryMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -171,6 +174,18 @@ func (c *Client) addOperationDeleteInventoryMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go index c1bbb36..3a75ab9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteMaintenanceWindow.go @@ -90,6 +90,9 @@ func (c *Client) addOperationDeleteMaintenanceWindowMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,18 @@ func (c *Client) addOperationDeleteMaintenanceWindowMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go index c3dd4e4..b543260 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsItem.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteOpsItemMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationDeleteOpsItemMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go index a5e6ddb..aa38398 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteOpsMetadata.go @@ -86,6 +86,9 @@ func (c *Client) addOperationDeleteOpsMetadataMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -125,6 +128,18 @@ func (c *Client) addOperationDeleteOpsMetadataMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go index fe44e60..f7bdfed 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameter.go @@ -90,6 +90,9 @@ func (c *Client) addOperationDeleteParameterMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,18 @@ func (c *Client) addOperationDeleteParameterMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go index a974699..78029e1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteParameters.go @@ -99,6 +99,9 @@ func (c *Client) addOperationDeleteParametersMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -138,6 +141,18 @@ func (c *Client) addOperationDeleteParametersMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go index 6c90be6..e83d423 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeletePatchBaseline.go @@ -90,6 +90,9 @@ func (c *Client) addOperationDeletePatchBaselineMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -129,6 +132,18 @@ func (c *Client) addOperationDeletePatchBaselineMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go index 0dae204..9cfcb80 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourceDataSync.go @@ -91,6 +91,9 @@ func (c *Client) addOperationDeleteResourceDataSyncMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -130,6 +133,18 @@ func (c *Client) addOperationDeleteResourceDataSyncMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go index d3b64d1..1cbf9a4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeleteResourcePolicy.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -150,6 +153,18 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go index c48e2d5..887c6f8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterManagedInstance.go @@ -89,6 +89,9 @@ func (c *Client) addOperationDeregisterManagedInstanceMiddlewares(stack *middlew if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -128,6 +131,18 @@ func (c *Client) addOperationDeregisterManagedInstanceMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go index fee065b..344f848 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go @@ -98,6 +98,9 @@ func (c *Client) addOperationDeregisterPatchBaselineForPatchGroupMiddlewares(sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationDeregisterPatchBaselineForPatchGroupMiddlewares(sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go index aba811b..9a0871a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeregisterTargetFromMaintenanceWindowMiddlewares(st if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationDeregisterTargetFromMaintenanceWindowMiddlewares(st if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go index ea0491d..ecb2e27 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go @@ -98,6 +98,9 @@ func (c *Client) addOperationDeregisterTaskFromMaintenanceWindowMiddlewares(stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationDeregisterTaskFromMaintenanceWindowMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go index 68aa66f..bfb22b1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeActivations.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeActivationsMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -139,6 +142,18 @@ func (c *Client) addOperationDescribeActivationsMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go index a0437f5..bba1d32 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociation.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeAssociationMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -139,6 +142,18 @@ func (c *Client) addOperationDescribeAssociationMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go index 57cce65..d3b2ac1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutionTargets.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeAssociationExecutionTargetsMiddlewares(stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -156,6 +159,18 @@ func (c *Client) addOperationDescribeAssociationExecutionTargetsMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go index fa90d07..61db22e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAssociationExecutions.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeAssociationExecutionsMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -150,6 +153,18 @@ func (c *Client) addOperationDescribeAssociationExecutionsMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go index 4a868c8..b4e642d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationExecutions.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDescribeAutomationExecutionsMiddlewares(stack *midd if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -141,6 +144,18 @@ func (c *Client) addOperationDescribeAutomationExecutionsMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go index 758e068..627b8fc 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAutomationStepExecutions.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAutomationStepExecutionsMiddlewares(stack * if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -152,6 +155,18 @@ func (c *Client) addOperationDescribeAutomationStepExecutionsMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go index f376e8f..99c67b0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeAvailablePatches.go @@ -190,6 +190,9 @@ func (c *Client) addOperationDescribeAvailablePatchesMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -226,6 +229,18 @@ func (c *Client) addOperationDescribeAvailablePatchesMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go index 0ab1102..3e5ac0e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocument.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDescribeDocumentMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationDescribeDocumentMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go index 310ee79..2bd6927 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeDocumentPermission.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeDocumentPermissionMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -155,6 +158,18 @@ func (c *Client) addOperationDescribeDocumentPermissionMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go index 2a6a620..935f361 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeEffectiveInstanceAssociationsMiddlewares(st if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationDescribeEffectiveInstanceAssociationsMiddlewares(st if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go index ed7d8e8..8216e63 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go index 64bc7d4..b650324 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceAssociationsStatus.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeInstanceAssociationsStatusMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationDescribeInstanceAssociationsStatusMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go index 1449c1a..dccb0cd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceInformation.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeInstanceInformationMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -164,6 +167,18 @@ func (c *Client) addOperationDescribeInstanceInformationMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go index 7ef0527..002a413 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStates.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeInstancePatchStatesMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationDescribeInstancePatchStatesMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go index 9a56eff..f778f76 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -152,6 +155,18 @@ func (c *Client) addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go index d78eed3..d59192c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstancePatches.go @@ -55,10 +55,10 @@ type DescribeInstancePatchesInput struct { // // Sample values: Installed | InstalledOther | InstalledPendingReboot // - // For lists of all State values, see [Understanding patch compliance state values]in the Amazon Web Services Systems Manager + // For lists of all State values, see [Patch compliance state values]in the Amazon Web Services Systems Manager // User Guide. // - // [Understanding patch compliance state values]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html + // [Patch compliance state values]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-compliance-states.html Filters []types.PatchOrchestratorFilter // The maximum number of patches to return (per page). @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeInstancePatchesMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -182,6 +185,18 @@ func (c *Client) addOperationDescribeInstancePatchesMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go index e80e3ad..56eb598 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInstanceProperties.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeInstancePropertiesMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -144,6 +147,18 @@ func (c *Client) addOperationDescribeInstancePropertiesMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go index 4cb6074..b452e12 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeInventoryDeletions.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDescribeInventoryDeletionsMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationDescribeInventoryDeletionsMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go index 23bb89a..0f4b5f1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMi if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -154,6 +157,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go index 444b7cf..e297a5e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares( if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares( if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go index 98026b1..2f8ae37 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go @@ -43,7 +43,7 @@ type DescribeMaintenanceWindowExecutionsInput struct { // // - Values. An array of strings, each between 1 and 256 characters. Supported // values are date/time strings in a valid ISO 8601 date/time format, such as - // 2021-11-04T05:00:00Z . + // 2024-11-04T05:00:00Z . Filters []types.MaintenanceWindowFilter // The maximum number of items to return for this call. The call also returns a @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionsMiddlewares(stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -154,6 +157,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionsMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go index c67391b..bb77a9f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowScheduleMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -150,6 +153,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowScheduleMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go index 1aaadaf..2eaf5d8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTargets.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowTargetsMiddlewares(stack * if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -147,6 +150,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowTargetsMiddlewares(stack * if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go index 86d67a6..4c2fe95 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowTasks.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowTasksMiddlewares(stack *mi if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -151,6 +154,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowTasksMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go index 260dee6..6ad9dc9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindows.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowsMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -139,6 +142,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowsMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go index f4a1521..185721e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowsForTargetMiddlewares(stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -150,6 +153,18 @@ func (c *Client) addOperationDescribeMaintenanceWindowsForTargetMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go index c92a985..6d31e09 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeOpsItems.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeOpsItemsMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -213,6 +216,18 @@ func (c *Client) addOperationDescribeOpsItemsMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go index 748e58c..8dc7092 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeParameters.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -173,6 +176,18 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go index ad769de..9349b8c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchBaselines.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribePatchBaselinesMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -150,6 +153,18 @@ func (c *Client) addOperationDescribePatchBaselinesMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go index abd4706..9f1955e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroupState.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribePatchGroupStateMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -183,6 +186,18 @@ func (c *Client) addOperationDescribePatchGroupStateMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go index d126259..4ac4b69 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribePatchGroupsMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -151,6 +154,18 @@ func (c *Client) addOperationDescribePatchGroupsMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go index 0c549b2..b3ff5d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribePatchProperties.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribePatchPropertiesMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -181,6 +184,18 @@ func (c *Client) addOperationDescribePatchPropertiesMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go index e5aaea2..cfad5f4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DescribeSessions.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go index 67f2fc9..b59d069 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_DisassociateOpsItemRelatedItem.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDisassociateOpsItemRelatedItemMiddlewares(stack *mi if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -134,6 +137,18 @@ func (c *Client) addOperationDisassociateOpsItemRelatedItemMiddlewares(stack *mi if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go index f8d6ece..54e2328 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetAutomationExecution.go @@ -93,6 +93,9 @@ func (c *Client) addOperationGetAutomationExecutionMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -132,6 +135,18 @@ func (c *Client) addOperationGetAutomationExecutionMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go index 34a448a..e9f3c10 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCalendarState.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetCalendarStateMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -168,6 +171,18 @@ func (c *Client) addOperationGetCalendarStateMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go index 21db09f..338e183 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetCommandInvocation.go @@ -246,6 +246,9 @@ func (c *Client) addOperationGetCommandInvocationMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -285,6 +288,18 @@ func (c *Client) addOperationGetCommandInvocationMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go index 2b49373..63f33b0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetConnectionStatus.go @@ -95,6 +95,9 @@ func (c *Client) addOperationGetConnectionStatusMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -134,6 +137,18 @@ func (c *Client) addOperationGetConnectionStatusMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go index f5bec97..5aaf401 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDefaultPatchBaseline.go @@ -97,6 +97,9 @@ func (c *Client) addOperationGetDefaultPatchBaselineMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -133,6 +136,18 @@ func (c *Client) addOperationGetDefaultPatchBaselineMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go index f8be186..2fec2c1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetDeployablePatchSnapshotForInstanceMiddlewares(st if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -160,6 +163,18 @@ func (c *Client) addOperationGetDeployablePatchSnapshotForInstanceMiddlewares(st if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go index 5aaccce..66560ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetDocument.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetDocumentMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -197,6 +200,18 @@ func (c *Client) addOperationGetDocumentMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go index dd63848..bf35101 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventory.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetInventoryMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -151,6 +154,18 @@ func (c *Client) addOperationGetInventoryMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go index decc8d8..4ce7b2a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetInventorySchema.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetInventorySchemaMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationGetInventorySchemaMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go index 40b95da..c5119e7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindow.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetMaintenanceWindowMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -185,6 +188,18 @@ func (c *Client) addOperationGetMaintenanceWindowMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go index 6ccd9d4..3a38404 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecution.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go index 2225170..944a456 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -194,6 +197,18 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go index 0c34b8d..daf268f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -178,6 +181,18 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go index 3fa362d..65a3eba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetMaintenanceWindowTask.go @@ -108,10 +108,10 @@ type GetMaintenanceWindowTaskOutput struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets where the task should run. @@ -192,6 +192,9 @@ func (c *Client) addOperationGetMaintenanceWindowTaskMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -231,6 +234,18 @@ func (c *Client) addOperationGetMaintenanceWindowTaskMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go index 9346575..212a72a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsItem.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetOpsItemMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -143,6 +146,18 @@ func (c *Client) addOperationGetOpsItemMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go index fc8b40e..66c9fdf 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsMetadata.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetOpsMetadataMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -144,6 +147,18 @@ func (c *Client) addOperationGetOpsMetadataMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go index f56cf1e..a8531ac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetOpsSummary.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetOpsSummaryMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationGetOpsSummaryMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go index a804b8c..c46b348 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameter.go @@ -40,7 +40,7 @@ type GetParameterInput struct { // For more information about shared parameters, see [Working with shared parameters] in the Amazon Web Services // Systems Manager User Guide. // - // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sharing.html + // [Working with shared parameters]: https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html // // This member is required. Name *string @@ -106,6 +106,9 @@ func (c *Client) addOperationGetParameterMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationGetParameterMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go index 2b5d21a..842336d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameterHistory.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetParameterHistoryMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -153,6 +156,18 @@ func (c *Client) addOperationGetParameterHistoryMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go index 7e80d39..ba6af1a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParameters.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetParametersMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -154,6 +157,18 @@ func (c *Client) addOperationGetParametersMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go index 41a696e..2c244d2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetParametersByPath.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetParametersByPathMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationGetParametersByPathMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go index db9aa89..0d8b304 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaseline.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetPatchBaselineMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -186,6 +189,18 @@ func (c *Client) addOperationGetPatchBaselineMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go index 714558f..1c3150b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetPatchBaselineForPatchGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetPatchBaselineForPatchGroupMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationGetPatchBaselineForPatchGroupMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go index fbc6b9b..05729d1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetResourcePolicies.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -141,6 +144,18 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go index 8c3c089..990d366 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_GetServiceSetting.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetServiceSettingMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -164,6 +167,18 @@ func (c *Client) addOperationGetServiceSettingMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go index 9d60726..d52c242 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_LabelParameterVersion.go @@ -138,6 +138,9 @@ func (c *Client) addOperationLabelParameterVersionMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -177,6 +180,18 @@ func (c *Client) addOperationLabelParameterVersionMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go index 7bf48c7..8e3345a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociationVersions.go @@ -103,6 +103,9 @@ func (c *Client) addOperationListAssociationVersionsMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationListAssociationVersionsMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go index 3559fd6..dc3cb70 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListAssociations.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go index d9bf154..bca54e6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommandInvocations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListCommandInvocationsMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -156,6 +159,18 @@ func (c *Client) addOperationListCommandInvocationsMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go index ea706cd..b70024a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListCommands.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListCommandsMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -151,6 +154,18 @@ func (c *Client) addOperationListCommandsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go index 022faa0..45fa251 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceItems.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListComplianceItemsMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationListComplianceItemsMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go index 5346125..1641dde 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListComplianceSummaries.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListComplianceSummariesMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -143,6 +146,18 @@ func (c *Client) addOperationListComplianceSummariesMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go index 8e39e17..2ce37a3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentMetadataHistory.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListDocumentMetadataHistoryMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -162,6 +165,18 @@ func (c *Client) addOperationListDocumentMetadataHistoryMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go index 3695f89..118bb7c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocumentVersions.go @@ -103,6 +103,9 @@ func (c *Client) addOperationListDocumentVersionsMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationListDocumentVersionsMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go index 7403a56..eef1181 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListDocuments.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -154,6 +157,18 @@ func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go index 179fa0e..c767af4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListInventoryEntries.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListInventoryEntriesMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -162,6 +165,18 @@ func (c *Client) addOperationListInventoryEntriesMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go index 4f1f5f4..6724558 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemEvents.go @@ -103,6 +103,9 @@ func (c *Client) addOperationListOpsItemEventsMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationListOpsItemEventsMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go index f8b1825..f461619 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsItemRelatedItems.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListOpsItemRelatedItemsMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationListOpsItemRelatedItemsMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go index ef37d10..6cbd29e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListOpsMetadata.go @@ -102,6 +102,9 @@ func (c *Client) addOperationListOpsMetadataMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -141,6 +144,18 @@ func (c *Client) addOperationListOpsMetadataMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go index e64abd8..1aecf62 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceComplianceSummaries.go @@ -104,6 +104,9 @@ func (c *Client) addOperationListResourceComplianceSummariesMiddlewares(stack *m if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationListResourceComplianceSummariesMiddlewares(stack *m if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go index e8d39c7..85a3a96 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListResourceDataSync.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListResourceDataSyncMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationListResourceDataSyncMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go index 64219d3..e1eeb2f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ListTagsForResource.go @@ -98,6 +98,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go index 97875a8..8bcf832 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ModifyDocumentPermission.go @@ -109,6 +109,9 @@ func (c *Client) addOperationModifyDocumentPermissionMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -148,6 +151,18 @@ func (c *Client) addOperationModifyDocumentPermissionMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go index 93af0ff..0ca0d57 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutComplianceItems.go @@ -171,6 +171,9 @@ func (c *Client) addOperationPutComplianceItemsMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -210,6 +213,18 @@ func (c *Client) addOperationPutComplianceItemsMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go index 27de145..f70bc99 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutInventory.go @@ -98,6 +98,9 @@ func (c *Client) addOperationPutInventoryMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationPutInventoryMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go index f177ccd..727fa40 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutParameter.go @@ -324,6 +324,9 @@ func (c *Client) addOperationPutParameterMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -363,6 +366,18 @@ func (c *Client) addOperationPutParameterMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go index c17418d..f288454 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_PutResourcePolicy.go @@ -147,6 +147,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -186,6 +189,18 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go index 26a5254..2ceeefd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterDefaultPatchBaseline.go @@ -96,6 +96,9 @@ func (c *Client) addOperationRegisterDefaultPatchBaselineMiddlewares(stack *midd if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -135,6 +138,18 @@ func (c *Client) addOperationRegisterDefaultPatchBaselineMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go index 8a05d1d..ab7a19a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go @@ -98,6 +98,9 @@ func (c *Client) addOperationRegisterPatchBaselineForPatchGroupMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationRegisterPatchBaselineForPatchGroupMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go index a8da827..42ac2ac 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go @@ -153,6 +153,9 @@ func (c *Client) addOperationRegisterTargetWithMaintenanceWindowMiddlewares(stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -195,6 +198,18 @@ func (c *Client) addOperationRegisterTargetWithMaintenanceWindowMiddlewares(stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go index 2664622..9b07292 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go @@ -126,10 +126,10 @@ type RegisterTaskWithMaintenanceWindowInput struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or maintenance window targets). @@ -220,6 +220,9 @@ func (c *Client) addOperationRegisterTaskWithMaintenanceWindowMiddlewares(stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -262,6 +265,18 @@ func (c *Client) addOperationRegisterTaskWithMaintenanceWindowMiddlewares(stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go index a8b9b63..3b2e71e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_RemoveTagsFromResource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -161,6 +164,18 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go index a9cb0ab..eefc0c1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResetServiceSetting.go @@ -126,6 +126,9 @@ func (c *Client) addOperationResetServiceSettingMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -165,6 +168,18 @@ func (c *Client) addOperationResetServiceSettingMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go index 63e15da..a771e94 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_ResumeSession.go @@ -115,6 +115,9 @@ func (c *Client) addOperationResumeSessionMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -154,6 +157,18 @@ func (c *Client) addOperationResumeSessionMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go index 91fb9eb..797d3de 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendAutomationSignal.go @@ -113,6 +113,9 @@ func (c *Client) addOperationSendAutomationSignalMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -152,6 +155,18 @@ func (c *Client) addOperationSendAutomationSignalMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go index 34e55b3..493de7b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_SendCommand.go @@ -217,6 +217,9 @@ func (c *Client) addOperationSendCommandMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -256,6 +259,18 @@ func (c *Client) addOperationSendCommandMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go index e9ff2fe..0dbe2dd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAssociationsOnce.go @@ -87,6 +87,9 @@ func (c *Client) addOperationStartAssociationsOnceMiddlewares(stack *middleware. if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -126,6 +129,18 @@ func (c *Client) addOperationStartAssociationsOnceMiddlewares(stack *middleware. if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go index a52c348..cfbb662 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartAutomationExecution.go @@ -52,6 +52,9 @@ type StartAutomationExecutionInput struct { // The maximum number of targets allowed to run this task in parallel. You can // specify a number, such as 10, or a percentage, such as 10%. The default value is // 10 . + // + // If both this parameter and the TargetLocation:TargetsMaxConcurrency are + // supplied, TargetLocation:TargetsMaxConcurrency takes precedence. MaxConcurrency *string // The number of errors that are allowed before the system stops running the @@ -68,6 +71,9 @@ type StartAutomationExecutionInput struct { // are allowed to complete, but some of these executions may fail as well. If you // need to ensure that there won't be more than max-errors failed executions, set // max-concurrency to 1 so the executions proceed one at a time. + // + // If this parameter and the TargetLocation:TargetsMaxErrors parameter are both + // supplied, TargetLocation:TargetsMaxErrors takes precedence. MaxErrors *string // The execution mode of the automation. Valid modes include the following: Auto @@ -94,12 +100,16 @@ type StartAutomationExecutionInput struct { // A location is a combination of Amazon Web Services Regions and/or Amazon Web // Services accounts where you want to run the automation. Use this operation to // start an automation in multiple Amazon Web Services Regions and multiple Amazon - // Web Services accounts. For more information, see [Running Automation workflows in multiple Amazon Web Services Regions and Amazon Web Services accounts]in the Amazon Web Services + // Web Services accounts. For more information, see [Running automations in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services // Systems Manager User Guide. // - // [Running Automation workflows in multiple Amazon Web Services Regions and Amazon Web Services accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html + // [Running automations in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html TargetLocations []types.TargetLocation + // Specify a publicly accessible URL for a file that contains the TargetLocations + // body. Currently, only files in presigned Amazon S3 buckets are supported. + TargetLocationsURL *string + // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps can't be specified together. TargetMaps []map[string][]string @@ -110,6 +120,9 @@ type StartAutomationExecutionInput struct { // A key-value mapping to target resources. Required if you specify // TargetParameterName. + // + // If both this parameter and the TargetLocation:Targets parameter are supplied, + // TargetLocation:Targets takes precedence. Targets []types.Target noSmithyDocumentSerde @@ -169,6 +182,9 @@ func (c *Client) addOperationStartAutomationExecutionMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -208,6 +224,18 @@ func (c *Client) addOperationStartAutomationExecutionMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go index 1d265a3..ae23acb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartChangeRequestExecution.go @@ -160,6 +160,9 @@ func (c *Client) addOperationStartChangeRequestExecutionMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -199,6 +202,18 @@ func (c *Client) addOperationStartChangeRequestExecutionMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go index 9a1bb57..268e15f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StartSession.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartSessionMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -182,6 +185,18 @@ func (c *Client) addOperationStartSessionMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go index b011807..cd6098f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_StopAutomationExecution.go @@ -91,6 +91,9 @@ func (c *Client) addOperationStopAutomationExecutionMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -130,6 +133,18 @@ func (c *Client) addOperationStopAutomationExecutionMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go index d2ed650..8ad81ef 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_TerminateSession.go @@ -92,6 +92,9 @@ func (c *Client) addOperationTerminateSessionMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -131,6 +134,18 @@ func (c *Client) addOperationTerminateSessionMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go index 405a1f7..251661e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UnlabelParameterVersion.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUnlabelParameterVersionMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationUnlabelParameterVersionMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go index a4fbdc1..80b17c9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociation.go @@ -283,6 +283,9 @@ func (c *Client) addOperationUpdateAssociationMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -322,6 +325,18 @@ func (c *Client) addOperationUpdateAssociationMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go index 569a5a1..51a4f46 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateAssociationStatus.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUpdateAssociationStatusMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationUpdateAssociationStatusMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go index 321462c..4d8e32b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocument.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateDocumentMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -165,6 +168,18 @@ func (c *Client) addOperationUpdateDocumentMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go index 6a5ecad..1844006 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentDefaultVersion.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUpdateDocumentDefaultVersionMiddlewares(stack *midd if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationUpdateDocumentDefaultVersionMiddlewares(stack *midd if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go index cfc70f1..5871080 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateDocumentMetadata.go @@ -96,6 +96,9 @@ func (c *Client) addOperationUpdateDocumentMetadataMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -135,6 +138,18 @@ func (c *Client) addOperationUpdateDocumentMetadataMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go index 102e5b8..80ae8e5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindow.go @@ -202,6 +202,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowMiddlewares(stack *middlewar if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -241,6 +244,18 @@ func (c *Client) addOperationUpdateMaintenanceWindowMiddlewares(stack *middlewar if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go index d83324b..c9f1351 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTarget.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowTargetMiddlewares(stack *mid if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -183,6 +186,18 @@ func (c *Client) addOperationUpdateMaintenanceWindowTargetMiddlewares(stack *mid if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go index ba53633..85dff67 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateMaintenanceWindowTask.go @@ -158,10 +158,10 @@ type UpdateMaintenanceWindowTaskInput struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or tags) to modify. Managed nodes are @@ -253,10 +253,10 @@ type UpdateMaintenanceWindowTaskOutput struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The updated target values. @@ -331,6 +331,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowTaskMiddlewares(stack *middl if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -370,6 +373,18 @@ func (c *Client) addOperationUpdateMaintenanceWindowTaskMiddlewares(stack *middl if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go index ce31afd..cf39cd1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateManagedInstanceRole.go @@ -34,13 +34,13 @@ type UpdateManagedInstanceRoleInput struct { // The name of the Identity and Access Management (IAM) role that you want to // assign to the managed node. This IAM role must provide AssumeRole permissions // for the Amazon Web Services Systems Manager service principal ssm.amazonaws.com - // . For more information, see [Create an IAM service role for a hybrid and multicloud environment]in the Amazon Web Services Systems Manager User + // . For more information, see [Create the IAM service role required for Systems Manager in hybrid and multicloud environments]in the Amazon Web Services Systems Manager User // Guide. // // You can't specify an IAM service-linked role for this parameter. You must // create a unique role. // - // [Create an IAM service role for a hybrid and multicloud environment]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-service-role.html + // [Create the IAM service role required for Systems Manager in hybrid and multicloud environments]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-service-role.html // // This member is required. IamRole *string @@ -103,6 +103,9 @@ func (c *Client) addOperationUpdateManagedInstanceRoleMiddlewares(stack *middlew if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -142,6 +145,18 @@ func (c *Client) addOperationUpdateManagedInstanceRoleMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go index ace113b..6d8c490 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsItem.go @@ -117,8 +117,8 @@ type UpdateOpsItemInput struct { // Specify a new severity for an OpsItem. Severity *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . For more - // information, see [Editing OpsItem details]in the Amazon Web Services Systems Manager User Guide. + // The OpsItem status. For more information, see [Editing OpsItem details] in the Amazon Web Services + // Systems Manager User Guide. // // [Editing OpsItem details]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Status types.OpsItemStatus @@ -180,6 +180,9 @@ func (c *Client) addOperationUpdateOpsItemMiddlewares(stack *middleware.Stack, o if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -219,6 +222,18 @@ func (c *Client) addOperationUpdateOpsItemMiddlewares(stack *middleware.Stack, o if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go index d95de8b..d42ead9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateOpsMetadata.go @@ -98,6 +98,9 @@ func (c *Client) addOperationUpdateOpsMetadataMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -137,6 +140,18 @@ func (c *Client) addOperationUpdateOpsMetadataMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go index f97a9b4..b6aa835 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdatePatchBaseline.go @@ -45,9 +45,9 @@ type UpdatePatchBaselineInput struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Assigns a new compliance severity level to an existing patch baseline. @@ -70,9 +70,9 @@ type UpdatePatchBaselineInput struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages @@ -209,6 +209,9 @@ func (c *Client) addOperationUpdatePatchBaselineMiddlewares(stack *middleware.St if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -248,6 +251,18 @@ func (c *Client) addOperationUpdatePatchBaselineMiddlewares(stack *middleware.St if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go index 5a6d08a..0ace9af 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateResourceDataSync.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdateResourceDataSyncMiddlewares(stack *middleware if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -144,6 +147,18 @@ func (c *Client) addOperationUpdateResourceDataSyncMiddlewares(stack *middleware if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go index fd860e7..80cc9f9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/api_op_UpdateServiceSetting.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateServiceSettingMiddlewares(stack *middleware.S if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -191,6 +194,18 @@ func (c *Client) addOperationUpdateServiceSettingMiddlewares(stack *middleware.S if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go index 22cb7c4..b081fc3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/auth.go @@ -8,7 +8,9 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -145,6 +147,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -157,6 +162,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -216,7 +224,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -226,12 +237,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) if err != nil { return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) + + span.End() return next.HandleFinalize(ctx, in) } @@ -247,6 +266,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -256,6 +276,9 @@ func (*signRequestMiddleware) ID() string { func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) @@ -276,9 +299,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { return out, metadata, fmt.Errorf("sign request: %w", err) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go index 9600946..0acb68a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/deserializers.go @@ -15,6 +15,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" @@ -44,6 +45,10 @@ func (m *awsAwsjson11_deserializeOpAddTagsToResource) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -163,6 +168,10 @@ func (m *awsAwsjson11_deserializeOpAssociateOpsItemRelatedItem) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -285,6 +294,10 @@ func (m *awsAwsjson11_deserializeOpCancelCommand) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -401,6 +414,10 @@ func (m *awsAwsjson11_deserializeOpCancelMaintenanceWindowExecution) HandleDeser return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -511,6 +528,10 @@ func (m *awsAwsjson11_deserializeOpCreateActivation) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -621,6 +642,10 @@ func (m *awsAwsjson11_deserializeOpCreateAssociation) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -764,6 +789,10 @@ func (m *awsAwsjson11_deserializeOpCreateAssociationBatch) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -904,6 +933,10 @@ func (m *awsAwsjson11_deserializeOpCreateDocument) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1026,6 +1059,10 @@ func (m *awsAwsjson11_deserializeOpCreateMaintenanceWindow) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1139,6 +1176,10 @@ func (m *awsAwsjson11_deserializeOpCreateOpsItem) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1258,6 +1299,10 @@ func (m *awsAwsjson11_deserializeOpCreateOpsMetadata) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1377,6 +1422,10 @@ func (m *awsAwsjson11_deserializeOpCreatePatchBaseline) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1490,6 +1539,10 @@ func (m *awsAwsjson11_deserializeOpCreateResourceDataSync) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1606,6 +1659,10 @@ func (m *awsAwsjson11_deserializeOpDeleteActivation) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1722,6 +1779,10 @@ func (m *awsAwsjson11_deserializeOpDeleteAssociation) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1841,6 +1902,10 @@ func (m *awsAwsjson11_deserializeOpDeleteDocument) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -1957,6 +2022,10 @@ func (m *awsAwsjson11_deserializeOpDeleteInventory) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2076,6 +2145,10 @@ func (m *awsAwsjson11_deserializeOpDeleteMaintenanceWindow) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2183,6 +2256,10 @@ func (m *awsAwsjson11_deserializeOpDeleteOpsItem) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2293,6 +2370,10 @@ func (m *awsAwsjson11_deserializeOpDeleteOpsMetadata) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2406,6 +2487,10 @@ func (m *awsAwsjson11_deserializeOpDeleteParameter) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2516,6 +2601,10 @@ func (m *awsAwsjson11_deserializeOpDeleteParameters) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2623,6 +2712,10 @@ func (m *awsAwsjson11_deserializeOpDeletePatchBaseline) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2733,6 +2826,10 @@ func (m *awsAwsjson11_deserializeOpDeleteResourceDataSync) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2846,6 +2943,10 @@ func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -2968,6 +3069,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterManagedInstance) HandleDeserialize( return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3078,6 +3183,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterPatchBaselineForPatchGroup) HandleD return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3188,6 +3297,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterTargetFromMaintenanceWindow) Handle return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3301,6 +3414,10 @@ func (m *awsAwsjson11_deserializeOpDeregisterTaskFromMaintenanceWindow) HandleDe return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3411,6 +3528,10 @@ func (m *awsAwsjson11_deserializeOpDescribeActivations) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3524,6 +3645,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAssociation) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3643,6 +3768,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAssociationExecutions) HandleDeserial return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3756,6 +3885,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAssociationExecutionTargets) HandleDe return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3872,6 +4005,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAutomationExecutions) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -3988,6 +4125,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAutomationStepExecutions) HandleDeser return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4107,6 +4248,10 @@ func (m *awsAwsjson11_deserializeOpDescribeAvailablePatches) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4214,6 +4359,10 @@ func (m *awsAwsjson11_deserializeOpDescribeDocument) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4327,6 +4476,10 @@ func (m *awsAwsjson11_deserializeOpDescribeDocumentPermission) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4446,6 +4599,10 @@ func (m *awsAwsjson11_deserializeOpDescribeEffectiveInstanceAssociations) Handle return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4559,6 +4716,10 @@ func (m *awsAwsjson11_deserializeOpDescribeEffectivePatchesForPatchBaseline) Han return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4675,6 +4836,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstanceAssociationsStatus) HandleDes return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4788,6 +4953,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstanceInformation) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -4907,6 +5076,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstancePatches) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5023,6 +5196,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstancePatchStates) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5133,6 +5310,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstancePatchStatesForPatchGroup) Han return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5246,6 +5427,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInstanceProperties) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5371,6 +5556,10 @@ func (m *awsAwsjson11_deserializeOpDescribeInventoryDeletions) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5484,6 +5673,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutions) HandleDe return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5591,6 +5784,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTaskInvocat return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5701,6 +5898,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowExecutionTasks) Hand return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5811,6 +6012,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindows) HandleDeserialize return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -5918,6 +6123,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowSchedule) HandleDese return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6028,6 +6237,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowsForTarget) HandleDe return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6135,6 +6348,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTargets) HandleDeser return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6245,6 +6462,10 @@ func (m *awsAwsjson11_deserializeOpDescribeMaintenanceWindowTasks) HandleDeseria return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6355,6 +6576,10 @@ func (m *awsAwsjson11_deserializeOpDescribeOpsItems) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6462,6 +6687,10 @@ func (m *awsAwsjson11_deserializeOpDescribeParameters) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6581,6 +6810,10 @@ func (m *awsAwsjson11_deserializeOpDescribePatchBaselines) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6688,6 +6921,10 @@ func (m *awsAwsjson11_deserializeOpDescribePatchGroups) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6795,6 +7032,10 @@ func (m *awsAwsjson11_deserializeOpDescribePatchGroupState) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -6905,6 +7146,10 @@ func (m *awsAwsjson11_deserializeOpDescribePatchProperties) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7012,6 +7257,10 @@ func (m *awsAwsjson11_deserializeOpDescribeSessions) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7125,6 +7374,10 @@ func (m *awsAwsjson11_deserializeOpDisassociateOpsItemRelatedItem) HandleDeseria return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7244,6 +7497,10 @@ func (m *awsAwsjson11_deserializeOpGetAutomationExecution) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7354,6 +7611,10 @@ func (m *awsAwsjson11_deserializeOpGetCalendarState) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7470,6 +7731,10 @@ func (m *awsAwsjson11_deserializeOpGetCommandInvocation) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7589,6 +7854,10 @@ func (m *awsAwsjson11_deserializeOpGetConnectionStatus) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7696,6 +7965,10 @@ func (m *awsAwsjson11_deserializeOpGetDefaultPatchBaseline) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7803,6 +8076,10 @@ func (m *awsAwsjson11_deserializeOpGetDeployablePatchSnapshotForInstance) Handle return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -7916,6 +8193,10 @@ func (m *awsAwsjson11_deserializeOpGetDocument) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8029,6 +8310,10 @@ func (m *awsAwsjson11_deserializeOpGetInventory) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8154,6 +8439,10 @@ func (m *awsAwsjson11_deserializeOpGetInventorySchema) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8267,6 +8556,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindow) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8377,6 +8670,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecution) HandleDeserial return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8487,6 +8784,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTask) HandleDese return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8597,6 +8898,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowExecutionTaskInvocation) return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8707,6 +9012,10 @@ func (m *awsAwsjson11_deserializeOpGetMaintenanceWindowTask) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8817,6 +9126,10 @@ func (m *awsAwsjson11_deserializeOpGetOpsItem) HandleDeserialize(ctx context.Con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -8930,6 +9243,10 @@ func (m *awsAwsjson11_deserializeOpGetOpsMetadata) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9043,6 +9360,10 @@ func (m *awsAwsjson11_deserializeOpGetOpsSummary) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9165,6 +9486,10 @@ func (m *awsAwsjson11_deserializeOpGetParameter) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9281,6 +9606,10 @@ func (m *awsAwsjson11_deserializeOpGetParameterHistory) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9397,6 +9726,10 @@ func (m *awsAwsjson11_deserializeOpGetParameters) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9507,6 +9840,10 @@ func (m *awsAwsjson11_deserializeOpGetParametersByPath) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9629,6 +9966,10 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaseline) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9742,6 +10083,10 @@ func (m *awsAwsjson11_deserializeOpGetPatchBaselineForPatchGroup) HandleDeserial return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9849,6 +10194,10 @@ func (m *awsAwsjson11_deserializeOpGetResourcePolicies) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -9962,6 +10311,10 @@ func (m *awsAwsjson11_deserializeOpGetServiceSetting) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10072,6 +10425,10 @@ func (m *awsAwsjson11_deserializeOpLabelParameterVersion) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10191,6 +10548,10 @@ func (m *awsAwsjson11_deserializeOpListAssociations) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10301,6 +10662,10 @@ func (m *awsAwsjson11_deserializeOpListAssociationVersions) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10414,6 +10779,10 @@ func (m *awsAwsjson11_deserializeOpListCommandInvocations) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10533,6 +10902,10 @@ func (m *awsAwsjson11_deserializeOpListCommands) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10652,6 +11025,10 @@ func (m *awsAwsjson11_deserializeOpListComplianceItems) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10771,6 +11148,10 @@ func (m *awsAwsjson11_deserializeOpListComplianceSummaries) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -10884,6 +11265,10 @@ func (m *awsAwsjson11_deserializeOpListDocumentMetadataHistory) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11000,6 +11385,10 @@ func (m *awsAwsjson11_deserializeOpListDocuments) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11113,6 +11502,10 @@ func (m *awsAwsjson11_deserializeOpListDocumentVersions) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11226,6 +11619,10 @@ func (m *awsAwsjson11_deserializeOpListInventoryEntries) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11345,6 +11742,10 @@ func (m *awsAwsjson11_deserializeOpListOpsItemEvents) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11461,6 +11862,10 @@ func (m *awsAwsjson11_deserializeOpListOpsItemRelatedItems) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11571,6 +11976,10 @@ func (m *awsAwsjson11_deserializeOpListOpsMetadata) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11681,6 +12090,10 @@ func (m *awsAwsjson11_deserializeOpListResourceComplianceSummaries) HandleDeseri return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11794,6 +12207,10 @@ func (m *awsAwsjson11_deserializeOpListResourceDataSync) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -11907,6 +12324,10 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12020,6 +12441,10 @@ func (m *awsAwsjson11_deserializeOpModifyDocumentPermission) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12139,6 +12564,10 @@ func (m *awsAwsjson11_deserializeOpPutComplianceItems) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12264,6 +12693,10 @@ func (m *awsAwsjson11_deserializeOpPutInventory) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12404,6 +12837,10 @@ func (m *awsAwsjson11_deserializeOpPutParameter) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12553,6 +12990,10 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12678,6 +13119,10 @@ func (m *awsAwsjson11_deserializeOpRegisterDefaultPatchBaseline) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12791,6 +13236,10 @@ func (m *awsAwsjson11_deserializeOpRegisterPatchBaselineForPatchGroup) HandleDes return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -12910,6 +13359,10 @@ func (m *awsAwsjson11_deserializeOpRegisterTargetWithMaintenanceWindow) HandleDe return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13026,6 +13479,10 @@ func (m *awsAwsjson11_deserializeOpRegisterTaskWithMaintenanceWindow) HandleDese return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13145,6 +13602,10 @@ func (m *awsAwsjson11_deserializeOpRemoveTagsFromResource) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13261,6 +13722,10 @@ func (m *awsAwsjson11_deserializeOpResetServiceSetting) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13374,6 +13839,10 @@ func (m *awsAwsjson11_deserializeOpResumeSession) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13484,6 +13953,10 @@ func (m *awsAwsjson11_deserializeOpSendAutomationSignal) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13600,6 +14073,10 @@ func (m *awsAwsjson11_deserializeOpSendCommand) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13737,6 +14214,10 @@ func (m *awsAwsjson11_deserializeOpStartAssociationsOnce) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13847,6 +14328,10 @@ func (m *awsAwsjson11_deserializeOpStartAutomationExecution) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -13972,6 +14457,10 @@ func (m *awsAwsjson11_deserializeOpStartChangeRequestExecution) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14097,6 +14586,10 @@ func (m *awsAwsjson11_deserializeOpStartSession) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14210,6 +14703,10 @@ func (m *awsAwsjson11_deserializeOpStopAutomationExecution) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14323,6 +14820,10 @@ func (m *awsAwsjson11_deserializeOpTerminateSession) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14430,6 +14931,10 @@ func (m *awsAwsjson11_deserializeOpUnlabelParameterVersion) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14546,6 +15051,10 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociation) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14689,6 +15198,10 @@ func (m *awsAwsjson11_deserializeOpUpdateAssociationStatus) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14811,6 +15324,10 @@ func (m *awsAwsjson11_deserializeOpUpdateDocument) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -14945,6 +15462,10 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentDefaultVersion) HandleDeseriali return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15061,6 +15582,10 @@ func (m *awsAwsjson11_deserializeOpUpdateDocumentMetadata) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15177,6 +15702,10 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindow) HandleDeserialize(ct return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15287,6 +15816,10 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTarget) HandleDeserial return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15397,6 +15930,10 @@ func (m *awsAwsjson11_deserializeOpUpdateMaintenanceWindowTask) HandleDeserializ return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15507,6 +16044,10 @@ func (m *awsAwsjson11_deserializeOpUpdateManagedInstanceRole) HandleDeserialize( return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15617,6 +16158,10 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsItem) HandleDeserialize(ctx context. return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15742,6 +16287,10 @@ func (m *awsAwsjson11_deserializeOpUpdateOpsMetadata) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15861,6 +16410,10 @@ func (m *awsAwsjson11_deserializeOpUpdatePatchBaseline) HandleDeserialize(ctx co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -15971,6 +16524,10 @@ func (m *awsAwsjson11_deserializeOpUpdateResourceDataSync) HandleDeserialize(ctx return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -16087,6 +16644,10 @@ func (m *awsAwsjson11_deserializeOpUpdateServiceSetting) HandleDeserialize(ctx c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -23424,6 +23985,15 @@ func awsAwsjson11_deserializeDocumentAutomationExecution(v **types.AutomationExe return err } + case "TargetLocationsURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetLocationsURL to be of type string, got %T instead", value) + } + sv.TargetLocationsURL = ptr.String(jtv) + } + case "TargetMaps": if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { return err @@ -23763,6 +24333,15 @@ func awsAwsjson11_deserializeDocumentAutomationExecutionMetadata(v **types.Autom sv.Target = ptr.String(jtv) } + case "TargetLocationsURL": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetLocationsURL to be of type string, got %T instead", value) + } + sv.TargetLocationsURL = ptr.String(jtv) + } + case "TargetMaps": if err := awsAwsjson11_deserializeDocumentTargetMaps(&sv.TargetMaps, value); err != nil { return err @@ -26998,6 +27577,42 @@ func awsAwsjson11_deserializeDocumentEffectivePatchList(v *[]types.EffectivePatc return nil } +func awsAwsjson11_deserializeDocumentExcludeAccounts(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExcludeAccount to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentFailedCreateAssociation(v **types.FailedCreateAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -41135,6 +41750,11 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va return err } + case "ExcludeAccounts": + if err := awsAwsjson11_deserializeDocumentExcludeAccounts(&sv.ExcludeAccounts, value); err != nil { + return err + } + case "ExecutionRoleName": if value != nil { jtv, ok := value.(string) @@ -41144,6 +41764,15 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va sv.ExecutionRoleName = ptr.String(jtv) } + case "IncludeChildOrganizationUnits": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IncludeChildOrganizationUnits = jtv + } + case "Regions": if err := awsAwsjson11_deserializeDocumentRegions(&sv.Regions, value); err != nil { return err @@ -41172,6 +41801,29 @@ func awsAwsjson11_deserializeDocumentTargetLocation(v **types.TargetLocation, va sv.TargetLocationMaxErrors = ptr.String(jtv) } + case "Targets": + if err := awsAwsjson11_deserializeDocumentTargets(&sv.Targets, value); err != nil { + return err + } + + case "TargetsMaxConcurrency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxConcurrency to be of type string, got %T instead", value) + } + sv.TargetsMaxConcurrency = ptr.String(jtv) + } + + case "TargetsMaxErrors": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MaxErrors to be of type string, got %T instead", value) + } + sv.TargetsMaxErrors = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go index 71564d7..0fd09f7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/endpoints.go @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -502,14 +503,13 @@ func (*resolveEndpointV2Middleware) ID() string { func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { return next.HandleFinalize(ctx, in) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -520,11 +520,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { endpt.URI.RawPath = endpt.URI.Path } @@ -546,5 +551,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go index c9a0c5c..3e0fcb7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/go_module_metadata.go @@ -3,4 +3,4 @@ package ssm // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.52.4" +const goModuleVersion = "1.54.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go index 88f6325..dc18288 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go index ff77c5f..5974a42 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/options.go @@ -9,7 +9,9 @@ import ( internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" smithyauth "github.com/aws/smithy-go/auth" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -73,6 +72,9 @@ type Options struct { // The logger writer interface to write logging messages to. Logger logging.Logger + // The client meter provider. + MeterProvider metrics.MeterProvider + // The region to send requests to. (Required) Region string @@ -107,6 +109,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go index e5adf5a..eef889d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -26,6 +27,10 @@ func (*awsAwsjson11_serializeOpAddTagsToResource) ID() string { func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -68,6 +73,8 @@ func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -81,6 +88,10 @@ func (*awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) ID() string { func (m *awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -123,6 +134,8 @@ func (m *awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -136,6 +149,10 @@ func (*awsAwsjson11_serializeOpCancelCommand) ID() string { func (m *awsAwsjson11_serializeOpCancelCommand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -178,6 +195,8 @@ func (m *awsAwsjson11_serializeOpCancelCommand) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -191,6 +210,10 @@ func (*awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) ID() string { func (m *awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -233,6 +256,8 @@ func (m *awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -246,6 +271,10 @@ func (*awsAwsjson11_serializeOpCreateActivation) ID() string { func (m *awsAwsjson11_serializeOpCreateActivation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -288,6 +317,8 @@ func (m *awsAwsjson11_serializeOpCreateActivation) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -301,6 +332,10 @@ func (*awsAwsjson11_serializeOpCreateAssociation) ID() string { func (m *awsAwsjson11_serializeOpCreateAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -343,6 +378,8 @@ func (m *awsAwsjson11_serializeOpCreateAssociation) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -356,6 +393,10 @@ func (*awsAwsjson11_serializeOpCreateAssociationBatch) ID() string { func (m *awsAwsjson11_serializeOpCreateAssociationBatch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -398,6 +439,8 @@ func (m *awsAwsjson11_serializeOpCreateAssociationBatch) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -411,6 +454,10 @@ func (*awsAwsjson11_serializeOpCreateDocument) ID() string { func (m *awsAwsjson11_serializeOpCreateDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -453,6 +500,8 @@ func (m *awsAwsjson11_serializeOpCreateDocument) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -466,6 +515,10 @@ func (*awsAwsjson11_serializeOpCreateMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpCreateMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -508,6 +561,8 @@ func (m *awsAwsjson11_serializeOpCreateMaintenanceWindow) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -521,6 +576,10 @@ func (*awsAwsjson11_serializeOpCreateOpsItem) ID() string { func (m *awsAwsjson11_serializeOpCreateOpsItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -563,6 +622,8 @@ func (m *awsAwsjson11_serializeOpCreateOpsItem) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -576,6 +637,10 @@ func (*awsAwsjson11_serializeOpCreateOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpCreateOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -618,6 +683,8 @@ func (m *awsAwsjson11_serializeOpCreateOpsMetadata) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -631,6 +698,10 @@ func (*awsAwsjson11_serializeOpCreatePatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpCreatePatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -673,6 +744,8 @@ func (m *awsAwsjson11_serializeOpCreatePatchBaseline) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -686,6 +759,10 @@ func (*awsAwsjson11_serializeOpCreateResourceDataSync) ID() string { func (m *awsAwsjson11_serializeOpCreateResourceDataSync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -728,6 +805,8 @@ func (m *awsAwsjson11_serializeOpCreateResourceDataSync) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -741,6 +820,10 @@ func (*awsAwsjson11_serializeOpDeleteActivation) ID() string { func (m *awsAwsjson11_serializeOpDeleteActivation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -783,6 +866,8 @@ func (m *awsAwsjson11_serializeOpDeleteActivation) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -796,6 +881,10 @@ func (*awsAwsjson11_serializeOpDeleteAssociation) ID() string { func (m *awsAwsjson11_serializeOpDeleteAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -838,6 +927,8 @@ func (m *awsAwsjson11_serializeOpDeleteAssociation) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -851,6 +942,10 @@ func (*awsAwsjson11_serializeOpDeleteDocument) ID() string { func (m *awsAwsjson11_serializeOpDeleteDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -893,6 +988,8 @@ func (m *awsAwsjson11_serializeOpDeleteDocument) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -906,6 +1003,10 @@ func (*awsAwsjson11_serializeOpDeleteInventory) ID() string { func (m *awsAwsjson11_serializeOpDeleteInventory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -948,6 +1049,8 @@ func (m *awsAwsjson11_serializeOpDeleteInventory) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -961,6 +1064,10 @@ func (*awsAwsjson11_serializeOpDeleteMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpDeleteMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1003,6 +1110,8 @@ func (m *awsAwsjson11_serializeOpDeleteMaintenanceWindow) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1016,6 +1125,10 @@ func (*awsAwsjson11_serializeOpDeleteOpsItem) ID() string { func (m *awsAwsjson11_serializeOpDeleteOpsItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1058,6 +1171,8 @@ func (m *awsAwsjson11_serializeOpDeleteOpsItem) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1071,6 +1186,10 @@ func (*awsAwsjson11_serializeOpDeleteOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpDeleteOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1113,6 +1232,8 @@ func (m *awsAwsjson11_serializeOpDeleteOpsMetadata) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1126,6 +1247,10 @@ func (*awsAwsjson11_serializeOpDeleteParameter) ID() string { func (m *awsAwsjson11_serializeOpDeleteParameter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1168,6 +1293,8 @@ func (m *awsAwsjson11_serializeOpDeleteParameter) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1181,6 +1308,10 @@ func (*awsAwsjson11_serializeOpDeleteParameters) ID() string { func (m *awsAwsjson11_serializeOpDeleteParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1223,6 +1354,8 @@ func (m *awsAwsjson11_serializeOpDeleteParameters) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1236,6 +1369,10 @@ func (*awsAwsjson11_serializeOpDeletePatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpDeletePatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1278,6 +1415,8 @@ func (m *awsAwsjson11_serializeOpDeletePatchBaseline) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1291,6 +1430,10 @@ func (*awsAwsjson11_serializeOpDeleteResourceDataSync) ID() string { func (m *awsAwsjson11_serializeOpDeleteResourceDataSync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1333,6 +1476,8 @@ func (m *awsAwsjson11_serializeOpDeleteResourceDataSync) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1346,6 +1491,10 @@ func (*awsAwsjson11_serializeOpDeleteResourcePolicy) ID() string { func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1388,6 +1537,8 @@ func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1401,6 +1552,10 @@ func (*awsAwsjson11_serializeOpDeregisterManagedInstance) ID() string { func (m *awsAwsjson11_serializeOpDeregisterManagedInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1443,6 +1598,8 @@ func (m *awsAwsjson11_serializeOpDeregisterManagedInstance) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1456,6 +1613,10 @@ func (*awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) ID() string func (m *awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1498,6 +1659,8 @@ func (m *awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) HandleSer } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1511,6 +1674,10 @@ func (*awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) ID() strin func (m *awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1553,6 +1720,8 @@ func (m *awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) HandleSe } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1566,6 +1735,10 @@ func (*awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) ID() string func (m *awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1608,6 +1781,8 @@ func (m *awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1621,6 +1796,10 @@ func (*awsAwsjson11_serializeOpDescribeActivations) ID() string { func (m *awsAwsjson11_serializeOpDescribeActivations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1663,6 +1842,8 @@ func (m *awsAwsjson11_serializeOpDescribeActivations) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1676,6 +1857,10 @@ func (*awsAwsjson11_serializeOpDescribeAssociation) ID() string { func (m *awsAwsjson11_serializeOpDescribeAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1718,6 +1903,8 @@ func (m *awsAwsjson11_serializeOpDescribeAssociation) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1731,6 +1918,10 @@ func (*awsAwsjson11_serializeOpDescribeAssociationExecutions) ID() string { func (m *awsAwsjson11_serializeOpDescribeAssociationExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1773,6 +1964,8 @@ func (m *awsAwsjson11_serializeOpDescribeAssociationExecutions) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1786,6 +1979,10 @@ func (*awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) ID() string func (m *awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1828,6 +2025,8 @@ func (m *awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1841,6 +2040,10 @@ func (*awsAwsjson11_serializeOpDescribeAutomationExecutions) ID() string { func (m *awsAwsjson11_serializeOpDescribeAutomationExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1883,6 +2086,8 @@ func (m *awsAwsjson11_serializeOpDescribeAutomationExecutions) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1896,6 +2101,10 @@ func (*awsAwsjson11_serializeOpDescribeAutomationStepExecutions) ID() string { func (m *awsAwsjson11_serializeOpDescribeAutomationStepExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1938,6 +2147,8 @@ func (m *awsAwsjson11_serializeOpDescribeAutomationStepExecutions) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -1951,6 +2162,10 @@ func (*awsAwsjson11_serializeOpDescribeAvailablePatches) ID() string { func (m *awsAwsjson11_serializeOpDescribeAvailablePatches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -1993,6 +2208,8 @@ func (m *awsAwsjson11_serializeOpDescribeAvailablePatches) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2006,6 +2223,10 @@ func (*awsAwsjson11_serializeOpDescribeDocument) ID() string { func (m *awsAwsjson11_serializeOpDescribeDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2048,6 +2269,8 @@ func (m *awsAwsjson11_serializeOpDescribeDocument) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2061,6 +2284,10 @@ func (*awsAwsjson11_serializeOpDescribeDocumentPermission) ID() string { func (m *awsAwsjson11_serializeOpDescribeDocumentPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2103,6 +2330,8 @@ func (m *awsAwsjson11_serializeOpDescribeDocumentPermission) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2116,6 +2345,10 @@ func (*awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) ID() strin func (m *awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2158,6 +2391,8 @@ func (m *awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) HandleSe } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2171,6 +2406,10 @@ func (*awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) ID() st func (m *awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2213,6 +2452,8 @@ func (m *awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) Handl } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2226,6 +2467,10 @@ func (*awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2268,6 +2513,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) HandleSeria } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2281,6 +2528,10 @@ func (*awsAwsjson11_serializeOpDescribeInstanceInformation) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstanceInformation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2323,6 +2574,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceInformation) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2336,6 +2589,10 @@ func (*awsAwsjson11_serializeOpDescribeInstancePatches) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstancePatches) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2378,6 +2635,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatches) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2391,6 +2650,10 @@ func (*awsAwsjson11_serializeOpDescribeInstancePatchStates) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstancePatchStates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2433,6 +2696,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatchStates) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2446,6 +2711,10 @@ func (*awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) ID() st func (m *awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2488,6 +2757,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) Handl } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2501,6 +2772,10 @@ func (*awsAwsjson11_serializeOpDescribeInstanceProperties) ID() string { func (m *awsAwsjson11_serializeOpDescribeInstanceProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2543,6 +2818,8 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceProperties) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2556,6 +2833,10 @@ func (*awsAwsjson11_serializeOpDescribeInventoryDeletions) ID() string { func (m *awsAwsjson11_serializeOpDescribeInventoryDeletions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2598,6 +2879,8 @@ func (m *awsAwsjson11_serializeOpDescribeInventoryDeletions) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2611,6 +2894,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) ID() string func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2653,6 +2940,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2666,6 +2955,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2708,6 +3001,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocatio } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2721,6 +3016,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) ID() str func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2763,6 +3062,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) Handle } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2776,6 +3077,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindows) ID() string { func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindows) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2818,6 +3123,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindows) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2831,6 +3138,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) ID() string { func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2873,6 +3184,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2886,6 +3199,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) ID() string func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2928,6 +3245,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2941,6 +3260,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) ID() string { func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -2983,6 +3306,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) HandleSeriali } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -2996,6 +3321,10 @@ func (*awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) ID() string { func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3038,6 +3367,8 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3051,6 +3382,10 @@ func (*awsAwsjson11_serializeOpDescribeOpsItems) ID() string { func (m *awsAwsjson11_serializeOpDescribeOpsItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3093,6 +3428,8 @@ func (m *awsAwsjson11_serializeOpDescribeOpsItems) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3106,6 +3443,10 @@ func (*awsAwsjson11_serializeOpDescribeParameters) ID() string { func (m *awsAwsjson11_serializeOpDescribeParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3148,6 +3489,8 @@ func (m *awsAwsjson11_serializeOpDescribeParameters) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3161,6 +3504,10 @@ func (*awsAwsjson11_serializeOpDescribePatchBaselines) ID() string { func (m *awsAwsjson11_serializeOpDescribePatchBaselines) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3203,6 +3550,8 @@ func (m *awsAwsjson11_serializeOpDescribePatchBaselines) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3216,6 +3565,10 @@ func (*awsAwsjson11_serializeOpDescribePatchGroups) ID() string { func (m *awsAwsjson11_serializeOpDescribePatchGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3258,6 +3611,8 @@ func (m *awsAwsjson11_serializeOpDescribePatchGroups) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3271,6 +3626,10 @@ func (*awsAwsjson11_serializeOpDescribePatchGroupState) ID() string { func (m *awsAwsjson11_serializeOpDescribePatchGroupState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3313,6 +3672,8 @@ func (m *awsAwsjson11_serializeOpDescribePatchGroupState) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3326,6 +3687,10 @@ func (*awsAwsjson11_serializeOpDescribePatchProperties) ID() string { func (m *awsAwsjson11_serializeOpDescribePatchProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3368,6 +3733,8 @@ func (m *awsAwsjson11_serializeOpDescribePatchProperties) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3381,6 +3748,10 @@ func (*awsAwsjson11_serializeOpDescribeSessions) ID() string { func (m *awsAwsjson11_serializeOpDescribeSessions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3423,6 +3794,8 @@ func (m *awsAwsjson11_serializeOpDescribeSessions) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3436,6 +3809,10 @@ func (*awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) ID() string { func (m *awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3478,6 +3855,8 @@ func (m *awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) HandleSerialize } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3491,6 +3870,10 @@ func (*awsAwsjson11_serializeOpGetAutomationExecution) ID() string { func (m *awsAwsjson11_serializeOpGetAutomationExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3533,6 +3916,8 @@ func (m *awsAwsjson11_serializeOpGetAutomationExecution) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3546,6 +3931,10 @@ func (*awsAwsjson11_serializeOpGetCalendarState) ID() string { func (m *awsAwsjson11_serializeOpGetCalendarState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3588,6 +3977,8 @@ func (m *awsAwsjson11_serializeOpGetCalendarState) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3601,6 +3992,10 @@ func (*awsAwsjson11_serializeOpGetCommandInvocation) ID() string { func (m *awsAwsjson11_serializeOpGetCommandInvocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3643,6 +4038,8 @@ func (m *awsAwsjson11_serializeOpGetCommandInvocation) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3656,6 +4053,10 @@ func (*awsAwsjson11_serializeOpGetConnectionStatus) ID() string { func (m *awsAwsjson11_serializeOpGetConnectionStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3698,6 +4099,8 @@ func (m *awsAwsjson11_serializeOpGetConnectionStatus) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3711,6 +4114,10 @@ func (*awsAwsjson11_serializeOpGetDefaultPatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpGetDefaultPatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3753,6 +4160,8 @@ func (m *awsAwsjson11_serializeOpGetDefaultPatchBaseline) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3766,6 +4175,10 @@ func (*awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) ID() strin func (m *awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3808,6 +4221,8 @@ func (m *awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) HandleSe } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3821,6 +4236,10 @@ func (*awsAwsjson11_serializeOpGetDocument) ID() string { func (m *awsAwsjson11_serializeOpGetDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3863,6 +4282,8 @@ func (m *awsAwsjson11_serializeOpGetDocument) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3876,6 +4297,10 @@ func (*awsAwsjson11_serializeOpGetInventory) ID() string { func (m *awsAwsjson11_serializeOpGetInventory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3918,6 +4343,8 @@ func (m *awsAwsjson11_serializeOpGetInventory) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3931,6 +4358,10 @@ func (*awsAwsjson11_serializeOpGetInventorySchema) ID() string { func (m *awsAwsjson11_serializeOpGetInventorySchema) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -3973,6 +4404,8 @@ func (m *awsAwsjson11_serializeOpGetInventorySchema) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -3986,6 +4419,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpGetMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4028,6 +4465,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindow) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4041,6 +4480,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecution) ID() string { func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4083,6 +4526,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecution) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4096,6 +4541,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) ID() string { func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4138,6 +4587,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4151,6 +4602,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) ID() func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4193,6 +4648,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) Ha } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4206,6 +4663,10 @@ func (*awsAwsjson11_serializeOpGetMaintenanceWindowTask) ID() string { func (m *awsAwsjson11_serializeOpGetMaintenanceWindowTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4248,6 +4709,8 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowTask) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4261,6 +4724,10 @@ func (*awsAwsjson11_serializeOpGetOpsItem) ID() string { func (m *awsAwsjson11_serializeOpGetOpsItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4303,6 +4770,8 @@ func (m *awsAwsjson11_serializeOpGetOpsItem) HandleSerialize(ctx context.Context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4316,6 +4785,10 @@ func (*awsAwsjson11_serializeOpGetOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpGetOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4358,6 +4831,8 @@ func (m *awsAwsjson11_serializeOpGetOpsMetadata) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4371,6 +4846,10 @@ func (*awsAwsjson11_serializeOpGetOpsSummary) ID() string { func (m *awsAwsjson11_serializeOpGetOpsSummary) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4413,6 +4892,8 @@ func (m *awsAwsjson11_serializeOpGetOpsSummary) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4426,6 +4907,10 @@ func (*awsAwsjson11_serializeOpGetParameter) ID() string { func (m *awsAwsjson11_serializeOpGetParameter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4468,6 +4953,8 @@ func (m *awsAwsjson11_serializeOpGetParameter) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4481,6 +4968,10 @@ func (*awsAwsjson11_serializeOpGetParameterHistory) ID() string { func (m *awsAwsjson11_serializeOpGetParameterHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4523,6 +5014,8 @@ func (m *awsAwsjson11_serializeOpGetParameterHistory) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4536,6 +5029,10 @@ func (*awsAwsjson11_serializeOpGetParameters) ID() string { func (m *awsAwsjson11_serializeOpGetParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4578,6 +5075,8 @@ func (m *awsAwsjson11_serializeOpGetParameters) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4591,6 +5090,10 @@ func (*awsAwsjson11_serializeOpGetParametersByPath) ID() string { func (m *awsAwsjson11_serializeOpGetParametersByPath) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4633,6 +5136,8 @@ func (m *awsAwsjson11_serializeOpGetParametersByPath) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4646,6 +5151,10 @@ func (*awsAwsjson11_serializeOpGetPatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpGetPatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4688,6 +5197,8 @@ func (m *awsAwsjson11_serializeOpGetPatchBaseline) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4701,6 +5212,10 @@ func (*awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) ID() string { func (m *awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4743,6 +5258,8 @@ func (m *awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4756,6 +5273,10 @@ func (*awsAwsjson11_serializeOpGetResourcePolicies) ID() string { func (m *awsAwsjson11_serializeOpGetResourcePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4798,6 +5319,8 @@ func (m *awsAwsjson11_serializeOpGetResourcePolicies) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4811,6 +5334,10 @@ func (*awsAwsjson11_serializeOpGetServiceSetting) ID() string { func (m *awsAwsjson11_serializeOpGetServiceSetting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4853,6 +5380,8 @@ func (m *awsAwsjson11_serializeOpGetServiceSetting) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4866,6 +5395,10 @@ func (*awsAwsjson11_serializeOpLabelParameterVersion) ID() string { func (m *awsAwsjson11_serializeOpLabelParameterVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4908,6 +5441,8 @@ func (m *awsAwsjson11_serializeOpLabelParameterVersion) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4921,6 +5456,10 @@ func (*awsAwsjson11_serializeOpListAssociations) ID() string { func (m *awsAwsjson11_serializeOpListAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -4963,6 +5502,8 @@ func (m *awsAwsjson11_serializeOpListAssociations) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -4976,6 +5517,10 @@ func (*awsAwsjson11_serializeOpListAssociationVersions) ID() string { func (m *awsAwsjson11_serializeOpListAssociationVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5018,6 +5563,8 @@ func (m *awsAwsjson11_serializeOpListAssociationVersions) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5031,6 +5578,10 @@ func (*awsAwsjson11_serializeOpListCommandInvocations) ID() string { func (m *awsAwsjson11_serializeOpListCommandInvocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5073,6 +5624,8 @@ func (m *awsAwsjson11_serializeOpListCommandInvocations) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5086,6 +5639,10 @@ func (*awsAwsjson11_serializeOpListCommands) ID() string { func (m *awsAwsjson11_serializeOpListCommands) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5128,6 +5685,8 @@ func (m *awsAwsjson11_serializeOpListCommands) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5141,6 +5700,10 @@ func (*awsAwsjson11_serializeOpListComplianceItems) ID() string { func (m *awsAwsjson11_serializeOpListComplianceItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5183,6 +5746,8 @@ func (m *awsAwsjson11_serializeOpListComplianceItems) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5196,6 +5761,10 @@ func (*awsAwsjson11_serializeOpListComplianceSummaries) ID() string { func (m *awsAwsjson11_serializeOpListComplianceSummaries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5238,6 +5807,8 @@ func (m *awsAwsjson11_serializeOpListComplianceSummaries) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5251,6 +5822,10 @@ func (*awsAwsjson11_serializeOpListDocumentMetadataHistory) ID() string { func (m *awsAwsjson11_serializeOpListDocumentMetadataHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5293,6 +5868,8 @@ func (m *awsAwsjson11_serializeOpListDocumentMetadataHistory) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5306,6 +5883,10 @@ func (*awsAwsjson11_serializeOpListDocuments) ID() string { func (m *awsAwsjson11_serializeOpListDocuments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5348,6 +5929,8 @@ func (m *awsAwsjson11_serializeOpListDocuments) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5361,6 +5944,10 @@ func (*awsAwsjson11_serializeOpListDocumentVersions) ID() string { func (m *awsAwsjson11_serializeOpListDocumentVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5403,6 +5990,8 @@ func (m *awsAwsjson11_serializeOpListDocumentVersions) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5416,6 +6005,10 @@ func (*awsAwsjson11_serializeOpListInventoryEntries) ID() string { func (m *awsAwsjson11_serializeOpListInventoryEntries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5458,6 +6051,8 @@ func (m *awsAwsjson11_serializeOpListInventoryEntries) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5471,6 +6066,10 @@ func (*awsAwsjson11_serializeOpListOpsItemEvents) ID() string { func (m *awsAwsjson11_serializeOpListOpsItemEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5513,6 +6112,8 @@ func (m *awsAwsjson11_serializeOpListOpsItemEvents) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5526,6 +6127,10 @@ func (*awsAwsjson11_serializeOpListOpsItemRelatedItems) ID() string { func (m *awsAwsjson11_serializeOpListOpsItemRelatedItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5568,6 +6173,8 @@ func (m *awsAwsjson11_serializeOpListOpsItemRelatedItems) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5581,6 +6188,10 @@ func (*awsAwsjson11_serializeOpListOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpListOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5623,6 +6234,8 @@ func (m *awsAwsjson11_serializeOpListOpsMetadata) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5636,6 +6249,10 @@ func (*awsAwsjson11_serializeOpListResourceComplianceSummaries) ID() string { func (m *awsAwsjson11_serializeOpListResourceComplianceSummaries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5678,6 +6295,8 @@ func (m *awsAwsjson11_serializeOpListResourceComplianceSummaries) HandleSerializ } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5691,6 +6310,10 @@ func (*awsAwsjson11_serializeOpListResourceDataSync) ID() string { func (m *awsAwsjson11_serializeOpListResourceDataSync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5733,6 +6356,8 @@ func (m *awsAwsjson11_serializeOpListResourceDataSync) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5746,6 +6371,10 @@ func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5788,6 +6417,8 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5801,6 +6432,10 @@ func (*awsAwsjson11_serializeOpModifyDocumentPermission) ID() string { func (m *awsAwsjson11_serializeOpModifyDocumentPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5843,6 +6478,8 @@ func (m *awsAwsjson11_serializeOpModifyDocumentPermission) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5856,6 +6493,10 @@ func (*awsAwsjson11_serializeOpPutComplianceItems) ID() string { func (m *awsAwsjson11_serializeOpPutComplianceItems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5898,6 +6539,8 @@ func (m *awsAwsjson11_serializeOpPutComplianceItems) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5911,6 +6554,10 @@ func (*awsAwsjson11_serializeOpPutInventory) ID() string { func (m *awsAwsjson11_serializeOpPutInventory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -5953,6 +6600,8 @@ func (m *awsAwsjson11_serializeOpPutInventory) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -5966,6 +6615,10 @@ func (*awsAwsjson11_serializeOpPutParameter) ID() string { func (m *awsAwsjson11_serializeOpPutParameter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6008,6 +6661,8 @@ func (m *awsAwsjson11_serializeOpPutParameter) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6021,6 +6676,10 @@ func (*awsAwsjson11_serializeOpPutResourcePolicy) ID() string { func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6063,6 +6722,8 @@ func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6076,6 +6737,10 @@ func (*awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6118,6 +6783,8 @@ func (m *awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6131,6 +6798,10 @@ func (*awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) ID() string { func (m *awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6173,6 +6844,8 @@ func (m *awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) HandleSeria } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6186,6 +6859,10 @@ func (*awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) ID() string func (m *awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6228,6 +6905,8 @@ func (m *awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) HandleSeri } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6241,6 +6920,10 @@ func (*awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6283,6 +6966,8 @@ func (m *awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) HandleSerial } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6296,6 +6981,10 @@ func (*awsAwsjson11_serializeOpRemoveTagsFromResource) ID() string { func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6338,6 +7027,8 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6351,6 +7042,10 @@ func (*awsAwsjson11_serializeOpResetServiceSetting) ID() string { func (m *awsAwsjson11_serializeOpResetServiceSetting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6393,6 +7088,8 @@ func (m *awsAwsjson11_serializeOpResetServiceSetting) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6406,6 +7103,10 @@ func (*awsAwsjson11_serializeOpResumeSession) ID() string { func (m *awsAwsjson11_serializeOpResumeSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6448,6 +7149,8 @@ func (m *awsAwsjson11_serializeOpResumeSession) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6461,6 +7164,10 @@ func (*awsAwsjson11_serializeOpSendAutomationSignal) ID() string { func (m *awsAwsjson11_serializeOpSendAutomationSignal) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6503,6 +7210,8 @@ func (m *awsAwsjson11_serializeOpSendAutomationSignal) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6516,6 +7225,10 @@ func (*awsAwsjson11_serializeOpSendCommand) ID() string { func (m *awsAwsjson11_serializeOpSendCommand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6558,6 +7271,8 @@ func (m *awsAwsjson11_serializeOpSendCommand) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6571,6 +7286,10 @@ func (*awsAwsjson11_serializeOpStartAssociationsOnce) ID() string { func (m *awsAwsjson11_serializeOpStartAssociationsOnce) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6613,6 +7332,8 @@ func (m *awsAwsjson11_serializeOpStartAssociationsOnce) HandleSerialize(ctx cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6626,6 +7347,10 @@ func (*awsAwsjson11_serializeOpStartAutomationExecution) ID() string { func (m *awsAwsjson11_serializeOpStartAutomationExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6668,6 +7393,8 @@ func (m *awsAwsjson11_serializeOpStartAutomationExecution) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6681,6 +7408,10 @@ func (*awsAwsjson11_serializeOpStartChangeRequestExecution) ID() string { func (m *awsAwsjson11_serializeOpStartChangeRequestExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6723,6 +7454,8 @@ func (m *awsAwsjson11_serializeOpStartChangeRequestExecution) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6736,6 +7469,10 @@ func (*awsAwsjson11_serializeOpStartSession) ID() string { func (m *awsAwsjson11_serializeOpStartSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6778,6 +7515,8 @@ func (m *awsAwsjson11_serializeOpStartSession) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6791,6 +7530,10 @@ func (*awsAwsjson11_serializeOpStopAutomationExecution) ID() string { func (m *awsAwsjson11_serializeOpStopAutomationExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6833,6 +7576,8 @@ func (m *awsAwsjson11_serializeOpStopAutomationExecution) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6846,6 +7591,10 @@ func (*awsAwsjson11_serializeOpTerminateSession) ID() string { func (m *awsAwsjson11_serializeOpTerminateSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6888,6 +7637,8 @@ func (m *awsAwsjson11_serializeOpTerminateSession) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6901,6 +7652,10 @@ func (*awsAwsjson11_serializeOpUnlabelParameterVersion) ID() string { func (m *awsAwsjson11_serializeOpUnlabelParameterVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6943,6 +7698,8 @@ func (m *awsAwsjson11_serializeOpUnlabelParameterVersion) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -6956,6 +7713,10 @@ func (*awsAwsjson11_serializeOpUpdateAssociation) ID() string { func (m *awsAwsjson11_serializeOpUpdateAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -6998,6 +7759,8 @@ func (m *awsAwsjson11_serializeOpUpdateAssociation) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7011,6 +7774,10 @@ func (*awsAwsjson11_serializeOpUpdateAssociationStatus) ID() string { func (m *awsAwsjson11_serializeOpUpdateAssociationStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7053,6 +7820,8 @@ func (m *awsAwsjson11_serializeOpUpdateAssociationStatus) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7066,6 +7835,10 @@ func (*awsAwsjson11_serializeOpUpdateDocument) ID() string { func (m *awsAwsjson11_serializeOpUpdateDocument) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7108,6 +7881,8 @@ func (m *awsAwsjson11_serializeOpUpdateDocument) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7121,6 +7896,10 @@ func (*awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) ID() string { func (m *awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7163,6 +7942,8 @@ func (m *awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) HandleSerialize(c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7176,6 +7957,10 @@ func (*awsAwsjson11_serializeOpUpdateDocumentMetadata) ID() string { func (m *awsAwsjson11_serializeOpUpdateDocumentMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7218,6 +8003,8 @@ func (m *awsAwsjson11_serializeOpUpdateDocumentMetadata) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7231,6 +8018,10 @@ func (*awsAwsjson11_serializeOpUpdateMaintenanceWindow) ID() string { func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7273,6 +8064,8 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindow) HandleSerialize(ctx co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7286,6 +8079,10 @@ func (*awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) ID() string { func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7328,6 +8125,8 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) HandleSerialize( } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7341,6 +8140,10 @@ func (*awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) ID() string { func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7383,6 +8186,8 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) HandleSerialize(ct } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7396,6 +8201,10 @@ func (*awsAwsjson11_serializeOpUpdateManagedInstanceRole) ID() string { func (m *awsAwsjson11_serializeOpUpdateManagedInstanceRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7438,6 +8247,8 @@ func (m *awsAwsjson11_serializeOpUpdateManagedInstanceRole) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7451,6 +8262,10 @@ func (*awsAwsjson11_serializeOpUpdateOpsItem) ID() string { func (m *awsAwsjson11_serializeOpUpdateOpsItem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7493,6 +8308,8 @@ func (m *awsAwsjson11_serializeOpUpdateOpsItem) HandleSerialize(ctx context.Cont } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7506,6 +8323,10 @@ func (*awsAwsjson11_serializeOpUpdateOpsMetadata) ID() string { func (m *awsAwsjson11_serializeOpUpdateOpsMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7548,6 +8369,8 @@ func (m *awsAwsjson11_serializeOpUpdateOpsMetadata) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7561,6 +8384,10 @@ func (*awsAwsjson11_serializeOpUpdatePatchBaseline) ID() string { func (m *awsAwsjson11_serializeOpUpdatePatchBaseline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7603,6 +8430,8 @@ func (m *awsAwsjson11_serializeOpUpdatePatchBaseline) HandleSerialize(ctx contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7616,6 +8445,10 @@ func (*awsAwsjson11_serializeOpUpdateResourceDataSync) ID() string { func (m *awsAwsjson11_serializeOpUpdateResourceDataSync) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7658,6 +8491,8 @@ func (m *awsAwsjson11_serializeOpUpdateResourceDataSync) HandleSerialize(ctx con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -7671,6 +8506,10 @@ func (*awsAwsjson11_serializeOpUpdateServiceSetting) ID() string { func (m *awsAwsjson11_serializeOpUpdateServiceSetting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -7713,6 +8552,8 @@ func (m *awsAwsjson11_serializeOpUpdateServiceSetting) HandleSerialize(ctx conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentAccountIdList(v []string, value smithyjson.Value) error { @@ -8630,6 +9471,17 @@ func awsAwsjson11_serializeDocumentDocumentReviews(v *types.DocumentReviews, val return nil } +func awsAwsjson11_serializeDocumentExcludeAccounts(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson11_serializeDocumentInstanceAssociationOutputLocation(v *types.InstanceAssociationOutputLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10670,11 +11522,23 @@ func awsAwsjson11_serializeDocumentTargetLocation(v *types.TargetLocation, value } } + if v.ExcludeAccounts != nil { + ok := object.Key("ExcludeAccounts") + if err := awsAwsjson11_serializeDocumentExcludeAccounts(v.ExcludeAccounts, ok); err != nil { + return err + } + } + if v.ExecutionRoleName != nil { ok := object.Key("ExecutionRoleName") ok.String(*v.ExecutionRoleName) } + if v.IncludeChildOrganizationUnits { + ok := object.Key("IncludeChildOrganizationUnits") + ok.Boolean(v.IncludeChildOrganizationUnits) + } + if v.Regions != nil { ok := object.Key("Regions") if err := awsAwsjson11_serializeDocumentRegions(v.Regions, ok); err != nil { @@ -10699,6 +11563,23 @@ func awsAwsjson11_serializeDocumentTargetLocation(v *types.TargetLocation, value ok.String(*v.TargetLocationMaxErrors) } + if v.Targets != nil { + ok := object.Key("Targets") + if err := awsAwsjson11_serializeDocumentTargets(v.Targets, ok); err != nil { + return err + } + } + + if v.TargetsMaxConcurrency != nil { + ok := object.Key("TargetsMaxConcurrency") + ok.String(*v.TargetsMaxConcurrency) + } + + if v.TargetsMaxErrors != nil { + ok := object.Key("TargetsMaxErrors") + ok.String(*v.TargetsMaxErrors) + } + return nil } @@ -14216,6 +15097,11 @@ func awsAwsjson11_serializeOpDocumentStartAutomationExecutionInput(v *StartAutom } } + if v.TargetLocationsURL != nil { + ok := object.Key("TargetLocationsURL") + ok.String(*v.TargetLocationsURL) + } + if v.TargetMaps != nil { ok := object.Key("TargetMaps") if err := awsAwsjson11_serializeDocumentTargetMaps(v.TargetMaps, ok); err != nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go index f7d8d80..77c2c19 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/errors.go @@ -3383,11 +3383,11 @@ func (e *TargetInUseException) ErrorCode() string { func (e *TargetInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified target managed node for the session isn't fully configured for -// use with Session Manager. For more information, see [Getting started with Session Manager]in the Amazon Web Services +// use with Session Manager. For more information, see [Setting up Session Manager]in the Amazon Web Services // Systems Manager User Guide. This error is also returned if you attempt to start // a session on a managed node that is located in a different account or Region // -// [Getting started with Session Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html +// [Setting up Session Manager]: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started.html type TargetNotConnected struct { Message *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go index 7da3ad4..bec5f3e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssm/types/types.go @@ -635,11 +635,11 @@ type AttachmentsSource struct { // // - For the key SourceUrl, the value is an S3 bucket location. For example: // - // "Values": [ "s3://doc-example-bucket/my-folder" ] + // "Values": [ "s3://amzn-s3-demo-bucket/my-prefix" ] // // - For the key S3FileUrl, the value is a file in an S3 bucket. For example: // - // "Values": [ "s3://doc-example-bucket/my-folder/my-file.py" ] + // "Values": [ "s3://amzn-s3-demo-bucket/my-prefix/my-file.py" ] // // - For the key AttachmentReference, the value is constructed from the name of // another SSM document in your account, a version number of that document, and a @@ -763,6 +763,10 @@ type AutomationExecution struct { // accounts where you want to run the Automation. TargetLocations []TargetLocation + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported + TargetLocationsURL *string + // The specified key-value mapping of document parameters to target resources. TargetMaps []map[string][]string @@ -820,10 +824,10 @@ type AutomationExecutionMetadata struct { // Use this filter with DescribeAutomationExecutions. Specify either Local or CrossAccount. CrossAccount is an // Automation that runs in multiple Amazon Web Services Regions and Amazon Web - // Services accounts. For more information, see [Running Automation workflows in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services Systems + // Services accounts. For more information, see [Running automations in multiple Amazon Web Services Regions and accounts]in the Amazon Web Services Systems // Manager User Guide. // - // [Running Automation workflows in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html + // [Running automations in multiple Amazon Web Services Regions and accounts]: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html AutomationType AutomationType // The name of the Change Manager change request. @@ -892,6 +896,10 @@ type AutomationExecutionMetadata struct { // The list of execution outputs as defined in the Automation runbook. Target *string + // A publicly accessible URL for a file that contains the TargetLocations body. + // Currently, only files in presigned Amazon S3 buckets are supported + TargetLocationsURL *string + // The specified key-value mapping of document parameters to target resources. TargetMaps []map[string][]string @@ -916,9 +924,9 @@ type BaselineOverride struct { // A list of explicitly approved patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html ApprovedPatches []string // Defines the compliance level for approved patches. When an approved patch is @@ -940,9 +948,9 @@ type BaselineOverride struct { // A list of explicitly rejected patches for the baseline. // // For information about accepted formats for lists of approved patches and - // rejected patches, see [About package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. + // rejected patches, see [Package name formats for approved and rejected patch lists]in the Amazon Web Services Systems Manager User Guide. // - // [About package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html + // [Package name formats for approved and rejected patch lists]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html RejectedPatches []string // The action for Patch Manager to take on patches included in the RejectedPackages @@ -1143,11 +1151,11 @@ type CommandFilter struct { // The filter value. Valid values for each filter key are as follows: // // - InvokedAfter: Specify a timestamp to limit your results. For example, - // specify 2021-07-07T00:00:00Z to see a list of command executions occurring + // specify 2024-07-07T00:00:00Z to see a list of command executions occurring // July 7, 2021, and later. // // - InvokedBefore: Specify a timestamp to limit your results. For example, - // specify 2021-07-07T00:00:00Z to see a list of command executions from before + // specify 2024-07-07T00:00:00Z to see a list of command executions from before // July 7, 2021. // // - Status: Specify a valid command status to see a list of all command @@ -1358,11 +1366,11 @@ type CommandPlugin struct { // This was requested when issuing the command. For example, in the following // response: // - // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript + // amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript // - // doc-example-bucket is the name of the S3 bucket; + // amzn-s3-demo-bucket is the name of the S3 bucket; // - // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; + // my-prefix is the name of the S3 prefix; // // i-02573cafcfEXAMPLE is the managed node ID; // @@ -1373,11 +1381,11 @@ type CommandPlugin struct { // executions should be stored. This was requested when issuing the command. For // example, in the following response: // - // doc-example-bucket/ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix/i-02573cafcfEXAMPLE/awsrunShellScript + // amzn-s3-demo-bucket/my-prefix/i-02573cafcfEXAMPLE/awsrunShellScript // - // doc-example-bucket is the name of the S3 bucket; + // amzn-s3-demo-bucket is the name of the S3 bucket; // - // ab19cb99-a030-46dd-9dfc-8eSAMPLEPre-Fix is the name of the S3 prefix; + // my-prefix is the name of the S3 prefix; // // i-02573cafcfEXAMPLE is the managed node ID; // @@ -2433,13 +2441,13 @@ type InstanceInformation struct { // (VM) when it is activated as a Systems Manager managed node. The name is // specified as the DefaultInstanceName property using the CreateActivation command. It is applied // to the managed node by specifying the Activation Code and Activation ID when you - // install SSM Agent on the node, as explained in [Install SSM Agent for a hybrid and multicloud environment (Linux)]and [Install SSM Agent for a hybrid and multicloud environment (Windows)]. To retrieve the Name tag + // install SSM Agent on the node, as explained in [How to install SSM Agent on hybrid Linux nodes]and [How to install SSM Agent on hybrid Windows Server nodes]. To retrieve the Name tag // of an EC2 instance, use the Amazon EC2 DescribeInstances operation. For // information, see [DescribeInstances]in the Amazon EC2 API Reference or [describe-instances] in the Amazon Web Services // CLI Command Reference. // - // [Install SSM Agent for a hybrid and multicloud environment (Windows)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-win.html - // [Install SSM Agent for a hybrid and multicloud environment (Linux)]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html + // [How to install SSM Agent on hybrid Linux nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-linux.html + // [How to install SSM Agent on hybrid Windows Server nodes]: https://docs.aws.amazon.com/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-windows.html // [DescribeInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html // [describe-instances]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html Name *string @@ -2589,11 +2597,10 @@ type InstancePatchState struct { // AWS-RunPatchBaseline , overrides the patches specified by the default patch // baseline. // - // For more information about the InstallOverrideList parameter, see [About the AWS-RunPatchBaseline SSM document] - // AWS-RunPatchBaseline SSM document in the Amazon Web Services Systems Manager - // User Guide. + // For more information about the InstallOverrideList parameter, see [SSM Command document for patching: AWS-RunPatchBaseline] + // AWS-RunPatchBaseline in the Amazon Web Services Systems Manager User Guide. // - // [About the AWS-RunPatchBaseline SSM document]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html + // [SSM Command document for patching: AWS-RunPatchBaseline]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html InstallOverrideList *string // The number of patches from the patch baseline that are installed on the managed @@ -2873,7 +2880,7 @@ type InventoryDeletionStatusItem struct { // Information about the delete operation. For more information about this // summary, see [Understanding the delete inventory summary]in the Amazon Web Services Systems Manager User Guide. // - // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-custom.html#sysman-inventory-delete + // [Understanding the delete inventory summary]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-custom.html#delete-custom-inventory DeletionSummary *InventoryDeletionSummary // The status of the operation. Possible values are InProgress and Complete. @@ -2943,7 +2950,7 @@ type InventoryFilter struct { // The Exists filter must be used with aggregators. For more information, see [Aggregating inventory data] in // the Amazon Web Services Systems Manager User Guide. // - // [Aggregating inventory data]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-inventory-aggregate.html + // [Aggregating inventory data]: https://docs.aws.amazon.com/systems-manager/latest/userguide/inventory-aggregate.html Type InventoryQueryOperatorType noSmithyDocumentSerde @@ -3450,10 +3457,10 @@ type MaintenanceWindowRunCommandParameters struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // If this time is reached and the command hasn't already started running, it @@ -3593,10 +3600,10 @@ type MaintenanceWindowTask struct { // However, for an improved security posture, we strongly recommend creating a // custom policy and custom service role for running your maintenance window tasks. // The policy can be crafted to provide only the permissions needed for your - // particular maintenance window tasks. For more information, see [Setting up maintenance windows]in the in the + // particular maintenance window tasks. For more information, see [Setting up Maintenance Windows]in the in the // Amazon Web Services Systems Manager User Guide. // - // [Setting up maintenance windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html + // [Setting up Maintenance Windows]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html ServiceRoleArn *string // The targets (either managed nodes or tags). Managed nodes are specified using @@ -3897,8 +3904,8 @@ type OpsItem struct { // resource is a subset of source. Source *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . For more - // information, see [Editing OpsItem details]in the Amazon Web Services Systems Manager User Guide. + // The OpsItem status. For more information, see [Editing OpsItem details] in the Amazon Web Services + // Systems Manager User Guide. // // [Editing OpsItem details]: https://docs.aws.amazon.com/systems-manager/latest/userguide/OpsCenter-working-with-OpsItems-editing-details.html Status OpsItemStatus @@ -4140,7 +4147,7 @@ type OpsItemSummary struct { // The impacted Amazon Web Services resource. Source *string - // The OpsItem status. Status can be Open , In Progress , or Resolved . + // The OpsItem status. Status OpsItemStatus // A short heading that describes the nature of the OpsItem and the impacted @@ -4605,7 +4612,7 @@ type PatchComplianceData struct { // For descriptions of each patch state, see [About patch compliance] in the Amazon Web Services Systems // Manager User Guide. // - // [About patch compliance]: https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch + // [About patch compliance]: https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-monitor-patch // // This member is required. State PatchComplianceDataState @@ -4719,21 +4726,37 @@ type PatchRule struct { // that the patch is marked as approved in the patch baseline. For example, a value // of 7 means that patches are approved seven days after they are released. // - // This parameter is marked as not required, but your request must include a value + // This parameter is marked as Required: No , but your request must include a value // for either ApproveAfterDays or ApproveUntilDate . // // Not supported for Debian Server or Ubuntu Server. + // + // Use caution when setting this value for Windows Server patch baselines. Because + // patch updates that are replaced by later updates are removed, setting too broad + // a value for this parameter can result in crucial patches not being installed. + // For more information, see the Windows Server tab in the topic [How security patches are selected]in the Amazon Web + // Services Systems Manager User Guide. + // + // [How security patches are selected]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-selecting-patches.html ApproveAfterDays *int32 // The cutoff date for auto approval of released patches. Any patches released on // or before this date are installed automatically. // - // Enter dates in the format YYYY-MM-DD . For example, 2021-12-31 . + // Enter dates in the format YYYY-MM-DD . For example, 2024-12-31 . // - // This parameter is marked as not required, but your request must include a value + // This parameter is marked as Required: No , but your request must include a value // for either ApproveUntilDate or ApproveAfterDays . // // Not supported for Debian Server or Ubuntu Server. + // + // Use caution when setting this value for Windows Server patch baselines. Because + // patch updates that are replaced by later updates are removed, setting too broad + // a value for this parameter can result in crucial patches not being installed. + // For more information, see the Windows Server tab in the topic [How security patches are selected]in the Amazon Web + // Services Systems Manager User Guide. + // + // [How security patches are selected]: https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-selecting-patches.html ApproveUntilDate *string // A compliance severity level for all approved patches in a patch baseline. @@ -5339,12 +5362,12 @@ type SessionFilter struct { // The filter value. Valid values for each filter key are as follows: // // - InvokedAfter: Specify a timestamp to limit your results. For example, - // specify 2018-08-29T00:00:00Z to see sessions that started August 29, 2018, and + // specify 2024-08-29T00:00:00Z to see sessions that started August 29, 2024, and // later. // // - InvokedBefore: Specify a timestamp to limit your results. For example, - // specify 2018-08-29T00:00:00Z to see sessions that started before August 29, - // 2018. + // specify 2024-08-29T00:00:00Z to see sessions that started before August 29, + // 2024. // // - Target: Specify a managed node to which session connections have been made. // @@ -5628,10 +5651,18 @@ type TargetLocation struct { // The Amazon Web Services accounts targeted by the current Automation execution. Accounts []string + // Amazon Web Services accounts or organizational units to exclude as expanded + // targets. + ExcludeAccounts []string + // The Automation execution role used by the currently running Automation. If not // specified, the default value is AWS-SystemsManager-AutomationExecutionRole . ExecutionRoleName *string + // Indicates whether to include child organizational units (OUs) that are children + // of the targeted OUs. The default is false . + IncludeChildOrganizationUnits bool + // The Amazon Web Services Regions targeted by the current Automation execution. Regions []string @@ -5647,6 +5678,24 @@ type TargetLocation struct { // additional Automation executions for the currently running Automation. TargetLocationMaxErrors *string + // A list of key-value mappings to target resources. If you specify values for + // this data type, you must also specify a value for TargetParameterName . + // + // This Targets parameter takes precedence over the + // StartAutomationExecution:Targets parameter if both are supplied. + Targets []Target + + // The maximum number of targets allowed to run this task in parallel. This + // TargetsMaxConcurrency takes precedence over the + // StartAutomationExecution:MaxConcurrency parameter if both are supplied. + TargetsMaxConcurrency *string + + // The maximum number of errors that are allowed before the system stops running + // the automation on additional targets. This TargetsMaxErrors parameter takes + // precedence over the StartAutomationExecution:MaxErrors parameter if both are + // supplied. + TargetsMaxErrors *string + noSmithyDocumentSerde } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md index 03f870f..c4bb87d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md @@ -1,3 +1,54 @@ +# v1.24.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.24.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.4 (2024-10-03) + +* No change notes available for this release. + +# v1.23.3 (2024-09-27) + +* No change notes available for this release. + +# v1.23.2 (2024-09-25) + +* No change notes available for this release. + +# v1.23.1 (2024-09-23) + +* No change notes available for this release. + +# v1.23.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.8 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.22.7 (2024-09-04) + +* No change notes available for this release. + +# v1.22.6 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.22.4 (2024-07-18) * No change notes available for this release. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go index a06c6e7..644ee1e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go @@ -4,6 +4,7 @@ package sso import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -30,6 +33,133 @@ import ( const ServiceID = "SSO" const ServiceAPIVersion = "2019-06-10" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sso") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/sso") +} + // Client provides the API client to make operations call for AWS Single Sign-On. type Client struct { options Options @@ -56,6 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -88,8 +222,15 @@ func (c *Client) Options() Options { return c.options.Copy() } -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() @@ -113,15 +254,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + ctx, err = withOperationMetrics(ctx, options.MeterProvider) if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sso") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + return result, metadata, err } @@ -159,7 +341,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { return fmt.Errorf("add ResolveEndpointV2: %v", err) } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -237,16 +419,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -434,6 +615,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) } @@ -477,6 +682,7 @@ func addIsPaginatorUserAgent(o *Options) { func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sso") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -540,25 +746,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -574,6 +761,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } @@ -625,3 +824,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go index 5ce00b4..a656020 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -141,6 +144,18 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go index f20e3ac..315526e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -146,6 +149,18 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go index 391b567..d867b78 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -145,6 +148,18 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go index 456e4a3..434b430 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go @@ -101,6 +101,9 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -140,6 +143,18 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go index a93a77c..366963b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go @@ -8,7 +8,9 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -169,6 +171,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -181,6 +186,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -240,7 +248,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -250,12 +261,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) if err != nil { return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) + + span.End() return next.HandleFinalize(ctx, in) } @@ -271,6 +290,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -280,6 +300,9 @@ func (*signRequestMiddleware) ID() string { func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) @@ -300,9 +323,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { return out, metadata, fmt.Errorf("sign request: %w", err) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go index d6297fa..5f0cce2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go @@ -14,6 +14,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" @@ -44,6 +45,10 @@ func (m *awsRestjson1_deserializeOpGetRoleCredentials) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -83,6 +88,7 @@ func (m *awsRestjson1_deserializeOpGetRoleCredentials) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -200,6 +206,10 @@ func (m *awsRestjson1_deserializeOpListAccountRoles) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -239,6 +249,7 @@ func (m *awsRestjson1_deserializeOpListAccountRoles) HandleDeserialize(ctx conte } } + span.End() return out, metadata, err } @@ -365,6 +376,10 @@ func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.C return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -404,6 +419,7 @@ func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.C } } + span.End() return out, metadata, err } @@ -530,6 +546,10 @@ func (m *awsRestjson1_deserializeOpLogout) HandleDeserialize(ctx context.Context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -547,6 +567,7 @@ func (m *awsRestjson1_deserializeOpLogout) HandleDeserialize(ctx context.Context } } + span.End() return out, metadata, err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go index 75ae283..53c6bc7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -502,14 +503,13 @@ func (*resolveEndpointV2Middleware) ID() string { func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { return next.HandleFinalize(ctx, in) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -520,11 +520,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { endpt.URI.RawPath = endpt.URI.Path } @@ -546,5 +551,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go index f252ba3..f248e45 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go @@ -3,4 +3,4 @@ package sso // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.22.4" +const goModuleVersion = "1.24.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go index d522129..081867b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go index 0ba182e..aa744f1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go @@ -9,7 +9,9 @@ import ( internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" smithyauth "github.com/aws/smithy-go/auth" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // The logger writer interface to write logging messages to. Logger logging.Logger + // The client meter provider. + MeterProvider metrics.MeterProvider + // The region to send requests to. (Required) Region string @@ -103,6 +105,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go index 02e3141..a7a5b57 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go @@ -8,6 +8,7 @@ import ( smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -21,6 +22,10 @@ func (*awsRestjson1_serializeOpGetRoleCredentials) ID() string { func (m *awsRestjson1_serializeOpGetRoleCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -57,6 +62,8 @@ func (m *awsRestjson1_serializeOpGetRoleCredentials) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsGetRoleCredentialsInput(v *GetRoleCredentialsInput, encoder *httpbinding.Encoder) error { @@ -64,7 +71,7 @@ func awsRestjson1_serializeOpHttpBindingsGetRoleCredentialsInput(v *GetRoleCrede return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccessToken != nil && len(*v.AccessToken) > 0 { + if v.AccessToken != nil { locationName := "X-Amz-Sso_bearer_token" encoder.SetHeader(locationName).String(*v.AccessToken) } @@ -90,6 +97,10 @@ func (*awsRestjson1_serializeOpListAccountRoles) ID() string { func (m *awsRestjson1_serializeOpListAccountRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -126,6 +137,8 @@ func (m *awsRestjson1_serializeOpListAccountRoles) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListAccountRolesInput(v *ListAccountRolesInput, encoder *httpbinding.Encoder) error { @@ -133,7 +146,7 @@ func awsRestjson1_serializeOpHttpBindingsListAccountRolesInput(v *ListAccountRol return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccessToken != nil && len(*v.AccessToken) > 0 { + if v.AccessToken != nil { locationName := "X-Amz-Sso_bearer_token" encoder.SetHeader(locationName).String(*v.AccessToken) } @@ -163,6 +176,10 @@ func (*awsRestjson1_serializeOpListAccounts) ID() string { func (m *awsRestjson1_serializeOpListAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -199,6 +216,8 @@ func (m *awsRestjson1_serializeOpListAccounts) HandleSerialize(ctx context.Conte } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListAccountsInput(v *ListAccountsInput, encoder *httpbinding.Encoder) error { @@ -206,7 +225,7 @@ func awsRestjson1_serializeOpHttpBindingsListAccountsInput(v *ListAccountsInput, return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccessToken != nil && len(*v.AccessToken) > 0 { + if v.AccessToken != nil { locationName := "X-Amz-Sso_bearer_token" encoder.SetHeader(locationName).String(*v.AccessToken) } @@ -232,6 +251,10 @@ func (*awsRestjson1_serializeOpLogout) ID() string { func (m *awsRestjson1_serializeOpLogout) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -268,6 +291,8 @@ func (m *awsRestjson1_serializeOpLogout) HandleSerialize(ctx context.Context, in } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsLogoutInput(v *LogoutInput, encoder *httpbinding.Encoder) error { @@ -275,7 +300,7 @@ func awsRestjson1_serializeOpHttpBindingsLogoutInput(v *LogoutInput, encoder *ht return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccessToken != nil && len(*v.AccessToken) > 0 { + if v.AccessToken != nil { locationName := "X-Amz-Sso_bearer_token" encoder.SetHeader(locationName).String(*v.AccessToken) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md index adf698c..54c7d83 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md @@ -1,3 +1,54 @@ +# v1.28.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.4 (2024-10-03) + +* No change notes available for this release. + +# v1.27.3 (2024-09-27) + +* No change notes available for this release. + +# v1.27.2 (2024-09-25) + +* No change notes available for this release. + +# v1.27.1 (2024-09-23) + +* No change notes available for this release. + +# v1.27.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.8 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.26.7 (2024-09-04) + +* No change notes available for this release. + +# v1.26.6 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.5 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.26.4 (2024-07-10.2) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go index 25cd1c0..0b05bf6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go @@ -4,6 +4,7 @@ package ssooidc import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -19,7 +20,9 @@ import ( smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -30,6 +33,133 @@ import ( const ServiceID = "SSO OIDC" const ServiceAPIVersion = "2019-06-10" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/ssooidc") +} + // Client provides the API client to make operations call for AWS SSO OIDC. type Client struct { options Options @@ -56,6 +186,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -88,8 +222,15 @@ func (c *Client) Options() Options { return c.options.Copy() } -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() @@ -113,15 +254,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + ctx, err = withOperationMetrics(ctx, options.MeterProvider) if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + return result, metadata, err } @@ -159,7 +341,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { return fmt.Errorf("add ResolveEndpointV2: %v", err) } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -237,16 +419,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -434,6 +615,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) } @@ -477,6 +682,7 @@ func addIsPaginatorUserAgent(o *Options) { func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -540,25 +746,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -574,6 +761,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } @@ -625,3 +824,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go index 8b82918..5fb8d2a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -213,6 +216,18 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go index af04c25..8abd436 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go @@ -205,6 +205,9 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -244,6 +247,18 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go index d8c766c..03a3594 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go @@ -135,6 +135,9 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -174,6 +177,18 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go index 7c2b38b..203ca5e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go @@ -125,6 +125,9 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -164,6 +167,18 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go index e6058da..e4b87f5 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go @@ -8,7 +8,9 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -163,6 +165,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -175,6 +180,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -234,7 +242,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -244,12 +255,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) if err != nil { return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) + + span.End() return next.HandleFinalize(ctx, in) } @@ -265,6 +284,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -274,6 +294,9 @@ func (*signRequestMiddleware) ID() string { func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) @@ -294,9 +317,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { return out, metadata, fmt.Errorf("sign request: %w", err) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go index 05e8c6b..ae9f145 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go @@ -14,6 +14,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" @@ -43,6 +44,10 @@ func (m *awsRestjson1_deserializeOpCreateToken) HandleDeserialize(ctx context.Co return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -82,6 +87,7 @@ func (m *awsRestjson1_deserializeOpCreateToken) HandleDeserialize(ctx context.Co } } + span.End() return out, metadata, err } @@ -264,6 +270,10 @@ func (m *awsRestjson1_deserializeOpCreateTokenWithIAM) HandleDeserialize(ctx con return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -303,6 +313,7 @@ func (m *awsRestjson1_deserializeOpCreateTokenWithIAM) HandleDeserialize(ctx con } } + span.End() return out, metadata, err } @@ -502,6 +513,10 @@ func (m *awsRestjson1_deserializeOpRegisterClient) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -541,6 +556,7 @@ func (m *awsRestjson1_deserializeOpRegisterClient) HandleDeserialize(ctx context } } + span.End() return out, metadata, err } @@ -721,6 +737,10 @@ func (m *awsRestjson1_deserializeOpStartDeviceAuthorization) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -760,6 +780,7 @@ func (m *awsRestjson1_deserializeOpStartDeviceAuthorization) HandleDeserialize(c } } + span.End() return out, metadata, err } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go index d709972..6feea0c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go @@ -16,6 +16,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -502,14 +503,13 @@ func (*resolveEndpointV2Middleware) ID() string { func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { return next.HandleFinalize(ctx, in) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -520,11 +520,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { endpt.URI.RawPath = endpt.URI.Path } @@ -546,5 +551,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go index b71407f..ab2907e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go @@ -3,4 +3,4 @@ package ssooidc // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.26.4" +const goModuleVersion = "1.28.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go index 4a29eaa..b4c61eb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go index a012e4c..55dd80d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go @@ -9,7 +9,9 @@ import ( internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" smithyauth "github.com/aws/smithy-go/auth" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // The logger writer interface to write logging messages to. Logger logging.Logger + // The client meter provider. + MeterProvider metrics.MeterProvider + // The region to send requests to. (Required) Region string @@ -103,6 +105,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go index 04411bd..1ad103d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go @@ -10,6 +10,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -23,6 +24,10 @@ func (*awsRestjson1_serializeOpCreateToken) ID() string { func (m *awsRestjson1_serializeOpCreateToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -66,6 +71,8 @@ func (m *awsRestjson1_serializeOpCreateToken) HandleSerialize(ctx context.Contex } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateTokenInput(v *CreateTokenInput, encoder *httpbinding.Encoder) error { @@ -140,6 +147,10 @@ func (*awsRestjson1_serializeOpCreateTokenWithIAM) ID() string { func (m *awsRestjson1_serializeOpCreateTokenWithIAM) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -183,6 +194,8 @@ func (m *awsRestjson1_serializeOpCreateTokenWithIAM) HandleSerialize(ctx context } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsCreateTokenWithIAMInput(v *CreateTokenWithIAMInput, encoder *httpbinding.Encoder) error { @@ -267,6 +280,10 @@ func (*awsRestjson1_serializeOpRegisterClient) ID() string { func (m *awsRestjson1_serializeOpRegisterClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -310,6 +327,8 @@ func (m *awsRestjson1_serializeOpRegisterClient) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsRegisterClientInput(v *RegisterClientInput, encoder *httpbinding.Encoder) error { @@ -378,6 +397,10 @@ func (*awsRestjson1_serializeOpStartDeviceAuthorization) ID() string { func (m *awsRestjson1_serializeOpStartDeviceAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -421,6 +444,8 @@ func (m *awsRestjson1_serializeOpStartDeviceAuthorization) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, encoder *httpbinding.Encoder) error { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md index f3128d7..06ebd69 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md @@ -1,3 +1,58 @@ +# v1.32.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.4 (2024-10-03) + +* No change notes available for this release. + +# v1.31.3 (2024-09-27) + +* No change notes available for this release. + +# v1.31.2 (2024-09-25) + +* No change notes available for this release. + +# v1.31.1 (2024-09-23) + +* No change notes available for this release. + +# v1.31.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.8 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.30.7 (2024-09-04) + +* No change notes available for this release. + +# v1.30.6 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.5 (2024-08-22) + +* No change notes available for this release. + +# v1.30.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + # v1.30.3 (2024-07-10.2) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go index acd2b8e..4e678ce 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go @@ -4,6 +4,7 @@ package sts import ( "context" + "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -22,7 +23,9 @@ import ( smithyauth "github.com/aws/smithy-go/auth" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -33,6 +36,133 @@ import ( const ServiceID = "STS" const ServiceAPIVersion = "2011-06-15" +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sts") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/sts") +} + // Client provides the API client to make operations call for AWS Security Token // Service. type Client struct { @@ -60,6 +190,10 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveEndpointResolverV2(&options) + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + resolveAuthSchemeResolver(&options) for _, fn := range optFns { @@ -92,8 +226,15 @@ func (c *Client) Options() Options { return c.options.Copy() } -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() @@ -117,15 +258,56 @@ func (c *Client) invokeOperation(ctx context.Context, opID string, params interf } } - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) + ctx, err = withOperationMetrics(ctx, options.MeterProvider) if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sts") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + return result, metadata, err } @@ -163,7 +345,7 @@ func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, o if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { return fmt.Errorf("add ResolveEndpointV2: %v", err) } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { return fmt.Errorf("add Signing: %w", err) } return nil @@ -241,16 +423,15 @@ func setResolvedDefaultsMode(o *Options) { // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) @@ -438,6 +619,30 @@ func addRawResponseToMetadata(stack *middleware.Stack) error { func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} func addStreamingEventsPayload(stack *middleware.Stack) error { return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) } @@ -481,6 +686,7 @@ func addIsPaginatorUserAgent(o *Options) { func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sts") }) if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { return err @@ -544,25 +750,6 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { ua, err := getOrAddRequestUserAgent(stack) if err != nil { @@ -578,6 +765,18 @@ func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { return nil } +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } @@ -777,3 +976,89 @@ func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { DisableHTTPS: o.EndpointOptions.DisableHTTPS, }, "ResolveEndpointV2", middleware.After) } + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go index e74fc8b..be03f01 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go @@ -445,6 +445,9 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -484,6 +487,18 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go index 4c685ab..b8b0c09 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go @@ -385,6 +385,9 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -424,6 +427,18 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go index 0b5e5a3..ffe2479 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -396,6 +396,9 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -435,6 +438,18 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go index b1f14d2..a56840e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -165,6 +168,18 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go index 3ba0087..c80b055 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -156,6 +159,18 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go index abac49a..49304bd 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -144,6 +147,18 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go index 2bae674..96f59ec 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go @@ -330,6 +330,9 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -369,6 +372,18 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go index c73316a..0ed9ecb 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go @@ -179,6 +179,9 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err = addRecordResponseTiming(stack); err != nil { return err } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } if err = addClientUserAgent(stack, options); err != nil { return err } @@ -215,6 +218,18 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err = addDisableHTTPSMiddleware(stack, options); err != nil { return err } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go index e842a7f..a90b2b7 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go @@ -8,7 +8,9 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" smithy "github.com/aws/smithy-go" smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -157,6 +159,9 @@ func (*resolveAuthSchemeMiddleware) ID() string { func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) if err != nil { @@ -169,6 +174,9 @@ func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in mid } ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() return next.HandleFinalize(ctx, in) } @@ -228,7 +236,10 @@ func (*getIdentityMiddleware) ID() string { func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { - rscheme := getResolvedAuthScheme(ctx) + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) if rscheme == nil { return out, metadata, fmt.Errorf("no resolved auth scheme") } @@ -238,12 +249,20 @@ func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no identity resolver") } - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) if err != nil { return out, metadata, fmt.Errorf("get identity: %w", err) } ctx = setIdentity(ctx, identity) + + span.End() return next.HandleFinalize(ctx, in) } @@ -259,6 +278,7 @@ func getIdentity(ctx context.Context) smithyauth.Identity { } type signRequestMiddleware struct { + options Options } func (*signRequestMiddleware) ID() string { @@ -268,6 +288,9 @@ func (*signRequestMiddleware) ID() string { func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) @@ -288,9 +311,15 @@ func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middlewar return out, metadata, fmt.Errorf("no signer") } - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { return out, metadata, fmt.Errorf("sign request: %w", err) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go index 7e4346e..cf0cc54 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go @@ -16,6 +16,7 @@ import ( "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strconv" @@ -46,6 +47,10 @@ func (m *awsAwsquery_deserializeOpAssumeRole) HandleDeserialize(ctx context.Cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -163,6 +168,10 @@ func (m *awsAwsquery_deserializeOpAssumeRoleWithSAML) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -286,6 +295,10 @@ func (m *awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) HandleDeserialize(c return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -412,6 +425,10 @@ func (m *awsAwsquery_deserializeOpDecodeAuthorizationMessage) HandleDeserialize( return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -520,6 +537,10 @@ func (m *awsAwsquery_deserializeOpGetAccessKeyInfo) HandleDeserialize(ctx contex return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -625,6 +646,10 @@ func (m *awsAwsquery_deserializeOpGetCallerIdentity) HandleDeserialize(ctx conte return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -730,6 +755,10 @@ func (m *awsAwsquery_deserializeOpGetFederationToken) HandleDeserialize(ctx cont return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} @@ -844,6 +873,10 @@ func (m *awsAwsquery_deserializeOpGetSessionToken) HandleDeserialize(ctx context return out, metadata, err } + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go index 35305d8..dca2ce3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go @@ -17,6 +17,7 @@ import ( smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "net/url" @@ -1082,14 +1083,13 @@ func (*resolveEndpointV2Middleware) ID() string { func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( out middleware.FinalizeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { return next.HandleFinalize(ctx, in) } - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) @@ -1100,11 +1100,16 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid } params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { endpt.URI.RawPath = endpt.URI.Path } @@ -1126,5 +1131,6 @@ func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in mid rscheme.SignerProperties.SetAll(&o.SignerProperties) } + span.End() return next.HandleFinalize(ctx, in) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go index 84e221f..5e0fa18 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go @@ -3,4 +3,4 @@ package sts // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.30.3" +const goModuleVersion = "1.32.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go index 3dbd993..9fe930b 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go @@ -94,7 +94,7 @@ var partitionRegexp = struct { AwsUsGov *regexp.Regexp }{ - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), @@ -172,6 +172,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "aws-global", }: endpoints.Endpoint{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go index a9a3588..e1398f3 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go @@ -9,7 +9,9 @@ import ( internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" smithyauth "github.com/aws/smithy-go/auth" "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" ) @@ -24,9 +26,6 @@ type Options struct { // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - // The optional application specific identifier appended to the User-Agent header. AppID string @@ -69,6 +68,9 @@ type Options struct { // The logger writer interface to write logging messages to. Logger logging.Logger + // The client meter provider. + MeterProvider metrics.MeterProvider + // The region to send requests to. (Required) Region string @@ -103,6 +105,9 @@ type Options struct { // within your applications. RuntimeEnvironment aws.RuntimeEnvironment + // The client tracer provider. + TracerProvider tracing.TracerProvider + // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go index 4c08061..1bcbc82 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go @@ -11,6 +11,7 @@ import ( smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) @@ -25,6 +26,10 @@ func (*awsAwsquery_serializeOpAssumeRole) ID() string { func (m *awsAwsquery_serializeOpAssumeRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -76,6 +81,8 @@ func (m *awsAwsquery_serializeOpAssumeRole) HandleSerialize(ctx context.Context, } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -89,6 +96,10 @@ func (*awsAwsquery_serializeOpAssumeRoleWithSAML) ID() string { func (m *awsAwsquery_serializeOpAssumeRoleWithSAML) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -140,6 +151,8 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithSAML) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -153,6 +166,10 @@ func (*awsAwsquery_serializeOpAssumeRoleWithWebIdentity) ID() string { func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -204,6 +221,8 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx c } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -217,6 +236,10 @@ func (*awsAwsquery_serializeOpDecodeAuthorizationMessage) ID() string { func (m *awsAwsquery_serializeOpDecodeAuthorizationMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -268,6 +291,8 @@ func (m *awsAwsquery_serializeOpDecodeAuthorizationMessage) HandleSerialize(ctx } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -281,6 +306,10 @@ func (*awsAwsquery_serializeOpGetAccessKeyInfo) ID() string { func (m *awsAwsquery_serializeOpGetAccessKeyInfo) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -332,6 +361,8 @@ func (m *awsAwsquery_serializeOpGetAccessKeyInfo) HandleSerialize(ctx context.Co } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -345,6 +376,10 @@ func (*awsAwsquery_serializeOpGetCallerIdentity) ID() string { func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -392,6 +427,8 @@ func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.C } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -405,6 +442,10 @@ func (*awsAwsquery_serializeOpGetFederationToken) ID() string { func (m *awsAwsquery_serializeOpGetFederationToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -456,6 +497,8 @@ func (m *awsAwsquery_serializeOpGetFederationToken) HandleSerialize(ctx context. } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } @@ -469,6 +512,10 @@ func (*awsAwsquery_serializeOpGetSessionToken) ID() string { func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} @@ -520,6 +567,8 @@ func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Con } in.Request = request + endTimer() + span.End() return next.HandleSerialize(ctx, in) } func awsAwsquery_serializeDocumentPolicyDescriptorListType(v []types.PolicyDescriptorType, value query.Value) error { diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 28d3ccb..c63f18f 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,18 @@ +# Release (2024-10-03) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.22.0 + * **Feature**: Add HTTP client metrics. + +# Release (2024-09-25) + +## Module Highlights +* `github.com/aws/smithy-go/aws-http-auth`: [v1.0.0](aws-http-auth/CHANGELOG.md#v100-2024-09-25) + * **Release**: Initial release of module aws-http-auth, which implements generically consumable SigV4 and SigV4a request signing. + # Release (2024-09-19) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index 24162a6..d7a7627 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.21.0" +const goModuleVersion = "1.22.0" diff --git a/vendor/github.com/aws/smithy-go/transport/http/client.go b/vendor/github.com/aws/smithy-go/transport/http/client.go index c43c346..0fceae8 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/client.go +++ b/vendor/github.com/aws/smithy-go/transport/http/client.go @@ -6,6 +6,7 @@ import ( "net/http" smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/tracing" ) @@ -28,13 +29,30 @@ func (fn ClientDoFunc) Do(r *http.Request) (*http.Response, error) { // implementation is http.Client. type ClientHandler struct { client ClientDo + + Meter metrics.Meter // For HTTP client metrics. } // NewClientHandler returns an initialized middleware handler for the client. +// +// Deprecated: Use [NewClientHandlerWithOptions]. func NewClientHandler(client ClientDo) ClientHandler { - return ClientHandler{ + return NewClientHandlerWithOptions(client) +} + +// NewClientHandlerWithOptions returns an initialized middleware handler for the client +// with applied options. +func NewClientHandlerWithOptions(client ClientDo, opts ...func(*ClientHandler)) ClientHandler { + h := ClientHandler{ client: client, } + for _, opt := range opts { + opt(&h) + } + if h.Meter == nil { + h.Meter = metrics.NopMeterProvider{}.Meter("") + } + return h } // Handle implements the middleware Handler interface, that will invoke the @@ -46,6 +64,11 @@ func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( ctx, span := tracing.StartSpan(ctx, "DoHTTPRequest") defer span.End() + ctx, client, err := withMetrics(ctx, c.client, c.Meter) + if err != nil { + return nil, metadata, fmt.Errorf("instrument with HTTP metrics: %w", err) + } + req, ok := input.(*Request) if !ok { return nil, metadata, fmt.Errorf("expect Smithy http.Request value as input, got unsupported type %T", input) @@ -66,7 +89,7 @@ func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( span.SetProperty("http.request_content_length", length) } - resp, err := c.client.Do(builtRequest) + resp, err := client.Do(builtRequest) if resp == nil { // Ensure a http response value is always present to prevent unexpected // panics. diff --git a/vendor/github.com/aws/smithy-go/transport/http/metrics.go b/vendor/github.com/aws/smithy-go/transport/http/metrics.go new file mode 100644 index 0000000..ab11013 --- /dev/null +++ b/vendor/github.com/aws/smithy-go/transport/http/metrics.go @@ -0,0 +1,184 @@ +package http + +import ( + "context" + "crypto/tls" + "net/http" + "net/http/httptrace" + "time" + + "github.com/aws/smithy-go/metrics" +) + +var now = time.Now + +// withMetrics instruments an HTTP client and context to collect HTTP metrics. +func withMetrics(parent context.Context, client ClientDo, meter metrics.Meter) ( + context.Context, ClientDo, error, +) { + hm, err := newHTTPMetrics(meter) + if err != nil { + return nil, nil, err + } + + ctx := httptrace.WithClientTrace(parent, &httptrace.ClientTrace{ + DNSStart: hm.DNSStart, + ConnectStart: hm.ConnectStart, + TLSHandshakeStart: hm.TLSHandshakeStart, + + GotConn: hm.GotConn(parent), + PutIdleConn: hm.PutIdleConn(parent), + ConnectDone: hm.ConnectDone(parent), + DNSDone: hm.DNSDone(parent), + TLSHandshakeDone: hm.TLSHandshakeDone(parent), + GotFirstResponseByte: hm.GotFirstResponseByte(parent), + }) + return ctx, &timedClientDo{client, hm}, nil +} + +type timedClientDo struct { + ClientDo + hm *httpMetrics +} + +func (c *timedClientDo) Do(r *http.Request) (*http.Response, error) { + c.hm.doStart = now() + resp, err := c.ClientDo.Do(r) + + c.hm.DoRequestDuration.Record(r.Context(), elapsed(c.hm.doStart)) + return resp, err +} + +type httpMetrics struct { + DNSLookupDuration metrics.Float64Histogram // client.http.connections.dns_lookup_duration + ConnectDuration metrics.Float64Histogram // client.http.connections.acquire_duration + TLSHandshakeDuration metrics.Float64Histogram // client.http.connections.tls_handshake_duration + ConnectionUsage metrics.Int64UpDownCounter // client.http.connections.usage + + DoRequestDuration metrics.Float64Histogram // client.http.do_request_duration + TimeToFirstByte metrics.Float64Histogram // client.http.time_to_first_byte + + doStart time.Time + dnsStart time.Time + connectStart time.Time + tlsStart time.Time +} + +func newHTTPMetrics(meter metrics.Meter) (*httpMetrics, error) { + hm := &httpMetrics{} + + var err error + hm.DNSLookupDuration, err = meter.Float64Histogram("client.http.connections.dns_lookup_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes a request to perform DNS lookup." + }) + if err != nil { + return nil, err + } + hm.ConnectDuration, err = meter.Float64Histogram("client.http.connections.acquire_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes a request to acquire a connection." + }) + if err != nil { + return nil, err + } + hm.TLSHandshakeDuration, err = meter.Float64Histogram("client.http.connections.tls_handshake_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "The time it takes an HTTP request to perform the TLS handshake." + }) + if err != nil { + return nil, err + } + hm.ConnectionUsage, err = meter.Int64UpDownCounter("client.http.connections.usage", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "{connection}" + o.Description = "Current state of connections pool." + }) + if err != nil { + return nil, err + } + hm.DoRequestDuration, err = meter.Float64Histogram("client.http.do_request_duration", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "Time spent performing an entire HTTP transaction." + }) + if err != nil { + return nil, err + } + hm.TimeToFirstByte, err = meter.Float64Histogram("client.http.time_to_first_byte", func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = "Time from start of transaction to when the first response byte is available." + }) + if err != nil { + return nil, err + } + + return hm, nil +} + +func (m *httpMetrics) DNSStart(httptrace.DNSStartInfo) { + m.dnsStart = now() +} + +func (m *httpMetrics) ConnectStart(string, string) { + m.connectStart = now() +} + +func (m *httpMetrics) TLSHandshakeStart() { + m.tlsStart = now() +} + +func (m *httpMetrics) GotConn(ctx context.Context) func(httptrace.GotConnInfo) { + return func(httptrace.GotConnInfo) { + m.addConnAcquired(ctx, 1) + } +} + +func (m *httpMetrics) PutIdleConn(ctx context.Context) func(error) { + return func(error) { + m.addConnAcquired(ctx, -1) + } +} + +func (m *httpMetrics) DNSDone(ctx context.Context) func(httptrace.DNSDoneInfo) { + return func(httptrace.DNSDoneInfo) { + m.DNSLookupDuration.Record(ctx, elapsed(m.dnsStart)) + } +} + +func (m *httpMetrics) ConnectDone(ctx context.Context) func(string, string, error) { + return func(string, string, error) { + m.ConnectDuration.Record(ctx, elapsed(m.connectStart)) + } +} + +func (m *httpMetrics) TLSHandshakeDone(ctx context.Context) func(tls.ConnectionState, error) { + return func(tls.ConnectionState, error) { + m.TLSHandshakeDuration.Record(ctx, elapsed(m.tlsStart)) + } +} + +func (m *httpMetrics) GotFirstResponseByte(ctx context.Context) func() { + return func() { + m.TimeToFirstByte.Record(ctx, elapsed(m.doStart)) + } +} + +func (m *httpMetrics) addConnAcquired(ctx context.Context, incr int64) { + m.ConnectionUsage.Add(ctx, incr, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("state", "acquired") + }) +} + +// Not used: it is recommended to track acquired vs idle conn, but we can't +// determine when something is truly idle with the current HTTP client hooks +// available to us. +func (m *httpMetrics) addConnIdle(ctx context.Context, incr int64) { + m.ConnectionUsage.Add(ctx, incr, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("state", "idle") + }) +} + +func elapsed(start time.Time) float64 { + end := now() + elapsed := end.Sub(start) + return float64(elapsed) / 1e9 +} diff --git a/vendor/github.com/redis/go-redis/v9/Makefile b/vendor/github.com/redis/go-redis/v9/Makefile index d8d0075..1a6bd17 100644 --- a/vendor/github.com/redis/go-redis/v9/Makefile +++ b/vendor/github.com/redis/go-redis/v9/Makefile @@ -14,6 +14,7 @@ test: testdeps go test ./... -short -race && \ go test ./... -run=NONE -bench=. -benchmem && \ env GOOS=linux GOARCH=386 go test && \ + go test -coverprofile=coverage.txt -covermode=atomic ./... && \ go vet); \ done cd internal/customvet && go build . diff --git a/vendor/github.com/redis/go-redis/v9/README.md b/vendor/github.com/redis/go-redis/v9/README.md index e7df5df..37714a9 100644 --- a/vendor/github.com/redis/go-redis/v9/README.md +++ b/vendor/github.com/redis/go-redis/v9/README.md @@ -3,6 +3,7 @@ [![build workflow](https://github.com/redis/go-redis/actions/workflows/build.yml/badge.svg)](https://github.com/redis/go-redis/actions) [![PkgGoDev](https://pkg.go.dev/badge/github.com/redis/go-redis/v9)](https://pkg.go.dev/github.com/redis/go-redis/v9?tab=doc) [![Documentation](https://img.shields.io/badge/redis-documentation-informational)](https://redis.uptrace.dev/) +[![codecov](https://codecov.io/github/redis/go-redis/graph/badge.svg?token=tsrCZKuSSw)](https://codecov.io/github/redis/go-redis) [![Chat](https://discordapp.com/api/guilds/752070105847955518/widget.png)](https://discord.gg/rWtp5Aj) > go-redis is brought to you by :star: [**uptrace/uptrace**](https://github.com/uptrace/uptrace). @@ -182,6 +183,9 @@ rdb := redis.NewClient(&redis.Options{ }) ``` +#### Unstable RESP3 Structures for RediSearch Commands +When integrating Redis with application functionalities using RESP3, it's important to note that some response structures aren't final yet. This is especially true for more complex structures like search and query results. We recommend using RESP2 when using the search and query capabilities, but we plan to stabilize the RESP3-based API-s in the coming versions. You can find more guidance in the upcoming release notes. + ## Contributing Please see [out contributing guidelines](CONTRIBUTING.md) to help us improve this library! diff --git a/vendor/github.com/redis/go-redis/v9/command.go b/vendor/github.com/redis/go-redis/v9/command.go index 59ba089..4ced297 100644 --- a/vendor/github.com/redis/go-redis/v9/command.go +++ b/vendor/github.com/redis/go-redis/v9/command.go @@ -40,7 +40,7 @@ type Cmder interface { readTimeout() *time.Duration readReply(rd *proto.Reader) error - + readRawReply(rd *proto.Reader) error SetErr(error) Err() error } @@ -122,11 +122,11 @@ func cmdString(cmd Cmder, val interface{}) string { //------------------------------------------------------------------------------ type baseCmd struct { - ctx context.Context - args []interface{} - err error - keyPos int8 - + ctx context.Context + args []interface{} + err error + keyPos int8 + rawVal interface{} _readTimeout *time.Duration } @@ -197,6 +197,11 @@ func (cmd *baseCmd) setReadTimeout(d time.Duration) { cmd._readTimeout = &d } +func (cmd *baseCmd) readRawReply(rd *proto.Reader) (err error) { + cmd.rawVal, err = rd.ReadReply() + return err +} + //------------------------------------------------------------------------------ type Cmd struct { @@ -3787,6 +3792,65 @@ func (cmd *MapStringStringSliceCmd) readReply(rd *proto.Reader) error { return nil } +// ----------------------------------------------------------------------- +// MapStringInterfaceCmd represents a command that returns a map of strings to interface{}. +type MapMapStringInterfaceCmd struct { + baseCmd + val map[string]interface{} +} + +func NewMapMapStringInterfaceCmd(ctx context.Context, args ...interface{}) *MapMapStringInterfaceCmd { + return &MapMapStringInterfaceCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *MapMapStringInterfaceCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *MapMapStringInterfaceCmd) SetVal(val map[string]interface{}) { + cmd.val = val +} + +func (cmd *MapMapStringInterfaceCmd) Result() (map[string]interface{}, error) { + return cmd.val, cmd.err +} + +func (cmd *MapMapStringInterfaceCmd) Val() map[string]interface{} { + return cmd.val +} + +func (cmd *MapMapStringInterfaceCmd) readReply(rd *proto.Reader) (err error) { + n, err := rd.ReadArrayLen() + if err != nil { + return err + } + + data := make(map[string]interface{}, n/2) + for i := 0; i < n; i += 2 { + _, err := rd.ReadArrayLen() + if err != nil { + cmd.err = err + } + key, err := rd.ReadString() + if err != nil { + cmd.err = err + } + value, err := rd.ReadString() + if err != nil { + cmd.err = err + } + data[key] = value + } + + cmd.val = data + return nil +} + //----------------------------------------------------------------------- type MapStringInterfaceSliceCmd struct { diff --git a/vendor/github.com/redis/go-redis/v9/commands.go b/vendor/github.com/redis/go-redis/v9/commands.go index db59594..034daa2 100644 --- a/vendor/github.com/redis/go-redis/v9/commands.go +++ b/vendor/github.com/redis/go-redis/v9/commands.go @@ -220,6 +220,7 @@ type Cmdable interface { ProbabilisticCmdable PubSubCmdable ScriptingFunctionsCmdable + SearchCmdable SetCmdable SortedSetCmdable StringCmdable diff --git a/vendor/github.com/redis/go-redis/v9/internal/pool/conn.go b/vendor/github.com/redis/go-redis/v9/internal/pool/conn.go index d315c79..7f45bc0 100644 --- a/vendor/github.com/redis/go-redis/v9/internal/pool/conn.go +++ b/vendor/github.com/redis/go-redis/v9/internal/pool/conn.go @@ -3,10 +3,8 @@ package pool import ( "bufio" "context" - "crypto/tls" "net" "sync/atomic" - "syscall" "time" "github.com/redis/go-redis/v9/internal/proto" @@ -18,9 +16,6 @@ type Conn struct { usedAt int64 // atomic netConn net.Conn - // for checking the health status of the connection, it may be nil. - sysConn syscall.Conn - rd *proto.Reader bw *bufio.Writer wr *proto.Writer @@ -39,7 +34,6 @@ func NewConn(netConn net.Conn) *Conn { cn.bw = bufio.NewWriter(netConn) cn.wr = proto.NewWriter(cn.bw) cn.SetUsedAt(time.Now()) - cn.setSysConn() return cn } @@ -56,22 +50,6 @@ func (cn *Conn) SetNetConn(netConn net.Conn) { cn.netConn = netConn cn.rd.Reset(netConn) cn.bw.Reset(netConn) - cn.setSysConn() -} - -func (cn *Conn) setSysConn() { - cn.sysConn = nil - conn := cn.netConn - if conn == nil { - return - } - if tlsConn, ok := conn.(*tls.Conn); ok { - conn = tlsConn.NetConn() - } - - if sysConn, ok := conn.(syscall.Conn); ok { - cn.sysConn = sysConn - } } func (cn *Conn) Write(b []byte) (int, error) { diff --git a/vendor/github.com/redis/go-redis/v9/internal/pool/conn_check.go b/vendor/github.com/redis/go-redis/v9/internal/pool/conn_check.go index f288338..83190d3 100644 --- a/vendor/github.com/redis/go-redis/v9/internal/pool/conn_check.go +++ b/vendor/github.com/redis/go-redis/v9/internal/pool/conn_check.go @@ -5,12 +5,21 @@ package pool import ( "errors" "io" + "net" "syscall" + "time" ) var errUnexpectedRead = errors.New("unexpected read from socket") -func connCheck(sysConn syscall.Conn) error { +func connCheck(conn net.Conn) error { + // Reset previous timeout. + _ = conn.SetDeadline(time.Time{}) + + sysConn, ok := conn.(syscall.Conn) + if !ok { + return nil + } rawConn, err := sysConn.SyscallConn() if err != nil { return err diff --git a/vendor/github.com/redis/go-redis/v9/internal/pool/conn_check_dummy.go b/vendor/github.com/redis/go-redis/v9/internal/pool/conn_check_dummy.go index 2d270cf..295da12 100644 --- a/vendor/github.com/redis/go-redis/v9/internal/pool/conn_check_dummy.go +++ b/vendor/github.com/redis/go-redis/v9/internal/pool/conn_check_dummy.go @@ -2,8 +2,8 @@ package pool -import "syscall" +import "net" -func connCheck(_ syscall.Conn) error { +func connCheck(conn net.Conn) error { return nil } diff --git a/vendor/github.com/redis/go-redis/v9/internal/pool/pool.go b/vendor/github.com/redis/go-redis/v9/internal/pool/pool.go index 9b84993..2125f3e 100644 --- a/vendor/github.com/redis/go-redis/v9/internal/pool/pool.go +++ b/vendor/github.com/redis/go-redis/v9/internal/pool/pool.go @@ -499,8 +499,6 @@ func (p *ConnPool) Close() error { return firstErr } -var zeroTime = time.Time{} - func (p *ConnPool) isHealthyConn(cn *Conn) bool { now := time.Now() @@ -511,12 +509,8 @@ func (p *ConnPool) isHealthyConn(cn *Conn) bool { return false } - if cn.sysConn != nil { - // reset previous timeout. - _ = cn.netConn.SetDeadline(zeroTime) - if connCheck(cn.sysConn) != nil { - return false - } + if connCheck(cn.netConn) != nil { + return false } cn.SetUsedAt(now) diff --git a/vendor/github.com/redis/go-redis/v9/internal/util.go b/vendor/github.com/redis/go-redis/v9/internal/util.go index 235a91a..cc1bff2 100644 --- a/vendor/github.com/redis/go-redis/v9/internal/util.go +++ b/vendor/github.com/redis/go-redis/v9/internal/util.go @@ -3,6 +3,7 @@ package internal import ( "context" "net" + "strconv" "strings" "time" @@ -81,3 +82,47 @@ func GetAddr(addr string) string { } return net.JoinHostPort(addr[:ind], addr[ind+1:]) } + +func ToInteger(val interface{}) int { + switch v := val.(type) { + case int: + return v + case int64: + return int(v) + case string: + i, _ := strconv.Atoi(v) + return i + default: + return 0 + } +} + +func ToFloat(val interface{}) float64 { + switch v := val.(type) { + case float64: + return v + case string: + f, _ := strconv.ParseFloat(v, 64) + return f + default: + return 0.0 + } +} + +func ToString(val interface{}) string { + if str, ok := val.(string); ok { + return str + } + return "" +} + +func ToStringSlice(val interface{}) []string { + if arr, ok := val.([]interface{}); ok { + result := make([]string, len(arr)) + for i, v := range arr { + result[i] = ToString(v) + } + return result + } + return nil +} diff --git a/vendor/github.com/redis/go-redis/v9/json.go b/vendor/github.com/redis/go-redis/v9/json.go index ca731db..b3cadf4 100644 --- a/vendor/github.com/redis/go-redis/v9/json.go +++ b/vendor/github.com/redis/go-redis/v9/json.go @@ -60,7 +60,7 @@ type JSONArrTrimArgs struct { type JSONCmd struct { baseCmd val string - expanded []interface{} + expanded interface{} } var _ Cmder = (*JSONCmd)(nil) @@ -100,11 +100,11 @@ func (cmd *JSONCmd) Result() (string, error) { return cmd.Val(), cmd.Err() } -func (cmd JSONCmd) Expanded() (interface{}, error) { +func (cmd *JSONCmd) Expanded() (interface{}, error) { if len(cmd.val) != 0 && cmd.expanded == nil { err := json.Unmarshal([]byte(cmd.val), &cmd.expanded) if err != nil { - return "", err + return nil, err } } @@ -494,7 +494,7 @@ func (c cmdable) JSONMSet(ctx context.Context, params ...interface{}) *StatusCmd } // JSONNumIncrBy increments the number value stored at the specified path by the provided number. -// For more information, see https://redis.io/commands/json.numincreby +// For more information, see https://redis.io/docs/latest/commands/json.numincrby/ func (c cmdable) JSONNumIncrBy(ctx context.Context, key, path string, value float64) *JSONCmd { args := []interface{}{"JSON.NUMINCRBY", key, path, value} cmd := newJSONCmd(ctx, args...) diff --git a/vendor/github.com/redis/go-redis/v9/options.go b/vendor/github.com/redis/go-redis/v9/options.go index 6ed693a..8ba74cc 100644 --- a/vendor/github.com/redis/go-redis/v9/options.go +++ b/vendor/github.com/redis/go-redis/v9/options.go @@ -153,6 +153,9 @@ type Options struct { // Add suffix to client name. Default is empty. IdentitySuffix string + + // Enable Unstable mode for Redis Search module with RESP3. + UnstableResp3 bool } func (opt *Options) init() { diff --git a/vendor/github.com/redis/go-redis/v9/redis.go b/vendor/github.com/redis/go-redis/v9/redis.go index 527afb6..c8b5008 100644 --- a/vendor/github.com/redis/go-redis/v9/redis.go +++ b/vendor/github.com/redis/go-redis/v9/redis.go @@ -412,6 +412,19 @@ func (c *baseClient) process(ctx context.Context, cmd Cmder) error { return lastErr } +func (c *baseClient) assertUnstableCommand(cmd Cmder) bool { + switch cmd.(type) { + case *AggregateCmd, *FTInfoCmd, *FTSpellCheckCmd, *FTSearchCmd, *FTSynDumpCmd: + if c.opt.UnstableResp3 { + return true + } else { + panic("RESP3 responses for this command are disabled because they may still change. Please set the flag UnstableResp3 . See the [README](https://github.com/redis/go-redis/blob/master/README.md) and the release notes for guidance.") + } + default: + return false + } +} + func (c *baseClient) _process(ctx context.Context, cmd Cmder, attempt int) (bool, error) { if attempt > 0 { if err := internal.Sleep(ctx, c.retryBackoff(attempt)); err != nil { @@ -427,8 +440,12 @@ func (c *baseClient) _process(ctx context.Context, cmd Cmder, attempt int) (bool atomic.StoreUint32(&retryTimeout, 1) return err } - - if err := cn.WithReader(c.context(ctx), c.cmdTimeout(cmd), cmd.readReply); err != nil { + readReplyFunc := cmd.readReply + // Apply unstable RESP3 search module. + if c.opt.Protocol != 2 && c.assertUnstableCommand(cmd) { + readReplyFunc = cmd.readRawReply + } + if err := cn.WithReader(c.context(ctx), c.cmdTimeout(cmd), readReplyFunc); err != nil { if cmd.readTimeout() == nil { atomic.StoreUint32(&retryTimeout, 1) } else { diff --git a/vendor/github.com/redis/go-redis/v9/ring.go b/vendor/github.com/redis/go-redis/v9/ring.go index 4ae0054..b402217 100644 --- a/vendor/github.com/redis/go-redis/v9/ring.go +++ b/vendor/github.com/redis/go-redis/v9/ring.go @@ -100,6 +100,7 @@ type RingOptions struct { DisableIndentity bool IdentitySuffix string + UnstableResp3 bool } func (opt *RingOptions) init() { @@ -168,6 +169,7 @@ func (opt *RingOptions) clientOptions() *Options { DisableIndentity: opt.DisableIndentity, IdentitySuffix: opt.IdentitySuffix, + UnstableResp3: opt.UnstableResp3, } } diff --git a/vendor/github.com/redis/go-redis/v9/search_commands.go b/vendor/github.com/redis/go-redis/v9/search_commands.go new file mode 100644 index 0000000..e4df0b6 --- /dev/null +++ b/vendor/github.com/redis/go-redis/v9/search_commands.go @@ -0,0 +1,2240 @@ +package redis + +import ( + "context" + "fmt" + "strconv" + + "github.com/redis/go-redis/v9/internal" + "github.com/redis/go-redis/v9/internal/proto" +) + +type SearchCmdable interface { + FT_List(ctx context.Context) *StringSliceCmd + FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd + FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd + FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd + FTAliasDel(ctx context.Context, alias string) *StatusCmd + FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd + FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd + FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd + FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd + FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd + FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd + FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd + FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd + FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd + FTDictDump(ctx context.Context, dict string) *StringSliceCmd + FTDropIndex(ctx context.Context, index string) *StatusCmd + FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd + FTExplain(ctx context.Context, index string, query string) *StringCmd + FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd + FTInfo(ctx context.Context, index string) *FTInfoCmd + FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd + FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd + FTSearch(ctx context.Context, index string, query string) *FTSearchCmd + FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd + FTSynDump(ctx context.Context, index string) *FTSynDumpCmd + FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd + FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd + FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd +} + +type FTCreateOptions struct { + OnHash bool + OnJSON bool + Prefix []interface{} + Filter string + DefaultLanguage string + LanguageField string + Score float64 + ScoreField string + PayloadField string + MaxTextFields int + NoOffsets bool + Temporary int + NoHL bool + NoFields bool + NoFreqs bool + StopWords []interface{} + SkipInitialScan bool +} + +type FieldSchema struct { + FieldName string + As string + FieldType SearchFieldType + Sortable bool + UNF bool + NoStem bool + NoIndex bool + PhoneticMatcher string + Weight float64 + Separator string + CaseSensitive bool + WithSuffixtrie bool + VectorArgs *FTVectorArgs + GeoShapeFieldType string + IndexEmpty bool + IndexMissing bool +} + +type FTVectorArgs struct { + FlatOptions *FTFlatOptions + HNSWOptions *FTHNSWOptions +} + +type FTFlatOptions struct { + Type string + Dim int + DistanceMetric string + InitialCapacity int + BlockSize int +} + +type FTHNSWOptions struct { + Type string + Dim int + DistanceMetric string + InitialCapacity int + MaxEdgesPerNode int + MaxAllowedEdgesPerNode int + EFRunTime int + Epsilon float64 +} + +type FTDropIndexOptions struct { + DeleteDocs bool +} + +type SpellCheckTerms struct { + Include bool + Exclude bool + Dictionary string +} + +type FTExplainOptions struct { + Dialect string +} + +type FTSynUpdateOptions struct { + SkipInitialScan bool +} + +type SearchAggregator int + +const ( + SearchInvalid = SearchAggregator(iota) + SearchAvg + SearchSum + SearchMin + SearchMax + SearchCount + SearchCountDistinct + SearchCountDistinctish + SearchStdDev + SearchQuantile + SearchToList + SearchFirstValue + SearchRandomSample +) + +func (a SearchAggregator) String() string { + switch a { + case SearchInvalid: + return "" + case SearchAvg: + return "AVG" + case SearchSum: + return "SUM" + case SearchMin: + return "MIN" + case SearchMax: + return "MAX" + case SearchCount: + return "COUNT" + case SearchCountDistinct: + return "COUNT_DISTINCT" + case SearchCountDistinctish: + return "COUNT_DISTINCTISH" + case SearchStdDev: + return "STDDEV" + case SearchQuantile: + return "QUANTILE" + case SearchToList: + return "TOLIST" + case SearchFirstValue: + return "FIRST_VALUE" + case SearchRandomSample: + return "RANDOM_SAMPLE" + default: + return "" + } +} + +type SearchFieldType int + +const ( + SearchFieldTypeInvalid = SearchFieldType(iota) + SearchFieldTypeNumeric + SearchFieldTypeTag + SearchFieldTypeText + SearchFieldTypeGeo + SearchFieldTypeVector + SearchFieldTypeGeoShape +) + +func (t SearchFieldType) String() string { + switch t { + case SearchFieldTypeInvalid: + return "" + case SearchFieldTypeNumeric: + return "NUMERIC" + case SearchFieldTypeTag: + return "TAG" + case SearchFieldTypeText: + return "TEXT" + case SearchFieldTypeGeo: + return "GEO" + case SearchFieldTypeVector: + return "VECTOR" + case SearchFieldTypeGeoShape: + return "GEOSHAPE" + default: + return "TEXT" + } +} + +// Each AggregateReducer have different args. +// Please follow https://redis.io/docs/interact/search-and-query/search/aggregations/#supported-groupby-reducers for more information. +type FTAggregateReducer struct { + Reducer SearchAggregator + Args []interface{} + As string +} + +type FTAggregateGroupBy struct { + Fields []interface{} + Reduce []FTAggregateReducer +} + +type FTAggregateSortBy struct { + FieldName string + Asc bool + Desc bool +} + +type FTAggregateApply struct { + Field string + As string +} + +type FTAggregateLoad struct { + Field string + As string +} + +type FTAggregateWithCursor struct { + Count int + MaxIdle int +} + +type FTAggregateOptions struct { + Verbatim bool + LoadAll bool + Load []FTAggregateLoad + Timeout int + GroupBy []FTAggregateGroupBy + SortBy []FTAggregateSortBy + SortByMax int + Apply []FTAggregateApply + LimitOffset int + Limit int + Filter string + WithCursor bool + WithCursorOptions *FTAggregateWithCursor + Params map[string]interface{} + DialectVersion int +} + +type FTSearchFilter struct { + FieldName interface{} + Min interface{} + Max interface{} +} + +type FTSearchGeoFilter struct { + FieldName string + Longitude float64 + Latitude float64 + Radius float64 + Unit string +} + +type FTSearchReturn struct { + FieldName string + As string +} + +type FTSearchSortBy struct { + FieldName string + Asc bool + Desc bool +} + +type FTSearchOptions struct { + NoContent bool + Verbatim bool + NoStopWords bool + WithScores bool + WithPayloads bool + WithSortKeys bool + Filters []FTSearchFilter + GeoFilter []FTSearchGeoFilter + InKeys []interface{} + InFields []interface{} + Return []FTSearchReturn + Slop int + Timeout int + InOrder bool + Language string + Expander string + Scorer string + ExplainScore bool + Payload string + SortBy []FTSearchSortBy + SortByWithCount bool + LimitOffset int + Limit int + Params map[string]interface{} + DialectVersion int +} + +type FTSynDumpResult struct { + Term string + Synonyms []string +} + +type FTSynDumpCmd struct { + baseCmd + val []FTSynDumpResult +} + +type FTAggregateResult struct { + Total int + Rows []AggregateRow +} + +type AggregateRow struct { + Fields map[string]interface{} +} + +type AggregateCmd struct { + baseCmd + val *FTAggregateResult +} + +type FTInfoResult struct { + IndexErrors IndexErrors + Attributes []FTAttribute + BytesPerRecordAvg string + Cleaning int + CursorStats CursorStats + DialectStats map[string]int + DocTableSizeMB float64 + FieldStatistics []FieldStatistic + GCStats GCStats + GeoshapesSzMB float64 + HashIndexingFailures int + IndexDefinition IndexDefinition + IndexName string + IndexOptions []string + Indexing int + InvertedSzMB float64 + KeyTableSizeMB float64 + MaxDocID int + NumDocs int + NumRecords int + NumTerms int + NumberOfUses int + OffsetBitsPerRecordAvg string + OffsetVectorsSzMB float64 + OffsetsPerTermAvg string + PercentIndexed float64 + RecordsPerDocAvg string + SortableValuesSizeMB float64 + TagOverheadSzMB float64 + TextOverheadSzMB float64 + TotalIndexMemorySzMB float64 + TotalIndexingTime int + TotalInvertedIndexBlocks int + VectorIndexSzMB float64 +} + +type IndexErrors struct { + IndexingFailures int + LastIndexingError string + LastIndexingErrorKey string +} + +type FTAttribute struct { + Identifier string + Attribute string + Type string + Weight float64 + Sortable bool + NoStem bool + NoIndex bool + UNF bool + PhoneticMatcher string + CaseSensitive bool + WithSuffixtrie bool +} + +type CursorStats struct { + GlobalIdle int + GlobalTotal int + IndexCapacity int + IndexTotal int +} + +type FieldStatistic struct { + Identifier string + Attribute string + IndexErrors IndexErrors +} + +type GCStats struct { + BytesCollected int + TotalMsRun int + TotalCycles int + AverageCycleTimeMs string + LastRunTimeMs int + GCNumericTreesMissed int + GCBlocksDenied int +} + +type IndexDefinition struct { + KeyType string + Prefixes []string + DefaultScore float64 +} + +type FTSpellCheckOptions struct { + Distance int + Terms *FTSpellCheckTerms + Dialect int +} + +type FTSpellCheckTerms struct { + Inclusion string // Either "INCLUDE" or "EXCLUDE" + Dictionary string + Terms []interface{} +} + +type SpellCheckResult struct { + Term string + Suggestions []SpellCheckSuggestion +} + +type SpellCheckSuggestion struct { + Score float64 + Suggestion string +} + +type FTSearchResult struct { + Total int + Docs []Document +} + +type Document struct { + ID string + Score *float64 + Payload *string + SortKey *string + Fields map[string]string +} + +type AggregateQuery []interface{} + +// FT_List - Lists all the existing indexes in the database. +// For more information, please refer to the Redis documentation: +// [FT._LIST]: (https://redis.io/commands/ft._list/) +func (c cmdable) FT_List(ctx context.Context) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "FT._LIST") + _ = c(ctx, cmd) + return cmd +} + +// FTAggregate - Performs a search query on an index and applies a series of aggregate transformations to the result. +// The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. +// For more information, please refer to the Redis documentation: +// [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/) +func (c cmdable) FTAggregate(ctx context.Context, index string, query string) *MapStringInterfaceCmd { + args := []interface{}{"FT.AGGREGATE", index, query} + cmd := NewMapStringInterfaceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func FTAggregateQuery(query string, options *FTAggregateOptions) AggregateQuery { + queryArgs := []interface{}{query} + if options != nil { + if options.Verbatim { + queryArgs = append(queryArgs, "VERBATIM") + } + if options.LoadAll && options.Load != nil { + panic("FT.AGGREGATE: LOADALL and LOAD are mutually exclusive") + } + if options.LoadAll { + queryArgs = append(queryArgs, "LOAD", "*") + } + if options.Load != nil { + queryArgs = append(queryArgs, "LOAD", len(options.Load)) + for _, load := range options.Load { + queryArgs = append(queryArgs, load.Field) + if load.As != "" { + queryArgs = append(queryArgs, "AS", load.As) + } + } + } + if options.Timeout > 0 { + queryArgs = append(queryArgs, "TIMEOUT", options.Timeout) + } + if options.GroupBy != nil { + for _, groupBy := range options.GroupBy { + queryArgs = append(queryArgs, "GROUPBY", len(groupBy.Fields)) + queryArgs = append(queryArgs, groupBy.Fields...) + + for _, reducer := range groupBy.Reduce { + queryArgs = append(queryArgs, "REDUCE") + queryArgs = append(queryArgs, reducer.Reducer.String()) + if reducer.Args != nil { + queryArgs = append(queryArgs, len(reducer.Args)) + queryArgs = append(queryArgs, reducer.Args...) + } else { + queryArgs = append(queryArgs, 0) + } + if reducer.As != "" { + queryArgs = append(queryArgs, "AS", reducer.As) + } + } + } + } + if options.SortBy != nil { + queryArgs = append(queryArgs, "SORTBY") + sortByOptions := []interface{}{} + for _, sortBy := range options.SortBy { + sortByOptions = append(sortByOptions, sortBy.FieldName) + if sortBy.Asc && sortBy.Desc { + panic("FT.AGGREGATE: ASC and DESC are mutually exclusive") + } + if sortBy.Asc { + sortByOptions = append(sortByOptions, "ASC") + } + if sortBy.Desc { + sortByOptions = append(sortByOptions, "DESC") + } + } + queryArgs = append(queryArgs, len(sortByOptions)) + queryArgs = append(queryArgs, sortByOptions...) + } + if options.SortByMax > 0 { + queryArgs = append(queryArgs, "MAX", options.SortByMax) + } + for _, apply := range options.Apply { + queryArgs = append(queryArgs, "APPLY", apply.Field) + if apply.As != "" { + queryArgs = append(queryArgs, "AS", apply.As) + } + } + if options.LimitOffset > 0 { + queryArgs = append(queryArgs, "LIMIT", options.LimitOffset) + } + if options.Limit > 0 { + queryArgs = append(queryArgs, options.Limit) + } + if options.Filter != "" { + queryArgs = append(queryArgs, "FILTER", options.Filter) + } + if options.WithCursor { + queryArgs = append(queryArgs, "WITHCURSOR") + if options.WithCursorOptions != nil { + if options.WithCursorOptions.Count > 0 { + queryArgs = append(queryArgs, "COUNT", options.WithCursorOptions.Count) + } + if options.WithCursorOptions.MaxIdle > 0 { + queryArgs = append(queryArgs, "MAXIDLE", options.WithCursorOptions.MaxIdle) + } + } + } + if options.Params != nil { + queryArgs = append(queryArgs, "PARAMS", len(options.Params)*2) + for key, value := range options.Params { + queryArgs = append(queryArgs, key, value) + } + } + if options.DialectVersion > 0 { + queryArgs = append(queryArgs, "DIALECT", options.DialectVersion) + } + } + return queryArgs +} + +func ProcessAggregateResult(data []interface{}) (*FTAggregateResult, error) { + if len(data) == 0 { + return nil, fmt.Errorf("no data returned") + } + + total, ok := data[0].(int64) + if !ok { + return nil, fmt.Errorf("invalid total format") + } + + rows := make([]AggregateRow, 0, len(data)-1) + for _, row := range data[1:] { + fields, ok := row.([]interface{}) + if !ok { + return nil, fmt.Errorf("invalid row format") + } + + rowMap := make(map[string]interface{}) + for i := 0; i < len(fields); i += 2 { + key, ok := fields[i].(string) + if !ok { + return nil, fmt.Errorf("invalid field key format") + } + value := fields[i+1] + rowMap[key] = value + } + rows = append(rows, AggregateRow{Fields: rowMap}) + } + + result := &FTAggregateResult{ + Total: int(total), + Rows: rows, + } + return result, nil +} + +func NewAggregateCmd(ctx context.Context, args ...interface{}) *AggregateCmd { + return &AggregateCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *AggregateCmd) SetVal(val *FTAggregateResult) { + cmd.val = val +} + +func (cmd *AggregateCmd) Val() *FTAggregateResult { + return cmd.val +} + +func (cmd *AggregateCmd) Result() (*FTAggregateResult, error) { + return cmd.val, cmd.err +} + +func (cmd *AggregateCmd) RawVal() interface{} { + return cmd.rawVal +} + +func (cmd *AggregateCmd) RawResult() (interface{}, error) { + return cmd.rawVal, cmd.err +} + +func (cmd *AggregateCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *AggregateCmd) readReply(rd *proto.Reader) (err error) { + data, err := rd.ReadSlice() + if err != nil { + cmd.err = err + return nil + } + cmd.val, err = ProcessAggregateResult(data) + if err != nil { + cmd.err = err + } + return nil +} + +// FTAggregateWithArgs - Performs a search query on an index and applies a series of aggregate transformations to the result. +// The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. +// This function also allows for specifying additional options such as: Verbatim, LoadAll, Load, Timeout, GroupBy, SortBy, SortByMax, Apply, LimitOffset, Limit, Filter, WithCursor, Params, and DialectVersion. +// For more information, please refer to the Redis documentation: +// [FT.AGGREGATE]: (https://redis.io/commands/ft.aggregate/) +func (c cmdable) FTAggregateWithArgs(ctx context.Context, index string, query string, options *FTAggregateOptions) *AggregateCmd { + args := []interface{}{"FT.AGGREGATE", index, query} + if options != nil { + if options.Verbatim { + args = append(args, "VERBATIM") + } + if options.LoadAll && options.Load != nil { + panic("FT.AGGREGATE: LOADALL and LOAD are mutually exclusive") + } + if options.LoadAll { + args = append(args, "LOAD", "*") + } + if options.Load != nil { + args = append(args, "LOAD", len(options.Load)) + for _, load := range options.Load { + args = append(args, load.Field) + if load.As != "" { + args = append(args, "AS", load.As) + } + } + } + if options.Timeout > 0 { + args = append(args, "TIMEOUT", options.Timeout) + } + if options.GroupBy != nil { + for _, groupBy := range options.GroupBy { + args = append(args, "GROUPBY", len(groupBy.Fields)) + args = append(args, groupBy.Fields...) + + for _, reducer := range groupBy.Reduce { + args = append(args, "REDUCE") + args = append(args, reducer.Reducer.String()) + if reducer.Args != nil { + args = append(args, len(reducer.Args)) + args = append(args, reducer.Args...) + } else { + args = append(args, 0) + } + if reducer.As != "" { + args = append(args, "AS", reducer.As) + } + } + } + } + if options.SortBy != nil { + args = append(args, "SORTBY") + sortByOptions := []interface{}{} + for _, sortBy := range options.SortBy { + sortByOptions = append(sortByOptions, sortBy.FieldName) + if sortBy.Asc && sortBy.Desc { + panic("FT.AGGREGATE: ASC and DESC are mutually exclusive") + } + if sortBy.Asc { + sortByOptions = append(sortByOptions, "ASC") + } + if sortBy.Desc { + sortByOptions = append(sortByOptions, "DESC") + } + } + args = append(args, len(sortByOptions)) + args = append(args, sortByOptions...) + } + if options.SortByMax > 0 { + args = append(args, "MAX", options.SortByMax) + } + for _, apply := range options.Apply { + args = append(args, "APPLY", apply.Field) + if apply.As != "" { + args = append(args, "AS", apply.As) + } + } + if options.LimitOffset > 0 { + args = append(args, "LIMIT", options.LimitOffset) + } + if options.Limit > 0 { + args = append(args, options.Limit) + } + if options.Filter != "" { + args = append(args, "FILTER", options.Filter) + } + if options.WithCursor { + args = append(args, "WITHCURSOR") + if options.WithCursorOptions != nil { + if options.WithCursorOptions.Count > 0 { + args = append(args, "COUNT", options.WithCursorOptions.Count) + } + if options.WithCursorOptions.MaxIdle > 0 { + args = append(args, "MAXIDLE", options.WithCursorOptions.MaxIdle) + } + } + } + if options.Params != nil { + args = append(args, "PARAMS", len(options.Params)*2) + for key, value := range options.Params { + args = append(args, key, value) + } + } + if options.DialectVersion > 0 { + args = append(args, "DIALECT", options.DialectVersion) + } + } + + cmd := NewAggregateCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTAliasAdd - Adds an alias to an index. +// The 'index' parameter specifies the index to which the alias is added, and the 'alias' parameter specifies the alias. +// For more information, please refer to the Redis documentation: +// [FT.ALIASADD]: (https://redis.io/commands/ft.aliasadd/) +func (c cmdable) FTAliasAdd(ctx context.Context, index string, alias string) *StatusCmd { + args := []interface{}{"FT.ALIASADD", alias, index} + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTAliasDel - Removes an alias from an index. +// The 'alias' parameter specifies the alias to be removed. +// For more information, please refer to the Redis documentation: +// [FT.ALIASDEL]: (https://redis.io/commands/ft.aliasdel/) +func (c cmdable) FTAliasDel(ctx context.Context, alias string) *StatusCmd { + cmd := NewStatusCmd(ctx, "FT.ALIASDEL", alias) + _ = c(ctx, cmd) + return cmd +} + +// FTAliasUpdate - Updates an alias to an index. +// The 'index' parameter specifies the index to which the alias is updated, and the 'alias' parameter specifies the alias. +// If the alias already exists for a different index, it updates the alias to point to the specified index instead. +// For more information, please refer to the Redis documentation: +// [FT.ALIASUPDATE]: (https://redis.io/commands/ft.aliasupdate/) +func (c cmdable) FTAliasUpdate(ctx context.Context, index string, alias string) *StatusCmd { + cmd := NewStatusCmd(ctx, "FT.ALIASUPDATE", alias, index) + _ = c(ctx, cmd) + return cmd +} + +// FTAlter - Alters the definition of an existing index. +// The 'index' parameter specifies the index to alter, and the 'skipInitialScan' parameter specifies whether to skip the initial scan. +// The 'definition' parameter specifies the new definition for the index. +// For more information, please refer to the Redis documentation: +// [FT.ALTER]: (https://redis.io/commands/ft.alter/) +func (c cmdable) FTAlter(ctx context.Context, index string, skipInitialScan bool, definition []interface{}) *StatusCmd { + args := []interface{}{"FT.ALTER", index} + if skipInitialScan { + args = append(args, "SKIPINITIALSCAN") + } + args = append(args, "SCHEMA", "ADD") + args = append(args, definition...) + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTConfigGet - Retrieves the value of a RediSearch configuration parameter. +// The 'option' parameter specifies the configuration parameter to retrieve. +// For more information, please refer to the Redis documentation: +// [FT.CONFIG GET]: (https://redis.io/commands/ft.config-get/) +func (c cmdable) FTConfigGet(ctx context.Context, option string) *MapMapStringInterfaceCmd { + cmd := NewMapMapStringInterfaceCmd(ctx, "FT.CONFIG", "GET", option) + _ = c(ctx, cmd) + return cmd +} + +// FTConfigSet - Sets the value of a RediSearch configuration parameter. +// The 'option' parameter specifies the configuration parameter to set, and the 'value' parameter specifies the new value. +// For more information, please refer to the Redis documentation: +// [FT.CONFIG SET]: (https://redis.io/commands/ft.config-set/) +func (c cmdable) FTConfigSet(ctx context.Context, option string, value interface{}) *StatusCmd { + cmd := NewStatusCmd(ctx, "FT.CONFIG", "SET", option, value) + _ = c(ctx, cmd) + return cmd +} + +// FTCreate - Creates a new index with the given options and schema. +// The 'index' parameter specifies the name of the index to create. +// The 'options' parameter specifies various options for the index, such as: +// whether to index hashes or JSONs, prefixes, filters, default language, score, score field, payload field, etc. +// The 'schema' parameter specifies the schema for the index, which includes the field name, field type, etc. +// For more information, please refer to the Redis documentation: +// [FT.CREATE]: (https://redis.io/commands/ft.create/) +func (c cmdable) FTCreate(ctx context.Context, index string, options *FTCreateOptions, schema ...*FieldSchema) *StatusCmd { + args := []interface{}{"FT.CREATE", index} + if options != nil { + if options.OnHash && !options.OnJSON { + args = append(args, "ON", "HASH") + } + if options.OnJSON && !options.OnHash { + args = append(args, "ON", "JSON") + } + if options.OnHash && options.OnJSON { + panic("FT.CREATE: ON HASH and ON JSON are mutually exclusive") + } + if options.Prefix != nil { + args = append(args, "PREFIX", len(options.Prefix)) + args = append(args, options.Prefix...) + } + if options.Filter != "" { + args = append(args, "FILTER", options.Filter) + } + if options.DefaultLanguage != "" { + args = append(args, "LANGUAGE", options.DefaultLanguage) + } + if options.LanguageField != "" { + args = append(args, "LANGUAGE_FIELD", options.LanguageField) + } + if options.Score > 0 { + args = append(args, "SCORE", options.Score) + } + if options.ScoreField != "" { + args = append(args, "SCORE_FIELD", options.ScoreField) + } + if options.PayloadField != "" { + args = append(args, "PAYLOAD_FIELD", options.PayloadField) + } + if options.MaxTextFields > 0 { + args = append(args, "MAXTEXTFIELDS", options.MaxTextFields) + } + if options.NoOffsets { + args = append(args, "NOOFFSETS") + } + if options.Temporary > 0 { + args = append(args, "TEMPORARY", options.Temporary) + } + if options.NoHL { + args = append(args, "NOHL") + } + if options.NoFields { + args = append(args, "NOFIELDS") + } + if options.NoFreqs { + args = append(args, "NOFREQS") + } + if options.StopWords != nil { + args = append(args, "STOPWORDS", len(options.StopWords)) + args = append(args, options.StopWords...) + } + if options.SkipInitialScan { + args = append(args, "SKIPINITIALSCAN") + } + } + if schema == nil { + panic("FT.CREATE: SCHEMA is required") + } + args = append(args, "SCHEMA") + for _, schema := range schema { + if schema.FieldName == "" || schema.FieldType == SearchFieldTypeInvalid { + panic("FT.CREATE: SCHEMA FieldName and FieldType are required") + } + args = append(args, schema.FieldName) + if schema.As != "" { + args = append(args, "AS", schema.As) + } + args = append(args, schema.FieldType.String()) + if schema.VectorArgs != nil { + if schema.FieldType != SearchFieldTypeVector { + panic("FT.CREATE: SCHEMA FieldType VECTOR is required for VectorArgs") + } + if schema.VectorArgs.FlatOptions != nil && schema.VectorArgs.HNSWOptions != nil { + panic("FT.CREATE: SCHEMA VectorArgs FlatOptions and HNSWOptions are mutually exclusive") + } + if schema.VectorArgs.FlatOptions != nil { + args = append(args, "FLAT") + if schema.VectorArgs.FlatOptions.Type == "" || schema.VectorArgs.FlatOptions.Dim == 0 || schema.VectorArgs.FlatOptions.DistanceMetric == "" { + panic("FT.CREATE: Type, Dim and DistanceMetric are required for VECTOR FLAT") + } + flatArgs := []interface{}{ + "TYPE", schema.VectorArgs.FlatOptions.Type, + "DIM", schema.VectorArgs.FlatOptions.Dim, + "DISTANCE_METRIC", schema.VectorArgs.FlatOptions.DistanceMetric, + } + if schema.VectorArgs.FlatOptions.InitialCapacity > 0 { + flatArgs = append(flatArgs, "INITIAL_CAP", schema.VectorArgs.FlatOptions.InitialCapacity) + } + if schema.VectorArgs.FlatOptions.BlockSize > 0 { + flatArgs = append(flatArgs, "BLOCK_SIZE", schema.VectorArgs.FlatOptions.BlockSize) + } + args = append(args, len(flatArgs)) + args = append(args, flatArgs...) + } + if schema.VectorArgs.HNSWOptions != nil { + args = append(args, "HNSW") + if schema.VectorArgs.HNSWOptions.Type == "" || schema.VectorArgs.HNSWOptions.Dim == 0 || schema.VectorArgs.HNSWOptions.DistanceMetric == "" { + panic("FT.CREATE: Type, Dim and DistanceMetric are required for VECTOR HNSW") + } + hnswArgs := []interface{}{ + "TYPE", schema.VectorArgs.HNSWOptions.Type, + "DIM", schema.VectorArgs.HNSWOptions.Dim, + "DISTANCE_METRIC", schema.VectorArgs.HNSWOptions.DistanceMetric, + } + if schema.VectorArgs.HNSWOptions.InitialCapacity > 0 { + hnswArgs = append(hnswArgs, "INITIAL_CAP", schema.VectorArgs.HNSWOptions.InitialCapacity) + } + if schema.VectorArgs.HNSWOptions.MaxEdgesPerNode > 0 { + hnswArgs = append(hnswArgs, "M", schema.VectorArgs.HNSWOptions.MaxEdgesPerNode) + } + if schema.VectorArgs.HNSWOptions.MaxAllowedEdgesPerNode > 0 { + hnswArgs = append(hnswArgs, "EF_CONSTRUCTION", schema.VectorArgs.HNSWOptions.MaxAllowedEdgesPerNode) + } + if schema.VectorArgs.HNSWOptions.EFRunTime > 0 { + hnswArgs = append(hnswArgs, "EF_RUNTIME", schema.VectorArgs.HNSWOptions.EFRunTime) + } + if schema.VectorArgs.HNSWOptions.Epsilon > 0 { + hnswArgs = append(hnswArgs, "EPSILON", schema.VectorArgs.HNSWOptions.Epsilon) + } + args = append(args, len(hnswArgs)) + args = append(args, hnswArgs...) + } + } + if schema.GeoShapeFieldType != "" { + if schema.FieldType != SearchFieldTypeGeoShape { + panic("FT.CREATE: SCHEMA FieldType GEOSHAPE is required for GeoShapeFieldType") + } + args = append(args, schema.GeoShapeFieldType) + } + if schema.NoStem { + args = append(args, "NOSTEM") + } + if schema.Sortable { + args = append(args, "SORTABLE") + } + if schema.UNF { + args = append(args, "UNF") + } + if schema.NoIndex { + args = append(args, "NOINDEX") + } + if schema.PhoneticMatcher != "" { + args = append(args, "PHONETIC", schema.PhoneticMatcher) + } + if schema.Weight > 0 { + args = append(args, "WEIGHT", schema.Weight) + } + if schema.Separator != "" { + args = append(args, "SEPARATOR", schema.Separator) + } + if schema.CaseSensitive { + args = append(args, "CASESENSITIVE") + } + if schema.WithSuffixtrie { + args = append(args, "WITHSUFFIXTRIE") + } + if schema.IndexEmpty { + args = append(args, "INDEXEMPTY") + } + if schema.IndexMissing { + args = append(args, "INDEXMISSING") + + } + } + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTCursorDel - Deletes a cursor from an existing index. +// The 'index' parameter specifies the index from which to delete the cursor, and the 'cursorId' parameter specifies the ID of the cursor to delete. +// For more information, please refer to the Redis documentation: +// [FT.CURSOR DEL]: (https://redis.io/commands/ft.cursor-del/) +func (c cmdable) FTCursorDel(ctx context.Context, index string, cursorId int) *StatusCmd { + cmd := NewStatusCmd(ctx, "FT.CURSOR", "DEL", index, cursorId) + _ = c(ctx, cmd) + return cmd +} + +// FTCursorRead - Reads the next results from an existing cursor. +// The 'index' parameter specifies the index from which to read the cursor, the 'cursorId' parameter specifies the ID of the cursor to read, and the 'count' parameter specifies the number of results to read. +// For more information, please refer to the Redis documentation: +// [FT.CURSOR READ]: (https://redis.io/commands/ft.cursor-read/) +func (c cmdable) FTCursorRead(ctx context.Context, index string, cursorId int, count int) *MapStringInterfaceCmd { + args := []interface{}{"FT.CURSOR", "READ", index, cursorId} + if count > 0 { + args = append(args, "COUNT", count) + } + cmd := NewMapStringInterfaceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTDictAdd - Adds terms to a dictionary. +// The 'dict' parameter specifies the dictionary to which to add the terms, and the 'term' parameter specifies the terms to add. +// For more information, please refer to the Redis documentation: +// [FT.DICTADD]: (https://redis.io/commands/ft.dictadd/) +func (c cmdable) FTDictAdd(ctx context.Context, dict string, term ...interface{}) *IntCmd { + args := []interface{}{"FT.DICTADD", dict} + args = append(args, term...) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTDictDel - Deletes terms from a dictionary. +// The 'dict' parameter specifies the dictionary from which to delete the terms, and the 'term' parameter specifies the terms to delete. +// For more information, please refer to the Redis documentation: +// [FT.DICTDEL]: (https://redis.io/commands/ft.dictdel/) +func (c cmdable) FTDictDel(ctx context.Context, dict string, term ...interface{}) *IntCmd { + args := []interface{}{"FT.DICTDEL", dict} + args = append(args, term...) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTDictDump - Returns all terms in the specified dictionary. +// The 'dict' parameter specifies the dictionary from which to return the terms. +// For more information, please refer to the Redis documentation: +// [FT.DICTDUMP]: (https://redis.io/commands/ft.dictdump/) +func (c cmdable) FTDictDump(ctx context.Context, dict string) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "FT.DICTDUMP", dict) + _ = c(ctx, cmd) + return cmd +} + +// FTDropIndex - Deletes an index. +// The 'index' parameter specifies the index to delete. +// For more information, please refer to the Redis documentation: +// [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/) +func (c cmdable) FTDropIndex(ctx context.Context, index string) *StatusCmd { + args := []interface{}{"FT.DROPINDEX", index} + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTDropIndexWithArgs - Deletes an index with options. +// The 'index' parameter specifies the index to delete, and the 'options' parameter specifies the DeleteDocs option for docs deletion. +// For more information, please refer to the Redis documentation: +// [FT.DROPINDEX]: (https://redis.io/commands/ft.dropindex/) +func (c cmdable) FTDropIndexWithArgs(ctx context.Context, index string, options *FTDropIndexOptions) *StatusCmd { + args := []interface{}{"FT.DROPINDEX", index} + if options != nil { + if options.DeleteDocs { + args = append(args, "DD") + } + } + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTExplain - Returns the execution plan for a complex query. +// The 'index' parameter specifies the index to query, and the 'query' parameter specifies the query string. +// For more information, please refer to the Redis documentation: +// [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/) +func (c cmdable) FTExplain(ctx context.Context, index string, query string) *StringCmd { + cmd := NewStringCmd(ctx, "FT.EXPLAIN", index, query) + _ = c(ctx, cmd) + return cmd +} + +// FTExplainWithArgs - Returns the execution plan for a complex query with options. +// The 'index' parameter specifies the index to query, the 'query' parameter specifies the query string, and the 'options' parameter specifies the Dialect for the query. +// For more information, please refer to the Redis documentation: +// [FT.EXPLAIN]: (https://redis.io/commands/ft.explain/) +func (c cmdable) FTExplainWithArgs(ctx context.Context, index string, query string, options *FTExplainOptions) *StringCmd { + args := []interface{}{"FT.EXPLAIN", index, query} + if options.Dialect != "" { + args = append(args, "DIALECT", options.Dialect) + } + cmd := NewStringCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTExplainCli - Returns the execution plan for a complex query. [Not Implemented] +// For more information, see https://redis.io/commands/ft.explaincli/ +func (c cmdable) FTExplainCli(ctx context.Context, key, path string) error { + panic("not implemented") +} + +func parseFTInfo(data map[string]interface{}) (FTInfoResult, error) { + var ftInfo FTInfoResult + // Manually parse each field from the map + if indexErrors, ok := data["Index Errors"].([]interface{}); ok { + ftInfo.IndexErrors = IndexErrors{ + IndexingFailures: internal.ToInteger(indexErrors[1]), + LastIndexingError: internal.ToString(indexErrors[3]), + LastIndexingErrorKey: internal.ToString(indexErrors[5]), + } + } + + if attributes, ok := data["attributes"].([]interface{}); ok { + for _, attr := range attributes { + if attrMap, ok := attr.([]interface{}); ok { + att := FTAttribute{} + for i := 0; i < len(attrMap); i++ { + if internal.ToLower(internal.ToString(attrMap[i])) == "attribute" { + att.Attribute = internal.ToString(attrMap[i+1]) + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "identifier" { + att.Identifier = internal.ToString(attrMap[i+1]) + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "type" { + att.Type = internal.ToString(attrMap[i+1]) + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "weight" { + att.Weight = internal.ToFloat(attrMap[i+1]) + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "nostem" { + att.NoStem = true + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "sortable" { + att.Sortable = true + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "noindex" { + att.NoIndex = true + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "unf" { + att.UNF = true + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "phonetic" { + att.PhoneticMatcher = internal.ToString(attrMap[i+1]) + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "case_sensitive" { + att.CaseSensitive = true + continue + } + if internal.ToLower(internal.ToString(attrMap[i])) == "withsuffixtrie" { + att.WithSuffixtrie = true + continue + } + + } + ftInfo.Attributes = append(ftInfo.Attributes, att) + } + } + } + + ftInfo.BytesPerRecordAvg = internal.ToString(data["bytes_per_record_avg"]) + ftInfo.Cleaning = internal.ToInteger(data["cleaning"]) + + if cursorStats, ok := data["cursor_stats"].([]interface{}); ok { + ftInfo.CursorStats = CursorStats{ + GlobalIdle: internal.ToInteger(cursorStats[1]), + GlobalTotal: internal.ToInteger(cursorStats[3]), + IndexCapacity: internal.ToInteger(cursorStats[5]), + IndexTotal: internal.ToInteger(cursorStats[7]), + } + } + + if dialectStats, ok := data["dialect_stats"].([]interface{}); ok { + ftInfo.DialectStats = make(map[string]int) + for i := 0; i < len(dialectStats); i += 2 { + ftInfo.DialectStats[internal.ToString(dialectStats[i])] = internal.ToInteger(dialectStats[i+1]) + } + } + + ftInfo.DocTableSizeMB = internal.ToFloat(data["doc_table_size_mb"]) + + if fieldStats, ok := data["field statistics"].([]interface{}); ok { + for _, stat := range fieldStats { + if statMap, ok := stat.([]interface{}); ok { + ftInfo.FieldStatistics = append(ftInfo.FieldStatistics, FieldStatistic{ + Identifier: internal.ToString(statMap[1]), + Attribute: internal.ToString(statMap[3]), + IndexErrors: IndexErrors{ + IndexingFailures: internal.ToInteger(statMap[5].([]interface{})[1]), + LastIndexingError: internal.ToString(statMap[5].([]interface{})[3]), + LastIndexingErrorKey: internal.ToString(statMap[5].([]interface{})[5]), + }, + }) + } + } + } + + if gcStats, ok := data["gc_stats"].([]interface{}); ok { + ftInfo.GCStats = GCStats{} + for i := 0; i < len(gcStats); i += 2 { + if internal.ToLower(internal.ToString(gcStats[i])) == "bytes_collected" { + ftInfo.GCStats.BytesCollected = internal.ToInteger(gcStats[i+1]) + continue + } + if internal.ToLower(internal.ToString(gcStats[i])) == "total_ms_run" { + ftInfo.GCStats.TotalMsRun = internal.ToInteger(gcStats[i+1]) + continue + } + if internal.ToLower(internal.ToString(gcStats[i])) == "total_cycles" { + ftInfo.GCStats.TotalCycles = internal.ToInteger(gcStats[i+1]) + continue + } + if internal.ToLower(internal.ToString(gcStats[i])) == "average_cycle_time_ms" { + ftInfo.GCStats.AverageCycleTimeMs = internal.ToString(gcStats[i+1]) + continue + } + if internal.ToLower(internal.ToString(gcStats[i])) == "last_run_time_ms" { + ftInfo.GCStats.LastRunTimeMs = internal.ToInteger(gcStats[i+1]) + continue + } + if internal.ToLower(internal.ToString(gcStats[i])) == "gc_numeric_trees_missed" { + ftInfo.GCStats.GCNumericTreesMissed = internal.ToInteger(gcStats[i+1]) + continue + } + if internal.ToLower(internal.ToString(gcStats[i])) == "gc_blocks_denied" { + ftInfo.GCStats.GCBlocksDenied = internal.ToInteger(gcStats[i+1]) + continue + } + } + } + + ftInfo.GeoshapesSzMB = internal.ToFloat(data["geoshapes_sz_mb"]) + ftInfo.HashIndexingFailures = internal.ToInteger(data["hash_indexing_failures"]) + + if indexDef, ok := data["index_definition"].([]interface{}); ok { + ftInfo.IndexDefinition = IndexDefinition{ + KeyType: internal.ToString(indexDef[1]), + Prefixes: internal.ToStringSlice(indexDef[3]), + DefaultScore: internal.ToFloat(indexDef[5]), + } + } + + ftInfo.IndexName = internal.ToString(data["index_name"]) + ftInfo.IndexOptions = internal.ToStringSlice(data["index_options"].([]interface{})) + ftInfo.Indexing = internal.ToInteger(data["indexing"]) + ftInfo.InvertedSzMB = internal.ToFloat(data["inverted_sz_mb"]) + ftInfo.KeyTableSizeMB = internal.ToFloat(data["key_table_size_mb"]) + ftInfo.MaxDocID = internal.ToInteger(data["max_doc_id"]) + ftInfo.NumDocs = internal.ToInteger(data["num_docs"]) + ftInfo.NumRecords = internal.ToInteger(data["num_records"]) + ftInfo.NumTerms = internal.ToInteger(data["num_terms"]) + ftInfo.NumberOfUses = internal.ToInteger(data["number_of_uses"]) + ftInfo.OffsetBitsPerRecordAvg = internal.ToString(data["offset_bits_per_record_avg"]) + ftInfo.OffsetVectorsSzMB = internal.ToFloat(data["offset_vectors_sz_mb"]) + ftInfo.OffsetsPerTermAvg = internal.ToString(data["offsets_per_term_avg"]) + ftInfo.PercentIndexed = internal.ToFloat(data["percent_indexed"]) + ftInfo.RecordsPerDocAvg = internal.ToString(data["records_per_doc_avg"]) + ftInfo.SortableValuesSizeMB = internal.ToFloat(data["sortable_values_size_mb"]) + ftInfo.TagOverheadSzMB = internal.ToFloat(data["tag_overhead_sz_mb"]) + ftInfo.TextOverheadSzMB = internal.ToFloat(data["text_overhead_sz_mb"]) + ftInfo.TotalIndexMemorySzMB = internal.ToFloat(data["total_index_memory_sz_mb"]) + ftInfo.TotalIndexingTime = internal.ToInteger(data["total_indexing_time"]) + ftInfo.TotalInvertedIndexBlocks = internal.ToInteger(data["total_inverted_index_blocks"]) + ftInfo.VectorIndexSzMB = internal.ToFloat(data["vector_index_sz_mb"]) + + return ftInfo, nil +} + +type FTInfoCmd struct { + baseCmd + val FTInfoResult +} + +func newFTInfoCmd(ctx context.Context, args ...interface{}) *FTInfoCmd { + return &FTInfoCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *FTInfoCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *FTInfoCmd) SetVal(val FTInfoResult) { + cmd.val = val +} + +func (cmd *FTInfoCmd) Result() (FTInfoResult, error) { + return cmd.val, cmd.err +} + +func (cmd *FTInfoCmd) Val() FTInfoResult { + return cmd.val +} + +func (cmd *FTInfoCmd) RawVal() interface{} { + return cmd.rawVal +} + +func (cmd *FTInfoCmd) RawResult() (interface{}, error) { + return cmd.rawVal, cmd.err +} +func (cmd *FTInfoCmd) readReply(rd *proto.Reader) (err error) { + n, err := rd.ReadMapLen() + if err != nil { + return err + } + + data := make(map[string]interface{}, n) + for i := 0; i < n; i++ { + k, err := rd.ReadString() + if err != nil { + return err + } + v, err := rd.ReadReply() + if err != nil { + if err == Nil { + data[k] = Nil + continue + } + if err, ok := err.(proto.RedisError); ok { + data[k] = err + continue + } + return err + } + data[k] = v + } + cmd.val, err = parseFTInfo(data) + if err != nil { + cmd.err = err + } + + return nil +} + +// FTInfo - Retrieves information about an index. +// The 'index' parameter specifies the index to retrieve information about. +// For more information, please refer to the Redis documentation: +// [FT.INFO]: (https://redis.io/commands/ft.info/) +func (c cmdable) FTInfo(ctx context.Context, index string) *FTInfoCmd { + cmd := newFTInfoCmd(ctx, "FT.INFO", index) + _ = c(ctx, cmd) + return cmd +} + +// FTSpellCheck - Checks a query string for spelling errors. +// For more details about spellcheck query please follow: +// https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ +// For more information, please refer to the Redis documentation: +// [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/) +func (c cmdable) FTSpellCheck(ctx context.Context, index string, query string) *FTSpellCheckCmd { + args := []interface{}{"FT.SPELLCHECK", index, query} + cmd := newFTSpellCheckCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTSpellCheckWithArgs - Checks a query string for spelling errors with additional options. +// For more details about spellcheck query please follow: +// https://redis.io/docs/interact/search-and-query/advanced-concepts/spellcheck/ +// For more information, please refer to the Redis documentation: +// [FT.SPELLCHECK]: (https://redis.io/commands/ft.spellcheck/) +func (c cmdable) FTSpellCheckWithArgs(ctx context.Context, index string, query string, options *FTSpellCheckOptions) *FTSpellCheckCmd { + args := []interface{}{"FT.SPELLCHECK", index, query} + if options != nil { + if options.Distance > 0 { + args = append(args, "DISTANCE", options.Distance) + } + if options.Terms != nil { + args = append(args, "TERMS", options.Terms.Inclusion, options.Terms.Dictionary) + args = append(args, options.Terms.Terms...) + } + if options.Dialect > 0 { + args = append(args, "DIALECT", options.Dialect) + } + } + cmd := newFTSpellCheckCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +type FTSpellCheckCmd struct { + baseCmd + val []SpellCheckResult +} + +func newFTSpellCheckCmd(ctx context.Context, args ...interface{}) *FTSpellCheckCmd { + return &FTSpellCheckCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *FTSpellCheckCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *FTSpellCheckCmd) SetVal(val []SpellCheckResult) { + cmd.val = val +} + +func (cmd *FTSpellCheckCmd) Result() ([]SpellCheckResult, error) { + return cmd.val, cmd.err +} + +func (cmd *FTSpellCheckCmd) Val() []SpellCheckResult { + return cmd.val +} + +func (cmd *FTSpellCheckCmd) RawVal() interface{} { + return cmd.rawVal +} + +func (cmd *FTSpellCheckCmd) RawResult() (interface{}, error) { + return cmd.rawVal, cmd.err +} + +func (cmd *FTSpellCheckCmd) readReply(rd *proto.Reader) (err error) { + data, err := rd.ReadSlice() + if err != nil { + cmd.err = err + return nil + } + cmd.val, err = parseFTSpellCheck(data) + if err != nil { + cmd.err = err + } + return nil +} + +func parseFTSpellCheck(data []interface{}) ([]SpellCheckResult, error) { + results := make([]SpellCheckResult, 0, len(data)) + + for _, termData := range data { + termInfo, ok := termData.([]interface{}) + if !ok || len(termInfo) != 3 { + return nil, fmt.Errorf("invalid term format") + } + + term, ok := termInfo[1].(string) + if !ok { + return nil, fmt.Errorf("invalid term format") + } + + suggestionsData, ok := termInfo[2].([]interface{}) + if !ok { + return nil, fmt.Errorf("invalid suggestions format") + } + + suggestions := make([]SpellCheckSuggestion, 0, len(suggestionsData)) + for _, suggestionData := range suggestionsData { + suggestionInfo, ok := suggestionData.([]interface{}) + if !ok || len(suggestionInfo) != 2 { + return nil, fmt.Errorf("invalid suggestion format") + } + + scoreStr, ok := suggestionInfo[0].(string) + if !ok { + return nil, fmt.Errorf("invalid suggestion score format") + } + score, err := strconv.ParseFloat(scoreStr, 64) + if err != nil { + return nil, fmt.Errorf("invalid suggestion score value") + } + + suggestion, ok := suggestionInfo[1].(string) + if !ok { + return nil, fmt.Errorf("invalid suggestion format") + } + + suggestions = append(suggestions, SpellCheckSuggestion{ + Score: score, + Suggestion: suggestion, + }) + } + + results = append(results, SpellCheckResult{ + Term: term, + Suggestions: suggestions, + }) + } + + return results, nil +} + +func parseFTSearch(data []interface{}, noContent, withScores, withPayloads, withSortKeys bool) (FTSearchResult, error) { + if len(data) < 1 { + return FTSearchResult{}, fmt.Errorf("unexpected search result format") + } + + total, ok := data[0].(int64) + if !ok { + return FTSearchResult{}, fmt.Errorf("invalid total results format") + } + + var results []Document + for i := 1; i < len(data); { + docID, ok := data[i].(string) + if !ok { + return FTSearchResult{}, fmt.Errorf("invalid document ID format") + } + + doc := Document{ + ID: docID, + Fields: make(map[string]string), + } + i++ + + if noContent { + results = append(results, doc) + continue + } + + if withScores && i < len(data) { + if scoreStr, ok := data[i].(string); ok { + score, err := strconv.ParseFloat(scoreStr, 64) + if err != nil { + return FTSearchResult{}, fmt.Errorf("invalid score format") + } + doc.Score = &score + i++ + } + } + + if withPayloads && i < len(data) { + if payload, ok := data[i].(string); ok { + doc.Payload = &payload + i++ + } + } + + if withSortKeys && i < len(data) { + if sortKey, ok := data[i].(string); ok { + doc.SortKey = &sortKey + i++ + } + } + + if i < len(data) { + fields, ok := data[i].([]interface{}) + if !ok { + return FTSearchResult{}, fmt.Errorf("invalid document fields format") + } + + for j := 0; j < len(fields); j += 2 { + key, ok := fields[j].(string) + if !ok { + return FTSearchResult{}, fmt.Errorf("invalid field key format") + } + value, ok := fields[j+1].(string) + if !ok { + return FTSearchResult{}, fmt.Errorf("invalid field value format") + } + doc.Fields[key] = value + } + i++ + } + + results = append(results, doc) + } + return FTSearchResult{ + Total: int(total), + Docs: results, + }, nil +} + +type FTSearchCmd struct { + baseCmd + val FTSearchResult + options *FTSearchOptions +} + +func newFTSearchCmd(ctx context.Context, options *FTSearchOptions, args ...interface{}) *FTSearchCmd { + return &FTSearchCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + options: options, + } +} + +func (cmd *FTSearchCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *FTSearchCmd) SetVal(val FTSearchResult) { + cmd.val = val +} + +func (cmd *FTSearchCmd) Result() (FTSearchResult, error) { + return cmd.val, cmd.err +} + +func (cmd *FTSearchCmd) Val() FTSearchResult { + return cmd.val +} + +func (cmd *FTSearchCmd) RawVal() interface{} { + return cmd.rawVal +} + +func (cmd *FTSearchCmd) RawResult() (interface{}, error) { + return cmd.rawVal, cmd.err +} + +func (cmd *FTSearchCmd) readReply(rd *proto.Reader) (err error) { + data, err := rd.ReadSlice() + if err != nil { + cmd.err = err + return nil + } + cmd.val, err = parseFTSearch(data, cmd.options.NoContent, cmd.options.WithScores, cmd.options.WithPayloads, cmd.options.WithSortKeys) + if err != nil { + cmd.err = err + } + return nil +} + +// FTSearch - Executes a search query on an index. +// The 'index' parameter specifies the index to search, and the 'query' parameter specifies the search query. +// For more information, please refer to the Redis documentation: +// [FT.SEARCH]: (https://redis.io/commands/ft.search/) +func (c cmdable) FTSearch(ctx context.Context, index string, query string) *FTSearchCmd { + args := []interface{}{"FT.SEARCH", index, query} + cmd := newFTSearchCmd(ctx, &FTSearchOptions{}, args...) + _ = c(ctx, cmd) + return cmd +} + +type SearchQuery []interface{} + +func FTSearchQuery(query string, options *FTSearchOptions) SearchQuery { + queryArgs := []interface{}{query} + if options != nil { + if options.NoContent { + queryArgs = append(queryArgs, "NOCONTENT") + } + if options.Verbatim { + queryArgs = append(queryArgs, "VERBATIM") + } + if options.NoStopWords { + queryArgs = append(queryArgs, "NOSTOPWORDS") + } + if options.WithScores { + queryArgs = append(queryArgs, "WITHSCORES") + } + if options.WithPayloads { + queryArgs = append(queryArgs, "WITHPAYLOADS") + } + if options.WithSortKeys { + queryArgs = append(queryArgs, "WITHSORTKEYS") + } + if options.Filters != nil { + for _, filter := range options.Filters { + queryArgs = append(queryArgs, "FILTER", filter.FieldName, filter.Min, filter.Max) + } + } + if options.GeoFilter != nil { + for _, geoFilter := range options.GeoFilter { + queryArgs = append(queryArgs, "GEOFILTER", geoFilter.FieldName, geoFilter.Longitude, geoFilter.Latitude, geoFilter.Radius, geoFilter.Unit) + } + } + if options.InKeys != nil { + queryArgs = append(queryArgs, "INKEYS", len(options.InKeys)) + queryArgs = append(queryArgs, options.InKeys...) + } + if options.InFields != nil { + queryArgs = append(queryArgs, "INFIELDS", len(options.InFields)) + queryArgs = append(queryArgs, options.InFields...) + } + if options.Return != nil { + queryArgs = append(queryArgs, "RETURN") + queryArgsReturn := []interface{}{} + for _, ret := range options.Return { + queryArgsReturn = append(queryArgsReturn, ret.FieldName) + if ret.As != "" { + queryArgsReturn = append(queryArgsReturn, "AS", ret.As) + } + } + queryArgs = append(queryArgs, len(queryArgsReturn)) + queryArgs = append(queryArgs, queryArgsReturn...) + } + if options.Slop > 0 { + queryArgs = append(queryArgs, "SLOP", options.Slop) + } + if options.Timeout > 0 { + queryArgs = append(queryArgs, "TIMEOUT", options.Timeout) + } + if options.InOrder { + queryArgs = append(queryArgs, "INORDER") + } + if options.Language != "" { + queryArgs = append(queryArgs, "LANGUAGE", options.Language) + } + if options.Expander != "" { + queryArgs = append(queryArgs, "EXPANDER", options.Expander) + } + if options.Scorer != "" { + queryArgs = append(queryArgs, "SCORER", options.Scorer) + } + if options.ExplainScore { + queryArgs = append(queryArgs, "EXPLAINSCORE") + } + if options.Payload != "" { + queryArgs = append(queryArgs, "PAYLOAD", options.Payload) + } + if options.SortBy != nil { + queryArgs = append(queryArgs, "SORTBY") + for _, sortBy := range options.SortBy { + queryArgs = append(queryArgs, sortBy.FieldName) + if sortBy.Asc && sortBy.Desc { + panic("FT.SEARCH: ASC and DESC are mutually exclusive") + } + if sortBy.Asc { + queryArgs = append(queryArgs, "ASC") + } + if sortBy.Desc { + queryArgs = append(queryArgs, "DESC") + } + } + if options.SortByWithCount { + queryArgs = append(queryArgs, "WITHCOUT") + } + } + if options.LimitOffset >= 0 && options.Limit > 0 { + queryArgs = append(queryArgs, "LIMIT", options.LimitOffset, options.Limit) + } + if options.Params != nil { + queryArgs = append(queryArgs, "PARAMS", len(options.Params)*2) + for key, value := range options.Params { + queryArgs = append(queryArgs, key, value) + } + } + if options.DialectVersion > 0 { + queryArgs = append(queryArgs, "DIALECT", options.DialectVersion) + } + } + return queryArgs +} + +// FTSearchWithArgs - Executes a search query on an index with additional options. +// The 'index' parameter specifies the index to search, the 'query' parameter specifies the search query, +// and the 'options' parameter specifies additional options for the search. +// For more information, please refer to the Redis documentation: +// [FT.SEARCH]: (https://redis.io/commands/ft.search/) +func (c cmdable) FTSearchWithArgs(ctx context.Context, index string, query string, options *FTSearchOptions) *FTSearchCmd { + args := []interface{}{"FT.SEARCH", index, query} + if options != nil { + if options.NoContent { + args = append(args, "NOCONTENT") + } + if options.Verbatim { + args = append(args, "VERBATIM") + } + if options.NoStopWords { + args = append(args, "NOSTOPWORDS") + } + if options.WithScores { + args = append(args, "WITHSCORES") + } + if options.WithPayloads { + args = append(args, "WITHPAYLOADS") + } + if options.WithSortKeys { + args = append(args, "WITHSORTKEYS") + } + if options.Filters != nil { + for _, filter := range options.Filters { + args = append(args, "FILTER", filter.FieldName, filter.Min, filter.Max) + } + } + if options.GeoFilter != nil { + for _, geoFilter := range options.GeoFilter { + args = append(args, "GEOFILTER", geoFilter.FieldName, geoFilter.Longitude, geoFilter.Latitude, geoFilter.Radius, geoFilter.Unit) + } + } + if options.InKeys != nil { + args = append(args, "INKEYS", len(options.InKeys)) + args = append(args, options.InKeys...) + } + if options.InFields != nil { + args = append(args, "INFIELDS", len(options.InFields)) + args = append(args, options.InFields...) + } + if options.Return != nil { + args = append(args, "RETURN") + argsReturn := []interface{}{} + for _, ret := range options.Return { + argsReturn = append(argsReturn, ret.FieldName) + if ret.As != "" { + argsReturn = append(argsReturn, "AS", ret.As) + } + } + args = append(args, len(argsReturn)) + args = append(args, argsReturn...) + } + if options.Slop > 0 { + args = append(args, "SLOP", options.Slop) + } + if options.Timeout > 0 { + args = append(args, "TIMEOUT", options.Timeout) + } + if options.InOrder { + args = append(args, "INORDER") + } + if options.Language != "" { + args = append(args, "LANGUAGE", options.Language) + } + if options.Expander != "" { + args = append(args, "EXPANDER", options.Expander) + } + if options.Scorer != "" { + args = append(args, "SCORER", options.Scorer) + } + if options.ExplainScore { + args = append(args, "EXPLAINSCORE") + } + if options.Payload != "" { + args = append(args, "PAYLOAD", options.Payload) + } + if options.SortBy != nil { + args = append(args, "SORTBY") + for _, sortBy := range options.SortBy { + args = append(args, sortBy.FieldName) + if sortBy.Asc && sortBy.Desc { + panic("FT.SEARCH: ASC and DESC are mutually exclusive") + } + if sortBy.Asc { + args = append(args, "ASC") + } + if sortBy.Desc { + args = append(args, "DESC") + } + } + if options.SortByWithCount { + args = append(args, "WITHCOUT") + } + } + if options.LimitOffset >= 0 && options.Limit > 0 { + args = append(args, "LIMIT", options.LimitOffset, options.Limit) + } + if options.Params != nil { + args = append(args, "PARAMS", len(options.Params)*2) + for key, value := range options.Params { + args = append(args, key, value) + } + } + if options.DialectVersion > 0 { + args = append(args, "DIALECT", options.DialectVersion) + } + } + cmd := newFTSearchCmd(ctx, options, args...) + _ = c(ctx, cmd) + return cmd +} + +func NewFTSynDumpCmd(ctx context.Context, args ...interface{}) *FTSynDumpCmd { + return &FTSynDumpCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *FTSynDumpCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *FTSynDumpCmd) SetVal(val []FTSynDumpResult) { + cmd.val = val +} + +func (cmd *FTSynDumpCmd) Val() []FTSynDumpResult { + return cmd.val +} + +func (cmd *FTSynDumpCmd) Result() ([]FTSynDumpResult, error) { + return cmd.val, cmd.err +} + +func (cmd *FTSynDumpCmd) RawVal() interface{} { + return cmd.rawVal +} + +func (cmd *FTSynDumpCmd) RawResult() (interface{}, error) { + return cmd.rawVal, cmd.err +} + +func (cmd *FTSynDumpCmd) readReply(rd *proto.Reader) error { + termSynonymPairs, err := rd.ReadSlice() + if err != nil { + return err + } + + var results []FTSynDumpResult + for i := 0; i < len(termSynonymPairs); i += 2 { + term, ok := termSynonymPairs[i].(string) + if !ok { + return fmt.Errorf("invalid term format") + } + + synonyms, ok := termSynonymPairs[i+1].([]interface{}) + if !ok { + return fmt.Errorf("invalid synonyms format") + } + + synonymList := make([]string, len(synonyms)) + for j, syn := range synonyms { + synonym, ok := syn.(string) + if !ok { + return fmt.Errorf("invalid synonym format") + } + synonymList[j] = synonym + } + + results = append(results, FTSynDumpResult{ + Term: term, + Synonyms: synonymList, + }) + } + + cmd.val = results + return nil +} + +// FTSynDump - Dumps the contents of a synonym group. +// The 'index' parameter specifies the index to dump. +// For more information, please refer to the Redis documentation: +// [FT.SYNDUMP]: (https://redis.io/commands/ft.syndump/) +func (c cmdable) FTSynDump(ctx context.Context, index string) *FTSynDumpCmd { + cmd := NewFTSynDumpCmd(ctx, "FT.SYNDUMP", index) + _ = c(ctx, cmd) + return cmd +} + +// FTSynUpdate - Creates or updates a synonym group with additional terms. +// The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, and the 'terms' parameter specifies the additional terms. +// For more information, please refer to the Redis documentation: +// [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/) +func (c cmdable) FTSynUpdate(ctx context.Context, index string, synGroupId interface{}, terms []interface{}) *StatusCmd { + args := []interface{}{"FT.SYNUPDATE", index, synGroupId} + args = append(args, terms...) + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTSynUpdateWithArgs - Creates or updates a synonym group with additional terms and options. +// The 'index' parameter specifies the index to update, the 'synGroupId' parameter specifies the synonym group id, the 'options' parameter specifies additional options for the update, and the 'terms' parameter specifies the additional terms. +// For more information, please refer to the Redis documentation: +// [FT.SYNUPDATE]: (https://redis.io/commands/ft.synupdate/) +func (c cmdable) FTSynUpdateWithArgs(ctx context.Context, index string, synGroupId interface{}, options *FTSynUpdateOptions, terms []interface{}) *StatusCmd { + args := []interface{}{"FT.SYNUPDATE", index, synGroupId} + if options.SkipInitialScan { + args = append(args, "SKIPINITIALSCAN") + } + args = append(args, terms...) + cmd := NewStatusCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +// FTTagVals - Returns all distinct values indexed in a tag field. +// The 'index' parameter specifies the index to check, and the 'field' parameter specifies the tag field to retrieve values from. +// For more information, please refer to the Redis documentation: +// [FT.TAGVALS]: (https://redis.io/commands/ft.tagvals/) +func (c cmdable) FTTagVals(ctx context.Context, index string, field string) *StringSliceCmd { + cmd := NewStringSliceCmd(ctx, "FT.TAGVALS", index, field) + _ = c(ctx, cmd) + return cmd +} + +// type FTProfileResult struct { +// Results []interface{} +// Profile ProfileDetails +// } + +// type ProfileDetails struct { +// TotalProfileTime string +// ParsingTime string +// PipelineCreationTime string +// Warning string +// IteratorsProfile []IteratorProfile +// ResultProcessorsProfile []ResultProcessorProfile +// } + +// type IteratorProfile struct { +// Type string +// QueryType string +// Time interface{} +// Counter int +// Term string +// Size int +// ChildIterators []IteratorProfile +// } + +// type ResultProcessorProfile struct { +// Type string +// Time interface{} +// Counter int +// } + +// func parseFTProfileResult(data []interface{}) (FTProfileResult, error) { +// var result FTProfileResult +// if len(data) < 2 { +// return result, fmt.Errorf("unexpected data length") +// } + +// // Parse results +// result.Results = data[0].([]interface{}) + +// // Parse profile details +// profileData := data[1].([]interface{}) +// profileDetails := ProfileDetails{} +// for i := 0; i < len(profileData); i += 2 { +// switch profileData[i].(string) { +// case "Total profile time": +// profileDetails.TotalProfileTime = profileData[i+1].(string) +// case "Parsing time": +// profileDetails.ParsingTime = profileData[i+1].(string) +// case "Pipeline creation time": +// profileDetails.PipelineCreationTime = profileData[i+1].(string) +// case "Warning": +// profileDetails.Warning = profileData[i+1].(string) +// case "Iterators profile": +// profileDetails.IteratorsProfile = parseIteratorsProfile(profileData[i+1].([]interface{})) +// case "Result processors profile": +// profileDetails.ResultProcessorsProfile = parseResultProcessorsProfile(profileData[i+1].([]interface{})) +// } +// } + +// result.Profile = profileDetails +// return result, nil +// } + +// func parseIteratorsProfile(data []interface{}) []IteratorProfile { +// var iterators []IteratorProfile +// for _, item := range data { +// profile := item.([]interface{}) +// iterator := IteratorProfile{} +// for i := 0; i < len(profile); i += 2 { +// switch profile[i].(string) { +// case "Type": +// iterator.Type = profile[i+1].(string) +// case "Query type": +// iterator.QueryType = profile[i+1].(string) +// case "Time": +// iterator.Time = profile[i+1] +// case "Counter": +// iterator.Counter = int(profile[i+1].(int64)) +// case "Term": +// iterator.Term = profile[i+1].(string) +// case "Size": +// iterator.Size = int(profile[i+1].(int64)) +// case "Child iterators": +// iterator.ChildIterators = parseChildIteratorsProfile(profile[i+1].([]interface{})) +// } +// } +// iterators = append(iterators, iterator) +// } +// return iterators +// } + +// func parseChildIteratorsProfile(data []interface{}) []IteratorProfile { +// var iterators []IteratorProfile +// for _, item := range data { +// profile := item.([]interface{}) +// iterator := IteratorProfile{} +// for i := 0; i < len(profile); i += 2 { +// switch profile[i].(string) { +// case "Type": +// iterator.Type = profile[i+1].(string) +// case "Query type": +// iterator.QueryType = profile[i+1].(string) +// case "Time": +// iterator.Time = profile[i+1] +// case "Counter": +// iterator.Counter = int(profile[i+1].(int64)) +// case "Term": +// iterator.Term = profile[i+1].(string) +// case "Size": +// iterator.Size = int(profile[i+1].(int64)) +// } +// } +// iterators = append(iterators, iterator) +// } +// return iterators +// } + +// func parseResultProcessorsProfile(data []interface{}) []ResultProcessorProfile { +// var processors []ResultProcessorProfile +// for _, item := range data { +// profile := item.([]interface{}) +// processor := ResultProcessorProfile{} +// for i := 0; i < len(profile); i += 2 { +// switch profile[i].(string) { +// case "Type": +// processor.Type = profile[i+1].(string) +// case "Time": +// processor.Time = profile[i+1] +// case "Counter": +// processor.Counter = int(profile[i+1].(int64)) +// } +// } +// processors = append(processors, processor) +// } +// return processors +// } + +// func NewFTProfileCmd(ctx context.Context, args ...interface{}) *FTProfileCmd { +// return &FTProfileCmd{ +// baseCmd: baseCmd{ +// ctx: ctx, +// args: args, +// }, +// } +// } + +// type FTProfileCmd struct { +// baseCmd +// val FTProfileResult +// } + +// func (cmd *FTProfileCmd) String() string { +// return cmdString(cmd, cmd.val) +// } + +// func (cmd *FTProfileCmd) SetVal(val FTProfileResult) { +// cmd.val = val +// } + +// func (cmd *FTProfileCmd) Result() (FTProfileResult, error) { +// return cmd.val, cmd.err +// } + +// func (cmd *FTProfileCmd) Val() FTProfileResult { +// return cmd.val +// } + +// func (cmd *FTProfileCmd) readReply(rd *proto.Reader) (err error) { +// data, err := rd.ReadSlice() +// if err != nil { +// return err +// } +// cmd.val, err = parseFTProfileResult(data) +// if err != nil { +// cmd.err = err +// } +// return nil +// } + +// // FTProfile - Executes a search query and returns a profile of how the query was processed. +// // The 'index' parameter specifies the index to search, the 'limited' parameter specifies whether to limit the results, +// // and the 'query' parameter specifies the search / aggreagte query. Please notice that you must either pass a SearchQuery or an AggregateQuery. +// // For more information, please refer to the Redis documentation: +// // [FT.PROFILE]: (https://redis.io/commands/ft.profile/) +// func (c cmdable) FTProfile(ctx context.Context, index string, limited bool, query interface{}) *FTProfileCmd { +// queryType := "" +// var argsQuery []interface{} + +// switch v := query.(type) { +// case AggregateQuery: +// queryType = "AGGREGATE" +// argsQuery = v +// case SearchQuery: +// queryType = "SEARCH" +// argsQuery = v +// default: +// panic("FT.PROFILE: query must be either AggregateQuery or SearchQuery") +// } + +// args := []interface{}{"FT.PROFILE", index, queryType} + +// if limited { +// args = append(args, "LIMITED") +// } +// args = append(args, "QUERY") +// args = append(args, argsQuery...) + +// cmd := NewFTProfileCmd(ctx, args...) +// _ = c(ctx, cmd) +// return cmd +// } diff --git a/vendor/github.com/redis/go-redis/v9/sentinel.go b/vendor/github.com/redis/go-redis/v9/sentinel.go index 188f884..3156955 100644 --- a/vendor/github.com/redis/go-redis/v9/sentinel.go +++ b/vendor/github.com/redis/go-redis/v9/sentinel.go @@ -82,6 +82,7 @@ type FailoverOptions struct { DisableIndentity bool IdentitySuffix string + UnstableResp3 bool } func (opt *FailoverOptions) clientOptions() *Options { @@ -119,6 +120,7 @@ func (opt *FailoverOptions) clientOptions() *Options { DisableIndentity: opt.DisableIndentity, IdentitySuffix: opt.IdentitySuffix, + UnstableResp3: opt.UnstableResp3, } } @@ -156,6 +158,7 @@ func (opt *FailoverOptions) sentinelOptions(addr string) *Options { DisableIndentity: opt.DisableIndentity, IdentitySuffix: opt.IdentitySuffix, + UnstableResp3: opt.UnstableResp3, } } diff --git a/vendor/github.com/redis/go-redis/v9/timeseries_commands.go b/vendor/github.com/redis/go-redis/v9/timeseries_commands.go index 6f1b2fa..82d8cdf 100644 --- a/vendor/github.com/redis/go-redis/v9/timeseries_commands.go +++ b/vendor/github.com/redis/go-redis/v9/timeseries_commands.go @@ -40,25 +40,32 @@ type TimeseriesCmdable interface { } type TSOptions struct { - Retention int - ChunkSize int - Encoding string - DuplicatePolicy string - Labels map[string]string + Retention int + ChunkSize int + Encoding string + DuplicatePolicy string + Labels map[string]string + IgnoreMaxTimeDiff int64 + IgnoreMaxValDiff float64 } type TSIncrDecrOptions struct { - Timestamp int64 - Retention int - ChunkSize int - Uncompressed bool - Labels map[string]string + Timestamp int64 + Retention int + ChunkSize int + Uncompressed bool + DuplicatePolicy string + Labels map[string]string + IgnoreMaxTimeDiff int64 + IgnoreMaxValDiff float64 } type TSAlterOptions struct { - Retention int - ChunkSize int - DuplicatePolicy string - Labels map[string]string + Retention int + ChunkSize int + DuplicatePolicy string + Labels map[string]string + IgnoreMaxTimeDiff int64 + IgnoreMaxValDiff float64 } type TSCreateRuleOptions struct { @@ -223,6 +230,9 @@ func (c cmdable) TSAddWithArgs(ctx context.Context, key string, timestamp interf args = append(args, label, value) } } + if options.IgnoreMaxTimeDiff != 0 || options.IgnoreMaxValDiff != 0 { + args = append(args, "IGNORE", options.IgnoreMaxTimeDiff, options.IgnoreMaxValDiff) + } } cmd := NewIntCmd(ctx, args...) _ = c(ctx, cmd) @@ -264,6 +274,9 @@ func (c cmdable) TSCreateWithArgs(ctx context.Context, key string, options *TSOp args = append(args, label, value) } } + if options.IgnoreMaxTimeDiff != 0 || options.IgnoreMaxValDiff != 0 { + args = append(args, "IGNORE", options.IgnoreMaxTimeDiff, options.IgnoreMaxValDiff) + } } cmd := NewStatusCmd(ctx, args...) _ = c(ctx, cmd) @@ -292,6 +305,9 @@ func (c cmdable) TSAlter(ctx context.Context, key string, options *TSAlterOption args = append(args, label, value) } } + if options.IgnoreMaxTimeDiff != 0 || options.IgnoreMaxValDiff != 0 { + args = append(args, "IGNORE", options.IgnoreMaxTimeDiff, options.IgnoreMaxValDiff) + } } cmd := NewStatusCmd(ctx, args...) _ = c(ctx, cmd) @@ -351,12 +367,18 @@ func (c cmdable) TSIncrByWithArgs(ctx context.Context, key string, timestamp flo if options.Uncompressed { args = append(args, "UNCOMPRESSED") } + if options.DuplicatePolicy != "" { + args = append(args, "DUPLICATE_POLICY", options.DuplicatePolicy) + } if options.Labels != nil { args = append(args, "LABELS") for label, value := range options.Labels { args = append(args, label, value) } } + if options.IgnoreMaxTimeDiff != 0 || options.IgnoreMaxValDiff != 0 { + args = append(args, "IGNORE", options.IgnoreMaxTimeDiff, options.IgnoreMaxValDiff) + } } cmd := NewIntCmd(ctx, args...) _ = c(ctx, cmd) @@ -391,12 +413,18 @@ func (c cmdable) TSDecrByWithArgs(ctx context.Context, key string, timestamp flo if options.Uncompressed { args = append(args, "UNCOMPRESSED") } + if options.DuplicatePolicy != "" { + args = append(args, "DUPLICATE_POLICY", options.DuplicatePolicy) + } if options.Labels != nil { args = append(args, "LABELS") for label, value := range options.Labels { args = append(args, label, value) } } + if options.IgnoreMaxTimeDiff != 0 || options.IgnoreMaxValDiff != 0 { + args = append(args, "IGNORE", options.IgnoreMaxTimeDiff, options.IgnoreMaxValDiff) + } } cmd := NewIntCmd(ctx, args...) _ = c(ctx, cmd) diff --git a/vendor/github.com/redis/go-redis/v9/universal.go b/vendor/github.com/redis/go-redis/v9/universal.go index 275bef3..f4d2d75 100644 --- a/vendor/github.com/redis/go-redis/v9/universal.go +++ b/vendor/github.com/redis/go-redis/v9/universal.go @@ -68,6 +68,7 @@ type UniversalOptions struct { DisableIndentity bool IdentitySuffix string + UnstableResp3 bool } // Cluster returns cluster options created from the universal options. @@ -160,6 +161,7 @@ func (o *UniversalOptions) Failover() *FailoverOptions { DisableIndentity: o.DisableIndentity, IdentitySuffix: o.IdentitySuffix, + UnstableResp3: o.UnstableResp3, } } @@ -203,6 +205,7 @@ func (o *UniversalOptions) Simple() *Options { DisableIndentity: o.DisableIndentity, IdentitySuffix: o.IdentitySuffix, + UnstableResp3: o.UnstableResp3, } } diff --git a/vendor/github.com/redis/go-redis/v9/version.go b/vendor/github.com/redis/go-redis/v9/version.go index b1234da..2b9926e 100644 --- a/vendor/github.com/redis/go-redis/v9/version.go +++ b/vendor/github.com/redis/go-redis/v9/version.go @@ -2,5 +2,5 @@ package redis // Version is the current release version. func Version() string { - return "9.6.1" + return "9.7.0" } diff --git a/vendor/github.com/sfomuseum/go-activitypub/Makefile b/vendor/github.com/sfomuseum/go-activitypub/Makefile index 119fd6e..7ead5ad 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/Makefile +++ b/vendor/github.com/sfomuseum/go-activitypub/Makefile @@ -2,19 +2,31 @@ GOMOD=$(shell test -f "go.work" && echo "readonly" || echo "vendor") LDFLAGS=-s -w cli: - go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/server cmd/server/main.go go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/add-account cmd/add-account/main.go - go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/get-account cmd/get-account/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/add-aliases cmd/add-aliases/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/block cmd/block/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/boost-note cmd/boost-note/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/counts-for-date cmd/counts-for-date/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/create-dynamodb-tables cmd/create-dynamodb-tables/main.go go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/create-post cmd/create-post/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/deliver-activity cmd/deliver-activity/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/get-account cmd/get-account/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/follow cmd/follow/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/list-boosts cmd/list-boosts/main.go go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/list-followers cmd/list-followers/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/list-activities cmd/list-activities/main.go go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/list-addresses cmd/list-addresses/main.go - go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/counts-for-date cmd/counts-for-date/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/list-aliases cmd/list-aliases/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/list-deliveries cmd/list-deliveries/main.go go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/inbox cmd/inbox/main.go - go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/create-dynamodb-tables cmd/create-dynamodb-tables/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/retrieve-actor cmd/retrieve-actor/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/retrieve-delivery cmd/retrieve-delivery/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/retrieve-note cmd/retrieve-note/main.go + go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/server cmd/server/main.go lambda: @make lambda-server - @make lambda-deliver-post + @make lambda-deliver-activity lambda-server: if test -f bootstrap; then rm -f bootstrap; fi @@ -23,10 +35,10 @@ lambda-server: zip server.zip bootstrap rm -f bootstrap -lambda-deliver-post: +lambda-deliver-activity: if test -f bootstrap; then rm -f bootstrap; fi if test -f deliver.zip; then rm -f deliver.zip; fi - GOARCH=arm64 GOOS=linux go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -tags lambda.norpc -o bootstrap cmd/deliver-post/main.go + GOARCH=arm64 GOOS=linux go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -tags lambda.norpc -o bootstrap cmd/deliver-activity/main.go zip deliver.zip bootstrap rm -f bootstrap @@ -35,20 +47,22 @@ lambda-deliver-post: SQLITE3=sqlite3 TABLE_PREFIX= -ACCOUNTS_DB=accounts.db -FOLLOWERS_DB=followers.db -FOLLOWING_DB=following.db -POSTS_DB=posts.db -POST_TAGS_DB=posts.db -NOTES_DB=notes.db -MESSAGES_DB=messages.db -BLOCKS_DB=blocks.db -DELIVERIES_DB=deliveries.db -BOOSTS_DB=boosts.db -LIKES_DB=likes.db -PROPERTIES_DB=properties.db +ACCOUNTS_DB=work/accounts.db +ACTIVITIES_DB=work/activities.db +FOLLOWERS_DB=work/followers.db +FOLLOWING_DB=work/following.db +POSTS_DB=work/posts.db +POST_TAGS_DB=work/posts.db +NOTES_DB=work/notes.db +MESSAGES_DB=work/messages.db +BLOCKS_DB=work/blocks.db +DELIVERIES_DB=work/deliveries.db +BOOSTS_DB=work/boosts.db +LIKES_DB=work/likes.db +PROPERTIES_DB=work/properties.db ACCOUNTS_DB_URI=sql://sqlite3?dsn=$(ACCOUNTS_DB) +ACTIVITIES_DB_URI=sql://sqlite3?dsn=$(ACTIVITIES_DB) FOLLOWERS_DB_URI=sql://sqlite3?dsn=$(FOLLOWERS_DB) FOLLOWING_DB_URI=sql://sqlite3?dsn=$(FOLLOWING_DB) BLOCKS_DB_URI=sql://sqlite3?dsn=$(BLOCKS_DB) @@ -62,6 +76,7 @@ LIKES_DB_URI=sql://sqlite3?dsn=$(LIKES_DB) PROPERTIES_DB_URI=sql://sqlite3?dsn=$(PROPERTIES_DB) ACCOUNTS_DB_URI=awsdynamodb://$(TABLE_PREFIX)accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: +ACTIVITIES_DB_URI=awsdynamodb://$(TABLE_PREFIX)activities?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: ALIASES_DB_URI=awsdynamodb://$(TABLE_PREFIX)aliases?partition_key=Name&allow_scans=true&local=true®ion=localhost&credentials=anon: BLOCKS_DB_URI=awsdynamodb://$(TABLE_PREFIX)blocks?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: BOOSTS_DB_URI=awsdynamodb://$(TABLE_PREFIX)boosts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon: @@ -85,12 +100,27 @@ db-sqlite: $(SQLITE3) $(NOTES_DB) < schema/sqlite/notes.schema $(SQLITE3) $(MESSAGES_DB) < schema/sqlite/messages.schema $(SQLITE3) $(BLOCKS_DB) < schema/sqlite/blocks.schema - $(SQLITE3) $(DELIVERIES_DB) < schema/sqlite/deliveries.schema $(SQLITE3) $(BOOSTS_DB) < schema/sqlite/boosts.schema $(SQLITE3) $(LIKES_DB) < schema/sqlite/likes.schema $(SQLITE3) $(PROPERTIES_DB) < schema/sqlite/properties.schema + $(SQLITE3) $(DELIVERIES_DB) < schema/sqlite/deliveries.schema + +DELIVERY_QUEUE_URI=synchronous:// + +deliver-pubsub: + go run cmd/deliver-activity/main.go \ + -mode pubsub \ + -subscriber-uri 'redis://?channel=activitypub' \ + -accounts-database-uri '$(ACCOUNTS_DB_URI)' \ + -activities-database-uri '$(ACTIVITIES_DB_URI)' \ + -deliveries-database-uri '$(DELIVERIES_DB_URI)' \ + -followers-database-uri '$(FOLLOWERS_DB_URI)' \ + -posts-database-uri '$(POSTS_DB_URI)' \ + -post-tags-database-uri '$(POST_TAGS_DB_URI)' \ + -insecure \ + -verbose -accounts: +setup-accounts: go run cmd/add-account/main.go \ -accounts-database-uri '$(ACCOUNTS_DB_URI)' \ -aliases-database-uri '$(ALIASES_DB_URI)' \ @@ -152,7 +182,8 @@ block: -accounts-database-uri '$(ACCOUNTS_DB_URI)' \ -blocks-database-uri '$(BLOCKS_DB_URI)' \ -account-name bob \ - -block-host block.club + -block-host block.club \ + -verbose unblock: go run cmd/block/main.go \ @@ -160,23 +191,48 @@ unblock: -blocks-database-uri '$(BLOCKS_DB_URI)' \ -account-name bob \ -block-host block.club \ - -undo + -undo \ + -verbose # Alice wants to post something (to Bob, if Bob is following Alice) post: go run cmd/create-post/main.go \ -accounts-database-uri '$(ACCOUNTS_DB_URI)' \ + -activities-database-uri '$(ACTIVITIES_DB_URI)' \ -followers-database-uri '$(FOLLOWERS_DB_URI)' \ -posts-database-uri '$(POSTS_DB_URI)' \ -post-tags-database-uri '$(POST_TAGS_DB_URI)' \ -deliveries-database-uri '$(DELIVERIES_DB_URI)' \ + -delivery-queue-uri '$(DELIVERY_QUEUE_URI)' \ -account-name alice \ -message "$(MESSAGE)" \ -hostname localhost:8080 \ -insecure \ -verbose +boost-note: + go run cmd/boost-note/main.go \ + -accounts-database-uri '$(ACCOUNTS_DB_URI)' \ + -activities-database-uri '$(ACTIVITIES_DB_URI)' \ + -followers-database-uri '$(FOLLOWERS_DB_URI)' \ + -deliveries-database-uri '$(DELIVERIES_DB_URI)' \ + -account-name doug \ + -note "$(NOTE)" \ + -hostname localhost:8080 \ + -delivery-queue-uri '$(DELIVERY_QUEUE_URI)' \ + -insecure \ + -verbose + +list-boosts: + go run cmd/list-boosts/main.go \ + -accounts-database-uri '$(ACCOUNTS_DB_URI)' \ + -boosts-database-uri '$(BOOSTS_DB_URI)' \ + -account-name $(ACCOUNT) \ + -hostname localhost:8080 \ + -insecure \ + -verbose + # -mention $(MENTION) \ reply: @@ -199,12 +255,16 @@ delivery: -delivery-id $(ID) \ -verbose -inbox: +list-inbox: go run cmd/inbox/main.go \ -accounts-database-uri '$(ACCOUNTS_DB_URI)' \ -messages-database-uri '$(MESSAGES_DB_URI)' \ -notes-database-uri '$(NOTES_DB_URI)' \ - -account-name $(ACCOUNT) + -account-name $(ACCOUNT) \ + -verbose + +SERVER_DISABLED=false +SERVER_VERBOSE=true server: go run cmd/server/main.go \ @@ -223,22 +283,27 @@ server: -process-message-queue-uri 'stdout://' \ -allow-remote-icon-uri \ -allow-create \ - -verbose \ + -verbose=$(SERVER_VERBOSE) \ + -disabled=$(SERVER_DISABLED) \ -hostname localhost:8080 \ -insecure +list-activities: + go run cmd/list-activities/main.go \ + -activities-database-uri '$(ACTIVITIES_DB_URI)' \ + -verbose + +list-deliveries: + go run cmd/list-deliveries/main.go \ + -deliveries-database-uri '$(DELIVERIES_DB_URI)' \ + -verbose + retrieve: go run cmd/retrieve-actor/main.go \ -address $(ADDRESS) \ -verbose \ -insecure -# https://aws.amazon.com/about-aws/whats-new/2018/08/use-amazon-dynamodb-local-more-easily-with-the-new-docker-image/ -# https://hub.docker.com/r/amazon/dynamodb-local/ - -dynamo-local: - docker run --rm -it -p 8000:8000 amazon/dynamodb-local - dynamo-tables-local: go run -mod vendor cmd/create-dynamodb-tables/main.go \ -refresh \ diff --git a/vendor/github.com/sfomuseum/go-activitypub/README.md b/vendor/github.com/sfomuseum/go-activitypub/README.md index 3e46a12..5f8f711 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/README.md +++ b/vendor/github.com/sfomuseum/go-activitypub/README.md @@ -8,7 +8,7 @@ The ["Holding Hands with the "Fediverse" – ActivityPub at SFO Museum"](https:/ ## Documentation -The documentation for this package is incomplete reflecting the nature of our work to first understand the mechanics, and second explore the tolerances, of the ActivityPub protocols. The closest thing to "quick start" documentation can be found in the [Example](https://github.com/sfomuseum/go-activitypub?tab=readme-ov-file#example) section of this README. +The documentation for this package (and in particular `godoc`) is incomplete reflecting the nature of our work to first understand the mechanics, and second explore the tolerances, of the ActivityPub protocols. In advance of more comprehensive documentation we have set a GitHub “Discussions” group where people can ask questions or offer suggestions: @@ -16,549 +16,114 @@ In advance of more comprehensive documentation we have set a GitHub “Discussio ## Motivation +This is on-going and exploratory work to develop a limited "social media" style ActivityPub service. Although it is not necessarily "stable" in the sense that the code base may still change, without any guarantee of backwards compatibility, it does work and is currently deployed (in an experimental fashion) in production. + I find the documentation for ActivityPub very confusing. I don't think I have any problem(s) with the underlying specification but I have not found any implementation guides that haven't left me feeling more confused than when I started. This includes the actual ActivityPub specifications published by the W3C which are no doubt thorough but, as someone with a finite of amount of competing time to devote to reading those specs, often feel counter-productive. Likewise, working implementations of the ActivityPub standards are often a confusing maze of abstractions that become necessary to do everything defined in the specs. There are some third-party guides, listed below, which are better than others but so far each one has felt incomplete in one way or another. Importantly, the point is not that any of these things are "bad". They clearly aren't as evidenced by the many different working implementations of the ActivityPub standards in use today. The point is that the documentation, as it exists, hasn't been great for _me_. This repository is an attempt to understand all the moving pieces and their relationship to one another by working through the implementation of a simple ActivityPub service. It is incomplete by design and, if you are reading this, it's entirely possible that parts of it remain incorrect. The goal is implement a basic web service and a set of command line tools which allow: -* Individual accounts to be created -* The ability for one account to follow, or unfollow, one another -* The ability for one account to block, or unblock, another account -* The ability for one account to post a message and to have that message relayed to one or more other accounts -* The ability for one account to see all the messages that have been delivered to them by other accounts +* Individual accounts to be created. +* The ability for one account to follow, or unfollow, one another. +* The ability for one account to block, or unblock, another account. +* The ability for one account to post a message and to have that message relayed to one or more other accounts. +* The ability for one account to see all the messages that have been delivered to them by other accounts. +* The ability for an account to receive "boosts" and record them. +* The ability for messages to be processed, out of bounds, after receipts using a messaging queue. That's it, at least for now. It does have support for ActivityPub account migration, editing posts or notifications of changes to posts. -Importantly not all of those features have been implemented in both the web service and command line tools. This code is not something you can, or should, deploy as a hosted service for "strangers on the Internet". I have some fairly specific use-cases in mind for this code but the priority right now is just to understand the ActivityPub specification and the actual "brass tacks" of running a service that implements the specification. - -The mechanics of the code are discussed later in this document. - ## How does ActivityPub work? -Let's say there are two people, Bob and Alice, who want to exchange messages. A "message" might be text or images or video of some combination of all three. An "exchange" is the act of sending those messages from one person to another using an email-like addressing scheme but instead of using an email-specific protocol messages are sent over HTTP(S). - -Both Bob and Alice have their own respective public-private key pairs. When Bob sends a message it is signed using Bob's _private key_. When Alice receives a message from Bob the authenticity of that message (trust that it was sent by Bob) is verified by Alice using Bob's _public_ key. - -What needs to happen for this exchange of messages possible? - -1. There needs to be one or more web servers (services) to broker the exchange of messages between Bob and Alice. -2. Those web services need to have the concept of "member" accounts, in this case Bob or Alice. -3. Each web service needs to implement an endpoint for looking up other ActivityPub-specific endpoints for each member account, namely there ActivityPub "inbox" and "outbox". The detail of the inbox and outbox are discussed below. -4. Some kind of persistent database for the web service to store information about member accounts, relationships between individual members and the people they want to send and receive messages from, the messages that have been sent and the messages that have been received. -5. Though not required an additional database to track accounts that an individual member does not want to interact with, referred to here as "blocking" is generally considered to be an unfortunate necessity. -6. A delivery mechanism to send messages published by Alice to all the people who have "followed" them (in this case Bob). The act of delivering a message consists of Alice sending that message to their "outbox" with a list of recipients. The "outbox" is resposible for coordinating the process of relaying that message to each recipient's ActivityPub (web service) "inbox". -7. In practice you will also need somewhere to store and serve account icon images from. This might be a filesystem, a remote hosting storage system (like AWS S3) or even by storing the images as base64-encoded blobs in one or your databases. The point is that there is a requirement for this whole other layer of generating, storing, tracking and serveing account icon images. _Note: The code included in this package has support for generating generic coloured-background-and-capital-letter style icons on demand but there are plenty of scenarios where those icons might be considered insufficient._ - -To recap, we've got: - -1. A web server with a minimum of four endpoints: webfinger, actor, inbox and outbox -2. A database with the following tables: accounts, followers, following, posts, messages, blocks -3. Two member accounts: Bob and Alice -4. A delivery mechanism for sending messages; this might be an in-process loop or an asynchronous message queue but the point is that it is a sufficiently unique part of the process that it deserves to be thought of as distinct from the web server or the database. -5. A web server, or equivalent platform, for storing and serving account icon images. - -For the purposes of these examples and for testing the assumption is that Bob and Alice have member accounts on the same server. - -Importantly, please note that there is no mention of how Bob or Alice are authenticated or authorized on the web server itself. The public-private key pairs, mentioned above, that are assigned to each member are soley for the purposes of signing and verifiying messages send bewteen one or more ActivityPub endpoints. - -_As a practical matter what that means is: For the purposes of running a web service that implements ActivityPub-based message exchange you will need to implement some sort of credentialing system to distinguish Bob from Alice and to prevent Alice from sending messages on Bob's behalf._ - -### Accounts - -Accounts are the local representation of an individual or what ActivityPub refers to as "actors". Accounts are distinguished from one another by the use of a unique name, for example `bob` or `alice. - -Actors are distinguised from one another by the use of a unique "address" which consists of a name (`bob` or `alice`) and a hostname (`bob.com` or `alice.com`). For example `alice@alice.com` and `alice@bob.com` are two distinct "actors". In this example there are web services implementing the ActivityPub protocal available at both `bob.com` and `alice.com`. - -Each actor (or account) has a pair of public-private encryption keys. As the name suggests the public key is available for anyone to view. Bob is authorized to see Alice's public key and vice versa. The private key however is considered sensitive and should only be visible to Alice or a service acting on Alice's behalf. - -_The details of how any given private key is kept secure are not part of the ActivityPub specification and are left as implementation details to someone building a ActivityPub-based webs service._ - -### Exchanging messages - -#### Identifiers - -_TBW_ - -#### Signatures - -_TBW_ - -#### Call and response - -_TBW_ - -### Looking up and following accounts +This section has been moved in to the [docs/ACTIVITYPUB.md](docs/ACTIVITYPUB.md) document. -So let's say that Doug is on a Mastodon instance called `mastodon.server` and wants to follow `bob@bob.com`. To do this Doug would start by searching for the address `@bob@bob.com`. - -_Note: I am just using `bob.com` and `mastodon.server` as examples. They are not an actual ActivityPub or Mastodon endpoints._ - -The code that runs Mastodon will then derive the hostname (`bob.com`) from the address and construct a URL in the form of: - -``` -https://bob.com/.well-known/webfinger?resource=acct:bob@bob.com -``` - -Making a `GET` request to that URL is expected to return a [Webfinger](#) document which will look like this: - -``` -$> curl -s 'https://bob.com/.well-known/webfinger?resource=acct:bob@bob.com' | jq -{ - "subject": "acct:bob@bob.com", - "links": [ - { - "href": "https://bob.com/ap/bob", - "type": "text/html", - "rel": "http://webfinger.net/rel/profile-page" - }, - { - "href": "https://bob.com/ap/bob", - "type": "application/activity+json", - "rel": "self" - } - ] -} -``` - -The code will then iterate through the `links` element of the response searching for `rel=self` and `type=application/activity+json`. It will take the value of the corresponding `href` attribute and issue a second `GET` request assigning the HTTP `Accept` header to be `application/ld+json; profile="https://www.w3.org/ns/activitystreams"`. - -(There's a lot of "content negotiation" going on in ActivityPub and is often the source of confusion and mistakes.) - -This `GET` request is expected to return a "person" or "actor" resource in the form of: - -``` -$> curl -s -H 'Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams"' https://bob.com/ap/bob | jq -{ - "@context": [ - "https://www.w3.org/ns/activitystreams", - "https://w3id.org/security/v1" - ], - "id": "https://bob.com/ap/bob", - "type": "Person", - "preferredUsername": "bob", - "inbox": "https://bob.com/ap/bob/inbox", - "outbox": "https://bob.com/ap/bob/outbox", - "publicKey": { - "id": "https://bob.com/ap/bob#main-key", - "owner": "https://bob.com/ap/bob", - "publicKeyPem": "-----BEGIN RSA PUBLIC KEY-----\nMIICCgKCAgEAvzo9pTyEGXl9jbJT6zv1p+cEfDP2vVN8bbgBYsltYw5A8LutZD7A\nspATOPJ3i9w43dZCORjmyuAX/0qyljbLfwzx1IEBmeg/3EAs0ON8A8tIbfcmI9JE\nn47UVR+Vn1h6o1dsRFx7X+fGefRIm005f7H/GLbJYTAvTgW3HJcakQI9rbFhaqnT\nmq6E+eEVhFqORVRrBjFMmAMNv6kJHSDtJie2YW76Nd9lqgR1FKV5B2M3a6gtIWv4\nNLOnwHxc266kqllmVUW79LB/2yI9KogMXjbp+MB7NhbtndJTpn1vAMYvUYSwxPhW\nJbWTqq7yhQi7zNaEDmzgOUhDiehHmm2XAqyIhlFEVvdKdOXUpJuIzEyHyxfCTA8Q\nNB9kncrS+L8TNDwdraNBQzgL68sKGp9eE3Rv/H4oNsqDD0/N8FyYwIOy+1BDGa9E\nPlsd/8vDi/3Mf3OBjfj64QwQj3V689jq2S+M1JCX/3EC77p2thT61GZUIFy/VfFZ\nuHUpiPvaxMo9KehsjCNTeRyGwRDBnLv/MWgRwFNGrT2w/m+cafiYoALOI4YB2RF0\ntWS8wK+559zfkV8T+UuQNzZbGAa0q+IpuBMlQhhfiwhEb3Olw7SvTXQUnwPBwmQb\nbbg3Lffg2N2Qz7QN9G99MjFDHIXXSyKyO+/kLsM28pLbitAHmP2KeuUCAwEAAQ==\n-----END RSA PUBLIC KEY-----\n" - }, - "following": "https://bob.com/ap/bob/following", - "followers": "https://bob.com/ap/bob/followers", - "discoverable": true, - "published": "2024-02-20T15:55:17-08:00", - "icon": { - "type": "Image", - "mediaType": "image/png", - "url": "https://bob.com/ap/bob/icon.png" - } -} -``` - -At this point Doug's Mastodon server (`mastodon.server`) will issue a `POST` request to `https://bob.com/ap/bob/inbox` (or whatever the value is of the `inbox` property in the document that is returned). The body of that request will be a "Follow" sctivity that looks like this: - -{ - "@context" : "https://www.w3.org/ns/activitystreams", - "actor" : "https://mastodon.server/users/doug", - "id" : "https://mastodon.server/52c7a999-a6bb-4ce5-82ca-5f21aec51811", - "object" : "https://bob.bom/ap/bob", - "type" : "Follow" -} - - -Bob's server `bob.com` will then verify the request from Doug to follow Bob is valid by... _TBW_. - -Bob's server will then create a local entry indiciating that Doug is following Bob and then post (as in HTTP `POST` method) an "Accept" message to Doug's inbox: +## The Code -``` -POST /users/doug/inbox HTTP/1.1 -Host: mastodon.server -Content-Type: application/ld+json; profile="https://www.w3.org/ns/activitystreams" -Date: 2024-02-24T02:28:21Z -Digest: SHA-256=DrqW7OcDFoVsm/1G9mRx5576MkWm5rK5BwI0NglugJo= -Signature: keyId="https://bob.com/ap/bob",algorithm="hs2019",headers="(request-target) host date",signature="..." - -{ - "@context": "https://www.w3.org/ns/activitystreams", - "id": "0b8f64a3-2ab1-46c8-9f2c-4230a9f62689", - "type": "Accept", - "actor": "https://bob.com/ap/bob", - "object": { - "id" : "https://mastodon.server/52c7a999-a6bb-4ce5-82ca-5f21aec51811", - "type": "Follow", - "actor": "https://mastodon.server/users/doug", - "object": "https://bob.com/ap/bob" - } -} -``` - -There are a fews things to note: - -1. It appears that ActivityPub services sending messages to an inbox don't care about, and don't evaluate, responses that those inboxes return. Basically inboxes return a 2XX HTTP status code if everything went okay and everyone waits for the next message to arrive in an inbox before deciding what to do next. I am unclear if this is really true or not. -2. There is no requirement to send the `POST` right away. In fact many services don't because they want to allow people to manually approve followers and so final "Accept" messages are often sent "out-of-band". - -For the purposes of this example the code is sending the "Accept" message immediately after the `HTTP 202 Accepted` response is sent in a Go language deferred (`defer`) function. As mentioned, it is unclear whether it is really necessary to send the "Accept" message in a deferred function (or whether it can be sent inline before the HTTP 202 response is sent). On the other there are accept activities which are specifically meant to happen "out-of-band", like follower requests that are manually approved, so the easiest way to think about things is that they will (maybe?) get moved in to its own delivery queue (distinct from posts) to happen after the inbox handler has completed. - -Basically: Treat every message sent to the ActivityPub inbox as an offline task. I am still trying to determine if that's an accurate assumption but what that suggests is, especially for languages that don't have deferred functions (for example PHP), the minimal viable ActivityPub service needs an additional database and delivery queue for these kinds of activities. - -### Posting messages (to followers) - -This works (see the [#example](example section) below). I am still trying to work out the details. - -### Endpoints - -_To be written._ - -### Signing and verifying messages - -_To be written. In the meantime consult [inbox.go](inbox.go), [actor.go](actor.go) and [www/inbox_post.go](www/inbox_post.go)._ +This is now the second iteration of the code and a major refactoring of the first. Specifically: -## The Code +* The code has been updated to deliver arbitrary ActivityPub "activities" rather than just "posts" (which are the internal representation of ActvityPub "notes"). This is the first attempt at separating the generic ActivityPub mechanics from the specifics of a social media style web application. At some point those mechanics will get moved in to their own package and/or this package will be renamed. +* Moving relevant code in to domain-specific sub-packages, most notably the [database](database) packages. +* Improved separations of concerns between the different components in order to facilitate the ease of reasoning about what any piece of the codebase does. This work is not complete and is blocked on still needing to figure out how and where things should live while preventing Go import cycle conflicts. ### Architecture Here is a high-level boxes-and-arrows diagram of the core components of this package: -![](docs/images/ap-arch.png) +![](docs/images/activitypub-arch.png) There are four main components: -1. A database layer (which is anything implemeting the interfaces for the "databases" or "tables" discussed below) -2. A queueing layer which is anything that implements the "delivery queue" interface discussed below) -3. A [cmd/deliver-post](cmd/deliver-post/main.go) application for delivering messages which can be run from the command line or as an AWS Lambda function +1. A database layer (which is anything implemeting the interfaces for the "databases" or "tables", discussed [in its own documentation](database/README.md).) +2. A queueing layer (which is anything that implements the "delivery queue" or "message processing" interfaces, discussed [in its own documentation](queue/README.md).) +3. A [cmd/deliver-activity](cmd/deliver-activity/main.go) application for delivering messages which can be run from the command line or as an AWS Lambda function 4. A [cmd/server](cmd/server/main.go) application which implements a subset of the ActvityPub related resources. These are: A `/.well-known/webfinger` resource for retrieving account information; Individual account resource pages; Individual account "inbox" resources; Minimalistic "permalink" pages for individual posts. Importantly, this package does _not_ implement ActivityPub "outboxes" yet. It is assumed that individual posts are written directly to your "posts" database/table and then registered with the delivery queue explicitly in your custom code. That doesn't mean it will always be this way. It just means it's that way right now. Take a look at [cmd/create-post](cmd/create-post/main.go) and [app/post/create](app/post/create) for an example of how to post messages manually. For example, imagine that: -* The purple box is an AWS DynamoDB database (with 12 separate tables) -* The blue box is an AWS SQS queue +* The purple box is an AWS DynamoDB database (with 13 separate tables) +* The blue boxes are AWS SQS queues * The green boxes are AWS Lambda functions. The `cmd/server` function will need to be configured so that it is reachable from the internet whether that means it is configured as a Lambda Function URL or "fronted" by an API Gateway instance; those details are left as an exercise to the reader. However, this same setup could be configured and deployed where: -* The purple box is a MySQL database (with 12 separate tables) -* The blue box is a plain-vanilla "pub-sub" style queue +* The purple box is a MySQL database (with 13 separate tables) +* The blue boxes are plain-vanilla "pub-sub" style queues * The green boxes are long-running daemons on a plain-vanilla Linux server The point is that the code tries to be agnostic about these details. As such the code tries to define abstract "interfaces" for these high-level concepts in order to allow for a multiplicity of concrete implementations. Currently those implementations are centered on local and synchronous processes and AWS services but the hope is that it will be easy (or at least straightforward) to write custom implementations as needed. -These interfaces are discussed further below. - -### Databases - -The package liberally mixes up the terms "database" and "table". Generally each aspect of the ActivityPub service has been separated in to distinct "tables" each with its own Go language interface. For example the interface for adding and removing followers looks like this: - -``` -type GetFollowersCallbackFunc func(context.Context, string) error - -type FollowersDatabase interface { - GetFollowersForAccount(context.Context, int64, GetFollowersCallbackFunc) error - GetFollower(context.Context, int64, string) (*Follower, error) - AddFollower(context.Context, *Follower) error - RemoveFollower(context.Context, *Follower) error - Close(context.Context) error -} -``` +### Activities and "Activities" -The idea here is that the various tools for performing actions (posting, serving ActivityPub requests, etc.) don't know anything about the underlying database implementation. Maybe you want to run things locally using a SQLite database, or you want to run it in "production" using a MySQL database or in a "serverless" environment using something like DynamoDB. The answer is: Yes. So long as your database of choice implements the different database (or table) interfaces then it is supported. +As of this writing the `go-activitypub` package exposes two `Activity` types. This is not ideal but for the time being it just is. One is a generic ActivityPub construct and the other is specific to this package and how it processes ActivityPub messages. -As of this writing two "classes" of databases are supported: +#### ap.Activity -#### database/sql +This is a struct encapsulating an ActivityPub/ActivityStreams activity message. It is defined in the [ap](ap/activity.go) package. -Anything that implements the built-in Go [database/sql](https://pkg.go.dev/database/sql) `DB` interface. As of this writing only SQLite databases have been tested using the [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) package. There are two things to note about the SQLite implementation: +#### activitypub.Activity -* The use of the `mattn/go-sqlite3` package means you'll need to have a C complier to build the code. -* The SQLite databases themselves not infrequenely get themselves in to a state where they are locked preventing other operations from completing. This is a SQLite thing so you probably don't want to deploy it to "production" but it is generally good enough for testing things. It's also possible that I am simply misconfiguring SQLite and if I am I would appreciate any pointers on how to fix these mistakes. +This is a struct which represents and internal representation of an ActivityPub Activity message with pointers to other relevant internal representations of things like account IDs rather than actor, URIs, etc. It is defined in the root [activitypub](activity.go) package. -To add a different database "driver", for example MySQL, you will need to clone the respective tools and add the relevant import statement. For example to update the [cmd/server](cmd/server/main.go) tool to use MySQL you would replace the `_ "github.com/mattn/go-sqlite3"` import statement with `_ "github.com/go-sql-driver/mysql"` like this: +### Notes, Posts and Messages -``` -package main +"Notes" are the messages sent by an external actor to an account hosted by the `go-activitypub` package. They are the body (content) of an ActivityPub "note". -import ( - "context" - "os" +"Posts" are the internal representations of messages sent by an account hosted by the `go-activitypub` web service. They are transformed in to ActivityPub "notes" before delivery. - _ "github.com/go-sql-driver/mysql" - "github.com/sfomuseum/go-activitypub/app/server" - "github.com/sfomuseum/go-activitypub/slog" -) +"Messages" are pointers to "notes" and the accounts they are delivered to. Messages exists to deduplicate notes which may have been sent to multiple accounts hosted by the `go-activitypub` web service. -func main() { - ctx := context.Background() - logger := slog.Default() - server.Run(ctx, logger) -} -``` +### Deliveries -##### SQL schemas +There are four principal "layers" involved in delivering an ActivityPub "activity": -* [SQLite](schema/sqlite) -* [MySQL](schema/mysql) – _Note: These have not been tested yet._ +* The [PostToInbox](ap/activity.go) method which is what actually delivers the raw bytes of an activity to a remote host (inbox). It takes as its input the message body, a private key and an inbox URI. Importantly, it does not know anything about databases or accounts or anything of the other underlying infrastructure. It simply sends messages. -#### gocloud.dev/docstore +* The [SendActivity](account/go) method for `Account` instances which takes as its input the activity to send and a destination "inbox" and then calls the `PostToInbox` message, appending that accounts private key. -Anything that implements the [gocloud.dev/docstore](https://pkg.go.dev/gocloud.dev/docstore) `Docstore` interface. As of this writing only DynamoDB document stores have been tested using the [awsdynamodb](https://gocloud.dev/howto/docstore/#dynamodb) and the [aaronland/gocloud-docstore](https://github.com/aaronland/gocloud-docstore/) packages. A few things to note: +* The [DeliverActivity](deliver/activity.go) method which takes as its input an ActivityPub activity, a `@name@host` address to deliver the activity and resolves sender actors to underlying accounts and to addresses to inboxes. Ultimately, it calls the `account.SendActivity` method and performs any additional logging steps. -* One side effect of using the `aaronland/gocloud-docstore` package is that the `gocloud.dev/docstore/awsdynamodb` "driver" is always imported and available regardless of whether you include in an `import` statement. -* The "global secondary indices" for the [schema/dynamodb](schema/dynamodb) definitions are inefficient and could stand to be optimized at some point in the future. +* The [DeliverActivityToFollowers](queue/deliver_activity.go) method takes as its input an ActivityPub activity and a delivery queue and resolves sender actors and schedules the message to be delivered to all of that actor's followers (using the delivery queue). The details of the delivery queue are unknown to this method but it is assumed that, eventually, the "other end" of the delivery queue will invoke the `DeliverActivity` method. -To add a different docstore "driver", for example MongoDB, you will need to clone the respective tools and add the relevant import statement. For example to update the [cmd/server](cmd/server/main.go) tool to use MongoDB you would replace the `_ "github.com/mattn/go-sqlite3"` import statement with `_ "gocloud.dev/docstore/mongodocstore"` like this: +### Databases -``` -package main +Documentation for databases has been moved in to [database/README.md](database/README.md) -import ( - "context" - "os" - - _ "gocloud.dev/docstore/mongodocstore" - "github.com/sfomuseum/go-activitypub/app/server" - "github.com/sfomuseum/go-activitypub/slog" -) +### Queues -func main() { - ctx := context.Background() - logger := slog.Default() - server.Run(ctx, logger) -} -``` +Documentation for databases has been moved in to [queue/README.md](queue/README.md) -##### Document Store table definitions +### Tools -* [DynamoDB](schema/dynamodb) +Documentation for command line tools has been moved in to [cmd/README.md](cmd/README.md) -### Delivery Queues +### Example -_TBW_ +This documentation has moved in to [docs/EXAMPLE.md](docs/EXAMPLE.md) -The default delivery queue is [SynchronousDeliveryQueue](delivery_queue_synchronous.go) which delivers posts to each follower in the order they are received. +### Logging -### Example +This package uses the `log/slog` package for logging. The reality, though, is that between the inherent chatiness of ActivityPub (AP) to and from servers coupled with the endless abuse of bad actors probing and trying to perform mischief on AP endpoints the log output for a publicly accessible server can become "challenging". I am still thinking about how to deal with this. -What follows are the output of the different "targets" in the [Makefile](Makefile) that is included with this package. These targets are designed to make it easier to test common scenarios and to provide a reference of how things need to be configured. - -If you want to follow along and run these examples your self you will need the following: - -* The [Go programming language](https://go.dev/dl) -* The [Docker Desktop](https://www.docker.com/products/docker-desktop/) runtime environment to launch a local instance of DynamoDB. -* (3) different terminal windows (or "consoles") - -In console (1) start a local instance of DynamoDB. The easiest way to do this is using the Dockerfile that AWS provides: - -``` -$> docker run --rm -it -p 8000:8000 amazon/dynamodb-local -Initializing DynamoDB Local with the following configuration: -Port: 8000 -InMemory: true -Version: 2.2.1 -DbPath: null -SharedDb: false -shouldDelayTransientStatuses: false -CorsParams: null -``` - -_Note: This is an ephemeral Docker container so when you shut it down all the data that has been saved (like accounts and ActivityPub activity below) will be deleted._ - -In console (2) create the necessary tables for the ActivityPub service in DynamoDB. - -``` -$> make dynamo-tables-local TABLE_PREFIX=custom_ -go run -mod vendor cmd/create-dynamodb-tables/main.go \ - -refresh \ - -table-prefix custom_ \ - -dynamodb-client-uri 'awsdynamodb://?region=localhost&credentials=anon:&local=true' -``` - -Note that we passing a `TABLE_PREFIX` argument. This is to demonstrate how you can assign custom prefixes to the tables created in DynamoDB. You might want to do that because there are already one or more tables with the same names used by this package or because you want to run multiple, but distinct, ActivityPub services in the same DynamoDB environment. - -Start the ActivityPub server: - -``` -$> make server TABLE_PREFIX=custom_ -go run cmd/server/main.go \ - -accounts-database-uri 'awsdynamodb://custom_accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -followers-database-uri 'awsdynamodb://custom_followers?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -following-database-uri 'awsdynamodb://custom_following?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -notes-database-uri 'awsdynamodb://custom_notes?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -messages-database-uri 'awsdynamodb://custom_messages?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -blocks-database-uri 'awsdynamodb://custom_blocks?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -allow-create \ - -verbose \ - -allow-remote-icon-uri \ - -hostname localhost:8080 \ - -insecure -{"time":"2024-02-20T10:29:49.505754-08:00","level":"DEBUG","msg":"Verbose logging enabled"} -{"time":"2024-02-20T10:29:49.506312-08:00","level":"INFO","msg":"Listening for requests","address":"http://localhost:8080"} -``` - -Note the `-insecure` flag. Normally it is expected that all ActivityPub communications will happen over an encrypted (HTTPS) connection but since we are testing things locally and all of our accounts (Bob and Alice) will reside on the same server, and because setting up self-signed TLS certificates locally is a chore, we're going to exchange messages over an insecure connection. - -Also note the `-hostname` flag. This is when you are running the `server` tool in a "serverless" environment which likely has a different domain name than the one associated with public-facing ActivityPub server. If the `-hostname` flag is left empty then its value is derived from the `-server-uri` flag which defaults to "http://localhost:8080". - -Switch to console (3) and create account records for `bob` and `alice`: - -``` -$> make accounts TABLE_PREFIX=custom_ - -> make accounts -go run cmd/add-account/main.go \ - -accounts-database-uri 'awsdynamodb://custom_accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -account-name bob \ - -account-icon-uri fixtures/icons/bob.jpg -go run cmd/add-account/main.go \ - -accounts-database-uri 'awsdynamodb://custom_accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -account-name alice \ - -allow-remote-icon-uri \ - -account-icon-uri https://static.sfomuseum.org/media/172/956/659/5/1729566595_kjcAQKRw176gxIieIWZySjhlNzgKNxoA_s.jpg -``` - -Next `bob` follows `alice`: - -``` -$> make follow TABLE_PREFIX=custom_ -go run cmd/follow/main.go \ - -accounts-database-uri 'awsdynamodb://custom_accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -following-database-uri 'awsdynamodb://custom_following?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -messages-database-uri 'awsdynamodb://custom_messages?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -account-name bob \ - -follow alice@localhost:8080 \ - -hostname localhost:8080 \ - -verbose \ - -insecure -{"time":"2024-02-20T10:31:12.002118-08:00","level":"DEBUG","msg":"Verbose logging enabled"} -{"time":"2024-02-20T10:31:12.034109-08:00","level":"DEBUG","msg":"Webfinger URL for resource","resource":"alice","url":"http://localhost:8080/well-known/.webfinger?resource=alice"} -{"time":"2024-02-20T10:31:12.044169-08:00","level":"DEBUG","msg":"Profile page for actor","actor":"alice","url":"http://localhost:8080/ap/alice"} -{"time":"2024-02-20T10:31:12.04633-08:00","level":"DEBUG","msg":"Post to inbox","inbox":"http://localhost:8080/ap/alice/inbox","key_id":"http://localhost:8080/ap/bob"} -{"time":"2024-02-20T10:31:12.080122-08:00","level":"INFO","msg":"Following successful"} -``` - -Then `bob` unfollows `alice`: - -``` -$> make unfollow TABLE_PREFIX=custom_ -go run cmd/follow/main.go \ - -accounts-database-uri 'awsdynamodb://custom_accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -following-database-uri 'awsdynamodb://custom_following?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -messages-database-uri 'awsdynamodb://custom_messages?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -account-name bob \ - -follow alice@localhost:8080 \ - -hostname localhost:8080 \ - -insecure \ - -verbose \ - -undo -{"time":"2024-02-20T10:31:26.454195-08:00","level":"DEBUG","msg":"Verbose logging enabled"} -{"time":"2024-02-20T10:31:26.474536-08:00","level":"DEBUG","msg":"Webfinger URL for resource","resource":"alice","url":"http://localhost:8080/well-known/.webfinger?resource=alice"} -{"time":"2024-02-20T10:31:26.479316-08:00","level":"DEBUG","msg":"Profile page for actor","actor":"alice","url":"http://localhost:8080/ap/alice"} -{"time":"2024-02-20T10:31:26.482626-08:00","level":"DEBUG","msg":"Post to inbox","inbox":"http://localhost:8080/ap/alice/inbox","key_id":"http://localhost:8080/ap/bob"} -{"time":"2024-02-20T10:31:26.521846-08:00","level":"INFO","msg":"Unfollowing successful"} -``` - -At some point `alice` posts a message and then delivers it to all of their followers (including `bob` who has followed `alice` again): - -``` -$> make post MESSAGE='This message left intentionally blank' -go run cmd/post/main.go \ - -accounts-database-uri 'awsdynamodb://accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -followers-database-uri 'awsdynamodb://followers?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -posts-database-uri 'awsdynamodb://posts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -deliveries-database-uri 'awsdynamodb://deliveries?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -account-name alice \ - -message "This message left intentionally blank" \ - -hostname localhost:8080 \ - -insecure \ - -verbose -{"time":"2024-02-26T11:59:16.636181-08:00","level":"DEBUG","msg":"Verbose logging enabled"} -{"time":"2024-02-26T11:59:16.66917-08:00","level":"DEBUG","msg":"Deliver post","post":1762205712257126400,"from":1762201778486513664,"to":"bob@localhost:8080"} -{"time":"2024-02-26T11:59:16.669221-08:00","level":"DEBUG","msg":"Webfinger URL for resource","resource":"bob","url":"http://localhost:8080/.well-known/webfinger?resource=acct%3Abob%40localhost%3A8080"} -{"time":"2024-02-26T11:59:16.673629-08:00","level":"DEBUG","msg":"Profile page for actor","actor":"bob","url":"http://localhost:8080/ap/bob"} -{"time":"2024-02-26T11:59:16.676805-08:00","level":"DEBUG","msg":"Post to inbox","inbox":"http://localhost:8080/ap/bob/inbox"} -{"time":"2024-02-26T11:59:16.676888-08:00","level":"DEBUG","msg":"Post to inbox","inbox":"http://localhost:8080/ap/bob/inbox","key_id":"http://localhost:8080/ap/alice"} -{"time":"2024-02-26T11:59:16.706987-08:00","level":"DEBUG","msg":"Response","inbox":"http://localhost:8080/ap/bob/inbox","code":202,"content-type":""} -{"time":"2024-02-26T11:59:16.707027-08:00","level":"DEBUG","msg":"Add delivery for post","delivery id":1762205712303263744,"post id":1762205712257126400,"recipient":"bob@localhost:8080","success":true} -``` - -Switching back to the console running the `server` tool you should see something like this: - -``` -{"time":"2024-02-20T10:32:10.414033-08:00","level":"INFO","msg":"Fetch key for sender","method":"POST","accept":"application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"","path":"/ap/bob/inbox","remote_addr":"127.0.0.1:55271","account":"bob","account id":1760009124885565440,"sender_address":"alice@localhost:8080","activity-type":"Create","key id":"http://localhost:8080/ap/alice","key_id":"http://localhost:8080/ap/alice"} -{"time":"2024-02-20T10:32:10.416587-08:00","level":"DEBUG","msg":"Get following","account":1760009124885565440,"following":"alice@localhost:8080"} -{"time":"2024-02-20T10:32:10.419441-08:00","level":"DEBUG","msg":"Add note","uuid":"be26c823-b75e-461c-adea-7260299a7434","author":"alice@localhost:8080"} -{"time":"2024-02-20T10:32:10.419451-08:00","level":"DEBUG","msg":"Create new note","uuid":"be26c823-b75e-461c-adea-7260299a7434","author":"alice@localhost:8080"} -{"time":"2024-02-20T10:32:10.421078-08:00","level":"DEBUG","msg":"Return new note","id":1760009464624189440} -{"time":"2024-02-20T10:32:10.42109-08:00","level":"DEBUG","msg":"Get message","account":1760009124885565440,"note":1760009464624189440} -{"time":"2024-02-20T10:32:10.422455-08:00","level":"DEBUG","msg":"Add message","account":1760009124885565440,"note":1760009464624189440,"author":"alice@localhost:8080"} -{"time":"2024-02-20T10:32:10.422462-08:00","level":"DEBUG","msg":"Create new message","account":1760009124885565440,"note":1760009464624189440,"author":"alice@localhost:8080"} -{"time":"2024-02-20T10:32:10.424299-08:00","level":"INFO","msg":"Note has been added to messages","method":"POST","accept":"application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"","path":"/ap/bob/inbox","remote_addr":"127.0.0.1:55271","account":"bob","account id":1760009124885565440,"sender_address":"alice@localhost:8080","activity-type":"Create","key id":"http://localhost:8080/ap/alice","note uuid":"be26c823-b75e-461c-adea-7260299a7434","note id":1760009464624189440,"message id":1760009464636772352} -``` - -Did you notice the "Add delivery for post" debug message when posting the message? Deliveries for post messages are logged in a "deliveries database". These logs record where and when posts were sent and whether the delivery was successful. For example: - -``` -$> make delivery ID=1762205712303263744 -go run cmd/retrieve-delivery/main.go \ - -deliveries-database-uri 'awsdynamodb://deliveries?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -delivery-id 1762205712303263744 \ - -verbose -{"time":"2024-02-26T12:00:47.086377-08:00","level":"DEBUG","msg":"Verbose logging enabled"} -{"id":1762205712303263744,"activity_id":"http://localhost:8080/ap#as-f555a16d-9b09-452a-886f-0aae2cd52506","post_id":1762205712257126400,"account_id":1762201778486513664,"recipient":"bob@localhost:8080","inbox":"http://localhost:8080/ap/bob/inbox","created":1708977556,"completed":1708977556,"success":true} -``` - -Checking `bob`'s inbox we see the message from Alice: - -``` -$> make inbox TABLE_PREFIX=custom_ ACCOUNT=bob -go run cmd/inbox/main.go \ - -accounts-database-uri 'awsdynamodb://custom_accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -messages-database-uri 'awsdynamodb://custom_messages?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -notes-database-uri 'awsdynamodb://custom_notes?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -account-name bob -{"time":"2024-02-20T10:33:31.588716-08:00","level":"INFO","msg":"Get Note","message":1760009464636772352,"id":1760009464624189440} -{"time":"2024-02-20T10:33:31.592025-08:00","level":"INFO","msg":"NOTE","body":"{\"attributedTo\":\"fix me\",\"content\":\"This post left intentionally blank\",\"id\":\"be26c823-b75e-461c-adea-7260299a7434\",\"published\":\"2024-02-20T10:32:10-08:00\",\"to\":\"https://www.w3.org/ns/activitystreams#Public\",\"type\":\"Note\",\"url\":\"x-urn:fix-me#1760009464481583104\"}"} -``` - -`bob` unfollows `alice` and then removes all of Alice's posts from (Bob's) inbox: - -``` -$> make unfollow TABLE_PREFIX=custom_ -go run cmd/follow/main.go \ - -accounts-database-uri 'awsdynamodb://custom_accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -following-database-uri 'awsdynamodb://custom_following?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -messages-database-uri 'awsdynamodb://custom_messages?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -account-name bob \ - -follow alice@localhost:8080 \ - -hostname localhost:8080 \ - -insecure \ - -verbose \ - -undo -{"time":"2024-02-20T10:33:57.141869-08:00","level":"DEBUG","msg":"Verbose logging enabled"} -{"time":"2024-02-20T10:33:57.161661-08:00","level":"DEBUG","msg":"Webfinger URL for resource","resource":"alice","url":"http://localhost:8080/well-known/.webfinger?resource=alice"} -{"time":"2024-02-20T10:33:57.168161-08:00","level":"DEBUG","msg":"Profile page for actor","actor":"alice","url":"http://localhost:8080/ap/alice"} -{"time":"2024-02-20T10:33:57.171233-08:00","level":"DEBUG","msg":"Post to inbox","inbox":"http://localhost:8080/ap/alice/inbox","key_id":"http://localhost:8080/ap/bob"} -{"time":"2024-02-20T10:33:57.197086-08:00","level":"INFO","msg":"Remove message","id":1760009464636772352} -{"time":"2024-02-20T10:33:57.19868-08:00","level":"INFO","msg":"Unfollowing successful"} -``` - -Checking `bob`'s inbox again yields no posts: - -``` -$> make inbox TABLE_PREFIX=custom_ ACCOUNT=bob -go run cmd/inbox/main.go \ - -accounts-database-uri 'awsdynamodb://custom_accounts?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -messages-database-uri 'awsdynamodb://custom_messages?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -notes-database-uri 'awsdynamodb://custom_notes?partition_key=Id&allow_scans=true&local=true®ion=localhost&credentials=anon:' \ - -account-name bob -``` - -## See also - -* https://github.com/w3c/activitypub/blob/gh-pages/activitypub-tutorial.txt -* https://shkspr.mobi/blog/2024/02/activitypub-server-in-a-single-file/ -* https://blog.joinmastodon.org/2018/07/how-to-make-friends-and-verify-requests/ -* https://seb.jambor.dev/posts/understanding-activitypub/ -* https://justingarrison.com/blog/2022-12-06-mastodon-files-instance/ -* https://paul.kinlan.me/adding-activity-pub-to-your-static-site/ \ No newline at end of file diff --git a/vendor/github.com/sfomuseum/go-activitypub/account.go b/vendor/github.com/sfomuseum/go-activitypub/account.go index 65634df..d70a397 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/account.go +++ b/vendor/github.com/sfomuseum/go-activitypub/account.go @@ -4,6 +4,7 @@ import ( "context" "crypto/rsa" "fmt" + "log/slog" "net/url" "strconv" "time" @@ -176,50 +177,6 @@ func (a *Account) WebfingerResource(ctx context.Context, uris_table *uris.URIs) return r, nil } -func (a *Account) FollowersResource(ctx context.Context, uris_table *uris.URIs, followers_database FollowersDatabase) (*ap.Followers, error) { - - followers_path := uris.AssignResource(uris_table.Followers, a.Name) - followers_url := uris.NewURL(uris_table, followers_path) - - count, err := CountFollowers(ctx, followers_database, a.Id) - - if err != nil { - return nil, fmt.Errorf("Failed to count followers, %w", err) - } - - f := &ap.Followers{ - Context: "https://www.w3.org/ns/activitystreams", - Id: followers_url.String(), - Type: "OrderedCollection", - TotalItems: count, - First: followers_url.String(), - } - - return f, nil -} - -func (a *Account) FollowingResource(ctx context.Context, uris_table *uris.URIs, following_database FollowingDatabase) (*ap.Following, error) { - - following_path := uris.AssignResource(uris_table.Following, a.Name) - following_url := uris.NewURL(uris_table, following_path) - - count, err := CountFollowing(ctx, following_database, a.Id) - - if err != nil { - return nil, fmt.Errorf("Failed to count following, %w", err) - } - - f := &ap.Following{ - Context: "https://www.w3.org/ns/activitystreams", - Id: following_url.String(), - Type: "OrderedCollection", - TotalItems: count, - First: following_url.String(), - } - - return f, nil -} - func (a *Account) ProfileResource(ctx context.Context, uris_table *uris.URIs) (*ap.Actor, error) { // https://www.w3.org/TR/activitypub/#actor-objects @@ -327,51 +284,25 @@ func (a *Account) loadRuntimeVar(ctx context.Context, uri string) (string, error return runtimevar.StringVar(ctx, uri) } -func AddAccount(ctx context.Context, db AccountsDatabase, a *Account) (*Account, error) { +func (a *Account) SendActivity(ctx context.Context, uris_table *uris.URIs, inbox_uri string, activity *ap.Activity) error { - now := time.Now() - ts := now.Unix() + logger := slog.Default() - a.Created = ts - a.LastModified = ts + profile_url := a.AccountURL(ctx, uris_table) + key_id := profile_url.String() - err := db.AddAccount(ctx, a) + logger = logger.With("account", a.String()) + logger = logger.With("inbox", inbox_uri) + logger = logger.With("activity id", activity.Id) - if err != nil { - return nil, fmt.Errorf("Failed to add account, %w", err) - } - - return a, nil -} - -func UpdateAccount(ctx context.Context, db AccountsDatabase, a *Account) (*Account, error) { - - now := time.Now() - ts := now.Unix() - - a.LastModified = ts - - err := db.UpdateAccount(ctx, a) + private_key, err := a.PrivateKeyRSA(ctx) if err != nil { - return nil, fmt.Errorf("Failed to update account, %w", err) + logger.Error("Failed to derive private key", "error", err) + return fmt.Errorf("Failed to derive private key for from account, %w", err) } - return a, nil -} - -func IsAccountNameTaken(ctx context.Context, accounts_db AccountsDatabase, name string) (bool, error) { - - _, err := accounts_db.GetAccountWithName(ctx, name) - - if err != nil { - - if err != ErrNotFound { - return false, fmt.Errorf("Failed to determine is name is taken, %w", err) - } - - return false, nil - } + logger.Debug("Post activity to inbox") - return true, nil + return activity.PostToInbox(ctx, key_id, private_key, inbox_uri) } diff --git a/vendor/github.com/sfomuseum/go-activitypub/activity.go b/vendor/github.com/sfomuseum/go-activitypub/activity.go new file mode 100644 index 0000000..e158ab3 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/activity.go @@ -0,0 +1,83 @@ +package activitypub + +import ( + "context" + "encoding/json" + "fmt" + "time" + + "github.com/sfomuseum/go-activitypub/ap" + "github.com/sfomuseum/go-activitypub/id" +) + +const ( + // UndefinedActivityType is an unknown (or undefined) object type + UndefinedActivityType ActivityType = iota + PostActivityType + BoostActivityType +) + +type ActivityType int + +// Type Activity is internal representation of an ActivityPub Activity message with pointers +// to other relevant internal representations of things like account IDs rather than actor +// URIs, etc. +type Activity struct { + // A unique 64-bit ID for the activity + Id int64 `json:"id"` + // The unique ID associated with the ActivityPub Activity (Body) + ActivityPubId string `json:"activity_id"` + // The unique 64-bit ID for account associated with the activity + AccountId int64 `json:"id"` + // A valid object type (as in an ActivityPub object) supported by this package + ActivityType ActivityType `json:"activity_type"` + // The unique 64-bit ID associated with the activity type (for example if ActivityType is PostActivityType then ActivityId would be unique ID for that post). + ActivityTypeId int64 `json:"activity_type_id"` + // The JSON-encoded body of the ActivityPub Activity + Body string `json:"body"` + // The Unix timestamp when the activity was created. + Created int64 `json:"created"` +} + +// NewActivity returns a new `Activity` instance using properties derived from 'ap_activity'. +func NewActivity(ctx context.Context, ap_activity *ap.Activity) (*Activity, error) { + + enc_ap, err := json.Marshal(ap_activity) + + if err != nil { + return nil, fmt.Errorf("Failed to marshal activity, %w", err) + } + + id, err := id.NewId() + + if err != nil { + return nil, fmt.Errorf("Failed to create new ID, %w", err) + } + + ap_id := ap_activity.Id + + now := time.Now() + ts := now.Unix() + + a := &Activity{ + Id: id, + ActivityPubId: ap_id, + Body: string(enc_ap), + Created: ts, + } + + return a, nil +} + +// UnmarshalActivity returns the unmarshaled `*ap.Activity` that is encapsulated by 'a'. +func (a *Activity) UnmarshalActivity() (*ap.Activity, error) { + + var ap_activity *ap.Activity + err := json.Unmarshal([]byte(a.Body), &ap_activity) + + if err != nil { + return nil, fmt.Errorf("Failed to unmarshal activity, %w", err) + } + + return ap_activity, nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/actor.go b/vendor/github.com/sfomuseum/go-activitypub/actor.go deleted file mode 100644 index 6269e37..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/actor.go +++ /dev/null @@ -1,113 +0,0 @@ -package activitypub - -import ( - "context" - "encoding/json" - "fmt" - "log/slog" - "net/http" - "net/url" - - "github.com/sfomuseum/go-activitypub/ap" - "github.com/sfomuseum/go-activitypub/webfinger" -) - -func RetrieveActor(ctx context.Context, id string, insecure bool) (*ap.Actor, error) { - - actor_id, actor_hostname, err := ParseAddress(id) - - if err != nil { - return nil, fmt.Errorf("Failed to parse ID, %w", err) - } - - webfinger_scheme := "https" - - if insecure { - webfinger_scheme = "http" - } - - webfinger_acct := fmt.Sprintf("acct:%s@%s", actor_id, actor_hostname) - - webfinger_q := &url.Values{} - webfinger_q.Set("resource", webfinger_acct) - - webfinger_u := &url.URL{} - webfinger_u.Scheme = webfinger_scheme - webfinger_u.Host = actor_hostname - webfinger_u.Path = webfinger.Endpoint - webfinger_u.RawQuery = webfinger_q.Encode() - - webfinger_url := webfinger_u.String() - - slog.Debug("Webfinger URL for resource", "resource", actor_id, "url", webfinger_url) - - webfinger_rsp, err := http.Get(webfinger_url) - - if err != nil { - return nil, fmt.Errorf("Failed to perform webfinger (%s) for actor, %w", webfinger_url, err) - } - - defer webfinger_rsp.Body.Close() - - if webfinger_rsp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("Remote endpoint did not return successfully %d, %s", webfinger_rsp.StatusCode, webfinger_rsp.Status) - } - - var webfinger_resource *webfinger.Resource - - dec := json.NewDecoder(webfinger_rsp.Body) - err = dec.Decode(&webfinger_resource) - - if err != nil { - return nil, fmt.Errorf("Failed to decode webfinger resource, %w", err) - } - - var profile_url string - - for _, l := range webfinger_resource.Links { - - if l.Rel == "self" && l.Type == "application/activity+json" { - profile_url = l.HRef - break - } - } - - if profile_url == "" { - return nil, fmt.Errorf("Failed to derive profile URL from webfinger resource") - } - - slog.Debug("Profile page for actor", "actor", actor_id, "url", profile_url) - - profile_req, err := http.NewRequestWithContext(ctx, "GET", profile_url, nil) - - if err != nil { - return nil, fmt.Errorf("Failed to create profile request, %w", err) - } - - profile_req.Header.Set("Accept", ap.ACTIVITYSTREAMS_ACCEPT_HEADER) - - cl := &http.Client{} - - profile_rsp, err := cl.Do(profile_req) - - if err != nil { - return nil, fmt.Errorf("Failed to retrieve profile URL (%s), %w", profile_url, err) - } - - defer profile_rsp.Body.Close() - - if profile_rsp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("Remote endpoint did not return successfully %d, %s", profile_rsp.StatusCode, profile_rsp.Status) - } - - var actor *ap.Actor - - dec = json.NewDecoder(profile_rsp.Body) - err = dec.Decode(&actor) - - if err != nil { - return nil, fmt.Errorf("Failed to decode profile response, %w", err) - } - - return actor, nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/alias.go b/vendor/github.com/sfomuseum/go-activitypub/alias.go index c0ad7b6..a18ed21 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/alias.go +++ b/vendor/github.com/sfomuseum/go-activitypub/alias.go @@ -1,10 +1,5 @@ package activitypub -import ( - "context" - "fmt" -) - type Alias struct { Name string `json:"name"` // Unique primary key AccountId int64 `json:"account_id"` @@ -14,19 +9,3 @@ type Alias struct { func (a *Alias) String() string { return a.Name } - -func IsAliasNameTaken(ctx context.Context, aliases_db AliasesDatabase, name string) (bool, error) { - - _, err := aliases_db.GetAliasWithName(ctx, name) - - if err != nil { - - if err != ErrNotFound { - return false, fmt.Errorf("Failed to determine is name is taken, %w", err) - } - - return false, nil - } - - return true, nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/accept.go b/vendor/github.com/sfomuseum/go-activitypub/ap/accept.go index efd18d4..d393418 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/accept.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/accept.go @@ -12,7 +12,7 @@ import ( // The Accept activity "indicates that the actor accepts the object. The target property can be used in certain circumstances to indicate the context into which the object has been accepted." func NewAcceptActivity(ctx context.Context, uris_table *uris.URIs, from string, object interface{}) (*Activity, error) { - ap_id := NewId(uris_table) + ap_id := NewId(uris_table, "accept") req := &Activity{ Context: []interface{}{ diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/activity.go b/vendor/github.com/sfomuseum/go-activitypub/ap/activity.go index 8976f4a..69a44a8 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/activity.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/activity.go @@ -1,5 +1,22 @@ package ap +import ( + "bytes" + "context" + "crypto/rsa" + "encoding/json" + "fmt" + "log/slog" + "net/http" + // "net/http/httputil" + "net/url" + "strconv" + "time" + + "github.com/go-fed/httpsig" + "github.com/sfomuseum/iso8601duration" +) + // https://www.w3.org/TR/activitystreams-vocabulary/ // Activity is a struct encapsulating an ActivityPub activity. @@ -12,12 +29,179 @@ type Activity struct { Id string `json:"id"` // Type is the name of the activity being performed. Type string `json:"type"` - // Actor is the URI of the person (actor) performing the activity. + // Actor is the URI of the person (actor) performing the activity. Note: This is a fully-qualified "profile" URI and not a "@user@host" address. Actor string `json:"actor"` - // To is the list of URIs the activity should be delivered to. + // To is the list of URIs the activity should be delivered to. Note: The fact that this can be something like [ "https://www.w3.org/ns/activitystreams#Public" ] makes me wonder what the point of this property is (since the relevant issue is the inbox that the encoded activity is delivered to). To []string `json:"to,omitempty"` - // CC is the list of URIs the activity should be copied to. + // CC is the list of URIs the activity should be copied to. Note: It's not clear what the point of this unless the purpose of this property (and the "To" property) is for an activity to double as a complete record, inclusive of every address it should be delivered to, that can be scheduled for asynchronous delivery. Cc []string `json:"cc,omitempty"` + // Audience limits visibility to just the specified users. + Audience string `json:"audience,omitempty"` // Object is body of the activity itself. Object interface{} `json:"object,omitempty"` + // The RFC3339 date that the activity was published. + Published string `json:"published,omitempty"` +} + +type PostToInboxOptions struct { + // KeyId is a pointer (URI) to the actor/profile page where the public key of the actor posting the activity can be retrieved. + KeyId string + // The private key of the actor posting the activity used to sign the message. + PrivateKey *rsa.PrivateKey + // The URL of the inbox where the Activity should be posted. + Inbox string + // Log POST requests before they are sent using the default [log/slog] Logger. Note that this will + // include the HTTP signature sent with the request so you should apply all the necessary care that + // these values are logged somewhere you don't want unauthorized eyes to see the. + LogRequest bool + // Log the body of the POST response if it contains a status code that is not 200-202 or 204 using + // the default [log/slog] Logger + LogResponseOnError bool +} + +// PostToInbox delivers an Activity message to a specific inbox. +func (activity *Activity) PostToInbox(ctx context.Context, key_id string, private_key *rsa.PrivateKey, inbox_uri string) error { + + logger := slog.Default() + + logger = logger.With("activity id", activity.Id) + logger = logger.With("to", activity.To) + logger = logger.With("inbox", inbox_uri) + + logger.Info("Post activity to inbox") + + enc_req, err := json.Marshal(activity) + + if err != nil { + logger.Error("Failed to marshal activity", "error", err) + return fmt.Errorf("Failed to marshal follow activity request, %w", err) + } + + http_req, err := http.NewRequestWithContext(ctx, "POST", inbox_uri, bytes.NewBuffer(enc_req)) + + if err != nil { + logger.Error("Failed to create new request for activity", "error", err) + return fmt.Errorf("Failed to create new request to %s, %w", inbox_uri, err) + } + + now := time.Now() + + http_req.Header.Set("Content-Type", ACTIVITY_LD_CONTENT_TYPE) + + // RFC 2612 dates are required + http_req.Header.Set("Date", now.Format(http.TimeFormat)) + + // START OF this is necessary for HTTP signature hoohah... + inbox_u, err := url.Parse(inbox_uri) + + if err != nil { + logger.Error("Failed to parse inbox URI", "error", err) + return fmt.Errorf("Failed to parse inbox URL, %w", err) + } + + http_req.Header.Set("Host", inbox_u.Host) + // END OF this is necessary for HTTP signature hoohah... + + // Should this value be configurable? + str_ttl := "PT5M" + + d, err := duration.FromString(str_ttl) + + if err != nil { + return fmt.Errorf("Failed to derive duration, %w", err) + } + + ttl := int64(d.ToDuration().Seconds()) + + // Created and Expires headers are important for posting to Mastodon + // https://github.com/mastodon/mastodon/blob/main/app/controllers/concerns/signature_verification.rb#L183 + + created := now.Unix() + expires := created + ttl + + http_req.Header.Set("Created", strconv.FormatInt(created, 10)) + http_req.Header.Set("Expires", strconv.FormatInt(expires, 10)) + + // https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures#section-1.1 + // https://pkg.go.dev/github.com/go-fed/httpsig + + // prefs := []httpsig.Algorithm{httpsig.RSA_SHA512, httpsig.RSA_SHA256} + + prefs := []httpsig.Algorithm{httpsig.RSA_SHA256} + digestAlgorithm := httpsig.DigestSha256 + + headersToSign := []string{ + httpsig.RequestTarget, + "Host", + "Date", + "Digest", + // See the way this is "(created)" and not "Created". That's a go-fed/httpsig thing... or maybe it's a spec thing? + // https://github.com/go-fed/httpsig/blob/master/signing.go#L220-L229 + "(created)", + "(expires)", + } + + signer, _, err := httpsig.NewSigner(prefs, digestAlgorithm, headersToSign, httpsig.Signature, ttl) + + if err != nil { + logger.Error("Failed to create new HTTP signer", "error", err) + return fmt.Errorf("Failed to create new signer, %w", err) + } + + err = signer.SignRequest(private_key, key_id, http_req, enc_req) + + if err != nil { + logger.Error("Failed to sign request", "error", err) + return fmt.Errorf("Failed to sign request, %w", err) + } + + // https://pkg.go.dev/net/http/httputil#DumpRequest + + /* + if opts.LogRequest { + + dump, err := httputil.DumpRequest(http_req, true) + + if err != nil { + return fmt.Errorf("Failed to dump request, %w", err) + } + + logger.Debug("REQUEST", "body", string(dump)) + } + */ + + http_cl := http.Client{} + http_rsp, err := http_cl.Do(http_req) + + if err != nil { + return fmt.Errorf("Failed to execute post to inbox request, %w", err) + } + + defer http_rsp.Body.Close() + + logger.Info("Response", "code", http_rsp.StatusCode, "content-type", http_rsp.Header.Get("Content-Type")) + + // https://www.w3.org/wiki/ActivityPub/Primer/HTTP_status_codes_for_delivery + + switch http_rsp.StatusCode { + // HTTP 200, 201, 202, 204 + case http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent: + return nil + default: + + /* + if opts.LogResponseOnError { + + body, read_err := io.ReadAll(http_rsp.Body) + + if read_err != nil { + return fmt.Errorf("Follow request failed %d, %s; read body also failed, %w", http_rsp.StatusCode, http_rsp.Status, read_err) + } + + logger.Debug("ERROR", "body", string(body)) + } + */ + } + + return fmt.Errorf("Follow request failed %d, %s", http_rsp.StatusCode, http_rsp.Status) } diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/actor.go b/vendor/github.com/sfomuseum/go-activitypub/ap/actor.go index 7fa772e..f19d621 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/actor.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/actor.go @@ -3,9 +3,14 @@ package ap import ( "context" "crypto/rsa" + "encoding/json" "fmt" + "log/slog" + "net/http" + "net/url" "github.com/sfomuseum/go-activitypub/crypto" + "github.com/sfomuseum/go-activitypub/webfinger" ) // https://www.w3.org/TR/activitystreams-vocabulary/#actor-types @@ -33,6 +38,17 @@ type Actor struct { Attachments []*Attachment `json:"attachment,omitempty"` // Is this just a Mastodon-ism? } +func (a *Actor) Address() (string, error) { + + u, err := url.Parse(a.Inbox) + + if err != nil { + return "", fmt.Errorf("Failed to parse inbox URL, %w", err) + } + + return fmt.Sprintf("%s@%s", a.PreferredUsername, u.Host), nil +} + // Returns the `rsa.PublicKey` instance for 'a'. func (a *Actor) PublicKeyRSA(ctx context.Context) (*rsa.PublicKey, error) { @@ -51,3 +67,122 @@ func (a *Actor) PublicKeyRSA(ctx context.Context) (*rsa.PublicKey, error) { return public_key, nil } + +func RetrieveActor(ctx context.Context, id string, insecure bool) (*Actor, error) { + + logger := slog.Default() + logger = logger.With("actor", id) + + logger.Debug("Retrieve actor") + + actor_id, actor_hostname, err := ParseAddress(id) + + if err != nil { + return nil, fmt.Errorf("Failed to parse ID, %w", err) + } + + logger = logger.With("actor id", actor_id) + + webfinger_scheme := "https" + + if insecure { + webfinger_scheme = "http" + } + + webfinger_acct := fmt.Sprintf("acct:%s@%s", actor_id, actor_hostname) + + webfinger_q := &url.Values{} + webfinger_q.Set("resource", webfinger_acct) + + webfinger_u := &url.URL{} + webfinger_u.Scheme = webfinger_scheme + webfinger_u.Host = actor_hostname + webfinger_u.Path = webfinger.Endpoint + webfinger_u.RawQuery = webfinger_q.Encode() + + webfinger_url := webfinger_u.String() + + logger.Debug("Webfinger URL for resource", "url", webfinger_url) + + logger = logger.With("webfinger", webfinger_url) + + webfinger_rsp, err := http.Get(webfinger_url) + + if err != nil { + return nil, fmt.Errorf("Failed to perform webfinger (%s) for actor, %w", webfinger_url, err) + } + + defer webfinger_rsp.Body.Close() + + if webfinger_rsp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("Remote endpoint did not return successfully %d, %s", webfinger_rsp.StatusCode, webfinger_rsp.Status) + } + + var webfinger_resource *webfinger.Resource + + dec := json.NewDecoder(webfinger_rsp.Body) + err = dec.Decode(&webfinger_resource) + + if err != nil { + return nil, fmt.Errorf("Failed to decode webfinger resource, %w", err) + } + + var profile_url string + + for _, l := range webfinger_resource.Links { + + if l.Rel == "self" && l.Type == "application/activity+json" { + profile_url = l.HRef + break + } + } + + if profile_url == "" { + return nil, fmt.Errorf("Failed to derive profile URL from webfinger resource") + } + + return RetrieveActorWithProfileURL(ctx, profile_url) +} + +func RetrieveActorWithProfileURL(ctx context.Context, profile_url string) (*Actor, error) { + + // slog.Info(profile_url) + + logger := slog.Default() + logger = logger.With("profile url", profile_url) + + logger.Debug("Retrieve actor with profile") + + profile_req, err := http.NewRequestWithContext(ctx, "GET", profile_url, nil) + + if err != nil { + return nil, fmt.Errorf("Failed to create profile request, %w", err) + } + + profile_req.Header.Set("Accept", ACTIVITYSTREAMS_ACCEPT_HEADER) + + cl := &http.Client{} + + profile_rsp, err := cl.Do(profile_req) + + if err != nil { + return nil, fmt.Errorf("Failed to retrieve profile URL (%s), %w", profile_url, err) + } + + defer profile_rsp.Body.Close() + + if profile_rsp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("Remote endpoint did not return successfully %d, %s", profile_rsp.StatusCode, profile_rsp.Status) + } + + var actor *Actor + + dec := json.NewDecoder(profile_rsp.Body) + err = dec.Decode(&actor) + + if err != nil { + return nil, fmt.Errorf("Failed to decode profile response, %w", err) + } + + return actor, nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/address.go b/vendor/github.com/sfomuseum/go-activitypub/ap/address.go similarity index 94% rename from vendor/github.com/sfomuseum/go-activitypub/address.go rename to vendor/github.com/sfomuseum/go-activitypub/ap/address.go index 1cbc3d0..87902a3 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/address.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/address.go @@ -1,10 +1,12 @@ -package activitypub +package ap import ( "fmt" "log/slog" "net/http" "regexp" + + "github.com/sfomuseum/go-activitypub/html" ) // copied from: https://github.com/mcnijman/go-emailaddress @@ -49,6 +51,12 @@ func ParseAddressFromRequest(req *http.Request) (string, string, error) { func ParseAddressesFromString(body string) ([]string, error) { + body, err := html.HtmlToText(body) + + if err != nil { + return nil, err + } + matches := re_addresses.FindAllStringSubmatch(body, -1) lookup := make(map[string]bool) diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/ap.go b/vendor/github.com/sfomuseum/go-activitypub/ap/ap.go index ed8c4cc..436dcbf 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/ap.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/ap.go @@ -9,6 +9,8 @@ const ACTIVITYSTREAMS_ACCEPT_HEADER string = `application/ld+json; profile="http const ACTIVITYSTREAMS_CONTEXT string = "https://www.w3.org/ns/activitystreams" +const ACTIVITYSTREAMS_CONTEXT_PUBLIC string = "https://www.w3.org/ns/activitystreams#Public" + const ACCEPT_ACTIVITY string = "Accept" const CREATE_ACTIVITY string = "Create" diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/attachment.go b/vendor/github.com/sfomuseum/go-activitypub/ap/attachment.go index 3da28a1..33bc02a 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/attachment.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/attachment.go @@ -1,7 +1,9 @@ package ap type Attachment struct { - Type string `json:"type"` - Name string `json:"name"` - Value string `json:"value"` + Type string `json:"type"` + MediaType string `json:"mediaType"` + Name string `json:"name"` + Value string `json:"value,omitempty"` + URL string `json:"url"` } diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/boost.go b/vendor/github.com/sfomuseum/go-activitypub/ap/boost.go new file mode 100644 index 0000000..caa03c2 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/boost.go @@ -0,0 +1,84 @@ +package ap + +import ( + "context" + "fmt" + "log/slog" + "time" + + "github.com/sfomuseum/go-activitypub/uris" +) + +// TBD replace the return value ap.Activity to be activitypub.Activity ? +// Also move this in to go-activitypub/boosts... + +func NewBoostActivityForNote(ctx context.Context, uris_table *uris.URIs, from string, note_uri string) (*Activity, error) { + + logger := slog.Default() + logger = logger.With("from", from) + logger = logger.With("note", note_uri) + + logger.Debug("Retrieve note") + + n, err := RetrieveNote(ctx, note_uri) + + if err != nil { + return nil, fmt.Errorf("Failed to retrieve note, %w", err) + } + + logger = logger.With("attributed to", n.AttributedTo) + logger.Debug("Retrieve note") + + author, err := RetrieveActorWithProfileURL(ctx, n.AttributedTo) + + if err != nil { + return nil, fmt.Errorf("Failed to retrieve author (actor) for note, %w", err) + } + + logger.Debug("Derive address for author") + + author_addr, err := author.Address() + + if err != nil { + return nil, fmt.Errorf("Failed to derive note author address, %w", err) + } + + logger = logger.With("author address", author_addr) + logger.Debug("Create new boost (annouce) activity") + + return NewBoostActivity(ctx, uris_table, from, author_addr, note_uri) +} + +// NewBoostActivity will return an ActivityPub "Announce" activity from 'from' about 'object' (created by 'author_addr'). +func NewBoostActivity(ctx context.Context, uris_table *uris.URIs, from string, author_addr string, object interface{}) (*Activity, error) { + return NewAnnounceActivity(ctx, uris_table, from, author_addr, object) +} + +// NewAnnounceActivity will return an ActivityPub "Announce" activity from 'from' about 'object' (created by 'author_addr'). +func NewAnnounceActivity(ctx context.Context, uris_table *uris.URIs, from string, author_addr string, object interface{}) (*Activity, error) { + + ap_id := NewId(uris_table, "announce") + + now := time.Now() + + activity := &Activity{ + Context: ACTIVITYSTREAMS_CONTEXT, + Id: ap_id, + Type: "Announce", + Actor: from, + To: []string{ + ACTIVITYSTREAMS_CONTEXT_PUBLIC, + }, + Cc: []string{ + // Despite the example here which includes a URL it appears + // that an address is necessary? See also: the DeliverActivity + // method in (sfomuseum/go-activitypub/queue/deliver_activity.go) + // https://boyter.org/posts/activitypub-announce-post/ + author_addr, + }, + Object: object, + Published: now.Format(time.RFC3339), + } + + return activity, nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/create.go b/vendor/github.com/sfomuseum/go-activitypub/ap/create.go index 805d6f8..14fe933 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/create.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/create.go @@ -9,7 +9,7 @@ import ( // NewCreateActivity returns a new `Activity` instance of type "Create". func NewCreateActivity(ctx context.Context, uris_table *uris.URIs, from string, to []string, object interface{}) (*Activity, error) { - ap_id := NewId(uris_table) + ap_id := NewId(uris_table, "create") req := &Activity{ Context: ACTIVITYSTREAMS_CONTEXT, diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/follow.go b/vendor/github.com/sfomuseum/go-activitypub/ap/follow.go index 7f33cbe..690480b 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/follow.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/follow.go @@ -10,7 +10,7 @@ import ( // NewCreateActivity returns a new `Activity` instance of type "Follow". func NewFollowActivity(ctx context.Context, uris_table *uris.URIs, from string, to string) (*Activity, error) { - ap_id := NewId(uris_table) + ap_id := NewId(uris_table, "follow") req := &Activity{ Id: ap_id, @@ -24,7 +24,7 @@ func NewFollowActivity(ctx context.Context, uris_table *uris.URIs, from string, func NewUndoFollowActivity(ctx context.Context, uris_table *uris.URIs, from string, to string) (*Activity, error) { - ap_id := NewId(uris_table) + ap_id := NewId(uris_table, "undo-follow") follow_activity, err := NewFollowActivity(ctx, uris_table, from, to) diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/id.go b/vendor/github.com/sfomuseum/go-activitypub/ap/id.go index 96be4b9..02ec756 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/id.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/id.go @@ -9,12 +9,12 @@ import ( ) // NewId return a new identifier in the form of a unique URI. -func NewId(uris_table *uris.URIs) string { +func NewId(uris_table *uris.URIs, prefix string) string { uuid := id.NewUUID() u := uris.NewURL(uris_table, uris_table.Root) - u.Fragment = fmt.Sprintf("as-%s", uuid) + u.Fragment = fmt.Sprintf("as-%s-%s", prefix, uuid) // slog.Debug("New ap ID", "id", u.String()) return u.String() diff --git a/vendor/github.com/sfomuseum/go-activitypub/ap/note.go b/vendor/github.com/sfomuseum/go-activitypub/ap/note.go index 065c3e0..98a4a5a 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/ap/note.go +++ b/vendor/github.com/sfomuseum/go-activitypub/ap/note.go @@ -1,14 +1,74 @@ package ap +import ( + "context" + "encoding/json" + "fmt" + "net/http" +) + type Note struct { - Type string `json:"type"` - Id string `json:"id"` - AttributedTo string `json:"attributedTo"` - InReplyTo string `json:"inReplyTo,omitempty"` - Tags []*Tag `json:"tag,omitempty"` - To []string `json:"to"` - Cc []string `json:"cc"` - Content string `json:"content"` - URL string `json:"url"` - Published string `json:"published"` + // Type is the type of the note (aka "Note"). + Type string `json:"type"` + // Id is the unique identifier for the note. + Id string `json:"id"` + // The URI of the actor that the note is attributed to. + AttributedTo string `json:"attributedTo"` + // ... + InReplyTo string `json:"inReplyTo,omitempty"` + // Zero or more tags associated with the note. + Tags []*Tag `json:"tag,omitempty"` + // To is the list of URIs the activity should be delivered to. + To []string `json:"to"` + // CC is the list of URIs the activity should be copied to. + Cc []string `json:"cc,omitempty"` + // The body of the note. + Content string `json:"content"` + // The permanent URL of the post. + URL string `json:"url"` + // The RFC3339 date that the activity was published. + Published string `json:"published"` + // Zero or more attachments to include with the note. + Attachments []*Attachment `json:"attachment,omitempty"` +} + +// Retrieve note fetches and unmarshals the "application/activity+json" representation of 'uri'. +func RetrieveNote(ctx context.Context, uri string) (*Note, error) { + + req, err := http.NewRequestWithContext(ctx, "GET", uri, nil) + + if err != nil { + return nil, fmt.Errorf("Failed to create request, %w", err) + } + + req.Header.Set("Accept", ACTIVITY_CONTENT_TYPE) + + cl := &http.Client{} + + rsp, err := cl.Do(req) + + if err != nil { + return nil, fmt.Errorf("Failed to get note, %w", err) + } + + defer rsp.Body.Close() + + if rsp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("Note returned unexpected status, %d (%s)", rsp.StatusCode, rsp.Status) + } + + var n *Note + + dec := json.NewDecoder(rsp.Body) + err = dec.Decode(&n) + + if err != nil { + return nil, fmt.Errorf("Failed to decode note, %w", err) + } + + if n.Type != "Note" { + return nil, fmt.Errorf("Unexpected type, %s", n.Type) + } + + return n, nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/block.go b/vendor/github.com/sfomuseum/go-activitypub/block.go index 537bdd5..65a3100 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/block.go +++ b/vendor/github.com/sfomuseum/go-activitypub/block.go @@ -39,22 +39,3 @@ func NewBlock(ctx context.Context, account_id int64, block_host string, block_na return b, nil } - -func IsBlockedByAccount(ctx context.Context, db BlocksDatabase, account_id int64, host string, name string) (bool, error) { - - _, err := db.GetBlockWithAccountIdAndAddress(ctx, account_id, host, name) - - if err == nil { - return true, nil - } - - if err != ErrNotFound { - return false, fmt.Errorf("Failed to retrieve block with account and address, %w", err) - } - - if name == "*" { - return false, nil - } - - return IsBlockedByAccount(ctx, db, account_id, host, "*") -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/boost.go b/vendor/github.com/sfomuseum/go-activitypub/boost.go index 3b5aa47..f6d0223 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/boost.go +++ b/vendor/github.com/sfomuseum/go-activitypub/boost.go @@ -8,6 +8,21 @@ import ( "github.com/sfomuseum/go-activitypub/id" ) +// Type Boosted represents an object/URI/thing that a sfomuseum/go-activitypub.Account +// has boosted. It remains TBD whether this should try to be merged with the `Boost` +// struct below which would really mean replace `Boost.PostId` with `Boost.Object`... +type Boosted struct { + Id int64 `json:"id"` + AccountId int64 `json:"account_id"` + Author string `json:"author"` + Object string `json:"object"` + Created int64 `json:"created"` +} + +// Type Boost is possibly (probably) a misnomer in the same way that type `Post` is (see notes in +// post.go). Specifically this data and the correspinding `BoostsDatabase` was created to record +// boosts from external actors about posts created by accounts on this server. It is not currently +// suited to record or deliver boosts of external posts made by accounts on this server. type Boost struct { Id int64 `json:"id"` AccountId int64 `json:"account_id"` diff --git a/vendor/github.com/sfomuseum/go-activitypub/crypto/crypto.go b/vendor/github.com/sfomuseum/go-activitypub/crypto/crypto.go index 37769ef..019b5a2 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/crypto/crypto.go +++ b/vendor/github.com/sfomuseum/go-activitypub/crypto/crypto.go @@ -1,3 +1,4 @@ +// Package crypto provides methods for generating and processing x509 public and private keys. package crypto import ( @@ -8,6 +9,7 @@ import ( "fmt" ) +// GenerateKeyPair generates a new public and private x509 key of size 'sz'. func GenerateKeyPair(sz int) ([]byte, []byte, error) { key, err := rsa.GenerateKey(rand.Reader, sz) @@ -35,6 +37,7 @@ func GenerateKeyPair(sz int) ([]byte, []byte, error) { return keyPEM, pubPEM, nil } +// RSAPublicKeyFromPEM returns a new `rsa.PublicKey` instance derived from 'str_pem'. func RSAPublicKeyFromPEM(str_pem string) (*rsa.PublicKey, error) { public_key_block, _ := pem.Decode([]byte(str_pem)) @@ -62,6 +65,7 @@ func RSAPublicKeyFromPEM(str_pem string) (*rsa.PublicKey, error) { return public_key.(*rsa.PublicKey), nil } +// RSAPrivateKeyFromPEM returns a new `rsa.PrivateKey` instance derived from 'str_pem'. func RSAPrivateKeyFromPEM(str_pem string) (*rsa.PrivateKey, error) { private_key_block, _ := pem.Decode([]byte(str_pem)) diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/README.md b/vendor/github.com/sfomuseum/go-activitypub/database/README.md new file mode 100644 index 0000000..d2b0775 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/README.md @@ -0,0 +1,148 @@ +# Databases + +Databases in `go-activitypub` are really more akin to traditional RDBMS "tables" in that all of the database (or tables) listed below have one or more associations with each other. + +Each of these databases is defined as a Go-language interface with one or more default implementations provided by this package. For example: + +``` +type GetFollowersCallbackFunc func(context.Context, string) error + +type FollowersDatabase interface { + GetFollowersForAccount(context.Context, int64, GetFollowersCallbackFunc) error + GetFollower(context.Context, int64, string) (*Follower, error) + AddFollower(context.Context, *Follower) error + RemoveFollower(context.Context, *Follower) error + Close(context.Context) error +} +``` + +The idea here is that the various tools for performing actions (posting, serving ActivityPub requests, etc.) don't know anything about the underlying database implementation. Maybe you want to run things locally using a SQLite database, or you want to run it in "production" using a MySQL database or in a "serverless" environment using something like DynamoDB. The answer is: Yes. So long as your database of choice implements the different database (or table) interfaces then it is supported. + +## Implementations + +Like everything else in the `go-activitypub` package these databases implement a subset of all the functionality defined in the ActivityPub and ActivityStream standards and reflect the ongoing investigation in translating those standards in to working code. + +As of this writing two "classes" of databases are supported: + +### database/sql + +Anything that implements the built-in Go [database/sql](https://pkg.go.dev/database/sql) `DB` interface. As of this writing only SQLite databases have been tested using the [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) package. There are two things to note about the SQLite implementation: + +* The use of the `mattn/go-sqlite3` package means you'll need to have a C complier to build the code. +* The SQLite databases themselves not infrequenely get themselves in to a state where they are locked preventing other operations from completing. This is a SQLite thing so you probably don't want to deploy it to "production" but it is generally good enough for testing things. It's also possible that I am simply misconfiguring SQLite and if I am I would appreciate any pointers on how to fix these mistakes. + +To add a different database "driver", for example MySQL, you will need to clone the respective tools and add the relevant import statement. For example to update the [cmd/server](cmd/server/main.go) tool to use MySQL you would replace the `_ "github.com/mattn/go-sqlite3"` import statement with `_ "github.com/go-sql-driver/mysql"` like this: + +``` +package main + +import ( + "context" + "os" + + _ "github.com/go-sql-driver/mysql" + "github.com/sfomuseum/go-activitypub/app/server" + "github.com/sfomuseum/go-activitypub/slog" +) + +func main() { + ctx := context.Background() + logger := slog.Default() + server.Run(ctx, logger) +} +``` + +#### SQL schemas + +* [SQLite](schema/sqlite) +* [MySQL](schema/mysql) – _Note: These have not been tested yet._ + +### gocloud.dev/docstore + +Anything that implements the [gocloud.dev/docstore](https://pkg.go.dev/gocloud.dev/docstore) `Docstore` interface. As of this writing only DynamoDB document stores have been tested using the [awsdynamodb](https://gocloud.dev/howto/docstore/#dynamodb) and the [aaronland/gocloud-docstore](https://github.com/aaronland/gocloud-docstore/) packages. A few things to note: + +* One side effect of using the `aaronland/gocloud-docstore` package is that the `gocloud.dev/docstore/awsdynamodb` "driver" is always imported and available regardless of whether you include in an `import` statement. +* The "global secondary indices" for the [schema/dynamodb](schema/dynamodb) definitions are inefficient and could stand to be optimized at some point in the future. + +To add a different docstore "driver", for example MongoDB, you will need to clone the respective tools and add the relevant import statement. For example to update the [cmd/server](cmd/server/main.go) tool to use MongoDB you would replace the `_ "github.com/mattn/go-sqlite3"` import statement with `_ "gocloud.dev/docstore/mongodocstore"` like this: + +``` +package main + +import ( + "context" + "os" + + _ "gocloud.dev/docstore/mongodocstore" + "github.com/sfomuseum/go-activitypub/app/server" + "github.com/sfomuseum/go-activitypub/slog" +) + +func main() { + ctx := context.Background() + logger := slog.Default() + server.Run(ctx, logger) +} +``` + +#### Document Store table definitions + +* [DynamoDB](schema/dynamodb) + +## Interfaces + +### AccountsDatabase + +This is where accounts specific to an atomic instance of the `go-activitypub` package, for example `example1.social` versus `example2.social`, are stored. + +### ActivitiesDatabase + +This is where outbound (ActivityPub) actvities related to accounts are stored. This database stores both the raw (JSON-encoded) ActvityPub activity record as well as other properties (account id, activity type, etc.) specific to the `go-activitypub` package. + +### AliasesDatabase + +This is where aliases (alternate names) for accounts are stored. + +### BlocksDatabase + +This is where records describing external actors or hosts that are blocked by individual accounts are stored. + +### DeliveriesDatabase + +This is where a log of outbound deliveries of (ActivityPub) actvities for individual accounts are stored. + +### FollowersDatabase + +This is where records describing the external actors following (internal) accounts are stored. + +### FollowingDatabase + +This is where records describing the external actors that (internal) accounts are following are stored. + +### LikesDatabase + +This is where records describing boost activities by external actors (of activities by internal accounts) are stored. + +_There are currently no database tables for storing boost events by internal accounts._ + +### MessagesDatabase + +This is where the pointer to a "Note" activity (stored in an implementation of the `NotesDatabase`) delivered to a specific account is stored. + +### NotesDatabase + +This is where the details of a "Note" activity from an external actor is stored. + +### PostTagsDatabase + +This is where the details of the "Tags" associated with a post (or "Note") activitiy are stored. + +_Currently, this interface is tightly-coupled with "Notes" (posts) which may be revisited in the future._ + +### PostsDatabase + +This is where the details of a "Note" activity (or "post") by an account are stored. These details do not include ActivityStream "Tags" which are stored separately in an implementation of the `PostTagsDatabase`. + +### PropertiesDatabase + +This is where arbitrary key-value property records for individual accounts are stored. \ No newline at end of file diff --git a/vendor/github.com/sfomuseum/go-activitypub/accounts_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/accounts_database.go similarity index 62% rename from vendor/github.com/sfomuseum/go-activitypub/accounts_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/accounts_database.go index f086623..b8ee356 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/accounts_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/accounts_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,19 +8,32 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) +// GetAccountIdsCallbackFunc is a custom function used to process an `activitypub.Account` identifier. type GetAccountIdsCallbackFunc func(context.Context, int64) error -type GetAccountsCallbackFunc func(context.Context, *Account) error +// GetAccountsCallbackFunc is a custom function used to process an `activitypub.Account` record. +type GetAccountsCallbackFunc func(context.Context, *activitypub.Account) error + +// AccountsDatabase defines an interface for working with individual accounts associated with an atomic instance of the `go-activity` tools and services. type AccountsDatabase interface { + // GetAccounts iterates through all the account records and dispatches each to an instance of `GetAccountsCallbackFunc`. GetAccounts(context.Context, GetAccountsCallbackFunc) error + // GetAccountsForDateRange iterates through all the account records created between two dates and dispatches each to an instance of `GetAccountIdsCallbackFunc`. GetAccountIdsForDateRange(context.Context, int64, int64, GetAccountIdsCallbackFunc) error - GetAccountWithId(context.Context, int64) (*Account, error) - GetAccountWithName(context.Context, string) (*Account, error) - AddAccount(context.Context, *Account) error - RemoveAccount(context.Context, *Account) error - UpdateAccount(context.Context, *Account) error + // GetAccountWithId returns the account matching a specific 64-bit ID. + GetAccountWithId(context.Context, int64) (*activitypub.Account, error) + // GetAccountWithId returns the account matching a specific name. + GetAccountWithName(context.Context, string) (*activitypub.Account, error) + // AddAccount adds a new `activitypub.Account` instance. + AddAccount(context.Context, *activitypub.Account) error + // RemoveAccount removes a specific `activitypub.Account` instance. + RemoveAccount(context.Context, *activitypub.Account) error + // UpdateAccount updates a specific `activitypub.Account` instance. + UpdateAccount(context.Context, *activitypub.Account) error + // Close performs any final operations to terminate the underlying database connection. Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/accounts_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_docstore.go similarity index 82% rename from vendor/github.com/sfomuseum/go-activitypub/accounts_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_docstore.go index bf5bdd8..8a7a32c 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/accounts_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterAccountsDatabase(ctx, "awsdynamodb", NewDocstoreAccountsDatabase) + err := RegisterAccountsDatabase(ctx, "awsdynamodb", NewDocstoreAccountsDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterAccountsDatabase(ctx, scheme, NewDocstoreAccountsDatabase) + err := RegisterAccountsDatabase(ctx, scheme, NewDocstoreAccountsDatabase) + + if err != nil { + panic(err) + } } } @@ -49,7 +58,7 @@ func (db *DocstoreAccountsDatabase) GetAccounts(ctx context.Context, cb GetAccou for { - var a Account + var a activitypub.Account err := iter.Next(ctx, &a) if err == io.EOF { @@ -96,7 +105,7 @@ func (db *DocstoreAccountsDatabase) GetAccountIdsForDateRange(ctx context.Contex for { - var a Account + var a activitypub.Account err := iter.Next(ctx, &a) if err == io.EOF { @@ -118,12 +127,12 @@ func (db *DocstoreAccountsDatabase) GetAccountIdsForDateRange(ctx context.Contex return nil } -func (db *DocstoreAccountsDatabase) AddAccount(ctx context.Context, a *Account) error { +func (db *DocstoreAccountsDatabase) AddAccount(ctx context.Context, a *activitypub.Account) error { return db.collection.Put(ctx, a) } -func (db *DocstoreAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*Account, error) { +func (db *DocstoreAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*activitypub.Account, error) { q := db.collection.Query() q = q.Where("Id", "=", id) @@ -131,7 +140,7 @@ func (db *DocstoreAccountsDatabase) GetAccountWithId(ctx context.Context, id int return db.getAccount(ctx, q) } -func (db *DocstoreAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*Account, error) { +func (db *DocstoreAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*activitypub.Account, error) { q := db.collection.Query() q = q.Where("Name", "=", name) @@ -139,11 +148,11 @@ func (db *DocstoreAccountsDatabase) GetAccountWithName(ctx context.Context, name return db.getAccount(ctx, q) } -func (db *DocstoreAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error { +func (db *DocstoreAccountsDatabase) UpdateAccount(ctx context.Context, acct *activitypub.Account) error { return db.collection.Replace(ctx, acct) } -func (db *DocstoreAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error { +func (db *DocstoreAccountsDatabase) RemoveAccount(ctx context.Context, acct *activitypub.Account) error { return db.collection.Delete(ctx, acct) } @@ -151,21 +160,21 @@ func (db *DocstoreAccountsDatabase) Close(ctx context.Context) error { return db.collection.Close() } -func (db *DocstoreAccountsDatabase) getAccount(ctx context.Context, q *gc_docstore.Query) (*Account, error) { +func (db *DocstoreAccountsDatabase) getAccount(ctx context.Context, q *gc_docstore.Query) (*activitypub.Account, error) { iter := q.Get(ctx) defer iter.Stop() - var a Account + var a activitypub.Account err := iter.Next(ctx, &a) if err == io.EOF { - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } else if err != nil { return nil, fmt.Errorf("Failed to interate, %w", err) } else { return &a, nil } - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } diff --git a/vendor/github.com/sfomuseum/go-activitypub/accounts_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_null.go similarity index 69% rename from vendor/github.com/sfomuseum/go-activitypub/accounts_database_null.go rename to vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_null.go index 967da6f..bee3805 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/accounts_database_null.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_null.go @@ -1,7 +1,9 @@ -package activitypub +package database import ( "context" + + "github.com/sfomuseum/go-activitypub" ) type NullAccountsDatabase struct { @@ -10,8 +12,11 @@ type NullAccountsDatabase struct { func init() { ctx := context.Background() - RegisterAccountsDatabase(ctx, "null", NewNullAccountsDatabase) + err := RegisterAccountsDatabase(ctx, "null", NewNullAccountsDatabase) + if err != nil { + panic(err) + } } func NewNullAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error) { @@ -27,23 +32,23 @@ func (db *NullAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, s return nil } -func (db *NullAccountsDatabase) AddAccount(ctx context.Context, a *Account) error { +func (db *NullAccountsDatabase) AddAccount(ctx context.Context, a *activitypub.Account) error { return nil } -func (db *NullAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*Account, error) { - return nil, ErrNotFound +func (db *NullAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*activitypub.Account, error) { + return nil, activitypub.ErrNotFound } -func (db *NullAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*Account, error) { - return nil, ErrNotFound +func (db *NullAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*activitypub.Account, error) { + return nil, activitypub.ErrNotFound } -func (db *NullAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error { +func (db *NullAccountsDatabase) UpdateAccount(ctx context.Context, acct *activitypub.Account) error { return nil } -func (db *NullAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error { +func (db *NullAccountsDatabase) RemoveAccount(ctx context.Context, acct *activitypub.Account) error { return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/accounts_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_sql.go similarity index 86% rename from vendor/github.com/sfomuseum/go-activitypub/accounts_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_sql.go index 76981f8..7af613c 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/accounts_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/accounts_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,11 @@ type SQLAccountsDatabase struct { func init() { ctx := context.Background() - RegisterAccountsDatabase(ctx, "sql", NewSQLAccountsDatabase) + err := RegisterAccountsDatabase(ctx, "sql", NewSQLAccountsDatabase) + + if err != nil { + panic(err) + } } func NewSQLAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, error) { @@ -59,7 +64,7 @@ func NewSQLAccountsDatabase(ctx context.Context, uri string) (AccountsDatabase, } func (db *SQLAccountsDatabase) GetAccounts(ctx context.Context, acct GetAccountsCallbackFunc) error { - return ErrNotImplemented + return activitypub.ErrNotImplemented } func (db *SQLAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, start int64, end int64, cb GetAccountIdsCallbackFunc) error { @@ -113,7 +118,7 @@ func (db *SQLAccountsDatabase) GetAccountIdsForDateRange(ctx context.Context, st return nil } -func (db *SQLAccountsDatabase) AddAccount(ctx context.Context, a *Account) error { +func (db *SQLAccountsDatabase) AddAccount(ctx context.Context, a *activitypub.Account) error { q := fmt.Sprintf("INSERT INTO %s (id, account_type, name, display_name, blurb, url, public_key_uri, private_key_uri, created, lastmodified) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", SQL_ACCOUNTS_TABLE_NAME) @@ -126,17 +131,17 @@ func (db *SQLAccountsDatabase) AddAccount(ctx context.Context, a *Account) error return nil } -func (db *SQLAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*Account, error) { +func (db *SQLAccountsDatabase) GetAccountWithId(ctx context.Context, id int64) (*activitypub.Account, error) { where := "id = ?" return db.getAccount(ctx, where, id) } -func (db *SQLAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*Account, error) { +func (db *SQLAccountsDatabase) GetAccountWithName(ctx context.Context, name string) (*activitypub.Account, error) { where := "name = ?" return db.getAccount(ctx, where, name) } -func (db *SQLAccountsDatabase) getAccount(ctx context.Context, where string, args ...interface{}) (*Account, error) { +func (db *SQLAccountsDatabase) getAccount(ctx context.Context, where string, args ...interface{}) (*activitypub.Account, error) { var id int64 var account_type uint32 @@ -157,16 +162,16 @@ func (db *SQLAccountsDatabase) getAccount(ctx context.Context, where string, arg switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, err default: // } - a := &Account{ + a := &activitypub.Account{ Id: id, - AccountType: AccountType(account_type), + AccountType: activitypub.AccountType(account_type), Name: name, DisplayName: display_name, Blurb: blurb, @@ -180,12 +185,12 @@ func (db *SQLAccountsDatabase) getAccount(ctx context.Context, where string, arg return a, nil } -func (db *SQLAccountsDatabase) UpdateAccount(ctx context.Context, acct *Account) error { - return ErrNotImplemented +func (db *SQLAccountsDatabase) UpdateAccount(ctx context.Context, acct *activitypub.Account) error { + return activitypub.ErrNotImplemented } -func (db *SQLAccountsDatabase) RemoveAccount(ctx context.Context, acct *Account) error { - return ErrNotImplemented +func (db *SQLAccountsDatabase) RemoveAccount(ctx context.Context, acct *activitypub.Account) error { + return activitypub.ErrNotImplemented } func (db *SQLAccountsDatabase) Close(ctx context.Context) error { diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/activities_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/activities_database.go new file mode 100644 index 0000000..5eceba3 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/activities_database.go @@ -0,0 +1,106 @@ +package database + +import ( + "context" + "fmt" + "net/url" + "sort" + "strings" + + "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" +) + +type GetActivitiesCallbackFunc func(context.Context, *activitypub.Activity) error + +type ActivitiesDatabase interface { + AddActivity(context.Context, *activitypub.Activity) error + GetActivityWithId(context.Context, int64) (*activitypub.Activity, error) + GetActivityWithActivityPubId(context.Context, string) (*activitypub.Activity, error) + GetActivityWithActivityTypeAnId(context.Context, activitypub.ActivityType, int64) (*activitypub.Activity, error) + GetActivities(context.Context, GetActivitiesCallbackFunc) error + GetActivitiesForAccount(context.Context, int64, GetActivitiesCallbackFunc) error + Close(context.Context) error +} + +var activities_database_roster roster.Roster + +// ActivitiesDatabaseInitializationFunc is a function defined by individual activities_database package and used to create +// an instance of that activities_database +type ActivitiesDatabaseInitializationFunc func(ctx context.Context, uri string) (ActivitiesDatabase, error) + +// RegisterActivitiesDatabase registers 'scheme' as a key pointing to 'init_func' in an internal lookup table +// used to create new `ActivitiesDatabase` instances by the `NewActivitiesDatabase` method. +func RegisterActivitiesDatabase(ctx context.Context, scheme string, init_func ActivitiesDatabaseInitializationFunc) error { + + err := ensureActivitiesDatabaseRoster() + + if err != nil { + return err + } + + return activities_database_roster.Register(ctx, scheme, init_func) +} + +func ensureActivitiesDatabaseRoster() error { + + if activities_database_roster == nil { + + r, err := roster.NewDefaultRoster() + + if err != nil { + return err + } + + activities_database_roster = r + } + + return nil +} + +// NewActivitiesDatabase returns a new `ActivitiesDatabase` instance configured by 'uri'. The value of 'uri' is parsed +// as a `url.URL` and its scheme is used as the key for a corresponding `ActivitiesDatabaseInitializationFunc` +// function used to instantiate the new `ActivitiesDatabase`. It is assumed that the scheme (and initialization +// function) have been registered by the `RegisterActivitiesDatabase` method. +func NewActivitiesDatabase(ctx context.Context, uri string) (ActivitiesDatabase, error) { + + u, err := url.Parse(uri) + + if err != nil { + return nil, err + } + + scheme := u.Scheme + + i, err := activities_database_roster.Driver(ctx, scheme) + + if err != nil { + return nil, err + } + + init_func := i.(ActivitiesDatabaseInitializationFunc) + return init_func(ctx, uri) +} + +// Schemes returns the list of schemes that have been registered. +func ActivitiesDatabaseSchemes() []string { + + ctx := context.Background() + schemes := []string{} + + err := ensureActivitiesDatabaseRoster() + + if err != nil { + return schemes + } + + for _, dr := range activities_database_roster.Drivers(ctx) { + scheme := fmt.Sprintf("%s://", strings.ToLower(dr)) + schemes = append(schemes, scheme) + } + + sort.Strings(schemes) + return schemes +} + +// LocalWords: ActivitiesDatabase diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_docstore.go new file mode 100644 index 0000000..c67ed4d --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_docstore.go @@ -0,0 +1,151 @@ +package database + +import ( + "context" + "fmt" + "io" + + aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" + gc_docstore "gocloud.dev/docstore" +) + +type DocstoreActivitiesDatabase struct { + ActivitiesDatabase + collection *gc_docstore.Collection +} + +func init() { + + ctx := context.Background() + + err := RegisterActivitiesDatabase(ctx, "awsdynamodb", NewDocstoreActivitiesDatabase) + + if err != nil { + panic(err) + } + + for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { + err := RegisterActivitiesDatabase(ctx, scheme, NewDocstoreActivitiesDatabase) + + if err != nil { + panic(err) + } + + } + +} + +func NewDocstoreActivitiesDatabase(ctx context.Context, uri string) (ActivitiesDatabase, error) { + + col, err := aa_docstore.OpenCollection(ctx, uri) + + if err != nil { + return nil, fmt.Errorf("Failed to open collection, %w", err) + } + + db := &DocstoreActivitiesDatabase{ + collection: col, + } + + return db, nil +} + +func (db *DocstoreActivitiesDatabase) AddActivity(ctx context.Context, f *activitypub.Activity) error { + + return db.collection.Put(ctx, f) +} + +func (db *DocstoreActivitiesDatabase) GetActivityWithId(ctx context.Context, id int64) (*activitypub.Activity, error) { + + q := db.collection.Query() + q = q.Where("Id", "=", id) + + return db.getActivity(ctx, q) +} + +func (db *DocstoreActivitiesDatabase) GetActivityWithActivityPubId(ctx context.Context, id string) (*activitypub.Activity, error) { + + q := db.collection.Query() + q = q.Where("ActivityPubId", "=", id) + + return db.getActivity(ctx, q) +} + +func (db *DocstoreActivitiesDatabase) GetActivityWithActivityTypeAndId(ctx context.Context, activity_type activitypub.ActivityType, id int64) (*activitypub.Activity, error) { + + q := db.collection.Query() + q = q.Where("ActivityType", "=", activity_type) + q = q.Where("ActivityTypeId", "=", id) + + return db.getActivity(ctx, q) +} + +func (db *DocstoreActivitiesDatabase) GetActivities(ctx context.Context, cb GetActivitiesCallbackFunc) error { + + q := db.collection.Query() + + return db.getActivitiesWithQuery(ctx, q, cb) +} + +func (db *DocstoreActivitiesDatabase) GetActivitiesForAccount(ctx context.Context, id int64, cb GetActivitiesCallbackFunc) error { + + q := db.collection.Query() + q = q.Where("AccountId", "=", id) + + return db.getActivitiesWithQuery(ctx, q, cb) +} + +func (db *DocstoreActivitiesDatabase) Close(ctx context.Context) error { + return db.collection.Close() +} + +func (db *DocstoreActivitiesDatabase) getActivity(ctx context.Context, q *gc_docstore.Query) (*activitypub.Activity, error) { + + iter := q.Get(ctx) + defer iter.Stop() + + for { + + var d activitypub.Activity + err := iter.Next(ctx, &d) + + if err == io.EOF { + return nil, activitypub.ErrNotFound + } else if err != nil { + return nil, fmt.Errorf("Failed to interate, %w", err) + } else { + return &d, nil + } + } + + return nil, activitypub.ErrNotFound + +} + +func (db *DocstoreActivitiesDatabase) getActivitiesWithQuery(ctx context.Context, q *gc_docstore.Query, cb GetActivitiesCallbackFunc) error { + + iter := q.Get(ctx) + defer iter.Stop() + + for { + + var a activitypub.Activity + err := iter.Next(ctx, &a) + + if err == io.EOF { + break + } else if err != nil { + return fmt.Errorf("Failed to interate, %w", err) + } else { + + err := cb(ctx, &a) + + if err != nil { + return fmt.Errorf("Failed to execute activities callback for '%s', %w", a.Id, err) + } + } + } + + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_null.go new file mode 100644 index 0000000..57df876 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_null.go @@ -0,0 +1,54 @@ +package database + +import ( + "context" + + "github.com/sfomuseum/go-activitypub" +) + +type NullActivitiesDatabase struct { + ActivitiesDatabase +} + +func init() { + ctx := context.Background() + err := RegisterActivitiesDatabase(ctx, "null", NewNullActivitiesDatabase) + + if err != nil { + panic(err) + } +} + +func NewNullActivitiesDatabase(ctx context.Context, uri string) (ActivitiesDatabase, error) { + + db := &NullActivitiesDatabase{} + return db, nil +} + +func (db *NullActivitiesDatabase) AddActivity(ctx context.Context, f *activitypub.Activity) error { + return nil +} + +func (db *NullActivitiesDatabase) GetActivityWithId(ctx context.Context, id int64) (*activitypub.Activity, error) { + return nil, activitypub.ErrNotFound +} + +func (db *NullActivitiesDatabase) GetActivityWithActivityPubId(ctx context.Context, id string) (*activitypub.Activity, error) { + return nil, activitypub.ErrNotFound +} + +func (db *NullActivitiesDatabase) GetActivityWithActivityTypeAndId(ctx context.Context, activity_type activitypub.ActivityType, id int64) (*activitypub.Activity, error) { + return nil, activitypub.ErrNotFound +} + +func (db *NullActivitiesDatabase) GetActivities(ctx context.Context, cb GetActivitiesCallbackFunc) error { + return nil +} + +func (db *NullActivitiesDatabase) GetActivitiesForAccount(ctx context.Context, id int64, cb GetActivitiesCallbackFunc) error { + return nil +} + +func (db *NullActivitiesDatabase) Close(ctx context.Context) error { + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_sql.go new file mode 100644 index 0000000..e7aa5c4 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/activities_database_sql.go @@ -0,0 +1,221 @@ +package database + +import ( + "context" + "database/sql" + "fmt" + "net/url" + + pg_sql "github.com/aaronland/go-pagination-sql" + "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" + "github.com/sfomuseum/go-activitypub/sqlite" +) + +const SQL_ACTIVITIES_TABLE_NAME string = "activities" + +type SQLActivitiesDatabase struct { + ActivitiesDatabase + database *sql.DB +} + +func init() { + ctx := context.Background() + err := RegisterActivitiesDatabase(ctx, "sql", NewSQLActivitiesDatabase) + + if err != nil { + panic(err) + } +} + +func NewSQLActivitiesDatabase(ctx context.Context, uri string) (ActivitiesDatabase, error) { + + u, err := url.Parse(uri) + + if err != nil { + return nil, fmt.Errorf("Failed to parse URI, %w", err) + } + + engine := u.Host + + q := u.Query() + dsn := q.Get("dsn") + + conn, err := sql.Open(engine, dsn) + + if err != nil { + return nil, fmt.Errorf("Failed to open database connection, %w", err) + } + + if engine == "sqlite3" { + + err := sqlite.SetupConnection(ctx, conn) + + if err != nil { + return nil, fmt.Errorf("Failed to set up SQLite, %w", err) + } + } + + db := &SQLActivitiesDatabase{ + database: conn, + } + + return db, nil +} + +func (db *SQLActivitiesDatabase) AddActivity(ctx context.Context, a *activitypub.Activity) error { + + q := fmt.Sprintf("INSERT INTO %s (id, activitypub_id, account_id, activity_type, activity_type_id, body, created) VALUES (?, ?, ?, ?, ?, ?, ?)", SQL_ACTIVITIES_TABLE_NAME) + + _, err := db.database.ExecContext(ctx, q, a.Id, a.ActivityPubId, a.AccountId, a.ActivityType, a.ActivityTypeId, a.Body, a.Created) + + if err != nil { + return fmt.Errorf("Failed to add activity, %w", err) + } + + return nil +} + +func (db *SQLActivitiesDatabase) GetActivityWithId(ctx context.Context, id int64) (*activitypub.Activity, error) { + + where := "id = ?" + return db.getActivity(ctx, where, id) +} + +func (db *SQLActivitiesDatabase) GetActivityWithActivityPubId(ctx context.Context, id string) (*activitypub.Activity, error) { + + where := "activity_pub_id = ?" + return db.getActivity(ctx, where, id) +} + +func (db *SQLActivitiesDatabase) GetActivityWithActivityTypeAndId(ctx context.Context, activity_type activitypub.ActivityType, activity_type_id int64) (*activitypub.Activity, error) { + + where := "activity_type = ? AND activity_type_id = ?" + return db.getActivity(ctx, where, activity_type, activity_type_id) +} + +func (db *SQLActivitiesDatabase) GetActivities(ctx context.Context, cb GetActivitiesCallbackFunc) error { + + where := "1 = 1" + args := make([]interface{}, 0) + + return db.getActivities(ctx, where, args, cb) +} + +func (db *SQLActivitiesDatabase) GetActivitiesForAccount(ctx context.Context, id int64, cb GetActivitiesCallbackFunc) error { + + where := "account_id = ?" + args := []interface{}{id} + + return db.getActivities(ctx, where, args, cb) +} + +func (db *SQLActivitiesDatabase) Close(ctx context.Context) error { + return db.database.Close() +} + +func (db *SQLActivitiesDatabase) getActivity(ctx context.Context, where string, args ...interface{}) (*activitypub.Activity, error) { + + var id int64 + var activitypub_id string + var account_id int64 + var activity_type int + var activity_type_id int64 + var body string + var created int64 + + q := fmt.Sprintf("SELECT id, activitypub_id, account_id, activity_type, activity_type_id, body, created FROM %s WHERE %s", SQL_ACTIVITIES_TABLE_NAME, where) + + row := db.database.QueryRowContext(ctx, q, args...) + + err := row.Scan(&id, &activitypub_id, &account_id, &activity_type, &activity_type_id, &body, &created) + + switch { + case err == sql.ErrNoRows: + return nil, activitypub.ErrNotFound + case err != nil: + return nil, err + default: + // + } + + a := &activitypub.Activity{ + Id: id, + ActivityPubId: activitypub_id, + AccountId: account_id, + ActivityType: activitypub.ActivityType(activity_type), + ActivityTypeId: activity_type_id, + Body: body, + Created: created, + } + + return a, nil +} + +func (db *SQLActivitiesDatabase) getActivities(ctx context.Context, where string, args []interface{}, cb GetActivitiesCallbackFunc) error { + + pg_callback := func(pg_rsp pg_sql.PaginatedResponse) error { + + rows := pg_rsp.Rows() + + for rows.Next() { + + var id int64 + var activitypub_id string + var account_id int64 + var activity_type int + var activity_type_id int64 + var body string + var created int64 + + err := rows.Scan(&id, &activitypub_id, &account_id, &activity_type, &activity_type_id, &body, &created) + + if err != nil { + return fmt.Errorf("Failed to query database, %w", err) + } + + a := &activitypub.Activity{ + Id: id, + ActivityPubId: activitypub_id, + AccountId: account_id, + ActivityType: activitypub.ActivityType(activity_type), + ActivityTypeId: activity_type_id, + Body: body, + Created: created, + } + + err = cb(ctx, a) + + if err != nil { + return fmt.Errorf("Failed to execute following callback for account %d, %w", id, err) + } + + return nil + } + + err := rows.Close() + + if err != nil { + return fmt.Errorf("Failed to iterate through database rows, %w", err) + } + + return nil + } + + pg_opts, err := countable.NewCountableOptions() + + if err != nil { + return fmt.Errorf("Failed to create pagination options, %w", err) + } + + q := fmt.Sprintf("SELECT id, activitypub_id, account_id, activity_type, activity_type_id, body, created FROM %s WHERE %s", SQL_ACTIVITIES_TABLE_NAME, where) + + err = pg_sql.QueryPaginatedAll(db.database, pg_opts, pg_callback, q, args...) + + if err != nil { + return fmt.Errorf("Failed to execute paginated query, %w", err) + } + + return nil + +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/aliases_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/aliases_database.go similarity index 88% rename from vendor/github.com/sfomuseum/go-activitypub/aliases_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/aliases_database.go index cc95f2a..51fcbda 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/aliases_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/aliases_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,15 +8,16 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) -type GetAliasesCallbackFunc func(context.Context, *Alias) error +type GetAliasesCallbackFunc func(context.Context, *activitypub.Alias) error type AliasesDatabase interface { GetAliasesForAccount(context.Context, int64, GetAliasesCallbackFunc) error - GetAliasWithName(context.Context, string) (*Alias, error) - AddAlias(context.Context, *Alias) error - RemoveAlias(context.Context, *Alias) error + GetAliasWithName(context.Context, string) (*activitypub.Alias, error) + AddAlias(context.Context, *activitypub.Alias) error + RemoveAlias(context.Context, *activitypub.Alias) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/aliases_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_docstore.go similarity index 77% rename from vendor/github.com/sfomuseum/go-activitypub/aliases_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_docstore.go index 5ded614..010bd6b 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/aliases_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -17,10 +18,19 @@ type DocstoreAliasesDatabase struct { func init() { ctx := context.Background() - RegisterAliasesDatabase(ctx, "awsdynamodb", NewDocstoreAliasesDatabase) + err := RegisterAliasesDatabase(ctx, "awsdynamodb", NewDocstoreAliasesDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterAliasesDatabase(ctx, scheme, NewDocstoreAliasesDatabase) + err := RegisterAliasesDatabase(ctx, scheme, NewDocstoreAliasesDatabase) + + if err != nil { + panic(err) + } + } } @@ -49,7 +59,7 @@ func (db *DocstoreAliasesDatabase) GetAliasesForAccount(ctx context.Context, acc for { - var a Alias + var a activitypub.Alias err := iter.Next(ctx, &a) if err == io.EOF { @@ -69,7 +79,7 @@ func (db *DocstoreAliasesDatabase) GetAliasesForAccount(ctx context.Context, acc return nil } -func (db *DocstoreAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*Alias, error) { +func (db *DocstoreAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*activitypub.Alias, error) { q := db.collection.Query() q = q.Where("Name", "=", name) @@ -77,11 +87,11 @@ func (db *DocstoreAliasesDatabase) GetAliasWithName(ctx context.Context, name st return db.getAlias(ctx, q) } -func (db *DocstoreAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error { +func (db *DocstoreAliasesDatabase) AddAlias(ctx context.Context, alias *activitypub.Alias) error { return db.collection.Put(ctx, alias) } -func (db *DocstoreAliasesDatabase) RemoveAlias(ctx context.Context, alias *Alias) error { +func (db *DocstoreAliasesDatabase) RemoveAlias(ctx context.Context, alias *activitypub.Alias) error { return db.collection.Delete(ctx, alias) } @@ -89,16 +99,16 @@ func (db *DocstoreAliasesDatabase) Close(ctx context.Context) error { return db.collection.Close() } -func (db *DocstoreAliasesDatabase) getAlias(ctx context.Context, q *gc_docstore.Query) (*Alias, error) { +func (db *DocstoreAliasesDatabase) getAlias(ctx context.Context, q *gc_docstore.Query) (*activitypub.Alias, error) { iter := q.Get(ctx) defer iter.Stop() - var a Alias + var a activitypub.Alias err := iter.Next(ctx, &a) if err == io.EOF { - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } else if err != nil { return nil, fmt.Errorf("Failed to interate, %w", err) } else { diff --git a/vendor/github.com/sfomuseum/go-activitypub/aliases_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_null.go similarity index 69% rename from vendor/github.com/sfomuseum/go-activitypub/aliases_database_null.go rename to vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_null.go index bec2ca4..153465e 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/aliases_database_null.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_null.go @@ -1,7 +1,9 @@ -package activitypub +package database import ( "context" + + "github.com/sfomuseum/go-activitypub" ) type NullAliasesDatabase struct { @@ -10,7 +12,12 @@ type NullAliasesDatabase struct { func init() { ctx := context.Background() - RegisterAliasesDatabase(ctx, "null", NewNullAliasesDatabase) + err := RegisterAliasesDatabase(ctx, "null", NewNullAliasesDatabase) + + if err != nil { + panic(err) + } + } func NewNullAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error) { @@ -22,15 +29,15 @@ func (db *NullAliasesDatabase) GetAliasesForAccount(ctx context.Context, account return nil } -func (db *NullAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*Alias, error) { - return nil, ErrNotFound +func (db *NullAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*activitypub.Alias, error) { + return nil, activitypub.ErrNotFound } -func (db *NullAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error { +func (db *NullAliasesDatabase) AddAlias(ctx context.Context, alias *activitypub.Alias) error { return nil } -func (db *NullAliasesDatabase) RemoveAlias(ctx context.Context, alias *Alias) error { +func (db *NullAliasesDatabase) RemoveAlias(ctx context.Context, alias *activitypub.Alias) error { return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/aliases_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_sql.go similarity index 90% rename from vendor/github.com/sfomuseum/go-activitypub/aliases_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_sql.go index 815ca4a..6c11e08 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/aliases_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/aliases_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,12 @@ type SQLAliasesDatabase struct { func init() { ctx := context.Background() - RegisterAliasesDatabase(ctx, "sql", NewSQLAliasesDatabase) + err := RegisterAliasesDatabase(ctx, "sql", NewSQLAliasesDatabase) + + if err != nil { + panic(err) + } + } func NewSQLAliasesDatabase(ctx context.Context, uri string) (AliasesDatabase, error) { @@ -69,7 +75,7 @@ func (db *SQLAliasesDatabase) GetAliasesForAccount(ctx context.Context, account_ return db.getAliasesWithCallback(ctx, where, args, cb) } -func (db *SQLAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*Alias, error) { +func (db *SQLAliasesDatabase) GetAliasWithName(ctx context.Context, name string) (*activitypub.Alias, error) { where := "name = ?" @@ -80,7 +86,7 @@ func (db *SQLAliasesDatabase) GetAliasWithName(ctx context.Context, name string) return db.getAlias(ctx, where, args) } -func (db *SQLAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error { +func (db *SQLAliasesDatabase) AddAlias(ctx context.Context, alias *activitypub.Alias) error { q := fmt.Sprintf("INSERT INTO %s (name, account_id, created) VALUES (?, ?, ?)", SQL_ALIASES_TABLE_NAME) @@ -93,7 +99,7 @@ func (db *SQLAliasesDatabase) AddAlias(ctx context.Context, alias *Alias) error return nil } -func (db *SQLAliasesDatabase) RemoveAlias(ctx context.Context, alias *Alias) error { +func (db *SQLAliasesDatabase) RemoveAlias(ctx context.Context, alias *activitypub.Alias) error { q := fmt.Sprintf("DELETE FROM %s WHERE name = ?", SQL_ALIASES_TABLE_NAME) @@ -110,7 +116,7 @@ func (db *SQLAliasesDatabase) Close(ctx context.Context) error { return db.database.Close() } -func (db *SQLAliasesDatabase) getAlias(ctx context.Context, where string, args []interface{}) (*Alias, error) { +func (db *SQLAliasesDatabase) getAlias(ctx context.Context, where string, args []interface{}) (*activitypub.Alias, error) { var name string var account_id int64 @@ -124,12 +130,12 @@ func (db *SQLAliasesDatabase) getAlias(ctx context.Context, where string, args [ switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, err default: - a := &Alias{ + a := &activitypub.Alias{ Name: name, AccountId: account_id, Created: created, @@ -157,7 +163,7 @@ func (db *SQLAliasesDatabase) getAliasesWithCallback(ctx context.Context, where return fmt.Errorf("Failed to query database, %w", err) } - a := &Alias{ + a := &activitypub.Alias{ Name: name, AccountId: account_id, Created: created, diff --git a/vendor/github.com/sfomuseum/go-activitypub/blocks_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/blocks_database.go similarity index 87% rename from vendor/github.com/sfomuseum/go-activitypub/blocks_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/blocks_database.go index bc3d08a..e8d1efb 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/blocks_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/blocks_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,17 +8,18 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetBlockIdsCallbackFunc func(context.Context, int64) error -type GetBlocksCallbackFunc func(context.Context, *Block) error +type GetBlocksCallbackFunc func(context.Context, *activitypub.Block) error type BlocksDatabase interface { GetBlockIdsForDateRange(context.Context, int64, int64, GetBlockIdsCallbackFunc) error - GetBlockWithAccountIdAndAddress(context.Context, int64, string, string) (*Block, error) - GetBlockWithId(context.Context, int64) (*Block, error) - AddBlock(context.Context, *Block) error - RemoveBlock(context.Context, *Block) error + GetBlockWithAccountIdAndAddress(context.Context, int64, string, string) (*activitypub.Block, error) + GetBlockWithId(context.Context, int64) (*activitypub.Block, error) + AddBlock(context.Context, *activitypub.Block) error + RemoveBlock(context.Context, *activitypub.Block) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/blocks_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_docstore.go similarity index 78% rename from vendor/github.com/sfomuseum/go-activitypub/blocks_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_docstore.go index 692519c..33980d1 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/blocks_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterBlocksDatabase(ctx, "awsdynamodb", NewDocstoreBlocksDatabase) + err := RegisterBlocksDatabase(ctx, "awsdynamodb", NewDocstoreBlocksDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterBlocksDatabase(ctx, scheme, NewDocstoreBlocksDatabase) + err := RegisterBlocksDatabase(ctx, scheme, NewDocstoreBlocksDatabase) + + if err != nil { + panic(err) + } } } @@ -51,7 +60,7 @@ func (db *DocstoreBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, s for { - var b Block + var b activitypub.Block err := iter.Next(ctx, &b) if err == io.EOF { @@ -70,7 +79,7 @@ func (db *DocstoreBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, s return nil } -func (db *DocstoreBlocksDatabase) GetBlockWithId(ctx context.Context, id int64) (*Block, error) { +func (db *DocstoreBlocksDatabase) GetBlockWithId(ctx context.Context, id int64) (*activitypub.Block, error) { q := db.collection.Query() q = q.Where("Id", "=", id) @@ -78,7 +87,7 @@ func (db *DocstoreBlocksDatabase) GetBlockWithId(ctx context.Context, id int64) return db.getBlock(ctx, q) } -func (db *DocstoreBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*Block, error) { +func (db *DocstoreBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*activitypub.Block, error) { q := db.collection.Query() q = q.Where("AccountId", "=", account_id) @@ -89,18 +98,18 @@ func (db *DocstoreBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Co } -func (db *DocstoreBlocksDatabase) getBlock(ctx context.Context, q *gc_docstore.Query) (*Block, error) { +func (db *DocstoreBlocksDatabase) getBlock(ctx context.Context, q *gc_docstore.Query) (*activitypub.Block, error) { iter := q.Get(ctx) defer iter.Stop() for { - var b Block + var b activitypub.Block err := iter.Next(ctx, &b) if err == io.EOF { - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } else if err != nil { return nil, fmt.Errorf("Failed to interate, %w", err) } else { @@ -108,21 +117,21 @@ func (db *DocstoreBlocksDatabase) getBlock(ctx context.Context, q *gc_docstore.Q } } - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } -func (db *DocstoreBlocksDatabase) AddBlock(ctx context.Context, block *Block) error { +func (db *DocstoreBlocksDatabase) AddBlock(ctx context.Context, block *activitypub.Block) error { return db.collection.Put(ctx, block) } -func (db *DocstoreBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error { +func (db *DocstoreBlocksDatabase) UpdateBlock(ctx context.Context, block *activitypub.Block) error { return db.collection.Replace(ctx, block) } -func (db *DocstoreBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error { +func (db *DocstoreBlocksDatabase) RemoveBlock(ctx context.Context, block *activitypub.Block) error { return db.collection.Delete(ctx, block) } diff --git a/vendor/github.com/sfomuseum/go-activitypub/blocks_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_null.go similarity index 71% rename from vendor/github.com/sfomuseum/go-activitypub/blocks_database_null.go rename to vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_null.go index b14433b..d529526 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/blocks_database_null.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_null.go @@ -1,7 +1,9 @@ -package activitypub +package database import ( "context" + + "github.com/sfomuseum/go-activitypub" ) type NullBlocksDatabase struct { @@ -10,7 +12,11 @@ type NullBlocksDatabase struct { func init() { ctx := context.Background() - RegisterBlocksDatabase(ctx, "null", NewNullBlocksDatabase) + err := RegisterBlocksDatabase(ctx, "null", NewNullBlocksDatabase) + + if err != nil { + panic(err) + } } func NewNullBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error) { @@ -26,22 +32,22 @@ func (db *NullBlocksDatabase) IsBlockedByAccount(ctx context.Context, account_id return false, nil } -func (db *NullBlocksDatabase) GetBlockWithId(ctx context.Context, block_id int64) (*Block, error) { - return nil, ErrNotFound +func (db *NullBlocksDatabase) GetBlockWithId(ctx context.Context, block_id int64) (*activitypub.Block, error) { + return nil, activitypub.ErrNotFound } -func (db *NullBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*Block, error) { - return nil, ErrNotFound +func (db *NullBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*activitypub.Block, error) { + return nil, activitypub.ErrNotFound } -func (db *NullBlocksDatabase) AddBlock(ctx context.Context, block *Block) error { +func (db *NullBlocksDatabase) AddBlock(ctx context.Context, block *activitypub.Block) error { return nil } -func (db *NullBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error { +func (db *NullBlocksDatabase) UpdateBlock(ctx context.Context, block *activitypub.Block) error { return nil } -func (db *NullBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error { +func (db *NullBlocksDatabase) RemoveBlock(ctx context.Context, block *activitypub.Block) error { return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/blocks_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_sql.go similarity index 90% rename from vendor/github.com/sfomuseum/go-activitypub/blocks_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_sql.go index dcca7f9..f1aa709 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/blocks_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/blocks_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,11 @@ type SQLBlocksDatabase struct { func init() { ctx := context.Background() - RegisterBlocksDatabase(ctx, "sql", NewSQLBlocksDatabase) + err := RegisterBlocksDatabase(ctx, "sql", NewSQLBlocksDatabase) + + if err != nil { + panic(err) + } } func NewSQLBlocksDatabase(ctx context.Context, uri string) (BlocksDatabase, error) { @@ -109,19 +114,19 @@ func (db *SQLBlocksDatabase) GetBlockIdsForDateRange(ctx context.Context, start return nil } -func (db *SQLBlocksDatabase) GetBlockWithId(ctx context.Context, block_id int64) (*Block, error) { +func (db *SQLBlocksDatabase) GetBlockWithId(ctx context.Context, block_id int64) (*activitypub.Block, error) { where := "id = ?" return db.getBlock(ctx, where, block_id) } -func (db *SQLBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*Block, error) { +func (db *SQLBlocksDatabase) GetBlockWithAccountIdAndAddress(ctx context.Context, account_id int64, host string, name string) (*activitypub.Block, error) { where := "account_id = ? AND host = ? AND name = ?" return db.getBlock(ctx, where, account_id, host, name) } -func (db *SQLBlocksDatabase) getBlock(ctx context.Context, where string, args ...interface{}) (*Block, error) { +func (db *SQLBlocksDatabase) getBlock(ctx context.Context, where string, args ...interface{}) (*activitypub.Block, error) { q := fmt.Sprintf("SELECT id, account_id, name, host, created, lastmodified FROM %s WHERE %s", SQL_BLOCKS_TABLE_NAME, where) row := db.database.QueryRowContext(ctx, q, args...) @@ -137,12 +142,12 @@ func (db *SQLBlocksDatabase) getBlock(ctx context.Context, where string, args .. switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, fmt.Errorf("Failed to query database, %w", err) default: - n := &Block{ + n := &activitypub.Block{ Id: id, AccountId: account_id, Name: name, @@ -156,7 +161,7 @@ func (db *SQLBlocksDatabase) getBlock(ctx context.Context, where string, args .. } -func (db *SQLBlocksDatabase) AddBlock(ctx context.Context, block *Block) error { +func (db *SQLBlocksDatabase) AddBlock(ctx context.Context, block *activitypub.Block) error { q := fmt.Sprintf("INSERT INTO %s (id, account_id, name, host, created, lastmodified) VALUES (?, ?, ?, ?, ?, ?)", SQL_BLOCKS_TABLE_NAME) @@ -169,7 +174,7 @@ func (db *SQLBlocksDatabase) AddBlock(ctx context.Context, block *Block) error { return nil } -func (db *SQLBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) error { +func (db *SQLBlocksDatabase) UpdateBlock(ctx context.Context, block *activitypub.Block) error { q := fmt.Sprintf("UPDATE %s SET account_id=?, name=?, host=?, created=?, lastmodified=? WHERE id = ?", SQL_BLOCKS_TABLE_NAME) @@ -182,7 +187,7 @@ func (db *SQLBlocksDatabase) UpdateBlock(ctx context.Context, block *Block) erro return nil } -func (db *SQLBlocksDatabase) RemoveBlock(ctx context.Context, block *Block) error { +func (db *SQLBlocksDatabase) RemoveBlock(ctx context.Context, block *activitypub.Block) error { q := fmt.Sprintf("DELETE FROM %s WHERE id = ?", SQL_BLOCKS_TABLE_NAME) diff --git a/vendor/github.com/sfomuseum/go-activitypub/boosts_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/boosts_database.go similarity index 82% rename from vendor/github.com/sfomuseum/go-activitypub/boosts_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/boosts_database.go index d3dad03..77e7804 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/boosts_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/boosts_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,18 +8,21 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetBoostIdsCallbackFunc func(context.Context, int64) error -type GetBoostsCallbackFunc func(context.Context, *Boost) error +type GetBoostsCallbackFunc func(context.Context, *activitypub.Boost) error type BoostsDatabase interface { GetBoostIdsForDateRange(context.Context, int64, int64, GetBoostIdsCallbackFunc) error GetBoostsForPost(context.Context, int64, GetBoostsCallbackFunc) error - GetBoostWithPostIdAndActor(context.Context, int64, string) (*Boost, error) - GetBoostWithId(context.Context, int64) (*Boost, error) - AddBoost(context.Context, *Boost) error - RemoveBoost(context.Context, *Boost) error + GetBoostsForAccount(context.Context, int64, GetBoostsCallbackFunc) error + // GetBoostsForActor(context.Context, string, GetBoostsCallbackFunc) error + GetBoostWithPostIdAndActor(context.Context, int64, string) (*activitypub.Boost, error) + GetBoostWithId(context.Context, int64) (*activitypub.Boost, error) + AddBoost(context.Context, *activitypub.Boost) error + RemoveBoost(context.Context, *activitypub.Boost) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/boosts_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_docstore.go similarity index 71% rename from vendor/github.com/sfomuseum/go-activitypub/boosts_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_docstore.go index d0ea413..0ab8fa9 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/boosts_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterBoostsDatabase(ctx, "awsdynamodb", NewDocstoreBoostsDatabase) + err := RegisterBoostsDatabase(ctx, "awsdynamodb", NewDocstoreBoostsDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterBoostsDatabase(ctx, scheme, NewDocstoreBoostsDatabase) + err := RegisterBoostsDatabase(ctx, scheme, NewDocstoreBoostsDatabase) + + if err != nil { + panic(err) + } } } @@ -51,7 +60,7 @@ func (db *DocstoreBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, s for { - var b Boost + var b activitypub.Boost err := iter.Next(ctx, &b) if err == io.EOF { @@ -70,7 +79,7 @@ func (db *DocstoreBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, s return nil } -func (db *DocstoreBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*Boost, error) { +func (db *DocstoreBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*activitypub.Boost, error) { q := db.collection.Query() q = q.Where("Id", "=", id) @@ -78,7 +87,7 @@ func (db *DocstoreBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) return db.getBoost(ctx, q) } -func (db *DocstoreBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*Boost, error) { +func (db *DocstoreBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*activitypub.Boost, error) { q := db.collection.Query() q = q.Where("PostId", "=", post_id) @@ -92,42 +101,41 @@ func (db *DocstoreBoostsDatabase) GetBoostsForPost(ctx context.Context, post_id q := db.collection.Query() q = q.Where("PostId", "=", post_id) - iter := q.Get(ctx) - defer iter.Stop() + return db.getBoostsForQuery(ctx, q, cb) +} - for { +func (db *DocstoreBoostsDatabase) GetBoostsForAccount(ctx context.Context, account_id int64, cb GetBoostsCallbackFunc) error { - var b Boost - err := iter.Next(ctx, &b) + q := db.collection.Query() + q = q.Where("AccountId", "=", account_id) - if err == io.EOF { - break - } else if err != nil { - return fmt.Errorf("Failed to interate, %w", err) - } else { + return db.getBoostsForQuery(ctx, q, cb) +} - err := cb(ctx, &b) +func (db *DocstoreBoostsDatabase) AddBoost(ctx context.Context, boost *activitypub.Boost) error { - if err != nil { - return fmt.Errorf("Failed to execute callback for boost %d, %w", b.Id, err) - } - } - } + return db.collection.Put(ctx, boost) +} - return nil +func (db *DocstoreBoostsDatabase) RemoveBoost(ctx context.Context, boost *activitypub.Boost) error { + + return db.collection.Delete(ctx, boost) +} +func (db *DocstoreBoostsDatabase) Close(ctx context.Context) error { + return db.collection.Close() } -func (db *DocstoreBoostsDatabase) getBoost(ctx context.Context, q *gc_docstore.Query) (*Boost, error) { +func (db *DocstoreBoostsDatabase) getBoost(ctx context.Context, q *gc_docstore.Query) (*activitypub.Boost, error) { iter := q.Get(ctx) defer iter.Stop() - var b Boost + var b activitypub.Boost err := iter.Next(ctx, &b) if err == io.EOF { - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } else if err != nil { return nil, fmt.Errorf("Failed to interate, %w", err) } else { @@ -136,16 +144,29 @@ func (db *DocstoreBoostsDatabase) getBoost(ctx context.Context, q *gc_docstore.Q } -func (db *DocstoreBoostsDatabase) AddBoost(ctx context.Context, boost *Boost) error { +func (db *DocstoreBoostsDatabase) getBoostsForQuery(ctx context.Context, q *gc_docstore.Query, cb GetBoostsCallbackFunc) error { - return db.collection.Put(ctx, boost) -} + iter := q.Get(ctx) + defer iter.Stop() -func (db *DocstoreBoostsDatabase) RemoveBoost(ctx context.Context, boost *Boost) error { + for { - return db.collection.Delete(ctx, boost) -} + var b activitypub.Boost + err := iter.Next(ctx, &b) -func (db *DocstoreBoostsDatabase) Close(ctx context.Context) error { - return db.collection.Close() + if err == io.EOF { + break + } else if err != nil { + return fmt.Errorf("Failed to interate, %w", err) + } else { + + err := cb(ctx, &b) + + if err != nil { + return fmt.Errorf("Failed to execute callback for boost %d, %w", b.Id, err) + } + } + } + + return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/boosts_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_null.go similarity index 62% rename from vendor/github.com/sfomuseum/go-activitypub/boosts_database_null.go rename to vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_null.go index e78d8a5..a197fb4 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/boosts_database_null.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_null.go @@ -1,7 +1,9 @@ -package activitypub +package database import ( "context" + + "github.com/sfomuseum/go-activitypub" ) type NullBoostsDatabase struct { @@ -10,7 +12,11 @@ type NullBoostsDatabase struct { func init() { ctx := context.Background() - RegisterBoostsDatabase(ctx, "null", NewNullBoostsDatabase) + err := RegisterBoostsDatabase(ctx, "null", NewNullBoostsDatabase) + + if err != nil { + panic(err) + } } func NewNullBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error) { @@ -22,23 +28,27 @@ func (db *NullBoostsDatabase) GetBoostIdsForDateRange(ctx context.Context, start return nil } -func (db *NullBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*Boost, error) { - return nil, ErrNotFound +func (db *NullBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*activitypub.Boost, error) { + return nil, activitypub.ErrNotFound } -func (db *NullBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, id int64, actor string) (*Boost, error) { - return nil, ErrNotFound +func (db *NullBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, id int64, actor string) (*activitypub.Boost, error) { + return nil, activitypub.ErrNotFound } func (db *NullBoostsDatabase) GetBoostsForPost(ctx context.Context, post_id int64, cb GetBoostsCallbackFunc) error { return nil } -func (db *NullBoostsDatabase) AddBoost(ctx context.Context, boost *Boost) error { +func (db *NullBoostsDatabase) GetBoostsForAccount(ctx context.Context, account_id int64, cb GetBoostsCallbackFunc) error { + return nil +} + +func (db *NullBoostsDatabase) AddBoost(ctx context.Context, boost *activitypub.Boost) error { return nil } -func (db *NullBoostsDatabase) RemoveBoost(ctx context.Context, boost *Boost) error { +func (db *NullBoostsDatabase) RemoveBoost(ctx context.Context, boost *activitypub.Boost) error { return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/boosts_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_sql.go similarity index 73% rename from vendor/github.com/sfomuseum/go-activitypub/boosts_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_sql.go index c978b93..b798e58 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/boosts_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/boosts_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -21,7 +22,11 @@ type SQLBoostsDatabase struct { func init() { ctx := context.Background() - RegisterBoostsDatabase(ctx, "sql", NewSQLBoostsDatabase) + err := RegisterBoostsDatabase(ctx, "sql", NewSQLBoostsDatabase) + + if err != nil { + panic(err) + } } func NewSQLBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, error) { @@ -59,88 +64,52 @@ func NewSQLBoostsDatabase(ctx context.Context, uri string) (BoostsDatabase, erro return db, nil } -func (db *SQLBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*Boost, error) { +func (db *SQLBoostsDatabase) GetBoostWithId(ctx context.Context, id int64) (*activitypub.Boost, error) { where := "id = ?" return db.getBoost(ctx, where, id) } -func (db *SQLBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*Boost, error) { +func (db *SQLBoostsDatabase) GetBoostWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*activitypub.Boost, error) { where := "post_id = ? AND actor = ?" return db.getBoost(ctx, where, post_id, actor) } -func (db *SQLBoostsDatabase) GetBoostsForPostIdAndActor(ctx context.Context, post_id int64, actor string, cb GetBoostsCallbackFunc) error { - - pg_callback := func(pg_rsp pg_sql.PaginatedResponse) error { - - rows := pg_rsp.Rows() - - for rows.Next() { - - var id int64 - var account_id int64 - var post_id int64 - var actor string - var created int64 - - err := rows.Scan(&id, &account_id, &post_id, &actor, &created) - - switch { - case err == sql.ErrNoRows: - return nil - case err != nil: - return err - default: +func (db *SQLBoostsDatabase) GetBoostsForAccount(ctx context.Context, account_id int64, cb GetBoostsCallbackFunc) error { - b := &Boost{ - Id: id, - AccountId: account_id, - PostId: post_id, - Actor: actor, - Created: created, - } + where := "account_id = ?" - err = cb(ctx, b) - - if err != nil { - return fmt.Errorf("Failed to execute callback for '%b', %w", b.Id, err) - } - - } + args := []interface{}{ + account_id, + } - return nil - } + return db.getBoostsForQuery(ctx, where, args, cb) +} - err := rows.Close() +func (db *SQLBoostsDatabase) GetBoostsForPosts(ctx context.Context, post_id int64, cb GetBoostsCallbackFunc) error { - if err != nil { - return fmt.Errorf("Failed to iterate through database rows, %w", err) - } + where := "post_id = ?" - return nil + args := []interface{}{ + post_id, } - pg_opts, err := countable.NewCountableOptions() - - if err != nil { - return fmt.Errorf("Failed to create pagination options, %w", err) - } - - q := fmt.Sprintf("SELECT id, account_id, post_id, actor, created FROM %s WHERE post_id = ? AND actor = ?", SQL_BOOSTS_TABLE_NAME) + return db.getBoostsForQuery(ctx, where, args, cb) +} - err = pg_sql.QueryPaginatedAll(db.database, pg_opts, pg_callback, q, post_id, actor) +func (db *SQLBoostsDatabase) GetBoostsForPostIdAndActor(ctx context.Context, post_id int64, actor string, cb GetBoostsCallbackFunc) error { - if err != nil { - return fmt.Errorf("Failed to execute paginated query, %w", err) + where := "post_id = ? AND actor = ?" + args := []interface{}{ + post_id, + actor, } - return nil - + return db.getBoostsForQuery(ctx, where, args, cb) } -func (db *SQLBoostsDatabase) AddBoost(ctx context.Context, b *Boost) error { +func (db *SQLBoostsDatabase) AddBoost(ctx context.Context, b *activitypub.Boost) error { q := fmt.Sprintf("INSERT INTO %s (id, account_id, psot_id, actor, created) VALUES (?, ?, ?, ?, ?)", SQL_BOOSTS_TABLE_NAME) @@ -153,7 +122,7 @@ func (db *SQLBoostsDatabase) AddBoost(ctx context.Context, b *Boost) error { return nil } -func (db *SQLBoostsDatabase) RemoveBoost(ctx context.Context, b *Boost) error { +func (db *SQLBoostsDatabase) RemoveBoost(ctx context.Context, b *activitypub.Boost) error { q := fmt.Sprintf("DELETE FROM %s WHERE id= ?", SQL_BOOSTS_TABLE_NAME) @@ -170,7 +139,7 @@ func (db *SQLBoostsDatabase) Close(ctx context.Context) error { return db.database.Close() } -func (db *SQLBoostsDatabase) getBoost(ctx context.Context, where string, args ...interface{}) (*Boost, error) { +func (db *SQLBoostsDatabase) getBoost(ctx context.Context, where string, args ...interface{}) (*activitypub.Boost, error) { var id int64 var account_id int64 @@ -186,14 +155,14 @@ func (db *SQLBoostsDatabase) getBoost(ctx context.Context, where string, args .. switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, err default: // } - b := &Boost{ + b := &activitypub.Boost{ Id: id, AccountId: account_id, PostId: post_id, @@ -203,3 +172,71 @@ func (db *SQLBoostsDatabase) getBoost(ctx context.Context, where string, args .. return b, nil } + +func (db *SQLBoostsDatabase) getBoostsForQuery(ctx context.Context, where string, args []interface{}, cb GetBoostsCallbackFunc) error { + + pg_callback := func(pg_rsp pg_sql.PaginatedResponse) error { + + rows := pg_rsp.Rows() + + for rows.Next() { + + var id int64 + var account_id int64 + var post_id int64 + var actor string + var created int64 + + err := rows.Scan(&id, &account_id, &post_id, &actor, &created) + + switch { + case err == sql.ErrNoRows: + return nil + case err != nil: + return err + default: + + b := &activitypub.Boost{ + Id: id, + AccountId: account_id, + PostId: post_id, + Actor: actor, + Created: created, + } + + err = cb(ctx, b) + + if err != nil { + return fmt.Errorf("Failed to execute callback for '%b', %w", b.Id, err) + } + + } + + return nil + } + + err := rows.Close() + + if err != nil { + return fmt.Errorf("Failed to iterate through database rows, %w", err) + } + + return nil + } + + pg_opts, err := countable.NewCountableOptions() + + if err != nil { + return fmt.Errorf("Failed to create pagination options, %w", err) + } + + q := fmt.Sprintf("SELECT id, account_id, post_id, actor, created FROM %s WHERE %s", SQL_BOOSTS_TABLE_NAME, where) + + err = pg_sql.QueryPaginatedAll(db.database, pg_opts, pg_callback, q, args...) + + if err != nil { + return fmt.Errorf("Failed to execute paginated query, %w", err) + } + + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/database.go b/vendor/github.com/sfomuseum/go-activitypub/database/database.go new file mode 100644 index 0000000..f48c51a --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/database.go @@ -0,0 +1,2 @@ +// Package database defines interfaces and default implementation for the underlying databases (or database tables) used to store ActivityPub related operations. +package database diff --git a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database.go similarity index 82% rename from vendor/github.com/sfomuseum/go-activitypub/deliveries_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database.go index ae890cc..85c4216 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,24 +8,19 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetDeliveryIdsCallbackFunc func(context.Context, int64) error -type GetDeliveriesCallbackFunc func(context.Context, *Delivery) error - -type GetDeliveriesQuery struct { - AccountId int64 - Recipient string - Status string - Type string - Id string -} +type GetDeliveriesCallbackFunc func(context.Context, *activitypub.Delivery) error type DeliveriesDatabase interface { + AddDelivery(context.Context, *activitypub.Delivery) error + GetDeliveryWithId(context.Context, int64) (*activitypub.Delivery, error) + GetDeliveries(context.Context, GetDeliveriesCallbackFunc) error + GetDeliveriesWithActivityIdAndRecipient(context.Context, int64, string, GetDeliveriesCallbackFunc) error + GetDeliveriesWithActivityPubIdAndRecipient(context.Context, string, string, GetDeliveriesCallbackFunc) error GetDeliveryIdsForDateRange(context.Context, int64, int64, GetDeliveryIdsCallbackFunc) error - AddDelivery(context.Context, *Delivery) error - GetDeliveryWithId(context.Context, int64) (*Delivery, error) - GetDeliveriesWithPostIdAndRecipient(context.Context, int64, string, GetDeliveriesCallbackFunc) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_docstore.go similarity index 58% rename from vendor/github.com/sfomuseum/go-activitypub/deliveries_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_docstore.go index b7f47e5..e5dfe0b 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterDeliveriesDatabase(ctx, "awsdynamodb", NewDocstoreDeliveriesDatabase) + err := RegisterDeliveriesDatabase(ctx, "awsdynamodb", NewDocstoreDeliveriesDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterDeliveriesDatabase(ctx, scheme, NewDocstoreDeliveriesDatabase) + err := RegisterDeliveriesDatabase(ctx, scheme, NewDocstoreDeliveriesDatabase) + + if err != nil { + panic(err) + } } } @@ -52,7 +61,7 @@ func (db *DocstoreDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Con for { - var d Delivery + var d activitypub.Delivery err := iter.Next(ctx, &d) if err == io.EOF { @@ -71,12 +80,12 @@ func (db *DocstoreDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Con return nil } -func (db *DocstoreDeliveriesDatabase) AddDelivery(ctx context.Context, f *Delivery) error { +func (db *DocstoreDeliveriesDatabase) AddDelivery(ctx context.Context, f *activitypub.Delivery) error { return db.collection.Put(ctx, f) } -func (db *DocstoreDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*Delivery, error) { +func (db *DocstoreDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*activitypub.Delivery, error) { q := db.collection.Query() q = q.Where("Id", "=", id) @@ -84,60 +93,80 @@ func (db *DocstoreDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id return db.getDelivery(ctx, q) } -func (db *DocstoreDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, recipient string, deliveries_callback GetDeliveriesCallbackFunc) error { +func (db *DocstoreDeliveriesDatabase) GetDeliveries(ctx context.Context, deliveries_callback GetDeliveriesCallbackFunc) error { + + q := db.collection.Query() + return db.getDeliveriesWithQuery(ctx, q, deliveries_callback) +} + +func (db *DocstoreDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient(ctx context.Context, activity_id int64, recipient string, deliveries_callback GetDeliveriesCallbackFunc) error { + + q := db.collection.Query() + q = q.Where("ActivityId", "=", activity_id) + q = q.Where("Recipient", "=", recipient) + + return db.getDeliveriesWithQuery(ctx, q, deliveries_callback) +} + +func (db *DocstoreDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient(ctx context.Context, activity_pub_id string, recipient string, deliveries_callback GetDeliveriesCallbackFunc) error { q := db.collection.Query() - q = q.Where("PostId", "=", post_id) + q = q.Where("ActivityPubId", "=", activity_pub_id) q = q.Where("Recipient", "=", recipient) + return db.getDeliveriesWithQuery(ctx, q, deliveries_callback) +} + +func (db *DocstoreDeliveriesDatabase) Close(ctx context.Context) error { + return db.collection.Close() +} + +func (db *DocstoreDeliveriesDatabase) getDelivery(ctx context.Context, q *gc_docstore.Query) (*activitypub.Delivery, error) { + iter := q.Get(ctx) defer iter.Stop() for { - var d Delivery + var d activitypub.Delivery err := iter.Next(ctx, &d) if err == io.EOF { - break + return nil, activitypub.ErrNotFound } else if err != nil { - return fmt.Errorf("Failed to interate, %w", err) + return nil, fmt.Errorf("Failed to interate, %w", err) } else { - - err := deliveries_callback(ctx, &d) - - if err != nil { - return fmt.Errorf("Failed to execute deliveries callback for '%d', %w", d.Id, err) - } + return &d, nil } } - return nil -} + return nil, activitypub.ErrNotFound -func (db *DocstoreDeliveriesDatabase) Close(ctx context.Context) error { - return db.collection.Close() } -func (db *DocstoreDeliveriesDatabase) getDelivery(ctx context.Context, q *gc_docstore.Query) (*Delivery, error) { +func (db *DocstoreDeliveriesDatabase) getDeliveriesWithQuery(ctx context.Context, q *gc_docstore.Query, deliveries_callback GetDeliveriesCallbackFunc) error { iter := q.Get(ctx) defer iter.Stop() for { - var d Delivery + var d activitypub.Delivery err := iter.Next(ctx, &d) if err == io.EOF { - return nil, ErrNotFound + break } else if err != nil { - return nil, fmt.Errorf("Failed to interate, %w", err) + return fmt.Errorf("Failed to interate, %w", err) } else { - return &d, nil + + err := deliveries_callback(ctx, &d) + + if err != nil { + return fmt.Errorf("Failed to execute deliveries callback for '%d', %w", d.Id, err) + } } } - return nil, ErrNotFound - + return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_null.go new file mode 100644 index 0000000..b140aeb --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_null.go @@ -0,0 +1,53 @@ +package database + +import ( + "context" + + "github.com/sfomuseum/go-activitypub" +) + +type NullDeliveriesDatabase struct { + DeliveriesDatabase +} + +func init() { + ctx := context.Background() + err := RegisterDeliveriesDatabase(ctx, "null", NewNullDeliveriesDatabase) + + if err != nil { + panic(err) + } +} + +func NewNullDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error) { + db := &NullDeliveriesDatabase{} + return db, nil +} + +func (db *NullDeliveriesDatabase) AddDelivery(ctx context.Context, d *activitypub.Delivery) error { + return nil +} + +func (db *NullDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*activitypub.Delivery, error) { + return nil, activitypub.ErrNotFound +} + +func (db *NullDeliveriesDatabase) GetDeliveries(ctx context.Context, cb GetDeliveriesCallbackFunc) error { + return nil +} + +func (db *NullDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient(ctx context.Context, activity_id int64, recipient string, cb GetDeliveriesCallbackFunc) error { + return nil +} + +func (db *NullDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient(ctx context.Context, activity_pub_id string, recipient string, cb GetDeliveriesCallbackFunc) error { + return nil +} + +func (db *NullDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error { + return nil +} + +func (db *NullDeliveriesDatabase) Close(ctx context.Context) error { + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_slog.go b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_slog.go new file mode 100644 index 0000000..e9edd7e --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_slog.go @@ -0,0 +1,58 @@ +package database + +import ( + "context" + "log/slog" + + "github.com/sfomuseum/go-activitypub" +) + +type SlogDeliveriesDatabase struct { + DeliveriesDatabase + logger *slog.Logger +} + +func init() { + ctx := context.Background() + err := RegisterDeliveriesDatabase(ctx, "slog", NewSlogDeliveriesDatabase) + + if err != nil { + panic(err) + } +} + +func NewSlogDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error) { + db := &SlogDeliveriesDatabase{ + logger: slog.Default(), + } + return db, nil +} + +func (db *SlogDeliveriesDatabase) AddDelivery(ctx context.Context, d *activitypub.Delivery) error { + db.logger.Info("Add delivery", "activity id", d.ActivityId, "recipient", d.Recipient, "success", d.Success, "error", d.Error) + return nil +} + +func (db *SlogDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*activitypub.Delivery, error) { + return nil, activitypub.ErrNotFound +} + +func (db *SlogDeliveriesDatabase) GetDeliveries(ctx context.Context, cb GetDeliveriesCallbackFunc) error { + return nil +} + +func (db *SlogDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient(ctx context.Context, activity_id int64, recipient string, cb GetDeliveriesCallbackFunc) error { + return nil +} + +func (db *SlogDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient(ctx context.Context, activity_pub_id string, recipient string, cb GetDeliveriesCallbackFunc) error { + return nil +} + +func (db *SlogDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error { + return nil +} + +func (db *SlogDeliveriesDatabase) Close(ctx context.Context) error { + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_sql.go new file mode 100644 index 0000000..8ae5f41 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/database/deliveries_database_sql.go @@ -0,0 +1,291 @@ +package database + +import ( + "context" + "database/sql" + "fmt" + "net/url" + + pg_sql "github.com/aaronland/go-pagination-sql" + "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" + "github.com/sfomuseum/go-activitypub/sqlite" +) + +const SQL_DELIVERIES_TABLE_NAME string = "deliveries" + +type SQLDeliveriesDatabase struct { + DeliveriesDatabase + database *sql.DB +} + +func init() { + ctx := context.Background() + err := RegisterDeliveriesDatabase(ctx, "sql", NewSQLDeliveriesDatabase) + + if err != nil { + panic(err) + } +} + +func NewSQLDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error) { + + u, err := url.Parse(uri) + + if err != nil { + return nil, fmt.Errorf("Failed to parse URI, %w", err) + } + + engine := u.Host + + q := u.Query() + dsn := q.Get("dsn") + + conn, err := sql.Open(engine, dsn) + + if err != nil { + return nil, fmt.Errorf("Failed to open database connection, %w", err) + } + + if engine == "sqlite3" { + + err := sqlite.SetupConnection(ctx, conn) + + if err != nil { + return nil, fmt.Errorf("Failed to configure SQLite, %w", err) + } + } + + db := &SQLDeliveriesDatabase{ + database: conn, + } + + return db, nil +} + +func (db *SQLDeliveriesDatabase) AddDelivery(ctx context.Context, d *activitypub.Delivery) error { + + q := fmt.Sprintf("INSERT INTO %s (id, activity_id, activitypub_id, account_id, recipient, inbox, created, completed, success, error) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", SQL_DELIVERIES_TABLE_NAME) + + _, err := db.database.ExecContext(ctx, q, d.Id, d.ActivityId, d.ActivityPubId, d.AccountId, d.Recipient, d.Inbox, d.Created, d.Completed, d.Success, d.Error) + + if err != nil { + return fmt.Errorf("Failed to add delivery, %w", err) + } + + return nil +} + +func (db *SQLDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*activitypub.Delivery, error) { + where := "id = ?" + return db.getDelivery(ctx, where, id) +} + +func (db *SQLDeliveriesDatabase) GetDeliveries(ctx context.Context, cb GetDeliveriesCallbackFunc) error { + where := "1 = 1" + args := make([]interface{}, 0) + + return db.getDeliveries(ctx, where, args, cb) +} + +func (db *SQLDeliveriesDatabase) GetDeliveriesWithActivityIdAndRecipient(ctx context.Context, activity_id int64, recipient string, cb GetDeliveriesCallbackFunc) error { + + where := "activity_id = ? AND recipient = ?" + args := []interface{}{ + activity_id, + recipient, + } + + return db.getDeliveries(ctx, where, args, cb) +} + +func (db *SQLDeliveriesDatabase) GetDeliveriesWithActivityPubIdAndRecipient(ctx context.Context, activitypub_id string, recipient string, cb GetDeliveriesCallbackFunc) error { + + where := "activitypub_id = ? AND recipient = ?" + args := []interface{}{ + activitypub_id, + recipient, + } + + return db.getDeliveries(ctx, where, args, cb) +} + +func (db *SQLDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error { + + pg_callback := func(pg_rsp pg_sql.PaginatedResponse) error { + + rows := pg_rsp.Rows() + + for rows.Next() { + + var id int64 + + err := rows.Scan(&id) + + if err != nil { + return fmt.Errorf("Failed to query database, %w", err) + } + + err = cb(ctx, id) + + if err != nil { + return fmt.Errorf("Failed to execute following callback for delivery %d, %w", id, err) + } + + return nil + } + + err := rows.Close() + + if err != nil { + return fmt.Errorf("Failed to iterate through database rows, %w", err) + } + + return nil + } + + pg_opts, err := countable.NewCountableOptions() + + if err != nil { + return fmt.Errorf("Failed to create pagination options, %w", err) + } + + q := fmt.Sprintf("SELECT id FROM %s WHERE created >= ? AND created <= ?", SQL_DELIVERIES_TABLE_NAME) + + err = pg_sql.QueryPaginatedAll(db.database, pg_opts, pg_callback, q, start, end) + + if err != nil { + return fmt.Errorf("Failed to execute paginated query, %w", err) + } + + return nil +} + +func (db *SQLDeliveriesDatabase) Close(ctx context.Context) error { + return db.database.Close() +} + +func (db *SQLDeliveriesDatabase) getDelivery(ctx context.Context, where string, args ...interface{}) (*activitypub.Delivery, error) { + + var id int64 + var activity_id int64 + var activitypub_id string + var account_id int64 + var recipient string + var inbox string + var created int64 + var completed int64 + var success_i int + var error string + + q := fmt.Sprintf("SELECT id, activity_id, activitypub_id, account_id, recipient, inbox, created, completed, success, error FROM %s WHERE %s", SQL_DELIVERIES_TABLE_NAME, where) + + row := db.database.QueryRowContext(ctx, q, args...) + + err := row.Scan(&id, &activity_id, &activitypub_id, &account_id, &recipient, &inbox, &created, &completed, &success_i, &error) + + switch { + case err == sql.ErrNoRows: + return nil, activitypub.ErrNotFound + case err != nil: + return nil, err + default: + // + } + + a := &activitypub.Delivery{ + Id: id, + ActivityId: activity_id, + ActivityPubId: activitypub_id, + AccountId: account_id, + Recipient: recipient, + Inbox: inbox, + Created: created, + Completed: completed, + Error: error, + } + + if success_i > 0 { + a.Success = true + } + + return a, nil + +} + +func (db *SQLDeliveriesDatabase) getDeliveries(ctx context.Context, where string, args []interface{}, cb GetDeliveriesCallbackFunc) error { + + pg_callback := func(pg_rsp pg_sql.PaginatedResponse) error { + + rows := pg_rsp.Rows() + + for rows.Next() { + + var id int64 + var activity_id int64 + var activitypub_id string + var account_id int64 + var recipient string + var inbox string + var created int64 + var completed int64 + var success_i int + var error string + + err := rows.Scan(&id, &activity_id, &activitypub_id, &account_id, &recipient, &inbox, &created, &completed, &success_i, &error) + + if err != nil { + return fmt.Errorf("Failed to query database, %w", err) + } + + a := &activitypub.Delivery{ + Id: id, + ActivityId: activity_id, + ActivityPubId: activitypub_id, + AccountId: account_id, + Recipient: recipient, + Inbox: inbox, + Created: created, + Completed: completed, + Error: error, + } + + if success_i > 0 { + a.Success = true + } + + err = cb(ctx, a) + + if err != nil { + return fmt.Errorf("Failed to execute following callback for delivery %d, %w", id, err) + } + + return nil + } + + err := rows.Close() + + if err != nil { + return fmt.Errorf("Failed to iterate through database rows, %w", err) + } + + return nil + } + + pg_opts, err := countable.NewCountableOptions() + + if err != nil { + return fmt.Errorf("Failed to create pagination options, %w", err) + } + + q := fmt.Sprintf("SELECT id, activity_id, activitypub_id, account_id, recipient, inbox, created, completed, success, error FROM %s WHERE %s", SQL_DELIVERIES_TABLE_NAME, where) + + err = pg_sql.QueryPaginatedAll(db.database, pg_opts, pg_callback, q, args...) + + if err != nil { + return fmt.Errorf("Failed to execute paginated query, %w", err) + } + + return nil + +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/followers_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/followers_database.go similarity index 91% rename from vendor/github.com/sfomuseum/go-activitypub/followers_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/followers_database.go index c4ccfef..769d84e 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/followers_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/followers_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetFollowerIdsCallbackFunc func(context.Context, int64) error @@ -18,9 +19,9 @@ type FollowersDatabase interface { GetAllFollowers(context.Context, GetFollowersCallbackFunc) error GetFollowersForAccount(context.Context, int64, GetFollowersCallbackFunc) error HasFollowers(context.Context, int64) (bool, error) - GetFollower(context.Context, int64, string) (*Follower, error) - AddFollower(context.Context, *Follower) error - RemoveFollower(context.Context, *Follower) error + GetFollower(context.Context, int64, string) (*activitypub.Follower, error) + AddFollower(context.Context, *activitypub.Follower) error + RemoveFollower(context.Context, *activitypub.Follower) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/followers_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/followers_database_docstore.go similarity index 85% rename from vendor/github.com/sfomuseum/go-activitypub/followers_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/followers_database_docstore.go index ce97c4c..6acc50b 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/followers_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/followers_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterFollowersDatabase(ctx, "awsdynamodb", NewDocstoreFollowersDatabase) + err := RegisterFollowersDatabase(ctx, "awsdynamodb", NewDocstoreFollowersDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterFollowersDatabase(ctx, scheme, NewDocstoreFollowersDatabase) + err := RegisterFollowersDatabase(ctx, scheme, NewDocstoreFollowersDatabase) + + if err != nil { + panic(err) + } } } @@ -65,7 +74,7 @@ func (db *DocstoreFollowersDatabase) HasFollowers(ctx context.Context, account_i iter := q.Get(ctx, "Id") defer iter.Stop() - var f Follower + var f activitypub.Follower err := iter.Next(ctx, &f) if err == io.EOF { @@ -78,7 +87,7 @@ func (db *DocstoreFollowersDatabase) HasFollowers(ctx context.Context, account_i } -func (db *DocstoreFollowersDatabase) GetFollower(ctx context.Context, account_id int64, follower_address string) (*Follower, error) { +func (db *DocstoreFollowersDatabase) GetFollower(ctx context.Context, account_id int64, follower_address string) (*activitypub.Follower, error) { q := db.collection.Query() q = q.Where("AccountId", "=", account_id) @@ -89,7 +98,7 @@ func (db *DocstoreFollowersDatabase) GetFollower(ctx context.Context, account_id for { - var f Follower + var f activitypub.Follower err := iter.Next(ctx, &f) if err == io.EOF { @@ -101,15 +110,15 @@ func (db *DocstoreFollowersDatabase) GetFollower(ctx context.Context, account_id } } - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } -func (db *DocstoreFollowersDatabase) AddFollower(ctx context.Context, f *Follower) error { +func (db *DocstoreFollowersDatabase) AddFollower(ctx context.Context, f *activitypub.Follower) error { return db.collection.Put(ctx, f) } -func (db *DocstoreFollowersDatabase) RemoveFollower(ctx context.Context, f *Follower) error { +func (db *DocstoreFollowersDatabase) RemoveFollower(ctx context.Context, f *activitypub.Follower) error { return db.collection.Delete(ctx, f) } @@ -133,7 +142,7 @@ func (db *DocstoreFollowersDatabase) getFollowerIdsWithCallback(ctx context.Cont for { - var f Follower + var f activitypub.Follower err := iter.Next(ctx, &f) if err == io.EOF { @@ -159,7 +168,7 @@ func (db *DocstoreFollowersDatabase) getFollowerAddressesWithCallback(ctx contex for { - var f Follower + var f activitypub.Follower err := iter.Next(ctx, &f) if err == io.EOF { diff --git a/vendor/github.com/sfomuseum/go-activitypub/followers_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/followers_database_sql.go similarity index 93% rename from vendor/github.com/sfomuseum/go-activitypub/followers_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/followers_database_sql.go index c90c646..d7188ce 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/followers_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/followers_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,11 @@ type SQLFollowersDatabase struct { func init() { ctx := context.Background() - RegisterFollowersDatabase(ctx, "sql", NewSQLFollowersDatabase) + err := RegisterFollowersDatabase(ctx, "sql", NewSQLFollowersDatabase) + + if err != nil { + panic(err) + } } func NewSQLFollowersDatabase(ctx context.Context, uri string) (FollowersDatabase, error) { @@ -135,7 +140,7 @@ func (db *SQLFollowersDatabase) HasFollower(ctx context.Context, account_id int6 return false, nil } -func (db *SQLFollowersDatabase) GetFollower(ctx context.Context, account_id int64, follower_address string) (*Follower, error) { +func (db *SQLFollowersDatabase) GetFollower(ctx context.Context, account_id int64, follower_address string) (*activitypub.Follower, error) { q := fmt.Sprintf("SELECT id, created FROM %s WHERE account_id = ? AND follower_address = ?", SQL_FOLLOWERS_TABLE_NAME) @@ -148,12 +153,12 @@ func (db *SQLFollowersDatabase) GetFollower(ctx context.Context, account_id int6 switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, fmt.Errorf("Failed to query database, %w", err) default: - f := &Follower{ + f := &activitypub.Follower{ Id: id, AccountId: account_id, FollowerAddress: follower_address, @@ -165,7 +170,7 @@ func (db *SQLFollowersDatabase) GetFollower(ctx context.Context, account_id int6 } -func (db *SQLFollowersDatabase) AddFollower(ctx context.Context, f *Follower) error { +func (db *SQLFollowersDatabase) AddFollower(ctx context.Context, f *activitypub.Follower) error { q := fmt.Sprintf("INSERT INTO %s (id, account_id, follower_address, created) VALUES (?, ?, ?, ?)", SQL_FOLLOWERS_TABLE_NAME) @@ -178,7 +183,7 @@ func (db *SQLFollowersDatabase) AddFollower(ctx context.Context, f *Follower) er return nil } -func (db *SQLFollowersDatabase) RemoveFollower(ctx context.Context, f *Follower) error { +func (db *SQLFollowersDatabase) RemoveFollower(ctx context.Context, f *activitypub.Follower) error { q := fmt.Sprintf("DELETE FROM %s WHERE id = ?", SQL_FOLLOWERS_TABLE_NAME) diff --git a/vendor/github.com/sfomuseum/go-activitypub/following_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/following_database.go similarity index 91% rename from vendor/github.com/sfomuseum/go-activitypub/following_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/following_database.go index f560ab6..be8b6f3 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/following_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/following_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetFollowingIdsCallbackFunc func(context.Context, int64) error @@ -16,9 +17,9 @@ type GetFollowingCallbackFunc func(context.Context, string) error type FollowingDatabase interface { GetFollowingIdsForDateRange(context.Context, int64, int64, GetFollowingIdsCallbackFunc) error GetFollowingForAccount(context.Context, int64, GetFollowingCallbackFunc) error - GetFollowing(context.Context, int64, string) (*Following, error) - AddFollowing(context.Context, *Following) error - RemoveFollowing(context.Context, *Following) error + GetFollowing(context.Context, int64, string) (*activitypub.Following, error) + AddFollowing(context.Context, *activitypub.Following) error + RemoveFollowing(context.Context, *activitypub.Following) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/following_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/following_database_docstore.go similarity index 81% rename from vendor/github.com/sfomuseum/go-activitypub/following_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/following_database_docstore.go index 138cf27..9202db2 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/following_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/following_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( _ "log/slog" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -20,10 +21,18 @@ func init() { ctx := context.Background() - RegisterFollowingDatabase(ctx, "awsdynamodb", NewDocstoreFollowingDatabase) + err := RegisterFollowingDatabase(ctx, "awsdynamodb", NewDocstoreFollowingDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterFollowingDatabase(ctx, scheme, NewDocstoreFollowingDatabase) + err := RegisterFollowingDatabase(ctx, scheme, NewDocstoreFollowingDatabase) + + if err != nil { + panic(err) + } } } @@ -54,7 +63,7 @@ func (db *DocstoreFollowingDatabase) GetFollowingIdsForDateRange(ctx context.Con for { - var f Following + var f activitypub.Following err := iter.Next(ctx, &f) if err == io.EOF { @@ -73,7 +82,7 @@ func (db *DocstoreFollowingDatabase) GetFollowingIdsForDateRange(ctx context.Con return nil } -func (db *DocstoreFollowingDatabase) GetFollowing(ctx context.Context, account_id int64, following_address string) (*Following, error) { +func (db *DocstoreFollowingDatabase) GetFollowing(ctx context.Context, account_id int64, following_address string) (*activitypub.Following, error) { q := db.collection.Query() q = q.Where("AccountId", "=", account_id) @@ -84,7 +93,7 @@ func (db *DocstoreFollowingDatabase) GetFollowing(ctx context.Context, account_i for { - var f Following + var f activitypub.Following err := iter.Next(ctx, &f) if err == io.EOF { @@ -96,15 +105,15 @@ func (db *DocstoreFollowingDatabase) GetFollowing(ctx context.Context, account_i } } - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } -func (db *DocstoreFollowingDatabase) AddFollowing(ctx context.Context, f *Following) error { +func (db *DocstoreFollowingDatabase) AddFollowing(ctx context.Context, f *activitypub.Following) error { return db.collection.Put(ctx, f) } -func (db *DocstoreFollowingDatabase) RemoveFollowing(ctx context.Context, f *Following) error { +func (db *DocstoreFollowingDatabase) RemoveFollowing(ctx context.Context, f *activitypub.Following) error { return db.collection.Delete(ctx, f) } @@ -119,7 +128,7 @@ func (db *DocstoreFollowingDatabase) GetFollowingForAccount(ctx context.Context, for { - var f Following + var f activitypub.Following err := iter.Next(ctx, &f) if err == io.EOF { diff --git a/vendor/github.com/sfomuseum/go-activitypub/following_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/following_database_sql.go similarity index 92% rename from vendor/github.com/sfomuseum/go-activitypub/following_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/following_database_sql.go index 53e3ff4..aead4e8 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/following_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/following_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,11 @@ type SQLFollowingDatabase struct { func init() { ctx := context.Background() - RegisterFollowingDatabase(ctx, "sql", NewSQLFollowingDatabase) + err := RegisterFollowingDatabase(ctx, "sql", NewSQLFollowingDatabase) + + if err != nil { + panic(err) + } } func NewSQLFollowingDatabase(ctx context.Context, uri string) (FollowingDatabase, error) { @@ -109,7 +114,7 @@ func (db *SQLFollowingDatabase) GetFollowingIdsForDateRange(ctx context.Context, return nil } -func (db *SQLFollowingDatabase) GetFollowing(ctx context.Context, account_id int64, following_address string) (*Following, error) { +func (db *SQLFollowingDatabase) GetFollowing(ctx context.Context, account_id int64, following_address string) (*activitypub.Following, error) { q := fmt.Sprintf("SELECT id, created FROM %s WHERE account_id = ? AND following_address = ?", SQL_FOLLOWING_TABLE_NAME) @@ -122,12 +127,12 @@ func (db *SQLFollowingDatabase) GetFollowing(ctx context.Context, account_id int switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, fmt.Errorf("Failed to query database, %w", err) default: - f := &Following{ + f := &activitypub.Following{ Id: id, AccountId: account_id, FollowingAddress: following_address, @@ -139,7 +144,7 @@ func (db *SQLFollowingDatabase) GetFollowing(ctx context.Context, account_id int } -func (db *SQLFollowingDatabase) AddFollowing(ctx context.Context, f *Following) error { +func (db *SQLFollowingDatabase) AddFollowing(ctx context.Context, f *activitypub.Following) error { q := fmt.Sprintf("INSERT INTO %s (id, account_id, following_address, created) VALUES (?, ?, ?, ?)", SQL_FOLLOWING_TABLE_NAME) @@ -152,7 +157,7 @@ func (db *SQLFollowingDatabase) AddFollowing(ctx context.Context, f *Following) return nil } -func (db *SQLFollowingDatabase) RemoveFollowing(ctx context.Context, f *Following) error { +func (db *SQLFollowingDatabase) RemoveFollowing(ctx context.Context, f *activitypub.Following) error { q := fmt.Sprintf("DELETE FROM %s WHERE id = ?", SQL_FOLLOWING_TABLE_NAME) diff --git a/vendor/github.com/sfomuseum/go-activitypub/likes_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/likes_database.go similarity index 86% rename from vendor/github.com/sfomuseum/go-activitypub/likes_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/likes_database.go index c426b9a..0c0be43 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/likes_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/likes_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,18 +8,19 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetLikeIdsCallbackFunc func(context.Context, int64) error -type GetLikesCallbackFunc func(context.Context, *Like) error +type GetLikesCallbackFunc func(context.Context, *activitypub.Like) error type LikesDatabase interface { GetLikeIdsForDateRange(context.Context, int64, int64, GetLikeIdsCallbackFunc) error GetLikesForPost(context.Context, int64, GetLikesCallbackFunc) error - GetLikeWithPostIdAndActor(context.Context, int64, string) (*Like, error) - GetLikeWithId(context.Context, int64) (*Like, error) - AddLike(context.Context, *Like) error - RemoveLike(context.Context, *Like) error + GetLikeWithPostIdAndActor(context.Context, int64, string) (*activitypub.Like, error) + GetLikeWithId(context.Context, int64) (*activitypub.Like, error) + AddLike(context.Context, *activitypub.Like) error + RemoveLike(context.Context, *activitypub.Like) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/likes_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/likes_database_docstore.go similarity index 81% rename from vendor/github.com/sfomuseum/go-activitypub/likes_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/likes_database_docstore.go index 57a5fd3..d37a938 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/likes_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/likes_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterLikesDatabase(ctx, "awsdynamodb", NewDocstoreLikesDatabase) + err := RegisterLikesDatabase(ctx, "awsdynamodb", NewDocstoreLikesDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterLikesDatabase(ctx, scheme, NewDocstoreLikesDatabase) + err := RegisterLikesDatabase(ctx, scheme, NewDocstoreLikesDatabase) + + if err != nil { + panic(err) + } } } @@ -51,7 +60,7 @@ func (db *DocstoreLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, sta for { - var l Like + var l activitypub.Like err := iter.Next(ctx, &l) if err == io.EOF { @@ -70,7 +79,7 @@ func (db *DocstoreLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, sta return nil } -func (db *DocstoreLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*Like, error) { +func (db *DocstoreLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*activitypub.Like, error) { q := db.collection.Query() q = q.Where("Id", "=", id) @@ -78,7 +87,7 @@ func (db *DocstoreLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (* return db.getLike(ctx, q) } -func (db *DocstoreLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*Like, error) { +func (db *DocstoreLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*activitypub.Like, error) { q := db.collection.Query() q = q.Where("PostId", "=", post_id) @@ -97,7 +106,7 @@ func (db *DocstoreLikesDatabase) GetLikesForPost(ctx context.Context, post_id in for { - var b Like + var b activitypub.Like err := iter.Next(ctx, &b) if err == io.EOF { @@ -118,16 +127,16 @@ func (db *DocstoreLikesDatabase) GetLikesForPost(ctx context.Context, post_id in } -func (db *DocstoreLikesDatabase) getLike(ctx context.Context, q *gc_docstore.Query) (*Like, error) { +func (db *DocstoreLikesDatabase) getLike(ctx context.Context, q *gc_docstore.Query) (*activitypub.Like, error) { iter := q.Get(ctx) defer iter.Stop() - var b Like + var b activitypub.Like err := iter.Next(ctx, &b) if err == io.EOF { - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } else if err != nil { return nil, fmt.Errorf("Failed to interate, %w", err) } else { @@ -136,12 +145,12 @@ func (db *DocstoreLikesDatabase) getLike(ctx context.Context, q *gc_docstore.Que } -func (db *DocstoreLikesDatabase) AddLike(ctx context.Context, like *Like) error { +func (db *DocstoreLikesDatabase) AddLike(ctx context.Context, like *activitypub.Like) error { return db.collection.Put(ctx, like) } -func (db *DocstoreLikesDatabase) RemoveLike(ctx context.Context, like *Like) error { +func (db *DocstoreLikesDatabase) RemoveLike(ctx context.Context, like *activitypub.Like) error { return db.collection.Delete(ctx, like) } diff --git a/vendor/github.com/sfomuseum/go-activitypub/likes_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/likes_database_null.go similarity index 69% rename from vendor/github.com/sfomuseum/go-activitypub/likes_database_null.go rename to vendor/github.com/sfomuseum/go-activitypub/database/likes_database_null.go index 3bc1d15..8b67970 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/likes_database_null.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/likes_database_null.go @@ -1,7 +1,9 @@ -package activitypub +package database import ( "context" + + "github.com/sfomuseum/go-activitypub" ) type NullLikesDatabase struct { @@ -10,7 +12,11 @@ type NullLikesDatabase struct { func init() { ctx := context.Background() - RegisterLikesDatabase(ctx, "null", NewNullLikesDatabase) + err := RegisterLikesDatabase(ctx, "null", NewNullLikesDatabase) + + if err != nil { + panic(err) + } } func NewNullLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error) { @@ -22,23 +28,23 @@ func (db *NullLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start i return nil } -func (db *NullLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*Like, error) { - return nil, ErrNotFound +func (db *NullLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*activitypub.Like, error) { + return nil, activitypub.ErrNotFound } -func (db *NullLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, id int64, actor string) (*Like, error) { - return nil, ErrNotFound +func (db *NullLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, id int64, actor string) (*activitypub.Like, error) { + return nil, activitypub.ErrNotFound } func (db *NullLikesDatabase) GetLikesForPost(ctx context.Context, post_id int64, cb GetLikesCallbackFunc) error { return nil } -func (db *NullLikesDatabase) AddLike(ctx context.Context, like *Like) error { +func (db *NullLikesDatabase) AddLike(ctx context.Context, like *activitypub.Like) error { return nil } -func (db *NullLikesDatabase) RemoveLike(ctx context.Context, like *Like) error { +func (db *NullLikesDatabase) RemoveLike(ctx context.Context, like *activitypub.Like) error { return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/likes_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/likes_database_sql.go similarity index 89% rename from vendor/github.com/sfomuseum/go-activitypub/likes_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/likes_database_sql.go index fd7d757..126f7b7 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/likes_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/likes_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -21,7 +22,11 @@ type SQLLikesDatabase struct { func init() { ctx := context.Background() - RegisterLikesDatabase(ctx, "sql", NewSQLLikesDatabase) + err := RegisterLikesDatabase(ctx, "sql", NewSQLLikesDatabase) + + if err != nil { + panic(err) + } } func NewSQLLikesDatabase(ctx context.Context, uri string) (LikesDatabase, error) { @@ -110,13 +115,13 @@ func (db *SQLLikesDatabase) GetLikeIdsForDateRange(ctx context.Context, start in return nil } -func (db *SQLLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*Like, error) { +func (db *SQLLikesDatabase) GetLikeWithId(ctx context.Context, id int64) (*activitypub.Like, error) { where := "id = ?" return db.getLike(ctx, where, id) } -func (db *SQLLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*Like, error) { +func (db *SQLLikesDatabase) GetLikeWithPostIdAndActor(ctx context.Context, post_id int64, actor string) (*activitypub.Like, error) { where := "post_id = ? AND actor = ?" return db.getLike(ctx, where, post_id, actor) @@ -145,7 +150,7 @@ func (db *SQLLikesDatabase) GetLikesForPostIdAndActor(ctx context.Context, post_ return err default: - b := &Like{ + b := &activitypub.Like{ Id: id, AccountId: account_id, PostId: post_id, @@ -191,7 +196,7 @@ func (db *SQLLikesDatabase) GetLikesForPostIdAndActor(ctx context.Context, post_ } -func (db *SQLLikesDatabase) AddLike(ctx context.Context, b *Like) error { +func (db *SQLLikesDatabase) AddLike(ctx context.Context, b *activitypub.Like) error { q := fmt.Sprintf("INSERT INTO %s (id, account_id, psot_id, actor, created) VALUES (?, ?, ?, ?, ?)", SQL_LIKES_TABLE_NAME) @@ -204,7 +209,7 @@ func (db *SQLLikesDatabase) AddLike(ctx context.Context, b *Like) error { return nil } -func (db *SQLLikesDatabase) RemoveLike(ctx context.Context, b *Like) error { +func (db *SQLLikesDatabase) RemoveLike(ctx context.Context, b *activitypub.Like) error { q := fmt.Sprintf("DELETE FROM %s WHERE id= ?", SQL_LIKES_TABLE_NAME) @@ -221,7 +226,7 @@ func (db *SQLLikesDatabase) Close(ctx context.Context) error { return db.database.Close() } -func (db *SQLLikesDatabase) getLike(ctx context.Context, where string, args ...interface{}) (*Like, error) { +func (db *SQLLikesDatabase) getLike(ctx context.Context, where string, args ...interface{}) (*activitypub.Like, error) { var id int64 var account_id int64 @@ -237,14 +242,14 @@ func (db *SQLLikesDatabase) getLike(ctx context.Context, where string, args ...i switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, err default: // } - b := &Like{ + b := &activitypub.Like{ Id: id, AccountId: account_id, PostId: post_id, diff --git a/vendor/github.com/sfomuseum/go-activitypub/messages_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/messages_database.go similarity index 86% rename from vendor/github.com/sfomuseum/go-activitypub/messages_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/messages_database.go index f403b53..79d86fc 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/messages_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/messages_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,20 +8,21 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetMessageIdsCallbackFunc func(context.Context, int64) error -type GetMessagesCallbackFunc func(context.Context, *Message) error +type GetMessagesCallbackFunc func(context.Context, *activitypub.Message) error type MessagesDatabase interface { GetMessageIdsForDateRange(context.Context, int64, int64, GetMessageIdsCallbackFunc) error GetMessagesForAccount(context.Context, int64, GetMessagesCallbackFunc) error GetMessagesForAccountAndAuthor(context.Context, int64, string, GetMessagesCallbackFunc) error - GetMessageWithId(context.Context, int64) (*Message, error) - GetMessageWithAccountAndNoteIds(context.Context, int64, int64) (*Message, error) - AddMessage(context.Context, *Message) error - UpdateMessage(context.Context, *Message) error - RemoveMessage(context.Context, *Message) error + GetMessageWithId(context.Context, int64) (*activitypub.Message, error) + GetMessageWithAccountAndNoteIds(context.Context, int64, int64) (*activitypub.Message, error) + AddMessage(context.Context, *activitypub.Message) error + UpdateMessage(context.Context, *activitypub.Message) error + RemoveMessage(context.Context, *activitypub.Message) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/messages_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/messages_database_docstore.go similarity index 82% rename from vendor/github.com/sfomuseum/go-activitypub/messages_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/messages_database_docstore.go index da2a5dc..29b8f39 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/messages_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/messages_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterMessagesDatabase(ctx, "awsdynamodb", NewDocstoreMessagesDatabase) + err := RegisterMessagesDatabase(ctx, "awsdynamodb", NewDocstoreMessagesDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterMessagesDatabase(ctx, scheme, NewDocstoreMessagesDatabase) + err := RegisterMessagesDatabase(ctx, scheme, NewDocstoreMessagesDatabase) + + if err != nil { + panic(err) + } } } @@ -51,7 +60,7 @@ func (db *DocstoreMessagesDatabase) GetMessageIdsForDateRange(ctx context.Contex for { - var m Message + var m activitypub.Message err := iter.Next(ctx, &m) if err == io.EOF { @@ -70,7 +79,7 @@ func (db *DocstoreMessagesDatabase) GetMessageIdsForDateRange(ctx context.Contex return nil } -func (db *DocstoreMessagesDatabase) GetMessageWithId(ctx context.Context, message_id int64) (*Message, error) { +func (db *DocstoreMessagesDatabase) GetMessageWithId(ctx context.Context, message_id int64) (*activitypub.Message, error) { q := db.collection.Query() q = q.Where("Id", "=", message_id) @@ -78,7 +87,7 @@ func (db *DocstoreMessagesDatabase) GetMessageWithId(ctx context.Context, messag return db.getMessage(ctx, q) } -func (db *DocstoreMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context.Context, account_id int64, note_id int64) (*Message, error) { +func (db *DocstoreMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context.Context, account_id int64, note_id int64) (*activitypub.Message, error) { q := db.collection.Query() q = q.Where("AccountId", "=", account_id) @@ -87,14 +96,14 @@ func (db *DocstoreMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context. return db.getMessage(ctx, q) } -func (db *DocstoreMessagesDatabase) getMessage(ctx context.Context, q *gc_docstore.Query) (*Message, error) { +func (db *DocstoreMessagesDatabase) getMessage(ctx context.Context, q *gc_docstore.Query) (*activitypub.Message, error) { iter := q.Get(ctx) defer iter.Stop() for { - var m Message + var m activitypub.Message err := iter.Next(ctx, &m) if err == io.EOF { @@ -106,20 +115,20 @@ func (db *DocstoreMessagesDatabase) getMessage(ctx context.Context, q *gc_docsto } } - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } -func (db *DocstoreMessagesDatabase) AddMessage(ctx context.Context, message *Message) error { +func (db *DocstoreMessagesDatabase) AddMessage(ctx context.Context, message *activitypub.Message) error { return db.collection.Put(ctx, message) } -func (db *DocstoreMessagesDatabase) UpdateMessage(ctx context.Context, message *Message) error { +func (db *DocstoreMessagesDatabase) UpdateMessage(ctx context.Context, message *activitypub.Message) error { return db.collection.Replace(ctx, message) } -func (db *DocstoreMessagesDatabase) RemoveMessage(ctx context.Context, message *Message) error { +func (db *DocstoreMessagesDatabase) RemoveMessage(ctx context.Context, message *activitypub.Message) error { return db.collection.Delete(ctx, message) } @@ -148,7 +157,7 @@ func (db *DocstoreMessagesDatabase) getMessagesWithCallback(ctx context.Context, for { - var m Message + var m activitypub.Message err := iter.Next(ctx, &m) if err == io.EOF { diff --git a/vendor/github.com/sfomuseum/go-activitypub/messages_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/messages_database_sql.go similarity index 91% rename from vendor/github.com/sfomuseum/go-activitypub/messages_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/messages_database_sql.go index d52befa..c4cc2c2 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/messages_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/messages_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,11 @@ type SQLMessagesDatabase struct { func init() { ctx := context.Background() - RegisterMessagesDatabase(ctx, "sql", NewSQLMessagesDatabase) + err := RegisterMessagesDatabase(ctx, "sql", NewSQLMessagesDatabase) + + if err != nil { + panic(err) + } } func NewSQLMessagesDatabase(ctx context.Context, uri string) (MessagesDatabase, error) { @@ -109,19 +114,19 @@ func (db *SQLMessagesDatabase) GetMessageIdsForDateRange(ctx context.Context, st return nil } -func (db *SQLMessagesDatabase) GetMessageWithId(ctx context.Context, message_id int64) (*Message, error) { +func (db *SQLMessagesDatabase) GetMessageWithId(ctx context.Context, message_id int64) (*activitypub.Message, error) { where := "id = ?" return db.getMessage(ctx, where, message_id) } -func (db *SQLMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context.Context, account_id int64, note_id int64) (*Message, error) { +func (db *SQLMessagesDatabase) GetMessageWithAccountAndNoteIds(ctx context.Context, account_id int64, note_id int64) (*activitypub.Message, error) { where := "account_id = ? AND note_id = ?" return db.getMessage(ctx, where, account_id, note_id) } -func (db *SQLMessagesDatabase) getMessage(ctx context.Context, where string, args ...interface{}) (*Message, error) { +func (db *SQLMessagesDatabase) getMessage(ctx context.Context, where string, args ...interface{}) (*activitypub.Message, error) { q := fmt.Sprintf("SELECT id, note_id, author_address, account_id, created, lastmodified FROM %s WHERE %s", SQL_MESSAGES_TABLE_NAME, where) row := db.database.QueryRowContext(ctx, q, args...) @@ -137,12 +142,12 @@ func (db *SQLMessagesDatabase) getMessage(ctx context.Context, where string, arg switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, fmt.Errorf("Failed to query database, %w", err) default: - n := &Message{ + n := &activitypub.Message{ Id: id, NoteId: note_id, AuthorAddress: author_address, @@ -156,7 +161,7 @@ func (db *SQLMessagesDatabase) getMessage(ctx context.Context, where string, arg } -func (db *SQLMessagesDatabase) AddMessage(ctx context.Context, message *Message) error { +func (db *SQLMessagesDatabase) AddMessage(ctx context.Context, message *activitypub.Message) error { q := fmt.Sprintf("INSERT INTO %s (id, note_id, author_address, account_id, created, lastmodified) VALUES (?, ?, ?, ?, ?, ?)", SQL_MESSAGES_TABLE_NAME) @@ -169,7 +174,7 @@ func (db *SQLMessagesDatabase) AddMessage(ctx context.Context, message *Message) return nil } -func (db *SQLMessagesDatabase) UpdateMessage(ctx context.Context, message *Message) error { +func (db *SQLMessagesDatabase) UpdateMessage(ctx context.Context, message *activitypub.Message) error { q := fmt.Sprintf("UPDATE %s SET note_id=?, author_address=?, account_id=?, created=?, lastmodified=? WHERE id = ?", SQL_MESSAGES_TABLE_NAME) @@ -182,7 +187,7 @@ func (db *SQLMessagesDatabase) UpdateMessage(ctx context.Context, message *Messa return nil } -func (db *SQLMessagesDatabase) RemoveMessage(ctx context.Context, message *Message) error { +func (db *SQLMessagesDatabase) RemoveMessage(ctx context.Context, message *activitypub.Message) error { q := fmt.Sprintf("DELETE FROM %s WHERE id = ?", SQL_MESSAGES_TABLE_NAME) @@ -237,7 +242,7 @@ func (db *SQLMessagesDatabase) getMessagesWithCallback(ctx context.Context, wher return fmt.Errorf("Failed to query database, %w", err) } - m := &Message{ + m := &activitypub.Message{ Id: id, NoteId: note_id, AuthorAddress: author_address, diff --git a/vendor/github.com/sfomuseum/go-activitypub/notes_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/notes_database.go similarity index 86% rename from vendor/github.com/sfomuseum/go-activitypub/notes_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/notes_database.go index 309b096..c171b4f 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/notes_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/notes_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,18 +8,19 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetNoteIdsCallbackFunc func(context.Context, int64) error -type GetNotesCallbackFunc func(context.Context, *Note) error +type GetNotesCallbackFunc func(context.Context, *activitypub.Note) error type NotesDatabase interface { GetNoteIdsForDateRange(context.Context, int64, int64, GetNoteIdsCallbackFunc) error - GetNoteWithId(context.Context, int64) (*Note, error) - GetNoteWithUUIDAndAuthorAddress(context.Context, string, string) (*Note, error) - AddNote(context.Context, *Note) error - UpdateNote(context.Context, *Note) error - RemoveNote(context.Context, *Note) error + GetNoteWithId(context.Context, int64) (*activitypub.Note, error) + GetNoteWithUUIDAndAuthorAddress(context.Context, string, string) (*activitypub.Note, error) + AddNote(context.Context, *activitypub.Note) error + UpdateNote(context.Context, *activitypub.Note) error + RemoveNote(context.Context, *activitypub.Note) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/notes_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/notes_database_docstore.go similarity index 80% rename from vendor/github.com/sfomuseum/go-activitypub/notes_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/notes_database_docstore.go index 8492782..43bc1a0 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/notes_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/notes_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterNotesDatabase(ctx, "awsdynamodb", NewDocstoreNotesDatabase) + err := RegisterNotesDatabase(ctx, "awsdynamodb", NewDocstoreNotesDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterNotesDatabase(ctx, scheme, NewDocstoreNotesDatabase) + err := RegisterNotesDatabase(ctx, scheme, NewDocstoreNotesDatabase) + + if err != nil { + panic(err) + } } } @@ -51,7 +60,7 @@ func (db *DocstoreNotesDatabase) GetNoteIdsForDateRange(ctx context.Context, sta for { - var n Note + var n activitypub.Note err := iter.Next(ctx, &n) if err == io.EOF { @@ -70,7 +79,7 @@ func (db *DocstoreNotesDatabase) GetNoteIdsForDateRange(ctx context.Context, sta return nil } -func (db *DocstoreNotesDatabase) GetNoteWithId(ctx context.Context, note_id int64) (*Note, error) { +func (db *DocstoreNotesDatabase) GetNoteWithId(ctx context.Context, note_id int64) (*activitypub.Note, error) { q := db.collection.Query() q = q.Where("Id", "=", note_id) @@ -78,7 +87,7 @@ func (db *DocstoreNotesDatabase) GetNoteWithId(ctx context.Context, note_id int6 return db.getNote(ctx, q) } -func (db *DocstoreNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, note_uuid string, author_address string) (*Note, error) { +func (db *DocstoreNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, note_uuid string, author_address string) (*activitypub.Note, error) { q := db.collection.Query() q = q.Where("UUID", "=", note_uuid) @@ -87,14 +96,14 @@ func (db *DocstoreNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Con return db.getNote(ctx, q) } -func (db *DocstoreNotesDatabase) getNote(ctx context.Context, q *gc_docstore.Query) (*Note, error) { +func (db *DocstoreNotesDatabase) getNote(ctx context.Context, q *gc_docstore.Query) (*activitypub.Note, error) { iter := q.Get(ctx) defer iter.Stop() for { - var n Note + var n activitypub.Note err := iter.Next(ctx, &n) if err == io.EOF { @@ -106,20 +115,20 @@ func (db *DocstoreNotesDatabase) getNote(ctx context.Context, q *gc_docstore.Que } } - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } -func (db *DocstoreNotesDatabase) AddNote(ctx context.Context, note *Note) error { +func (db *DocstoreNotesDatabase) AddNote(ctx context.Context, note *activitypub.Note) error { return db.collection.Put(ctx, note) } -func (db *DocstoreNotesDatabase) UpdateNote(ctx context.Context, note *Note) error { +func (db *DocstoreNotesDatabase) UpdateNote(ctx context.Context, note *activitypub.Note) error { return db.collection.Replace(ctx, note) } -func (db *DocstoreNotesDatabase) RemoveNote(ctx context.Context, note *Note) error { +func (db *DocstoreNotesDatabase) RemoveNote(ctx context.Context, note *activitypub.Note) error { return db.collection.Delete(ctx, note) } diff --git a/vendor/github.com/sfomuseum/go-activitypub/notes_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/notes_database_sql.go similarity index 88% rename from vendor/github.com/sfomuseum/go-activitypub/notes_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/notes_database_sql.go index 08f5a29..52f86eb 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/notes_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/notes_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,11 @@ type SQLNotesDatabase struct { func init() { ctx := context.Background() - RegisterNotesDatabase(ctx, "sql", NewSQLNotesDatabase) + err := RegisterNotesDatabase(ctx, "sql", NewSQLNotesDatabase) + + if err != nil { + panic(err) + } } func NewSQLNotesDatabase(ctx context.Context, uri string) (NotesDatabase, error) { @@ -109,12 +114,12 @@ func (db *SQLNotesDatabase) GetNoteIdsForDateRange(ctx context.Context, start in return nil } -func (db *SQLNotesDatabase) GetNoteWithId(ctx context.Context, note_id int64) (*Note, error) { +func (db *SQLNotesDatabase) GetNoteWithId(ctx context.Context, note_id int64) (*activitypub.Note, error) { where := "id = ?" return db.getNote(ctx, where, note_id) } -func (db *SQLNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, uuid string, author_address string) (*Note, error) { +func (db *SQLNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, uuid string, author_address string) (*activitypub.Note, error) { // Note the order of arguments this is to account for the // notes_by_author_address index. @@ -123,7 +128,7 @@ func (db *SQLNotesDatabase) GetNoteWithUUIDAndAuthorAddress(ctx context.Context, return db.getNote(ctx, where, author_address, uuid) } -func (db *SQLNotesDatabase) getNote(ctx context.Context, where string, args ...interface{}) (*Note, error) { +func (db *SQLNotesDatabase) getNote(ctx context.Context, where string, args ...interface{}) (*activitypub.Note, error) { q := fmt.Sprintf("SELECT id, uuid, author_address, body, created, lastmodified FROM %s WHERE %s", SQL_NOTES_TABLE_NAME, where) row := db.database.QueryRowContext(ctx, q, args...) @@ -139,12 +144,12 @@ func (db *SQLNotesDatabase) getNote(ctx context.Context, where string, args ...i switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, fmt.Errorf("Failed to query database, %w", err) default: - n := &Note{ + n := &activitypub.Note{ Id: id, UUID: uuid, AuthorAddress: author_address, @@ -158,7 +163,7 @@ func (db *SQLNotesDatabase) getNote(ctx context.Context, where string, args ...i } -func (db *SQLNotesDatabase) AddNote(ctx context.Context, note *Note) error { +func (db *SQLNotesDatabase) AddNote(ctx context.Context, note *activitypub.Note) error { q := fmt.Sprintf("INSERT INTO %s (id, uuid, author_address, body, created, lastmodified) VALUES (?, ?, ?, ?, ?, ?)", SQL_NOTES_TABLE_NAME) @@ -171,7 +176,7 @@ func (db *SQLNotesDatabase) AddNote(ctx context.Context, note *Note) error { return nil } -func (db *SQLNotesDatabase) UpdateNote(ctx context.Context, note *Note) error { +func (db *SQLNotesDatabase) UpdateNote(ctx context.Context, note *activitypub.Note) error { q := fmt.Sprintf("UPDATE %s SET uuid=?, author_address=?, body=?, created=?, lastmodified=? WHERE id = ?", SQL_NOTES_TABLE_NAME) @@ -184,7 +189,7 @@ func (db *SQLNotesDatabase) UpdateNote(ctx context.Context, note *Note) error { return nil } -func (db *SQLNotesDatabase) RemoveNote(ctx context.Context, note *Note) error { +func (db *SQLNotesDatabase) RemoveNote(ctx context.Context, note *activitypub.Note) error { q := fmt.Sprintf("DELETE FROM %s WHERE id = ?", SQL_NOTES_TABLE_NAME) diff --git a/vendor/github.com/sfomuseum/go-activitypub/post_tags_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database.go similarity index 89% rename from vendor/github.com/sfomuseum/go-activitypub/post_tags_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database.go index 521c1d1..5d191ee 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/post_tags_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,19 +8,20 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetPostTagIdsCallbackFunc func(context.Context, int64) error -type GetPostTagsCallbackFunc func(context.Context, *PostTag) error +type GetPostTagsCallbackFunc func(context.Context, *activitypub.PostTag) error type PostTagsDatabase interface { GetPostTagIdsForDateRange(context.Context, int64, int64, GetPostTagIdsCallbackFunc) error GetPostTagsForName(context.Context, string, GetPostTagsCallbackFunc) error GetPostTagsForAccount(context.Context, int64, GetPostTagsCallbackFunc) error GetPostTagsForPost(context.Context, int64, GetPostTagsCallbackFunc) error - GetPostTagWithId(context.Context, int64) (*PostTag, error) - AddPostTag(context.Context, *PostTag) error - RemovePostTag(context.Context, *PostTag) error + GetPostTagWithId(context.Context, int64) (*activitypub.PostTag, error) + AddPostTag(context.Context, *activitypub.PostTag) error + RemovePostTag(context.Context, *activitypub.PostTag) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/post_tags_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_docstore.go similarity index 84% rename from vendor/github.com/sfomuseum/go-activitypub/post_tags_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_docstore.go index 7ed50d6..f1f6c9f 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/post_tags_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterPostTagsDatabase(ctx, "awsdynamodb", NewDocstorePostTagsDatabase) + err := RegisterPostTagsDatabase(ctx, "awsdynamodb", NewDocstorePostTagsDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterPostTagsDatabase(ctx, scheme, NewDocstorePostTagsDatabase) + err := RegisterPostTagsDatabase(ctx, scheme, NewDocstorePostTagsDatabase) + + if err != nil { + panic(err) + } } } @@ -50,7 +59,7 @@ func (db *DocstorePostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Contex for { - var t PostTag + var t activitypub.PostTag err := iter.Next(ctx, &t) if err == io.EOF { @@ -69,7 +78,7 @@ func (db *DocstorePostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Contex return nil } -func (db *DocstorePostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*PostTag, error) { +func (db *DocstorePostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*activitypub.PostTag, error) { q := db.collection.Query() q = q.Where("Id", "=", id) return db.getPostTag(ctx, q) @@ -93,11 +102,11 @@ func (db *DocstorePostTagsDatabase) GetPostTagsForPost(ctx context.Context, post return db.getPostTags(ctx, q, cb) } -func (db *DocstorePostTagsDatabase) AddPostTag(ctx context.Context, tag *PostTag) error { +func (db *DocstorePostTagsDatabase) AddPostTag(ctx context.Context, tag *activitypub.PostTag) error { return db.collection.Put(ctx, tag) } -func (db *DocstorePostTagsDatabase) RemovePostTag(ctx context.Context, tag *PostTag) error { +func (db *DocstorePostTagsDatabase) RemovePostTag(ctx context.Context, tag *activitypub.PostTag) error { return db.collection.Delete(ctx, tag) } @@ -105,16 +114,16 @@ func (db *DocstorePostTagsDatabase) Close(ctx context.Context) error { return db.collection.Close() } -func (db *DocstorePostTagsDatabase) getPostTag(ctx context.Context, q *gc_docstore.Query) (*PostTag, error) { +func (db *DocstorePostTagsDatabase) getPostTag(ctx context.Context, q *gc_docstore.Query) (*activitypub.PostTag, error) { iter := q.Get(ctx) defer iter.Stop() - var t PostTag + var t activitypub.PostTag err := iter.Next(ctx, &t) if err == io.EOF { - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } else if err != nil { return nil, fmt.Errorf("Failed to interate, %w", err) } else { @@ -129,7 +138,7 @@ func (db *DocstorePostTagsDatabase) getPostTags(ctx context.Context, q *gc_docst for { - var t PostTag + var t activitypub.PostTag err := iter.Next(ctx, &t) if err == io.EOF { diff --git a/vendor/github.com/sfomuseum/go-activitypub/post_tags_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_null.go similarity index 78% rename from vendor/github.com/sfomuseum/go-activitypub/post_tags_database_null.go rename to vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_null.go index 91d95d0..4a8a909 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/post_tags_database_null.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_null.go @@ -1,7 +1,9 @@ -package activitypub +package database import ( "context" + + "github.com/sfomuseum/go-activitypub" ) type NullPostTagsDatabase struct { @@ -10,7 +12,11 @@ type NullPostTagsDatabase struct { func init() { ctx := context.Background() - RegisterPostTagsDatabase(ctx, "null", NewNullPostTagsDatabase) + err := RegisterPostTagsDatabase(ctx, "null", NewNullPostTagsDatabase) + + if err != nil { + panic(err) + } } func NewNullPostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error) { @@ -22,8 +28,8 @@ func (db *NullPostTagsDatabase) GetLikeIdsForDateRange(ctx context.Context, star return nil } -func (db *NullPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*PostTag, error) { - return nil, ErrNotFound +func (db *NullPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*activitypub.PostTag, error) { + return nil, activitypub.ErrNotFound } func (db *NullPostTagsDatabase) GetPostTagsForName(ctx context.Context, name string, cb GetPostTagsCallbackFunc) error { @@ -38,11 +44,11 @@ func (db *NullPostTagsDatabase) GetPostTagsForPost(ctx context.Context, post_id return nil } -func (db *NullPostTagsDatabase) AddPostTag(ctx context.Context, boost *PostTag) error { +func (db *NullPostTagsDatabase) AddPostTag(ctx context.Context, boost *activitypub.PostTag) error { return nil } -func (db *NullPostTagsDatabase) RemovePostTag(ctx context.Context, boost *PostTag) error { +func (db *NullPostTagsDatabase) RemovePostTag(ctx context.Context, boost *activitypub.PostTag) error { return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/post_tags_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_sql.go similarity index 93% rename from vendor/github.com/sfomuseum/go-activitypub/post_tags_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_sql.go index d9ac1df..6dcc21b 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/post_tags_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/post_tags_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,11 @@ type SQLPostTagsDatabase struct { func init() { ctx := context.Background() - RegisterPostTagsDatabase(ctx, "sql", NewSQLPostTagsDatabase) + err := RegisterPostTagsDatabase(ctx, "sql", NewSQLPostTagsDatabase) + + if err != nil { + panic(err) + } } func NewSQLPostTagsDatabase(ctx context.Context, uri string) (PostTagsDatabase, error) { @@ -109,7 +114,7 @@ func (db *SQLPostTagsDatabase) GetPostTagIdsForDateRange(ctx context.Context, st return nil } -func (db *SQLPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*PostTag, error) { +func (db *SQLPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) (*activitypub.PostTag, error) { var account_id int64 var post_id int64 @@ -118,7 +123,7 @@ func (db *SQLPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) ( var pt_type string var created int64 - q := fmt.Sprintf("SELECT id, account_id, post_id, href, name, typem created FROM %s", SQL_POST_TAGS_TABLE_NAME) + q := fmt.Sprintf("SELECT id, account_id, post_id, href, name, type, created FROM %s", SQL_POST_TAGS_TABLE_NAME) row := db.database.QueryRowContext(ctx, q, id) @@ -126,12 +131,12 @@ func (db *SQLPostTagsDatabase) GetPostTagWithId(ctx context.Context, id int64) ( switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, err default: - t := &PostTag{ + t := &activitypub.PostTag{ Id: id, AccountId: account_id, PostId: post_id, @@ -178,7 +183,7 @@ func (db *SQLPostTagsDatabase) GetPostTagsForPost(ctx context.Context, post_id i return db.getPostTagsWithCallback(ctx, where, args, cb) } -func (db *SQLPostTagsDatabase) AddPostTag(ctx context.Context, post_tag *PostTag) error { +func (db *SQLPostTagsDatabase) AddPostTag(ctx context.Context, post_tag *activitypub.PostTag) error { q := fmt.Sprintf("INSERT INTO %s (id, account_id, post_id, href, name, type, created) VALUES (?, ?, ?, ?, ?, ?, ?)", SQL_POST_TAGS_TABLE_NAME) @@ -191,7 +196,7 @@ func (db *SQLPostTagsDatabase) AddPostTag(ctx context.Context, post_tag *PostTag return nil } -func (db *SQLPostTagsDatabase) RemovePostTag(ctx context.Context, post_tag *PostTag) error { +func (db *SQLPostTagsDatabase) RemovePostTag(ctx context.Context, post_tag *activitypub.PostTag) error { q := fmt.Sprintf("DELETE FROM %s WHERE id = ?", SQL_POST_TAGS_TABLE_NAME) @@ -230,7 +235,7 @@ func (db *SQLPostTagsDatabase) getPostTagsWithCallback(ctx context.Context, wher return fmt.Errorf("Failed to query database, %w", err) } - t := &PostTag{ + t := &activitypub.PostTag{ Id: id, AccountId: account_id, PostId: post_id, diff --git a/vendor/github.com/sfomuseum/go-activitypub/posts_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/posts_database.go similarity index 89% rename from vendor/github.com/sfomuseum/go-activitypub/posts_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/posts_database.go index 0893013..3a55550 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/posts_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/posts_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,16 +8,17 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) type GetPostIdsCallbackFunc func(context.Context, int64) error type PostsDatabase interface { GetPostIdsForDateRange(context.Context, int64, int64, GetPostIdsCallbackFunc) error - GetPostWithId(context.Context, int64) (*Post, error) - AddPost(context.Context, *Post) error - RemovePost(context.Context, *Post) error - UpdatePost(context.Context, *Post) error + GetPostWithId(context.Context, int64) (*activitypub.Post, error) + AddPost(context.Context, *activitypub.Post) error + RemovePost(context.Context, *activitypub.Post) error + UpdatePost(context.Context, *activitypub.Post) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/posts_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/posts_database_docstore.go similarity index 75% rename from vendor/github.com/sfomuseum/go-activitypub/posts_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/posts_database_docstore.go index f40a119..1a3cc8f 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/posts_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/posts_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -18,10 +19,18 @@ func init() { ctx := context.Background() - RegisterPostsDatabase(ctx, "awsdynamodb", NewDocstorePostsDatabase) + err := RegisterPostsDatabase(ctx, "awsdynamodb", NewDocstorePostsDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterPostsDatabase(ctx, scheme, NewDocstorePostsDatabase) + err := RegisterPostsDatabase(ctx, scheme, NewDocstorePostsDatabase) + + if err != nil { + panic(err) + } } } @@ -51,7 +60,7 @@ func (db *DocstorePostsDatabase) GetPostIdsForDateRange(ctx context.Context, sta for { - var p Post + var p activitypub.Post err := iter.Next(ctx, &p) if err == io.EOF { @@ -70,12 +79,15 @@ func (db *DocstorePostsDatabase) GetPostIdsForDateRange(ctx context.Context, sta return nil } -func (db *DocstorePostsDatabase) AddPost(ctx context.Context, p *Post) error { - +func (db *DocstorePostsDatabase) AddPost(ctx context.Context, p *activitypub.Post) error { return db.collection.Put(ctx, p) } -func (db *DocstorePostsDatabase) GetPostWithId(ctx context.Context, id int64) (*Post, error) { +func (db *DocstorePostsDatabase) UpdatePost(ctx context.Context, p *activitypub.Post) error { + return db.collection.Replace(ctx, p) +} + +func (db *DocstorePostsDatabase) GetPostWithId(ctx context.Context, id int64) (*activitypub.Post, error) { q := db.collection.Query() q = q.Where("Id", "=", id) @@ -83,16 +95,16 @@ func (db *DocstorePostsDatabase) GetPostWithId(ctx context.Context, id int64) (* return db.getPost(ctx, q) } -func (db *DocstorePostsDatabase) getPost(ctx context.Context, q *gc_docstore.Query) (*Post, error) { +func (db *DocstorePostsDatabase) getPost(ctx context.Context, q *gc_docstore.Query) (*activitypub.Post, error) { iter := q.Get(ctx) defer iter.Stop() - var p Post + var p activitypub.Post err := iter.Next(ctx, &p) if err == io.EOF { - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } else if err != nil { return nil, fmt.Errorf("Failed to interate, %w", err) } else { diff --git a/vendor/github.com/sfomuseum/go-activitypub/posts_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/posts_database_sql.go similarity index 89% rename from vendor/github.com/sfomuseum/go-activitypub/posts_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/posts_database_sql.go index 2af7df2..19e46fe 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/posts_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/posts_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,6 +8,7 @@ import ( pg_sql "github.com/aaronland/go-pagination-sql" "github.com/aaronland/go-pagination/countable" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -20,7 +21,11 @@ type SQLPostsDatabase struct { func init() { ctx := context.Background() - RegisterPostsDatabase(ctx, "sql", NewSQLPostsDatabase) + err := RegisterPostsDatabase(ctx, "sql", NewSQLPostsDatabase) + + if err != nil { + panic(err) + } } func NewSQLPostsDatabase(ctx context.Context, uri string) (PostsDatabase, error) { @@ -109,7 +114,7 @@ func (db *SQLPostsDatabase) GetPostIdsForDateRange(ctx context.Context, start in return nil } -func (db *SQLPostsDatabase) AddPost(ctx context.Context, p *Post) error { +func (db *SQLPostsDatabase) AddPost(ctx context.Context, p *activitypub.Post) error { q := fmt.Sprintf("INSERT INTO %s (id, account_id, body, in_reply_to, created, lastmodified) VALUES (?, ?, ?, ?, ?, ?)", SQL_POSTS_TABLE_NAME) @@ -122,12 +127,12 @@ func (db *SQLPostsDatabase) AddPost(ctx context.Context, p *Post) error { return nil } -func (db *SQLPostsDatabase) GetPostWithId(ctx context.Context, id int64) (*Post, error) { +func (db *SQLPostsDatabase) GetPostWithId(ctx context.Context, id int64) (*activitypub.Post, error) { where := "id = ?" return db.getPost(ctx, where, id) } -func (db *SQLPostsDatabase) getPost(ctx context.Context, where string, args ...interface{}) (*Post, error) { +func (db *SQLPostsDatabase) getPost(ctx context.Context, where string, args ...interface{}) (*activitypub.Post, error) { var id int64 var account_id int64 @@ -144,14 +149,14 @@ func (db *SQLPostsDatabase) getPost(ctx context.Context, where string, args ...i switch { case err == sql.ErrNoRows: - return nil, ErrNotFound + return nil, activitypub.ErrNotFound case err != nil: return nil, err default: // } - a := &Post{ + a := &activitypub.Post{ Id: id, AccountId: account_id, Body: body, diff --git a/vendor/github.com/sfomuseum/go-activitypub/properties_database.go b/vendor/github.com/sfomuseum/go-activitypub/database/properties_database.go similarity index 88% rename from vendor/github.com/sfomuseum/go-activitypub/properties_database.go rename to vendor/github.com/sfomuseum/go-activitypub/database/properties_database.go index a70d3db..15540b2 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/properties_database.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/properties_database.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -8,16 +8,17 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub" ) -type GetPropertiesCallbackFunc func(context.Context, *Property) error +type GetPropertiesCallbackFunc func(context.Context, *activitypub.Property) error type PropertiesDatabase interface { GetProperties(context.Context, GetPropertiesCallbackFunc) error GetPropertiesForAccount(context.Context, int64, GetPropertiesCallbackFunc) error - AddProperty(context.Context, *Property) error - UpdateProperty(context.Context, *Property) error - RemoveProperty(context.Context, *Property) error + AddProperty(context.Context, *activitypub.Property) error + UpdateProperty(context.Context, *activitypub.Property) error + RemoveProperty(context.Context, *activitypub.Property) error Close(context.Context) error } diff --git a/vendor/github.com/sfomuseum/go-activitypub/properties_database_docstore.go b/vendor/github.com/sfomuseum/go-activitypub/database/properties_database_docstore.go similarity index 79% rename from vendor/github.com/sfomuseum/go-activitypub/properties_database_docstore.go rename to vendor/github.com/sfomuseum/go-activitypub/database/properties_database_docstore.go index 387bca1..7e63c1b 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/properties_database_docstore.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/properties_database_docstore.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "io" aa_docstore "github.com/aaronland/gocloud-docstore" + "github.com/sfomuseum/go-activitypub" gc_docstore "gocloud.dev/docstore" ) @@ -17,10 +18,18 @@ type DocstorePropertiesDatabase struct { func init() { ctx := context.Background() - RegisterPropertiesDatabase(ctx, "awsdynamodb", NewDocstorePropertiesDatabase) + err := RegisterPropertiesDatabase(ctx, "awsdynamodb", NewDocstorePropertiesDatabase) + + if err != nil { + panic(err) + } for _, scheme := range gc_docstore.DefaultURLMux().CollectionSchemes() { - RegisterPropertiesDatabase(ctx, scheme, NewDocstorePropertiesDatabase) + err := RegisterPropertiesDatabase(ctx, scheme, NewDocstorePropertiesDatabase) + + if err != nil { + panic(err) + } } } @@ -48,7 +57,7 @@ func (db *DocstorePropertiesDatabase) GetProperties(ctx context.Context, cb GetP for { - var p Property + var p activitypub.Property err := iter.Next(ctx, &p) if err == io.EOF { @@ -78,7 +87,7 @@ func (db *DocstorePropertiesDatabase) GetPropertiesForAccount(ctx context.Contex for { - var p Property + var p activitypub.Property err := iter.Next(ctx, &p) if err == io.EOF { @@ -98,15 +107,15 @@ func (db *DocstorePropertiesDatabase) GetPropertiesForAccount(ctx context.Contex return nil } -func (db *DocstorePropertiesDatabase) AddProperty(ctx context.Context, property *Property) error { +func (db *DocstorePropertiesDatabase) AddProperty(ctx context.Context, property *activitypub.Property) error { return db.collection.Put(ctx, property) } -func (db *DocstorePropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error { +func (db *DocstorePropertiesDatabase) UpdateProperty(ctx context.Context, property *activitypub.Property) error { return db.collection.Replace(ctx, property) } -func (db *DocstorePropertiesDatabase) RemoveProperty(ctx context.Context, property *Property) error { +func (db *DocstorePropertiesDatabase) RemoveProperty(ctx context.Context, property *activitypub.Property) error { return db.collection.Delete(ctx, property) } @@ -114,16 +123,16 @@ func (db *DocstorePropertiesDatabase) Close(ctx context.Context) error { return db.collection.Close() } -func (db *DocstorePropertiesDatabase) getProperty(ctx context.Context, q *gc_docstore.Query) (*Property, error) { +func (db *DocstorePropertiesDatabase) getProperty(ctx context.Context, q *gc_docstore.Query) (*activitypub.Property, error) { iter := q.Get(ctx) defer iter.Stop() - var a Property + var a activitypub.Property err := iter.Next(ctx, &a) if err == io.EOF { - return nil, ErrNotFound + return nil, activitypub.ErrNotFound } else if err != nil { return nil, fmt.Errorf("Failed to interate, %w", err) } else { diff --git a/vendor/github.com/sfomuseum/go-activitypub/properties_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/database/properties_database_null.go similarity index 74% rename from vendor/github.com/sfomuseum/go-activitypub/properties_database_null.go rename to vendor/github.com/sfomuseum/go-activitypub/database/properties_database_null.go index 7157d98..c42196a 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/properties_database_null.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/properties_database_null.go @@ -1,7 +1,9 @@ -package activitypub +package database import ( "context" + + "github.com/sfomuseum/go-activitypub" ) type NullPropertiesDatabase struct { @@ -10,7 +12,11 @@ type NullPropertiesDatabase struct { func init() { ctx := context.Background() - RegisterPropertiesDatabase(ctx, "null", NewNullPropertiesDatabase) + err := RegisterPropertiesDatabase(ctx, "null", NewNullPropertiesDatabase) + + if err != nil { + panic(err) + } } func NewNullPropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error) { @@ -26,15 +32,15 @@ func (db *NullPropertiesDatabase) GetPropertiesForAccount(ctx context.Context, a return nil } -func (db *NullPropertiesDatabase) AddProperty(ctx context.Context, property *Property) error { +func (db *NullPropertiesDatabase) AddProperty(ctx context.Context, property *activitypub.Property) error { return nil } -func (db *NullPropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error { +func (db *NullPropertiesDatabase) UpdateProperty(ctx context.Context, property *activitypub.Property) error { return nil } -func (db *NullPropertiesDatabase) RemoveProperty(ctx context.Context, property *Property) error { +func (db *NullPropertiesDatabase) RemoveProperty(ctx context.Context, property *activitypub.Property) error { return nil } diff --git a/vendor/github.com/sfomuseum/go-activitypub/properties_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/database/properties_database_sql.go similarity index 74% rename from vendor/github.com/sfomuseum/go-activitypub/properties_database_sql.go rename to vendor/github.com/sfomuseum/go-activitypub/database/properties_database_sql.go index dc47a3d..4b9e8b3 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/properties_database_sql.go +++ b/vendor/github.com/sfomuseum/go-activitypub/database/properties_database_sql.go @@ -1,4 +1,4 @@ -package activitypub +package database import ( "context" @@ -6,6 +6,7 @@ import ( "fmt" "net/url" + "github.com/sfomuseum/go-activitypub" "github.com/sfomuseum/go-activitypub/sqlite" ) @@ -18,7 +19,11 @@ type SQLPropertiesDatabase struct { func init() { ctx := context.Background() - RegisterPropertiesDatabase(ctx, "sql", NewSQLPropertiesDatabase) + err := RegisterPropertiesDatabase(ctx, "sql", NewSQLPropertiesDatabase) + + if err != nil { + panic(err) + } } func NewSQLPropertiesDatabase(ctx context.Context, uri string) (PropertiesDatabase, error) { @@ -57,23 +62,23 @@ func NewSQLPropertiesDatabase(ctx context.Context, uri string) (PropertiesDataba } func (db *SQLPropertiesDatabase) GetProperties(ctx context.Context, cb GetPropertiesCallbackFunc) error { - return ErrNotImplemented + return activitypub.ErrNotImplemented } func (db *SQLPropertiesDatabase) GetPropertiesForAccount(ctx context.Context, account_id int64, cb GetPropertiesCallbackFunc) error { - return ErrNotImplemented + return activitypub.ErrNotImplemented } -func (db *SQLPropertiesDatabase) AddProperty(ctx context.Context, property *Property) error { - return ErrNotImplemented +func (db *SQLPropertiesDatabase) AddProperty(ctx context.Context, property *activitypub.Property) error { + return activitypub.ErrNotImplemented } -func (db *SQLPropertiesDatabase) UpdateProperty(ctx context.Context, property *Property) error { - return ErrNotImplemented +func (db *SQLPropertiesDatabase) UpdateProperty(ctx context.Context, property *activitypub.Property) error { + return activitypub.ErrNotImplemented } -func (db *SQLPropertiesDatabase) RemoveProperty(ctx context.Context, property *Property) error { - return ErrNotImplemented +func (db *SQLPropertiesDatabase) RemoveProperty(ctx context.Context, property *activitypub.Property) error { + return activitypub.ErrNotImplemented } func (db *SQLPropertiesDatabase) Close(ctx context.Context) error { diff --git a/vendor/github.com/sfomuseum/go-activitypub/deliver.go b/vendor/github.com/sfomuseum/go-activitypub/deliver.go deleted file mode 100644 index fb39f04..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/deliver.go +++ /dev/null @@ -1,227 +0,0 @@ -package activitypub - -import ( - "context" - "fmt" - "log/slog" - "time" - - "github.com/sfomuseum/go-activitypub/ap" - "github.com/sfomuseum/go-activitypub/id" - "github.com/sfomuseum/go-activitypub/uris" -) - -type DeliverPostOptions struct { - From *Account `json:"from"` - To string `json:"to"` - Post *Post `json:"post"` - PostTags []*PostTag `json:"post_tags"` - URIs *uris.URIs `json:"uris"` - DeliveriesDatabase DeliveriesDatabase `json:"deliveries_database,omitempty"` - MaxAttempts int `json:"max_attempts"` -} - -type DeliverPostToFollowersOptions struct { - AccountsDatabase AccountsDatabase - FollowersDatabase FollowersDatabase - PostTagsDatabase PostTagsDatabase - DeliveriesDatabase DeliveriesDatabase - DeliveryQueue DeliveryQueue - Post *Post - PostTags []*PostTag `json:"post_tags"` - MaxAttempts int `json:"max_attempts"` - URIs *uris.URIs -} - -func DeliverPostToFollowers(ctx context.Context, opts *DeliverPostToFollowersOptions) error { - - acct, err := opts.AccountsDatabase.GetAccountWithId(ctx, opts.Post.AccountId) - - if err != nil { - return fmt.Errorf("Failed to retrieve account ID for post, %w", err) - } - - followers_cb := func(ctx context.Context, follower_uri string) error { - - already_delivered := false - - deliveries_cb := func(ctx context.Context, d *Delivery) error { - - if d.Success { - already_delivered = true - } - - return nil - } - - err := opts.DeliveriesDatabase.GetDeliveriesWithPostIdAndRecipient(ctx, opts.Post.Id, follower_uri, deliveries_cb) - - if err != nil { - return fmt.Errorf("Failed to retrieve deliveries for post (%d) and recipient (%s), %w", opts.Post.Id, follower_uri, err) - } - - if already_delivered { - slog.Debug("Post already delivered", "post id", opts.Post.Id, "recipient", follower_uri) - return nil - } - - post_opts := &DeliverPostOptions{ - From: acct, - To: follower_uri, - Post: opts.Post, - PostTags: opts.PostTags, - URIs: opts.URIs, - DeliveriesDatabase: opts.DeliveriesDatabase, - MaxAttempts: opts.MaxAttempts, - } - - err = opts.DeliveryQueue.DeliverPost(ctx, post_opts) - - if err != nil { - return fmt.Errorf("Failed to deliver post to %s, %w", follower_uri, err) - } - - return nil - } - - err = opts.FollowersDatabase.GetFollowersForAccount(ctx, acct.Id, followers_cb) - - if err != nil { - return fmt.Errorf("Failed to get followers for post author, %w", err) - } - - // tags/mentions - - for _, t := range opts.PostTags { - - err := followers_cb(ctx, t.Name) // name or href? - - if err != nil { - return fmt.Errorf("Failed to deliver message to %s (%d), %w", t.Name, t.Id, err) - } - } - - return nil -} - -func DeliverPost(ctx context.Context, opts *DeliverPostOptions) error { - - logger := slog.Default() - logger = logger.With("post", opts.Post.Id) - logger = logger.With("from", opts.From.Id) - logger = logger.With("to", opts.To) - - logger.Debug("Deliver post", "max attempts", opts.MaxAttempts) - - if opts.MaxAttempts > 0 { - - count_attempts := 0 - - deliveries_cb := func(ctx context.Context, d *Delivery) error { - count_attempts += 1 - return nil - } - - err := opts.DeliveriesDatabase.GetDeliveriesWithPostIdAndRecipient(ctx, opts.Post.Id, opts.To, deliveries_cb) - - if err != nil { - logger.Error("Failed to count deliveries for post ID and recipient", "error", err) - return fmt.Errorf("Failed to count deliveries for post ID and recipient, %w", err) - } - - logger.Debug("Deliveries attempted", "count", count_attempts) - - if count_attempts >= opts.MaxAttempts { - logger.Warn("Post has met or exceed max delivery attempts threshold", "max", opts.MaxAttempts, "count", count_attempts) - return nil - } - } - - // Sort out dealing with Snowflake errors sooner... - delivery_id, _ := id.NewId() - - now := time.Now() - ts := now.Unix() - - d := &Delivery{ - Id: delivery_id, - PostId: opts.Post.Id, - AccountId: opts.From.Id, // This is still a bob@bob.com which suggests that we need to store actual inbox addresses... - Recipient: opts.To, - Created: ts, - Success: false, - } - - defer func() { - - now := time.Now() - ts := now.Unix() - - d.Completed = ts - - logger.Info("Add delivery for post", "delivery id", d.PostId, "recipient", d.Recipient, "success", d.Success) - - err := opts.DeliveriesDatabase.AddDelivery(ctx, d) - - if err != nil { - logger.Error("Failed to add delivery", "post_id", opts.Post.Id, "recipienct", d.Recipient, "error", err) - } - }() - - note, err := NoteFromPost(ctx, opts.URIs, opts.From, opts.Post, opts.PostTags) - - if err != nil { - d.Error = err.Error() - return fmt.Errorf("Failed to derive note from post, %w", err) - } - - from_uri := opts.From.AccountURL(ctx, opts.URIs).String() - - to_list := []string{ - opts.To, - } - - create_activity, err := ap.NewCreateActivity(ctx, opts.URIs, from_uri, to_list, note) - - if err != nil { - d.Error = err.Error() - return fmt.Errorf("Failed to create activity from post, %w", err) - } - - if len(note.Cc) > 0 { - create_activity.Cc = note.Cc - } - - // START OF is this really necessary? - // Also, what if this isn't a post? - - uuid := id.NewUUID() - - post_url := opts.From.PostURL(ctx, opts.URIs, opts.Post) - post_id := fmt.Sprintf("%s#%s", post_url.String(), uuid) - - create_activity.Id = post_id - - // END OF is this really necessary? - - d.ActivityId = create_activity.Id - - post_opts := &PostToAccountOptions{ - From: opts.From, - To: opts.To, - Activity: create_activity, - URIs: opts.URIs, - } - - inbox, err := PostToAccount(ctx, post_opts) - - d.Inbox = inbox - - if err != nil { - d.Error = err.Error() - return fmt.Errorf("Failed to post to inbox '%s', %w", opts.To, err) - } - - d.Success = true - return nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/deliver/activity.go b/vendor/github.com/sfomuseum/go-activitypub/deliver/activity.go new file mode 100644 index 0000000..a739d6a --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/deliver/activity.go @@ -0,0 +1,172 @@ +// Package deliver provides methods for delivering activities to external actors. +package deliver + +import ( + "context" + "fmt" + "log/slog" + "time" + + "github.com/sfomuseum/go-activitypub" + "github.com/sfomuseum/go-activitypub/ap" + "github.com/sfomuseum/go-activitypub/database" + "github.com/sfomuseum/go-activitypub/id" + "github.com/sfomuseum/go-activitypub/uris" +) + +// DeliveryActivityOptions defines configuration options for delivering an `activitypub.Activity` instance to an external actor. +type DeliverActivityOptions struct { + // To is the ActivityPub address of the external actor to deliver the `activitypub.Activity` instance to. + To string `json:"to"` + // Activity is the `activitypub.Activity` being delivered. + Activity *activitypub.Activity `json:"activity"` + // URIs is a `uris.URIs` instance containing host and domain specific information of the service delivering the activity. + URIs *uris.URIs `json:"uris"` + // AccountsDatabase is a `database.AccountsDatabase` instance used to lookup details about the account sending the activity. + AccountsDatabase database.AccountsDatabase `json:"accounts_database,omitempty"` + // DelivereisDatabase is a `database.DeliveriesDatabase` instance used to store and retrieve details about the delivery. + DeliveriesDatabase database.DeliveriesDatabase `json:"deliveries_database,omitempty"` + // MaxAttempts is the maximum number of times to attempt to deliver the activity. + MaxAttempts int `json:"max_attempts"` +} + +// DeliveryActivity attempts to deliver an `activitypub.Activity` instance to an external actor. +func DeliverActivity(ctx context.Context, opts *DeliverActivityOptions) error { + + logger := slog.Default() + logger = logger.With("activity id", opts.Activity.Id) + + ap_activity, err := opts.Activity.UnmarshalActivity() + + if err != nil { + logger.Error("Failed to unmarshal activity", "error", err) + return fmt.Errorf("Failed to unmarshal activity, %w", err) + } + + from_uri := ap_activity.Actor + to := opts.To + + logger = logger.With("from", from_uri) + logger = logger.With("to", to) + + logger.Info("Deliver activity to recipient") + + // I guess we could just assume that the tail end is the account name but... + // Note that in ap.ParseAddressFromRequest we rely on the Go 1.22 net/http + // {resource} placeholder to derive the name... + actor, err := ap.RetrieveActorWithProfileURL(ctx, from_uri) + + if err != nil { + logger.Error("Failed to retrieve actor for profile (from) URI", "error", err) + return fmt.Errorf("Failed to retrieve actor for profile (from) URI, %w", err) + } + + /* + acct_name, _, err := ap.ParseAddress(from_uri) + + if err != nil { + logger.Error("Failed to parse (actor) address", "error", err) + return fmt.Errorf("Failed to parse (actor) address, %w", err) + } + */ + + acct_name := actor.PreferredUsername + + logger = logger.With("account name", acct_name) + logger.Debug("Lookup account for actor name") + + acct, err := opts.AccountsDatabase.GetAccountWithName(ctx, acct_name) + + if err != nil { + logger.Error("Failed to retrieve account ID for post", "error", err) + return fmt.Errorf("Failed to retrieve account ID for post, %w", err) + } + + logger = logger.With("account id", acct.Id) + + logger.Debug("Deliver activity", "max attempts", opts.MaxAttempts) + + if opts.MaxAttempts > 0 { + + count_attempts := 0 + + deliveries_cb := func(ctx context.Context, d *activitypub.Delivery) error { + count_attempts += 1 + return nil + } + + err := opts.DeliveriesDatabase.GetDeliveriesWithActivityIdAndRecipient(ctx, opts.Activity.Id, to, deliveries_cb) + + if err != nil { + logger.Error("Failed to count deliveries for \"post\" ID and recipient", "error", err) + return fmt.Errorf("Failed to count deliveries for \"post\" ID and recipient, %w", err) + } + + logger.Debug("Deliveries attempted", "count", count_attempts) + + if count_attempts >= opts.MaxAttempts { + logger.Warn("Post has met or exceed max delivery attempts threshold", "max", opts.MaxAttempts, "count", count_attempts) + return nil + } + } + + // Sort out dealing with Snowflake errors sooner... + delivery_id, _ := id.NewId() + + logger = logger.With("delivery id", delivery_id) + + now := time.Now() + ts := now.Unix() + + d := &activitypub.Delivery{ + Id: delivery_id, + ActivityId: opts.Activity.Id, + ActivityPubId: opts.Activity.ActivityPubId, + AccountId: acct.Id, + Recipient: to, + Created: ts, + Success: false, + } + + defer func() { + + now := time.Now() + ts := now.Unix() + + d.Completed = ts + + logger.Info("Add delivery for activity", "success", d.Success) + + err := opts.DeliveriesDatabase.AddDelivery(ctx, d) + + if err != nil { + logger.Error("Failed to add delivery", "error", err) + } + }() + + recipient, err := ap.RetrieveActor(ctx, to, opts.URIs.Insecure) + + if err != nil { + logger.Error("Failed to retrieve (to) actor", "error", err) + + d.Error = err.Error() + return fmt.Errorf("Failed to derive actor for to address, %w", err) + } + + inbox_uri := recipient.Inbox + d.Inbox = inbox_uri + + err = acct.SendActivity(ctx, opts.URIs, inbox_uri, ap_activity) + + if err != nil { + logger.Error("Failed to post activity to inbox", "error", err) + + d.Error = err.Error() + return fmt.Errorf("Failed to post to inbox '%s', %w", recipient, err) + } + + d.Success = true + + logger.Info("Posted activity to inbox") + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/deliveries.go b/vendor/github.com/sfomuseum/go-activitypub/deliveries.go deleted file mode 100644 index 7d6c2b4..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/deliveries.go +++ /dev/null @@ -1,14 +0,0 @@ -package activitypub - -type Delivery struct { - Id int64 `json:"id"` - ActivityId string `json:"activity_id"` - PostId int64 `json:"post_id"` - AccountId int64 `json:"account_id"` - Recipient string `json:"recipient"` - Inbox string `json:"inbox"` - Created int64 `json:"created"` - Completed int64 `json:"completed"` - Success bool `json:"success"` - Error string `json:"error,omitempty"` -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_null.go b/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_null.go deleted file mode 100644 index c241aeb..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_null.go +++ /dev/null @@ -1,35 +0,0 @@ -package activitypub - -import ( - "context" -) - -type NullDeliveriesDatabase struct { - DeliveriesDatabase -} - -func init() { - ctx := context.Background() - RegisterDeliveriesDatabase(ctx, "null", NewNullDeliveriesDatabase) -} - -func NewNullDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error) { - db := &NullDeliveriesDatabase{} - return db, nil -} - -func (db *NullDeliveriesDatabase) AddDelivery(ctx context.Context, d *Delivery) error { - return nil -} - -func (db *NullDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*Delivery, error) { - return nil, ErrNotFound -} - -func (db *NullDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, recipient string, cb GetDeliveriesCallbackFunc) error { - return nil -} - -func (db *NullDeliveriesDatabase) Close(ctx context.Context) error { - return nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_slog.go b/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_slog.go deleted file mode 100644 index b9fd0c2..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_slog.go +++ /dev/null @@ -1,37 +0,0 @@ -package activitypub - -import ( - "context" - "log/slog" -) - -type SlogDeliveriesDatabase struct { - DeliveriesDatabase -} - -func init() { - ctx := context.Background() - RegisterDeliveriesDatabase(ctx, "slog", NewSlogDeliveriesDatabase) -} - -func NewSlogDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error) { - db := &SlogDeliveriesDatabase{} - return db, nil -} - -func (db *SlogDeliveriesDatabase) AddDelivery(ctx context.Context, d *Delivery) error { - slog.Info("Add delivery", "post id", d.PostId, "recipient", d.Recipient, "success", d.Success, "error", d.Error) - return nil -} - -func (db *SlogDeliveriesDatabase) GetDeliveryWithId(ctx context.Context, id int64) (*Delivery, error) { - return nil, ErrNotFound -} - -func (db *SlogDeliveriesDatabase) GetDeliveriesWithPostIdAndRecipient(ctx context.Context, post_id int64, recipient string, cb GetDeliveriesCallbackFunc) error { - return nil -} - -func (db *SlogDeliveriesDatabase) Close(ctx context.Context) error { - return nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_sql.go b/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_sql.go deleted file mode 100644 index 0dd9c10..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/deliveries_database_sql.go +++ /dev/null @@ -1,129 +0,0 @@ -package activitypub - -import ( - "context" - "database/sql" - "fmt" - "net/url" - - pg_sql "github.com/aaronland/go-pagination-sql" - "github.com/aaronland/go-pagination/countable" - "github.com/sfomuseum/go-activitypub/sqlite" -) - -const SQL_DELIVERIES_TABLE_NAME string = "deliveries" - -type SQLDeliveriesDatabase struct { - DeliveriesDatabase - database *sql.DB -} - -func init() { - ctx := context.Background() - RegisterDeliveriesDatabase(ctx, "sql", NewSQLDeliveriesDatabase) -} - -func NewSQLDeliveriesDatabase(ctx context.Context, uri string) (DeliveriesDatabase, error) { - - u, err := url.Parse(uri) - - if err != nil { - return nil, fmt.Errorf("Failed to parse URI, %w", err) - } - - engine := u.Host - - q := u.Query() - dsn := q.Get("dsn") - - conn, err := sql.Open(engine, dsn) - - if err != nil { - return nil, fmt.Errorf("Failed to open database connection, %w", err) - } - - if engine == "sqlite3" { - - err := sqlite.SetupConnection(ctx, conn) - - if err != nil { - return nil, fmt.Errorf("Failed to configure SQLite, %w", err) - } - } - - db := &SQLDeliveriesDatabase{ - database: conn, - } - - return db, nil -} - -func (db *SQLDeliveriesDatabase) GetDeliveryIdsForDateRange(ctx context.Context, start int64, end int64, cb GetDeliveryIdsCallbackFunc) error { - - pg_callback := func(pg_rsp pg_sql.PaginatedResponse) error { - - rows := pg_rsp.Rows() - - for rows.Next() { - - var id int64 - - err := rows.Scan(&id) - - if err != nil { - return fmt.Errorf("Failed to query database, %w", err) - } - - err = cb(ctx, id) - - if err != nil { - return fmt.Errorf("Failed to execute following callback for delivery %d, %w", id, err) - } - - return nil - } - - err := rows.Close() - - if err != nil { - return fmt.Errorf("Failed to iterate through database rows, %w", err) - } - - return nil - } - - pg_opts, err := countable.NewCountableOptions() - - if err != nil { - return fmt.Errorf("Failed to create pagination options, %w", err) - } - - q := fmt.Sprintf("SELECT id FROM %s WHERE created >= ? AND created <= ?", SQL_DELIVERIES_TABLE_NAME) - - err = pg_sql.QueryPaginatedAll(db.database, pg_opts, pg_callback, q, start, end) - - if err != nil { - return fmt.Errorf("Failed to execute paginated query, %w", err) - } - - return nil -} - -func (db *SQLDeliveriesDatabase) AddFollower(ctx context.Context, d *Delivery) error { - - /* - q := fmt.Sprintf("INSERT INTO %s (id, account_id, follower_address, created) VALUES (?, ?, ?, ?)", SQL_DELIVERIES_TABLE_NAME) - - _, err := db.database.ExecContext(ctx, q, f.Id, f.AccountId, f.FollowerAddress, f.Created) - - if err != nil { - return fmt.Errorf("Failed to add follower, %w", err) - } - */ - - return nil -} - -func (db *SQLDeliveriesDatabase) Close(ctx context.Context) error { - return db.database.Close() -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/delivery.go b/vendor/github.com/sfomuseum/go-activitypub/delivery.go new file mode 100644 index 0000000..1805782 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/delivery.go @@ -0,0 +1,14 @@ +package activitypub + +type Delivery struct { + Id int64 `json:"id"` + ActivityId int64 `json:"activity_id"` + ActivityPubId string `json:"activitypub_id"` + AccountId int64 `json:"account_id"` + Recipient string `json:"recipient"` + Inbox string `json:"inbox"` + Created int64 `json:"created"` + Completed int64 `json:"completed"` + Success bool `json:"success"` + Error string `json:"error,omitempty"` +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_null.go b/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_null.go deleted file mode 100644 index 2789155..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_null.go +++ /dev/null @@ -1,23 +0,0 @@ -package activitypub - -import ( - "context" -) - -type NullDeliveryQueue struct { - DeliveryQueue -} - -func init() { - ctx := context.Background() - RegisterDeliveryQueue(ctx, "null", NewNullDeliveryQueue) -} - -func NewNullDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error) { - q := &NullDeliveryQueue{} - return q, nil -} - -func (q *NullDeliveryQueue) DeliverPost(ctx context.Context, opts *DeliverPostOptions) error { - return nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_pubsub.go b/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_pubsub.go deleted file mode 100644 index ca4d4c6..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_pubsub.go +++ /dev/null @@ -1,75 +0,0 @@ -package activitypub - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/sfomuseum/go-pubsub/publisher" -) - -type PubSubDeliveryQueuePostOptions struct { - AccountId int64 `json:"account_id"` - Recipient string `json:"recipient"` - PostId int64 `json:"post_id"` -} - -type PubSubDeliveryQueue struct { - DeliveryQueue - publisher publisher.Publisher -} - -func init() { - - ctx := context.Background() - - to_register := []string{ - "awssqs-creds", - } - - for _, scheme := range to_register { - RegisterDeliveryQueue(ctx, scheme, NewPubSubDeliveryQueue) - } - - for _, scheme := range publisher.PublisherSchemes() { - RegisterDeliveryQueue(ctx, scheme, NewPubSubDeliveryQueue) - } -} - -func NewPubSubDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error) { - - pub, err := publisher.NewPublisher(ctx, uri) - - if err != nil { - return nil, fmt.Errorf("Failed to create publisher, %w", err) - } - - q := &PubSubDeliveryQueue{ - publisher: pub, - } - - return q, nil -} - -func (q *PubSubDeliveryQueue) DeliverPost(ctx context.Context, opts *DeliverPostOptions) error { - - ps_opts := PubSubDeliveryQueuePostOptions{ - AccountId: opts.From.Id, - Recipient: opts.To, - PostId: opts.Post.Id, - } - - enc_opts, err := json.Marshal(ps_opts) - - if err != nil { - return fmt.Errorf("Failed to marshal post options, %w", err) - } - - err = q.publisher.Publish(ctx, string(enc_opts)) - - if err != nil { - return fmt.Errorf("Failed to send message, %w", err) - } - - return nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_slog.go b/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_slog.go deleted file mode 100644 index e0d68d3..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_slog.go +++ /dev/null @@ -1,25 +0,0 @@ -package activitypub - -import ( - "context" - "log/slog" -) - -type SlogDeliveryQueue struct { - DeliveryQueue -} - -func init() { - ctx := context.Background() - RegisterDeliveryQueue(ctx, "slog", NewSlogDeliveryQueue) -} - -func NewSlogDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error) { - q := &SlogDeliveryQueue{} - return q, nil -} - -func (q *SlogDeliveryQueue) DeliverPost(ctx context.Context, opts *DeliverPostOptions) error { - slog.Info("Deliver post", "post id", opts.Post.Id, "from", opts.From.Id, "to", opts.To) - return nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_synchronous.go b/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_synchronous.go deleted file mode 100644 index 9437118..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue_synchronous.go +++ /dev/null @@ -1,31 +0,0 @@ -package activitypub - -import ( - "context" - "fmt" -) - -type SynchronousDeliveryQueue struct { - DeliveryQueue -} - -func init() { - ctx := context.Background() - RegisterDeliveryQueue(ctx, "synchronous", NewSynchronousDeliveryQueue) -} - -func NewSynchronousDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error) { - q := &SynchronousDeliveryQueue{} - return q, nil -} - -func (q *SynchronousDeliveryQueue) DeliverPost(ctx context.Context, opts *DeliverPostOptions) error { - - err := DeliverPost(ctx, opts) - - if err != nil { - return fmt.Errorf("Failed to deliver post, %w", err) - } - - return nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/follower.go b/vendor/github.com/sfomuseum/go-activitypub/follower.go index 39f2bdf..5570048 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/follower.go +++ b/vendor/github.com/sfomuseum/go-activitypub/follower.go @@ -3,8 +3,6 @@ package activitypub import ( "context" "fmt" - "log/slog" - "sync/atomic" "time" "github.com/sfomuseum/go-activitypub/id" @@ -17,44 +15,6 @@ type Follower struct { Created int64 `json:"created"` } -func CountFollowers(ctx context.Context, db FollowersDatabase, account_id int64) (uint32, error) { - - count := uint32(0) - - followers_cb := func(ctx context.Context, follower string) error { - atomic.AddUint32(&count, 1) - return nil - } - - err := db.GetFollowersForAccount(ctx, account_id, followers_cb) - - if err != nil { - return 0, fmt.Errorf("Failed to count followers, %w", err) - } - - return atomic.LoadUint32(&count), nil -} - -func GetFollower(ctx context.Context, db FollowersDatabase, account_id int64, follower_address string) (*Follower, error) { - - slog.Debug("Get follower", "account", account_id, "follower", follower_address) - - return db.GetFollower(ctx, account_id, follower_address) -} - -func AddFollower(ctx context.Context, db FollowersDatabase, account_id int64, follower_address string) error { - - slog.Debug("Add follower", "account", account_id, "follower", follower_address) - - f, err := NewFollower(ctx, account_id, follower_address) - - if err != nil { - return fmt.Errorf("Failed to create new follower, %w", err) - } - - return db.AddFollower(ctx, f) -} - func NewFollower(ctx context.Context, account_id int64, follower_address string) (*Follower, error) { db_id, err := id.NewId() @@ -75,19 +35,3 @@ func NewFollower(ctx context.Context, account_id int64, follower_address string) return b, nil } - -// Is follower_address following account_id? -func IsFollower(ctx context.Context, db FollowersDatabase, account_id int64, follower_address string) (bool, *Follower, error) { - - f, err := GetFollower(ctx, db, account_id, follower_address) - - if err == nil { - return true, f, nil - } - - if err == ErrNotFound { - return false, nil, nil - } - - return false, nil, fmt.Errorf("Failed to follower record, %w", err) -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/following.go b/vendor/github.com/sfomuseum/go-activitypub/following.go index 533b291..d5f9abf 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/following.go +++ b/vendor/github.com/sfomuseum/go-activitypub/following.go @@ -3,8 +3,6 @@ package activitypub import ( "context" "fmt" - "log/slog" - "sync/atomic" "time" "github.com/sfomuseum/go-activitypub/id" @@ -17,44 +15,6 @@ type Following struct { Created int64 `json:"created"` } -func CountFollowing(ctx context.Context, db FollowingDatabase, account_id int64) (uint32, error) { - - count := uint32(0) - - following_cb := func(ctx context.Context, following string) error { - atomic.AddUint32(&count, 1) - return nil - } - - err := db.GetFollowingForAccount(ctx, account_id, following_cb) - - if err != nil { - return 0, fmt.Errorf("Failed to count following, %w", err) - } - - return atomic.LoadUint32(&count), nil -} - -func GetFollowing(ctx context.Context, db FollowingDatabase, account_id int64, following_address string) (*Following, error) { - - slog.Debug("Get following", "account", account_id, "following", following_address) - - return db.GetFollowing(ctx, account_id, following_address) -} - -func AddFollowing(ctx context.Context, db FollowingDatabase, account_id int64, following_address string) error { - - slog.Debug("Add following", "account", account_id, "following", following_address) - - f, err := NewFollowing(ctx, account_id, following_address) - - if err != nil { - return fmt.Errorf("Failed to create new following, %w", err) - } - - return db.AddFollowing(ctx, f) -} - func NewFollowing(ctx context.Context, account_id int64, following_address string) (*Following, error) { db_id, err := id.NewId() @@ -75,19 +35,3 @@ func NewFollowing(ctx context.Context, account_id int64, following_address strin return b, nil } - -// Is account_id following following_address? -func IsFollowing(ctx context.Context, db FollowingDatabase, account_id int64, following_address string) (bool, *Following, error) { - - f, err := GetFollowing(ctx, db, account_id, following_address) - - if err == nil { - return true, f, nil - } - - if err == ErrNotFound { - return false, nil, nil - } - - return false, nil, fmt.Errorf("Failed to following record, %w", err) -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/html/html.go b/vendor/github.com/sfomuseum/go-activitypub/html/html.go new file mode 100644 index 0000000..2de66cb --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/html/html.go @@ -0,0 +1,31 @@ +package html + +import ( + "strings" + + "golang.org/x/net/html" +) + +// HtmlToText converts HTML to plain text by stripping all HTML tags. +func HtmlToText(htmlStr string) (string, error) { + doc, err := html.Parse(strings.NewReader(htmlStr)) + if err != nil { + return "", err + } + var textContent strings.Builder + extractText(doc, &textContent) + return textContent.String(), nil +} + +// extractText recursively traverses HTML nodes and appends text to the result. +func extractText(n *html.Node, textContent *strings.Builder) { + // If this is a text node, append it to the text content. + if n.Type == html.TextNode { + textContent.WriteString(n.Data) + } + + // Recursively apply to all child nodes. + for c := n.FirstChild; c != nil; c = c.NextSibling { + extractText(c, textContent) + } +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/id/id.go b/vendor/github.com/sfomuseum/go-activitypub/id/id.go index 73db4af..5dc1bc9 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/id/id.go +++ b/vendor/github.com/sfomuseum/go-activitypub/id/id.go @@ -1,3 +1,4 @@ +// Package id provides methods for generating unique identifiers. package id import ( @@ -25,6 +26,7 @@ func setupSnowflake() { snowflake_node = node } +// NewId will return a unique 64-bit identifier. func NewId() (int64, error) { setupSnowflakeOnce.Do(setupSnowflake) @@ -37,6 +39,7 @@ func NewId() (int64, error) { return id.Int64(), nil } +// NewUUID will return a UUID (v4) string. func NewUUID() string { guid := uuid.New() return guid.String() diff --git a/vendor/github.com/sfomuseum/go-activitypub/inbox.go b/vendor/github.com/sfomuseum/go-activitypub/inbox.go deleted file mode 100644 index 18bded0..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/inbox.go +++ /dev/null @@ -1,208 +0,0 @@ -package activitypub - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "log/slog" - "net/http" - "net/http/httputil" - "net/url" - "strconv" - "time" - - "github.com/go-fed/httpsig" - "github.com/sfomuseum/go-activitypub/ap" - "github.com/sfomuseum/go-activitypub/uris" - "github.com/sfomuseum/iso8601duration" -) - -type PostToAccountOptions struct { - From *Account - To string - Activity *ap.Activity - URIs *uris.URIs -} - -type PostToInboxOptions struct { - // The `Account` instance of the actor sending the Activity. - From *Account - // The URL of the inbox where the Activity should be posted. - Inbox string - // The `Activity` instance being posted to the inbox. - Activity *ap.Activity - URIs *uris.URIs - // Log POST requests before they are sent using the default [log/slog] Logger. Note that this will - // include the HTTP signature sent with the request so you should apply all the necessary care that - // these values are logged somewhere you don't want unauthorized eyes to see the. - LogRequest bool - // Log the body of the POST response if it contains a status code that is not 200-202 or 204 using - // the default [log/slog] Logger - LogResponseOnError bool -} - -func PostToAccount(ctx context.Context, opts *PostToAccountOptions) (string, error) { - - actor, err := RetrieveActor(ctx, opts.To, opts.URIs.Insecure) - - if err != nil { - return "", fmt.Errorf("Failed to retrieve actor for %s, %w", opts.To, err) - } - - inbox_opts := &PostToInboxOptions{ - From: opts.From, - Inbox: actor.Inbox, - Activity: opts.Activity, - URIs: opts.URIs, - } - - return actor.Inbox, PostToInbox(ctx, inbox_opts) -} - -// PostToInbox delivers an Activity message to a specific inbox. -func PostToInbox(ctx context.Context, opts *PostToInboxOptions) error { - - slog.Debug("Post to inbox", "inbox", opts.Inbox) - - enc_req, err := json.Marshal(opts.Activity) - - if err != nil { - return fmt.Errorf("Failed to marshal follow activity request, %w", err) - } - - http_req, err := http.NewRequestWithContext(ctx, "POST", opts.Inbox, bytes.NewBuffer(enc_req)) - - if err != nil { - return fmt.Errorf("Failed to create new request to %s, %w", opts.Inbox, err) - } - - now := time.Now() - - http_req.Header.Set("Content-Type", ap.ACTIVITY_LD_CONTENT_TYPE) - - // RFC 2612 dates are required - http_req.Header.Set("Date", now.Format(http.TimeFormat)) - - // START OF this is necessary for HTTP signature hoohah... - inbox_u, err := url.Parse(opts.Inbox) - - if err != nil { - return fmt.Errorf("Failed to parse inbox URL, %w", err) - } - - http_req.Header.Set("Host", inbox_u.Host) - // END OF this is necessary for HTTP signature hoohah... - - // Should this value be configurable? - str_ttl := "PT5M" - - d, err := duration.FromString(str_ttl) - - if err != nil { - return fmt.Errorf("Failed to derive duration, %w", err) - } - - ttl := int64(d.ToDuration().Seconds()) - - // Created and Expires headers are important for posting to Mastodon - // https://github.com/mastodon/mastodon/blob/main/app/controllers/concerns/signature_verification.rb#L183 - - created := now.Unix() - expires := created + ttl - - http_req.Header.Set("Created", strconv.FormatInt(created, 10)) - http_req.Header.Set("Expires", strconv.FormatInt(expires, 10)) - - // Note that "key_id" here means a pointer to the actor/profile page where the public key - // for the follower can be retrieved - - profile_url := opts.From.AccountURL(ctx, opts.URIs) - - key_id := profile_url.String() - slog.Debug("Post to inbox", "inbox", opts.Inbox, "key_id", key_id) - - private_key, err := opts.From.PrivateKeyRSA(ctx) - - if err != nil { - return fmt.Errorf("Failed to derive private key for from account, %w", err) - } - - // https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures#section-1.1 - // https://pkg.go.dev/github.com/go-fed/httpsig - - // prefs := []httpsig.Algorithm{httpsig.RSA_SHA512, httpsig.RSA_SHA256} - - prefs := []httpsig.Algorithm{httpsig.RSA_SHA256} - digestAlgorithm := httpsig.DigestSha256 - - headersToSign := []string{ - httpsig.RequestTarget, - "Host", - "Date", - "Digest", - // See the way this is "(created)" and not "Created". That's a go-fed/httpsig thing... or maybe it's a spec thing? - // https://github.com/go-fed/httpsig/blob/master/signing.go#L220-L229 - "(created)", - "(expires)", - } - - signer, _, err := httpsig.NewSigner(prefs, digestAlgorithm, headersToSign, httpsig.Signature, ttl) - - if err != nil { - return fmt.Errorf("Failed to create new signer, %w", err) - } - - err = signer.SignRequest(private_key, key_id, http_req, enc_req) - - if err != nil { - return fmt.Errorf("Failed to sign request, %w", err) - } - - // https://pkg.go.dev/net/http/httputil#DumpRequest - - if opts.LogRequest { - - dump, err := httputil.DumpRequest(http_req, true) - - if err != nil { - return fmt.Errorf("Failed to dump request, %w", err) - } - - slog.Debug("REQUEST", "body", string(dump)) - } - - http_cl := http.Client{} - http_rsp, err := http_cl.Do(http_req) - - if err != nil { - return fmt.Errorf("Failed to execute post to inbox request, %w", err) - } - - defer http_rsp.Body.Close() - - slog.Debug("Response", "inbox", opts.Inbox, "code", http_rsp.StatusCode, "content-type", http_rsp.Header.Get("Content-Type")) - - // https://www.w3.org/wiki/ActivityPub/Primer/HTTP_status_codes_for_delivery - - switch http_rsp.StatusCode { - // HTTP 200, 201, 202, 204 - case http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent: - return nil - default: - - if opts.LogResponseOnError { - - body, read_err := io.ReadAll(http_rsp.Body) - - if read_err != nil { - return fmt.Errorf("Follow request failed %d, %s; read body also failed, %w", http_rsp.StatusCode, http_rsp.Status, read_err) - } - - slog.Debug("ERROR", "body", string(body)) - } - } - - return fmt.Errorf("Follow request failed %d, %s", http_rsp.StatusCode, http_rsp.Status) -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/like.go b/vendor/github.com/sfomuseum/go-activitypub/like.go index 94cef67..42d4189 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/like.go +++ b/vendor/github.com/sfomuseum/go-activitypub/like.go @@ -8,6 +8,10 @@ import ( "github.com/sfomuseum/go-activitypub/id" ) +// Type Like is possibly (probably) a misnomer in the same way that type `Post` is (see notes in +// post.go and boost.go). Specifically this data and the correspinding `LikesDatabase` was created +// to record likes from external actors about posts created by accounts on this server. It is not +// currently suited to record or deliver likes of external posts made by accounts on this server. type Like struct { Id int64 `json:"id"` AccountId int64 `json:"account_id"` diff --git a/vendor/github.com/sfomuseum/go-activitypub/message.go b/vendor/github.com/sfomuseum/go-activitypub/message.go index 7033fb9..253073b 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/message.go +++ b/vendor/github.com/sfomuseum/go-activitypub/message.go @@ -3,7 +3,6 @@ package activitypub import ( "context" "fmt" - "log/slog" "time" "github.com/sfomuseum/go-activitypub/id" @@ -18,48 +17,8 @@ type Message struct { LastModified int64 `json:"created"` } -func GetMessage(ctx context.Context, db MessagesDatabase, account_id int64, note_id int64) (*Message, error) { - - slog.Debug("Get message", "account", account_id, "note", note_id) - return db.GetMessageWithAccountAndNoteIds(ctx, account_id, note_id) -} - -func AddMessage(ctx context.Context, db MessagesDatabase, account_id int64, note_id int64, author_address string) (*Message, error) { - - slog.Debug("Add message", "account", account_id, "note", note_id, "author", author_address) - - m, err := NewMessage(ctx, account_id, note_id, author_address) - - if err != nil { - return nil, fmt.Errorf("Failed to create new message, %w", err) - } - - err = db.AddMessage(ctx, m) - - if err != nil { - return nil, fmt.Errorf("Failed to add message, %w", err) - } - - return m, nil -} - -func UpdateMessage(ctx context.Context, db MessagesDatabase, m *Message) (*Message, error) { - - slog.Debug("Update message", "id", m.Id) - - now := time.Now() - ts := now.Unix() - - m.LastModified = ts - - err := db.UpdateMessage(ctx, m) - return m, err -} - func NewMessage(ctx context.Context, account_id int64, note_id int64, author_address string) (*Message, error) { - slog.Debug("Create new message", "account", account_id, "note", note_id, "author", author_address) - db_id, err := id.NewId() if err != nil { diff --git a/vendor/github.com/sfomuseum/go-activitypub/note.go b/vendor/github.com/sfomuseum/go-activitypub/note.go index ab6ee33..ce0792f 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/note.go +++ b/vendor/github.com/sfomuseum/go-activitypub/note.go @@ -3,12 +3,12 @@ package activitypub import ( "context" "fmt" - "log/slog" "time" "github.com/sfomuseum/go-activitypub/id" ) +// Note is a message (or post) delivered to an account. type Note struct { Id int64 `json:"id"` UUID string `json:"uuid"` @@ -18,30 +18,8 @@ type Note struct { LastModified int64 `json:"lastmodified"` } -func AddNote(ctx context.Context, db NotesDatabase, uuid string, author string, body string) (*Note, error) { - - slog.Debug("Add note", "uuid", uuid, "author", author) - - n, err := NewNote(ctx, uuid, author, body) - - if err != nil { - return nil, fmt.Errorf("Failed to create new note, %w", err) - } - - err = db.AddNote(ctx, n) - - if err != nil { - return nil, fmt.Errorf("Failed to add note, %w", err) - } - - slog.Debug("Return new note", "id", n.Id) - return n, nil -} - func NewNote(ctx context.Context, uuid string, author string, body string) (*Note, error) { - slog.Debug("Create new note", "uuid", uuid, "author", author) - db_id, err := id.NewId() if err != nil { diff --git a/vendor/github.com/sfomuseum/go-activitypub/post.go b/vendor/github.com/sfomuseum/go-activitypub/post.go index 17f75c6..ecefea9 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/post.go +++ b/vendor/github.com/sfomuseum/go-activitypub/post.go @@ -3,108 +3,30 @@ package activitypub import ( "context" "fmt" - "log/slog" - "net/http" - "net/url" - "regexp" - "strconv" - "strings" "time" - "github.com/sfomuseum/go-activitypub/ap" "github.com/sfomuseum/go-activitypub/id" - "github.com/sfomuseum/go-activitypub/uris" ) +// Post is a message (or post) written by an account holder. It is internal representation +// of what would be delivered as an ActivityPub note.x type Post struct { - Id int64 `json:"id"` + // The unique ID for the post. + Id int64 `json:"id"` + // The AccountsDatabase ID of the author of the post. AccountId int64 `json:"account_id"` - // This is a string mostly because []byte thingies get encoded incorrectly in DynamoDB - Body string `json:"body"` - InReplyTo string `json:"in_reply_to"` - Created int64 `json:"created"` - LastModified int64 `json:"lastmodified"` -} - -type AddPostOptions struct { - URIs *uris.URIs - PostsDatabase PostsDatabase - PostTagsDatabase PostTagsDatabase -} - -// AddPost creates a new post record for 'body' and adds it to the post database. Then it parses 'body' looking -// for other ActivityPub addresses and records each as a "mention" in the post tags database. It returns the post -// and the list of post tags (mentions) for further processing as needed. -func AddPost(ctx context.Context, opts *AddPostOptions, acct *Account, body string) (*Post, []*PostTag, error) { - - // Create the new post record - - p, err := NewPost(ctx, acct, body) - - if err != nil { - return nil, nil, fmt.Errorf("Failed to create new post, %w", err) - } - - // Add the post to the database - - err = opts.PostsDatabase.AddPost(ctx, p) - - if err != nil { - return nil, nil, fmt.Errorf("Failed to add post, %w", err) - } - - // Determine other accounts mentioned in post - - addrs_mentioned, err := ParseAddressesFromString(body) - - if err != nil { - return nil, nil, fmt.Errorf("Failed to derive addresses mentioned in message body, %w", err) - } - - // Create "mention" tags for any other accounts mentioned in post - // Add each mention to the "post tags" database - - post_tags := make([]*PostTag, 0) - - for _, name := range addrs_mentioned { - - actor, err := RetrieveActor(ctx, name, opts.URIs.Insecure) - - if err != nil { - slog.Error("Failed to retrieve actor data for name, skipping", "name", name, "error", err) - continue - } - - mention_name := name - - // https://github.com/sfomuseum/go-activitypub/issues/3 - // mention_href := actor.URL - - // And yet it appears to actually be {ACTOR}.id however this - // does not work (where "work" means open profile tab) in Ivory - // yet because... I have no idea - mention_href := actor.Id - - t, err := NewMention(ctx, p, mention_name, mention_href) - - if err != nil { - return nil, nil, fmt.Errorf("Failed to create mention for '%s', %w", name, err) - } - - err = opts.PostTagsDatabase.AddPostTag(ctx, t) - - if err != nil { - return nil, nil, fmt.Errorf("Failed to record post tag (mention) for '%s', %w", name, err) - } - - post_tags = append(post_tags, t) - } - - // Return all the things - - return p, post_tags, nil + // The body of the post. This is a string mostly because []byte thingies get encoded incorrectly + // in DynamoDB + Body string `json:"body"` + // The URL of the post this post is referencing. + InReplyTo string `json:"in_reply_to"` + // The Unix timestamp when the post was created + Created int64 `json:"created"` + // The Unix timestamp when the post was last modified + LastModified int64 `json:"lastmodified"` } +// NewPost returns a new `Post` instance from 'acct' and 'body'. func NewPost(ctx context.Context, acct *Account, body string) (*Post, error) { post_id, err := id.NewId() @@ -126,86 +48,3 @@ func NewPost(ctx context.Context, acct *Account, body string) (*Post, error) { return p, nil } - -func NoteFromPost(ctx context.Context, uris_table *uris.URIs, acct *Account, post *Post, post_tags []*PostTag) (*ap.Note, error) { - - attr := acct.ProfileURL(ctx, uris_table).String() - post_url := acct.PostURL(ctx, uris_table, post) - - t := time.Unix(post.Created, 0) - - tags := make([]*ap.Tag, len(post_tags)) - cc := make([]string, 0) - - for idx, pt := range post_tags { - - t := &ap.Tag{ - Name: pt.Name, - Href: pt.Href, - Type: pt.Type, - } - - tags[idx] = t - - if pt.Type == "Mention" { - cc = append(cc, pt.Href) - } - } - - n := &ap.Note{ - Type: "Note", - Id: post_url.String(), - AttributedTo: attr, - To: []string{ - "https://www.w3.org/ns/activitystreams#Public", // what? - }, - Content: post.Body, - Published: t.Format(http.TimeFormat), - InReplyTo: post.InReplyTo, - Tags: tags, - URL: post_url.String(), - } - - if len(cc) > 0 { - n.Cc = cc - } - - return n, nil -} - -func GetPostFromObjectURI(ctx context.Context, uris_table *uris.URIs, posts_db PostsDatabase, object_uri string) (*Post, error) { - - pat_post := uris_table.Post - pat_post = strings.Replace(pat_post, "{resource}", "(?:@[^\\/]+)", 1) - pat_post = strings.Replace(pat_post, "{id}", "(\\d+)", 1) - - re_post, err := regexp.Compile(pat_post) - - if err != nil { - return nil, fmt.Errorf("Failed to compile post URI pattern, %w", err) - } - - u, err := url.Parse(object_uri) - - if err != nil { - return nil, fmt.Errorf("Failed to parse URI, %w", err) - } - - object_path := u.Path - - if !re_post.MatchString(object_path) { - slog.Debug("Invalid or unsupport post URI", "uri", object_uri) - return nil, fmt.Errorf("Invalid or unsupport post URI") - } - - m := re_post.FindStringSubmatch(object_path) - - str_id := m[1] - post_id, err := strconv.ParseInt(str_id, 10, 64) - - if err != nil { - return nil, fmt.Errorf("Failed to parse ID derived from object URI, %w", err) - } - - return posts_db.GetPostWithId(ctx, post_id) -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/post_tag.go b/vendor/github.com/sfomuseum/go-activitypub/post_tag.go index 1afc3a4..4eeecca 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/post_tag.go +++ b/vendor/github.com/sfomuseum/go-activitypub/post_tag.go @@ -1,5 +1,9 @@ package activitypub +// This probably just needs to be renamed as "tag" and associated with an +// activitypub.ActivityTypeStatus and activitypub.ActivityTypeId but right +// now it is tightly coupled with "posts" (or "notes") + type PostTag struct { Id int64 `json:"id"` AccountId int64 `json:"account_id"` diff --git a/vendor/github.com/sfomuseum/go-activitypub/posts/posts.go b/vendor/github.com/sfomuseum/go-activitypub/posts/posts.go new file mode 100644 index 0000000..a5acf0a --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/posts/posts.go @@ -0,0 +1,214 @@ +package posts + +import ( + "context" + "fmt" + "log/slog" + "net/http" + "net/url" + "regexp" + "strconv" + "strings" + "time" + + "github.com/sfomuseum/go-activitypub" + "github.com/sfomuseum/go-activitypub/ap" + "github.com/sfomuseum/go-activitypub/database" + "github.com/sfomuseum/go-activitypub/uris" +) + +type AddPostOptions struct { + URIs *uris.URIs + PostsDatabase database.PostsDatabase + PostTagsDatabase database.PostTagsDatabase +} + +// AddPost creates a new post record for 'body' and adds it to the post database. Then it parses 'body' looking +// for other ActivityPub addresses and records each as a "mention" in the post tags database. It returns the post +// and the list of post tags (mentions) for further processing as needed. +func AddPost(ctx context.Context, opts *AddPostOptions, acct *activitypub.Account, body string) (*activitypub.Post, []*activitypub.PostTag, error) { + + // Create the new post record + + p, err := activitypub.NewPost(ctx, acct, body) + + if err != nil { + return nil, nil, fmt.Errorf("Failed to create new post, %w", err) + } + + // Add the post to the database + + err = opts.PostsDatabase.AddPost(ctx, p) + + if err != nil { + return nil, nil, fmt.Errorf("Failed to add post, %w", err) + } + + // Determine other accounts mentioned in post + + addrs_mentioned, err := ap.ParseAddressesFromString(body) + + if err != nil { + return nil, nil, fmt.Errorf("Failed to derive addresses mentioned in message body, %w", err) + } + + // Create "mention" tags for any other accounts mentioned in post + // Add each mention to the "post tags" database + + post_tags := make([]*activitypub.PostTag, 0) + + for _, name := range addrs_mentioned { + + actor, err := ap.RetrieveActor(ctx, name, opts.URIs.Insecure) + + if err != nil { + slog.Error("Failed to retrieve actor data for name, skipping", "name", name, "error", err) + continue + } + + mention_name := name + + // https://github.com/sfomuseum/go-activitypub/issues/3 + // mention_href := actor.URL + + // And yet it appears to actually be {ACTOR}.id however this + // does not work (where "work" means open profile tab) in Ivory + // yet because... I have no idea + mention_href := actor.Id + + t, err := activitypub.NewMention(ctx, p, mention_name, mention_href) + + if err != nil { + return nil, nil, fmt.Errorf("Failed to create mention for '%s', %w", name, err) + } + + err = opts.PostTagsDatabase.AddPostTag(ctx, t) + + if err != nil { + return nil, nil, fmt.Errorf("Failed to record post tag (mention) for '%s', %w", name, err) + } + + post_tags = append(post_tags, t) + } + + // Return all the things + + return p, post_tags, nil +} + +// ActivityFromPost should be kept in /ap but that causes Golang import cycle errors. +// ActivityFromPost should also be updated to accept media attachments. + +// ActivityFromPost creates a new (ActivityPub) `Activity` instance derived from 'acct', 'post' and 'post_tags'. +func ActivityFromPost(ctx context.Context, uris_table *uris.URIs, acct *activitypub.Account, post *activitypub.Post, mentions []*activitypub.PostTag) (*ap.Activity, error) { + + from_u := acct.AccountURL(ctx, uris_table) + from := from_u.String() + + logger := slog.Default() + logger = logger.With("post id", post.Id) + logger = logger.With("from", from) + + logger.Debug("Create note from post") + + note, err := NoteFromPost(ctx, uris_table, acct, post, mentions) + + if err != nil { + logger.Error("Failed to create note from post", "error", err) + return nil, fmt.Errorf("Failed to derive note from post, %w", err) + } + + to := []string{ + ap.ACTIVITYSTREAMS_CONTEXT_PUBLIC, + } + + logger.Debug("Create activity from note") + + // Something something something media attachments here... + + return ap.NewCreateActivity(ctx, uris_table, from, to, note) +} + +// THIS SHOULD BE IN /ap BUT CAUSES IMPORT CYCLE ERRORS + +// NoteFromPost creates a new (ActivityPub) `Note` instance derived from 'acct', 'post' and 'post_tags'. +func NoteFromPost(ctx context.Context, uris_table *uris.URIs, acct *activitypub.Account, post *activitypub.Post, post_tags []*activitypub.PostTag) (*ap.Note, error) { + + attr := acct.ProfileURL(ctx, uris_table).String() + post_url := acct.PostURL(ctx, uris_table, post) + + t := time.Unix(post.Created, 0) + + tags := make([]*ap.Tag, len(post_tags)) + // cc := make([]string, 0) + + for idx, pt := range post_tags { + + t := &ap.Tag{ + Name: pt.Name, + Href: pt.Href, + Type: pt.Type, + } + + tags[idx] = t + + if pt.Type == "Mention" { + // cc = append(cc, pt.Name) + } + } + + n := &ap.Note{ + Type: "Note", + Id: post_url.String(), + AttributedTo: attr, + To: []string{ + ap.ACTIVITYSTREAMS_CONTEXT_PUBLIC, + }, + // Cc: cc, + Content: post.Body, + Published: t.Format(http.TimeFormat), + InReplyTo: post.InReplyTo, + Tags: tags, + URL: post_url.String(), + } + + return n, nil +} + +// GetPostFromObjectURI attempt to derive a `Post` ID and its matching instance from an (ActivityPub) object URI. +func GetPostFromObjectURI(ctx context.Context, uris_table *uris.URIs, posts_db database.PostsDatabase, object_uri string) (*activitypub.Post, error) { + + pat_post := uris_table.Post + pat_post = strings.Replace(pat_post, "{resource}", "(?:@[^\\/]+)", 1) + pat_post = strings.Replace(pat_post, "{id}", "(\\d+)", 1) + + re_post, err := regexp.Compile(pat_post) + + if err != nil { + return nil, fmt.Errorf("Failed to compile post URI pattern, %w", err) + } + + u, err := url.Parse(object_uri) + + if err != nil { + return nil, fmt.Errorf("Failed to parse URI, %w", err) + } + + object_path := u.Path + + if !re_post.MatchString(object_path) { + slog.Debug("Invalid or unsupport post URI", "uri", object_uri) + return nil, fmt.Errorf("Invalid or unsupport post URI") + } + + m := re_post.FindStringSubmatch(object_path) + + str_id := m[1] + post_id, err := strconv.ParseInt(str_id, 10, 64) + + if err != nil { + return nil, fmt.Errorf("Failed to parse ID derived from object URI, %w", err) + } + + return posts_db.GetPostWithId(ctx, post_id) +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/property.go b/vendor/github.com/sfomuseum/go-activitypub/property.go index c50082a..73dfe1e 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/property.go +++ b/vendor/github.com/sfomuseum/go-activitypub/property.go @@ -8,6 +8,7 @@ import ( "github.com/sfomuseum/go-activitypub/id" ) +// Property is a single key-value property associated with an account holder. type Property struct { Id int64 `json:"id"` AccountId int64 `json:"account_id"` @@ -41,101 +42,3 @@ func NewProperty(ctx context.Context, acct *Account, k string, v string) (*Prope return pr, nil } - -func PropertiesMapForAccount(ctx context.Context, properties_db PropertiesDatabase, acct *Account) (map[string]*Property, error) { - - props_map := make(map[string]*Property) - - cb := func(ctx context.Context, pr *Property) error { - - _, exists := props_map[pr.Key] - - if exists { - return fmt.Errorf("Duplicate key for %s", pr.Key) - } - - props_map[pr.Key] = pr - return nil - } - - err := properties_db.GetPropertiesForAccount(ctx, acct.Id, cb) - - if err != nil { - return nil, fmt.Errorf("Failed to derive properties for account, %w", err) - } - - return props_map, nil -} - -func DerivePropertiesUpdates(ctx context.Context, acct *Account, props_lookup map[string]*Property, updates map[string]string) ([]*Property, []*Property, error) { - - to_add := make([]*Property, 0) - to_update := make([]*Property, 0) - - for k, v := range updates { - - pr, exists := props_lookup[k] - - if exists { - - if pr.Value != v { - pr.Value = v - to_update = append(to_update, pr) - } - - } else { - - pr, err := NewProperty(ctx, acct, k, v) - - if err != nil { - return nil, nil, fmt.Errorf("Failed to create %s property for %d, %w", k, acct.Id, err) - } - - to_add = append(to_add, pr) - } - } - - return to_add, to_update, nil -} - -func ApplyPropertiesUpdates(ctx context.Context, properties_db PropertiesDatabase, acct *Account, updates map[string]string) (int, int, error) { - - props_lookup, err := PropertiesMapForAccount(ctx, properties_db, acct) - - if err != nil { - return 0, 0, fmt.Errorf("Failed to derive properties map for %d, %w", acct.Id, err) - } - - to_add, to_update, err := DerivePropertiesUpdates(ctx, acct, props_lookup, updates) - - if err != nil { - return 0, 0, fmt.Errorf("Failed to derive properties updates for %d, %w", acct.Id, err) - } - - added := 0 - updated := 0 - - for _, pr := range to_add { - - err := properties_db.AddProperty(ctx, pr) - - if err != nil { - return added, updated, fmt.Errorf("Failed to add property (%s) for %d, %w", pr, acct.Id, err) - } - - added += 1 - } - - for _, pr := range to_update { - - err := properties_db.UpdateProperty(ctx, pr) - - if err != nil { - return added, updated, fmt.Errorf("Failed to update property (%s) for %d, %w", pr, acct.Id, err) - } - - updated += 1 - } - - return added, updated, nil -} diff --git a/vendor/github.com/sfomuseum/go-activitypub/queue/README.md b/vendor/github.com/sfomuseum/go-activitypub/queue/README.md new file mode 100644 index 0000000..c32afbb --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/README.md @@ -0,0 +1,69 @@ +# Queues + +There are two type of queues in the `go-activitypub` package. Delivery queues handle the details of delivery ActivityPub activities to one or more recipients (inboxes). Message processing queues handle additional, or custom, processing of a message (which resolves to an ActivityPub "note") after its been received and recorded an accounts inbox. + +## Delivery queues + +Delivery queues implement the `DeliveryQueue` interface: + +``` +type DeliveryQueue interface { + DeliverActivity(context.Context, *deliver.DeliverActivityOptions) error + Close(context.Context) error +} +``` + +### Implementations + +The following implementations of the `DeliveryQueue` interface are available by default: + +#### null:// + +This implementation will receive an activity but not do anything with it. It is akin to writing data to `/dev/null`. + +#### pubsub:// + +This implementation will dispatch the activity unique `ActivityId` property to an underlying implementation of the `sfomuseum/go-pubsub/publisher.Publisher` interface. That ID is expected to have been recorded in the `ActivitiesDatabase` table and that it can be retrieved by whatever code receives the message. + +See also: + +* https://github.com/sfomuseum/go-pubsub + +#### slog:// + +The implementation will log the activity using the default `log/slog` logger. + +#### synchronous:// + +## Message processing queues + +Message processing queues implement the `ProcessMessageQueue` interface: + +``` +type ProcessMessageQueue interface { + ProcessMessage(context.Context, int64) error + Close(context.Context) error +} +``` + +Currently, "messages" are considered to be ActivityPub "Create" activities with type "Note". Remember a "message" in the `go-activitypub` is a pointer to a note associated with a specific account. Messages are dispatched to a `ProcessMessageQueue` as a final step in the [www.InboxPostHandler](../www/inbox_post.go) in the [server](../app/server) application. + +There is no default endpoint, or code, for receiving or processing those messages after they have been dispatched. That is left up to individual users to implement, out of bounds, as their needs suit them. There is an [example application for processing messages](../app/message/process/example) that you can use as "starter code" which can run from the command line or as a Lambda function. It does nothing more than validate the message, recipient account and associated note and logging those details. + +### Implementations + +#### null:// + +This implementation will receive a message (ID) but not do anything with it. It is akin to writing data to `/dev/null`. + +#### pubsub:// + +This implementation will dispatch a message ID to an underlying implementation of the `sfomuseum/go-pubsub/publisher.Publisher` interface. That ID is expected to have been recorded in the `MessagesDatabase` table and that it can be retrieved by whatever code receives the message. + +See also: + +* https://github.com/sfomuseum/go-pubsub + +#### slog:// + +The implementation will log the activity using the default `log/slog` logger. \ No newline at end of file diff --git a/vendor/github.com/sfomuseum/go-activitypub/queue/deliver_activity.go b/vendor/github.com/sfomuseum/go-activitypub/queue/deliver_activity.go new file mode 100644 index 0000000..ffb9821 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/deliver_activity.go @@ -0,0 +1,140 @@ +package queue + +import ( + "context" + "fmt" + "log/slog" + + "github.com/sfomuseum/go-activitypub" + "github.com/sfomuseum/go-activitypub/database" + "github.com/sfomuseum/go-activitypub/deliver" + "github.com/sfomuseum/go-activitypub/uris" +) + +type DeliverActivityToFollowersOptions struct { + AccountsDatabase database.AccountsDatabase + FollowersDatabase database.FollowersDatabase + NotesDatabase database.NotesDatabase + DeliveriesDatabase database.DeliveriesDatabase + DeliveryQueue DeliveryQueue + Activity *activitypub.Activity + Mentions []*activitypub.PostTag `json:"mentions"` + MaxAttempts int `json:"max_attempts"` + URIs *uris.URIs +} + +func DeliverActivityToFollowers(ctx context.Context, opts *DeliverActivityToFollowersOptions) error { + + logger := slog.Default() + logger = logger.With("activity id", opts.Activity.Id) + logger = logger.With("activity type", opts.Activity.ActivityType) + logger = logger.With("activity type id", opts.Activity.ActivityTypeId) + logger = logger.With("account id", opts.Activity.AccountId) + + logger.Info("Deliver activity to followers") + + acct, err := opts.AccountsDatabase.GetAccountWithId(ctx, opts.Activity.AccountId) + + if err != nil { + logger.Error("Failed to retrieve account ID for post", "error", err) + return fmt.Errorf("Failed to retrieve account ID for post, %w", err) + } + + // TBD - compare acct_address and opts.Activity.Actor? + acct_address := acct.Address(opts.URIs.Hostname) + logger = logger.With("from address", acct_address) + + followers_cb := func(ctx context.Context, follower_address string) error { + + logger.Info("Process follower (for activity deliver)", "follower", follower_address) + + already_delivered := false + + deliveries_cb := func(ctx context.Context, d *activitypub.Delivery) error { + + if d.Success { + logger.Info("Delivery (to follower) already happened", "delivery id", d.Id, "activity id", d.ActivityId, "recipient", d.Recipient) + already_delivered = true + } + + return nil + } + + // This will probably fail because types...? + err := opts.DeliveriesDatabase.GetDeliveriesWithActivityIdAndRecipient(ctx, opts.Activity.Id, follower_address, deliveries_cb) + + if err != nil { + logger.Error("Failed to retrieve deliveries for post and recipient", "recipient", follower_address, "error", err) + return fmt.Errorf("Failed to retrieve deliveries for post (%d) and recipient (%s), %w", opts.Activity.Id, follower_address, err) + } + + if already_delivered { + logger.Info("Activity already delivered", "recipient", follower_address) + return nil + } + + deliver_opts := &deliver.DeliverActivityOptions{ + To: follower_address, + Activity: opts.Activity, + URIs: opts.URIs, + AccountsDatabase: opts.AccountsDatabase, + DeliveriesDatabase: opts.DeliveriesDatabase, + MaxAttempts: opts.MaxAttempts, + } + + logger.Info("Queue deliver activity", "to", follower_address) + + err = opts.DeliveryQueue.DeliverActivity(ctx, deliver_opts) + + if err != nil { + logger.Error("Failed to schedule post delivery", "recipient", follower_address, "error", err) + return fmt.Errorf("Failed to deliver post to %s, %w", follower_address, err) + } + + logger.Info("Activity delivery complete", "recipient", follower_address) + return nil + } + + err = opts.FollowersDatabase.GetFollowersForAccount(ctx, acct.Id, followers_cb) + + if err != nil { + logger.Error("Failed to get followers for post author", "error", err) + return fmt.Errorf("Failed to get followers for post author, %w", err) + } + + // tags/mentions... + + for _, t := range opts.Mentions { + + logger.Debug("Deliver activity to mention", "mention", t) + + err := followers_cb(ctx, t.Name) // name or href? + + if err != nil { + logger.Error("Failed to deliver message", "to", t.Name, "to id", t.Id, "error", err) + return fmt.Errorf("Failed to deliver message to %s (%d), %w", t.Name, t.Id, err) + } + } + + ap_activity, err := opts.Activity.UnmarshalActivity() + + if err != nil { + logger.Error("Failed to unmarshal activity", "error", err) + return fmt.Errorf("Failed to unmarshal activity, %w", err) + } + + for _, a := range ap_activity.Cc { + + logger.Info("Deliver activity to cc", "address", a) + + err := followers_cb(ctx, a) + + if err != nil { + logger.Error("Failed to deliver activity", "address", a, "error", err) + return fmt.Errorf("Failed to deliver message to %s , %w", a, err) + } + + } + + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue.go b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue.go similarity index 93% rename from vendor/github.com/sfomuseum/go-activitypub/delivery_queue.go rename to vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue.go index 11661a9..53fd2b1 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/delivery_queue.go +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue.go @@ -1,4 +1,4 @@ -package activitypub +package queue import ( "context" @@ -8,10 +8,12 @@ import ( "strings" "github.com/aaronland/go-roster" + "github.com/sfomuseum/go-activitypub/deliver" ) type DeliveryQueue interface { - DeliverPost(context.Context, *DeliverPostOptions) error + DeliverActivity(context.Context, *deliver.DeliverActivityOptions) error + Close(context.Context) error } var delivery_queue_roster roster.Roster diff --git a/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_null.go b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_null.go new file mode 100644 index 0000000..3e454a6 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_null.go @@ -0,0 +1,33 @@ +package queue + +import ( + "context" + + "github.com/sfomuseum/go-activitypub/deliver" +) + +type NullDeliveryQueue struct { + DeliveryQueue +} + +func init() { + ctx := context.Background() + err := RegisterDeliveryQueue(ctx, "null", NewNullDeliveryQueue) + + if err != nil { + panic(err) + } +} + +func NewNullDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error) { + q := &NullDeliveryQueue{} + return q, nil +} + +func (q *NullDeliveryQueue) DeliverActivity(ctx context.Context, opts *deliver.DeliverActivityOptions) error { + return nil +} + +func (q *NullDeliveryQueue) Close(ctx context.Context) error { + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_pubsub.go b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_pubsub.go new file mode 100644 index 0000000..2b3c11b --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_pubsub.go @@ -0,0 +1,140 @@ +package queue + +import ( + "context" + "encoding/json" + "fmt" + "log/slog" + "strings" + "sync" + + "github.com/sfomuseum/go-activitypub/deliver" + "github.com/sfomuseum/go-activitypub/id" + "github.com/sfomuseum/go-pubsub/publisher" +) + +type PubSubDeliveryQueueOptions struct { + // The unique ID associated with the pubsub delivery. This is mostly for debugging between the sender and the receiver. + Id int64 `json:"id"` + // The actor to whom the activity should be delivered. + To string `json:"to"` + // The unique Activity(Database) Id associated with the delivery. + ActivityId int64 `json:"activity_id"` +} + +type PubSubDeliveryQueue struct { + DeliveryQueue + publisher publisher.Publisher +} + +// In principle this could also be done with a sync.OnceFunc call but that will +// require that everyone uses Go 1.21 (whose package import changes broke everything) +// which is literally days old as I write this. So maybe a few releases after 1.21. +// +// Also, _not_ using a sync.OnceFunc means we can call RegisterSchemes multiple times +// if and when multiple gomail-sender instances register themselves. + +var delivery_register_mu = new(sync.RWMutex) +var delivery_register_map = map[string]bool{} + +func init() { + + ctx := context.Background() + err := RegisterPubSubDeliverySchemes(ctx) + + if err != nil { + panic(err) + } +} + +func RegisterPubSubDeliverySchemes(ctx context.Context) error { + + delivery_register_mu.Lock() + + defer delivery_register_mu.Unlock() + + to_register := []string{ + "awssqs-creds", + } + + for _, scheme := range publisher.PublisherSchemes() { + + scheme = strings.Replace(scheme, "://", "", 1) + + // I don't love this so maybe prefix everything as pubsub-{SCHEME} ? TBD... ? + + if scheme != "null" { + to_register = append(to_register, scheme) + } + } + + for _, scheme := range to_register { + + _, exists := delivery_register_map[scheme] + + if exists { + continue + } + + err := RegisterDeliveryQueue(ctx, scheme, NewPubSubDeliveryQueue) + + if err != nil { + return fmt.Errorf("Failed to register delivery queue for '%s', %w", scheme, err) + } + + delivery_register_map[scheme] = true + } + + return nil +} + +func NewPubSubDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error) { + + pub, err := publisher.NewPublisher(ctx, uri) + + if err != nil { + return nil, fmt.Errorf("Failed to create publisher, %w", err) + } + + q := &PubSubDeliveryQueue{ + publisher: pub, + } + + return q, nil +} + +func (q *PubSubDeliveryQueue) DeliverActivity(ctx context.Context, opts *deliver.DeliverActivityOptions) error { + + ps_id, err := id.NewId() + + if err != nil { + return fmt.Errorf("Failed to create unique pubsub ID, %w", err) + } + + ps_opts := PubSubDeliveryQueueOptions{ + Id: ps_id, + To: opts.To, + ActivityId: opts.Activity.Id, + } + + enc_opts, err := json.Marshal(ps_opts) + + if err != nil { + return fmt.Errorf("Failed to marshal post options, %w", err) + } + + err = q.publisher.Publish(ctx, string(enc_opts)) + + if err != nil { + return fmt.Errorf("Failed to send message, %w", err) + } + + logger := slog.Default() + logger.Info("Published pubsub activity", "to", opts.To, "from", opts.Activity.AccountId, "activity id", opts.Activity.Id, "pubsub id", ps_id) + + return nil +} + +func (q *PubSubDeliveryQueue) Close(ctx context.Context) error { + return q.publisher.Close() +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_slog.go b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_slog.go new file mode 100644 index 0000000..0a8c411 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_slog.go @@ -0,0 +1,35 @@ +package queue + +import ( + "context" + "log/slog" + + "github.com/sfomuseum/go-activitypub/deliver" +) + +type SlogDeliveryQueue struct { + DeliveryQueue +} + +func init() { + ctx := context.Background() + err := RegisterDeliveryQueue(ctx, "slog", NewSlogDeliveryQueue) + + if err != nil { + panic(err) + } +} + +func NewSlogDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error) { + q := &SlogDeliveryQueue{} + return q, nil +} + +func (q *SlogDeliveryQueue) DeliverActivity(ctx context.Context, opts *deliver.DeliverActivityOptions) error { + slog.Info("Deliver post", "activity id", opts.Activity.Id, "from", opts.Activity.AccountId, "to", opts.To) + return nil +} + +func (q *SlogDeliveryQueue) Close(ctx context.Context) error { + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_synchronous.go b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_synchronous.go new file mode 100644 index 0000000..51062b0 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/delivery_queue_synchronous.go @@ -0,0 +1,41 @@ +package queue + +import ( + "context" + "fmt" + + "github.com/sfomuseum/go-activitypub/deliver" +) + +type SynchronousDeliveryQueue struct { + DeliveryQueue +} + +func init() { + ctx := context.Background() + err := RegisterDeliveryQueue(ctx, "synchronous", NewSynchronousDeliveryQueue) + + if err != nil { + panic(err) + } +} + +func NewSynchronousDeliveryQueue(ctx context.Context, uri string) (DeliveryQueue, error) { + q := &SynchronousDeliveryQueue{} + return q, nil +} + +func (q *SynchronousDeliveryQueue) DeliverActivity(ctx context.Context, opts *deliver.DeliverActivityOptions) error { + + err := deliver.DeliverActivity(ctx, opts) + + if err != nil { + return fmt.Errorf("Failed to deliver post, %w", err) + } + + return nil +} + +func (q *SynchronousDeliveryQueue) Close(ctx context.Context) error { + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/process_message_queue.go b/vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue.go similarity index 98% rename from vendor/github.com/sfomuseum/go-activitypub/process_message_queue.go rename to vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue.go index 1a0b472..c27b4da 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/process_message_queue.go +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue.go @@ -1,4 +1,4 @@ -package activitypub +package queue import ( "context" @@ -12,6 +12,7 @@ import ( type ProcessMessageQueue interface { ProcessMessage(context.Context, int64) error + Close(context.Context) error } var process_message_queue_roster roster.Roster diff --git a/vendor/github.com/sfomuseum/go-activitypub/process_message_queue_null.go b/vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_null.go similarity index 64% rename from vendor/github.com/sfomuseum/go-activitypub/process_message_queue_null.go rename to vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_null.go index 2c488b4..8492f30 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/process_message_queue_null.go +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_null.go @@ -1,4 +1,4 @@ -package activitypub +package queue import ( "context" @@ -10,7 +10,12 @@ type NullProcessMessageQueue struct { func init() { ctx := context.Background() - RegisterProcessMessageQueue(ctx, "null", NewNullProcessMessageQueue) + err := RegisterProcessMessageQueue(ctx, "null", NewNullProcessMessageQueue) + + if err != nil { + panic(err) + } + } func NewNullProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error) { @@ -21,3 +26,7 @@ func NewNullProcessMessageQueue(ctx context.Context, uri string) (ProcessMessage func (q *NullProcessMessageQueue) ProcessMessage(ctx context.Context, message_id int64) error { return nil } + +func (q *NullProcessMessageQueue) Close(ctx context.Context) error { + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/process_message_queue_pubsub.go b/vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_pubsub.go similarity index 55% rename from vendor/github.com/sfomuseum/go-activitypub/process_message_queue_pubsub.go rename to vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_pubsub.go index 5a59e86..ca1f1f5 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/process_message_queue_pubsub.go +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_pubsub.go @@ -1,10 +1,11 @@ -package activitypub +package queue import ( "context" "encoding/json" "fmt" "strings" + "sync" "github.com/sfomuseum/go-pubsub/publisher" ) @@ -14,22 +15,58 @@ type PubSubProcessMessageQueue struct { publisher publisher.Publisher } +var process_register_mu = new(sync.RWMutex) +var process_register_map = map[string]bool{} + func init() { ctx := context.Background() - to_register := []string{ - "awssqs-creds", + err := RegisterPubSubProcessMessageSchemes(ctx) + + if err != nil { + panic(err) } +} - for _, scheme := range to_register { - RegisterProcessMessageQueue(ctx, scheme, NewPubSubProcessMessageQueue) +func RegisterPubSubProcessMessageSchemes(ctx context.Context) error { + + process_register_mu.Lock() + defer process_register_mu.Unlock() + + to_register := []string{ + "awssqs-creds", } for _, scheme := range publisher.PublisherSchemes() { + scheme = strings.Replace(scheme, "://", "", 1) - RegisterProcessMessageQueue(ctx, scheme, NewPubSubProcessMessageQueue) + + // I don't love this so maybe prefix everything as pubsub-{SCHEME} ? TBD... ? + + if scheme != "null" { + to_register = append(to_register, scheme) + } } + + for _, scheme := range to_register { + + _, exists := process_register_map[scheme] + + if exists { + continue + } + + err := RegisterProcessMessageQueue(ctx, scheme, NewPubSubProcessMessageQueue) + + if err != nil { + return fmt.Errorf("Failed to register delivery queue for '%s', %w", scheme, err) + } + + process_register_map[scheme] = true + } + + return nil } func NewPubSubProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error) { @@ -63,3 +100,7 @@ func (q *PubSubProcessMessageQueue) ProcessMessage(ctx context.Context, message_ return nil } + +func (q *PubSubProcessMessageQueue) Close(ctx context.Context) error { + return q.publisher.Close() +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/process_message_queue_slog.go b/vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_slog.go similarity index 68% rename from vendor/github.com/sfomuseum/go-activitypub/process_message_queue_slog.go rename to vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_slog.go index a8ee3e3..ff8898f 100644 --- a/vendor/github.com/sfomuseum/go-activitypub/process_message_queue_slog.go +++ b/vendor/github.com/sfomuseum/go-activitypub/queue/process_message_queue_slog.go @@ -1,4 +1,4 @@ -package activitypub +package queue import ( "context" @@ -11,7 +11,11 @@ type SlogProcessMessageQueue struct { func init() { ctx := context.Background() - RegisterProcessMessageQueue(ctx, "slog", NewSlogProcessMessageQueue) + err := RegisterProcessMessageQueue(ctx, "slog", NewSlogProcessMessageQueue) + + if err != nil { + panic(err) + } } func NewSlogProcessMessageQueue(ctx context.Context, uri string) (ProcessMessageQueue, error) { @@ -23,3 +27,7 @@ func (q *SlogProcessMessageQueue) ProcessMessage(ctx context.Context, message_id slog.Info("Process message", "message_id", message_id) return nil } + +func (q *SlogProcessMessageQueue) Close(ctx context.Context) error { + return nil +} diff --git a/vendor/github.com/sfomuseum/go-activitypub/slog/slog.go b/vendor/github.com/sfomuseum/go-activitypub/slog/slog.go deleted file mode 100644 index a5419af..0000000 --- a/vendor/github.com/sfomuseum/go-activitypub/slog/slog.go +++ /dev/null @@ -1,43 +0,0 @@ -package slog - -import ( - "io" - go_slog "log/slog" - "os" -) - -var logLevel = new(go_slog.LevelVar) - -func EnableVerboseLogging() { - logLevel.Set(go_slog.LevelDebug) -} - -func DisableVerboseLogging() { - logLevel.Set(go_slog.LevelInfo) -} - -func ConfigureLogger(logger *go_slog.Logger, verbose bool) { - - go_slog.SetDefault(logger) - - if verbose { - EnableVerboseLogging() - logger.Debug("Verbose logging enabled") - } -} - -func Default() *go_slog.Logger { - return DefaultWithWriter(os.Stderr) -} - -func DefaultWithWriter(wr io.Writer) *go_slog.Logger { - - opts := &go_slog.HandlerOptions{ - Level: logLevel, - } - - // handler := go_slog.NewJSONHandler(wr, opts) - handler := go_slog.NewTextHandler(wr, opts) - - return go_slog.New(handler) -} diff --git a/vendor/github.com/sfomuseum/go-pubsub/publisher/writer.go b/vendor/github.com/sfomuseum/go-pubsub/publisher/writer.go new file mode 100644 index 0000000..0d6c624 --- /dev/null +++ b/vendor/github.com/sfomuseum/go-pubsub/publisher/writer.go @@ -0,0 +1,40 @@ +package publisher + +import ( + "context" + "io" +) + +// PublisherWriter wraps a `Publisher` instance and confirms to the `io.WriteCloser` interface. +type PublisherWriter struct { + io.WriteCloser + publisher Publisher +} + +// NewWriter returns a new instance of `PublisherWriter` which wraps 'p' and confirms to the `io.WriteCloser` interface. +func NewWriter(p Publisher) io.WriteCloser { + + pwr := &PublisherWriter{ + publisher: p, + } + + return pwr +} + +// Write dispatches 'p' to the underlyng `Publisher` instance. +func (pwr *PublisherWriter) Write(p []byte) (int, error) { + + ctx := context.Background() + err := pwr.publisher.Publish(ctx, string(p)) + + if err != nil { + return 0, err + } + + return len(p), nil +} + +// Closer triggers the underlyng `Publisher` instance's Close method. +func (pwr *PublisherWriter) Close() error { + return pwr.publisher.Close() +} diff --git a/vendor/gocloud.dev/aws/aws.go b/vendor/gocloud.dev/aws/aws.go index 21d4ec5..4ee177c 100644 --- a/vendor/gocloud.dev/aws/aws.go +++ b/vendor/gocloud.dev/aws/aws.go @@ -22,10 +22,14 @@ import ( "strconv" awsv2 "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/ratelimit" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/config" awsv2cfg "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/session" "github.com/google/wire" ) @@ -79,8 +83,10 @@ func (co ConfigOverrider) ClientConfig(serviceName string, cfgs ...*aws.Config) // The following query options are supported: // - region: The AWS region for requests; sets aws.Config.Region. // - endpoint: The endpoint URL (hostname only or fully qualified URI); sets aws.Config.Endpoint. -// - disableSSL: A value of "true" disables SSL when sending requests; sets aws.Config.DisableSSL. -// - s3ForcePathStyle: A value of "true" forces the request to use path-style addressing; sets aws.Config.S3ForcePathStyle. +// - disable_ssl (or disableSSL): A value of "true" disables SSL when sending requests; sets aws.Config.DisableSSL. +// - s3_force_path_style (or s3ForcePathStyle): A value of "true" forces the request to use path-style addressing; sets aws.Config.S3ForcePathStyle. +// - dualstack: A value of "true" enables dual stack (IPv4 and IPv6) endpoints +// - fips: A value of "true" enables the use of FIPS endpoints func ConfigFromURLParams(q url.Values) (*aws.Config, error) { var cfg aws.Config for param, values := range q { @@ -90,18 +96,32 @@ func ConfigFromURLParams(q url.Values) (*aws.Config, error) { cfg.Region = aws.String(value) case "endpoint": cfg.Endpoint = aws.String(value) - case "disableSSL": + case "disable_ssl", "disableSSL": b, err := strconv.ParseBool(value) if err != nil { return nil, fmt.Errorf("invalid value for query parameter %q: %v", param, err) } cfg.DisableSSL = aws.Bool(b) - case "s3ForcePathStyle": + case "s3_force_path_style", "s3ForcePathStyle": b, err := strconv.ParseBool(value) if err != nil { return nil, fmt.Errorf("invalid value for query parameter %q: %v", param, err) } cfg.S3ForcePathStyle = aws.Bool(b) + case "dualstack": + b, err := strconv.ParseBool(value) + if err != nil { + return nil, fmt.Errorf("invalid value for query parameter %q: %v", param, err) + } + cfg.UseDualStack = aws.Bool(b) + case "fips": + b, err := strconv.ParseBool(value) + if err != nil { + return nil, fmt.Errorf("invalid value for query parameter %q: %v", param, err) + } + if b { + cfg.UseFIPSEndpoint = endpoints.FIPSEndpointStateEnabled + } case "awssdk": // ignore, should be handled before this default: @@ -177,30 +197,83 @@ func NewDefaultV2Config(ctx context.Context) (awsv2.Config, error) { // - region: The AWS region for requests; sets WithRegion. // - profile: The shared config profile to use; sets SharedConfigProfile. // - endpoint: The AWS service endpoint to send HTTP request. +// - hostname_immutable: Make the hostname immutable, only works if endpoint is also set. +// - dualstack: A value of "true" enables dual stack (IPv4 and IPv6) endpoints. +// - fips: A value of "true" enables the use of FIPS endpoints. +// - rate_limiter_capacity: A integer value configures the capacity of a token bucket used +// in client-side rate limits. If no value is set, the client-side rate limiting is disabled. +// See https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/retries-timeouts/#client-side-rate-limiting. func V2ConfigFromURLParams(ctx context.Context, q url.Values) (awsv2.Config, error) { + var endpoint string + var hostnameImmutable bool + var rateLimitCapacity int64 var opts []func(*awsv2cfg.LoadOptions) error for param, values := range q { value := values[0] switch param { + case "hostname_immutable": + var err error + hostnameImmutable, err = strconv.ParseBool(value) + if err != nil { + return awsv2.Config{}, fmt.Errorf("invalid value for hostname_immutable: %w", err) + } case "region": opts = append(opts, awsv2cfg.WithRegion(value)) case "endpoint": - customResolver := awsv2.EndpointResolverWithOptionsFunc( - func(service, region string, options ...interface{}) (awsv2.Endpoint, error) { - return awsv2.Endpoint{ - PartitionID: "aws", - URL: value, - SigningRegion: region, - }, nil - }) - opts = append(opts, awsv2cfg.WithEndpointResolverWithOptions(customResolver)) + endpoint = value case "profile": opts = append(opts, awsv2cfg.WithSharedConfigProfile(value)) + case "dualstack": + dualStack, err := strconv.ParseBool(value) + if err != nil { + return awsv2.Config{}, fmt.Errorf("invalid value for dualstack: %w", err) + } + if dualStack { + opts = append(opts, awsv2cfg.WithUseDualStackEndpoint(awsv2.DualStackEndpointStateEnabled)) + } + case "fips": + fips, err := strconv.ParseBool(value) + if err != nil { + return awsv2.Config{}, fmt.Errorf("invalid value for fips: %w", err) + } + if fips { + opts = append(opts, awsv2cfg.WithUseFIPSEndpoint(awsv2.FIPSEndpointStateEnabled)) + } + case "rate_limiter_capacity": + var err error + rateLimitCapacity, err = strconv.ParseInt(value, 10, 32) + if err != nil { + return awsv2.Config{}, fmt.Errorf("invalid value for capacity: %w", err) + } case "awssdk": // ignore, should be handled before this default: return awsv2.Config{}, fmt.Errorf("unknown query parameter %q", param) } } + if endpoint != "" { + customResolver := awsv2.EndpointResolverWithOptionsFunc( + func(service, region string, options ...interface{}) (awsv2.Endpoint, error) { + return awsv2.Endpoint{ + PartitionID: "aws", + URL: endpoint, + SigningRegion: region, + HostnameImmutable: hostnameImmutable, + }, nil + }) + opts = append(opts, awsv2cfg.WithEndpointResolverWithOptions(customResolver)) + } + + var rateLimiter retry.RateLimiter + rateLimiter = ratelimit.None + if rateLimitCapacity > 0 { + rateLimiter = ratelimit.NewTokenRateLimit(uint(rateLimitCapacity)) + } + opts = append(opts, config.WithRetryer(func() awsv2.Retryer { + return retry.NewStandard(func(so *retry.StandardOptions) { + so.RateLimiter = rateLimiter + }) + })) + return awsv2cfg.LoadDefaultConfig(ctx, opts...) } diff --git a/vendor/modules.txt b/vendor/modules.txt index b96ff7a..314a83b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,10 +1,10 @@ # github.com/PuerkitoBio/goquery v1.8.0 ## explicit; go 1.13 github.com/PuerkitoBio/goquery -# github.com/aaronland/go-aws-auth v1.6.4 +# github.com/aaronland/go-aws-auth v1.6.5 ## explicit; go 1.22.1 github.com/aaronland/go-aws-auth -# github.com/aaronland/go-aws-dynamodb v0.4.0 +# github.com/aaronland/go-aws-dynamodb v0.4.1 ## explicit; go 1.22.1 github.com/aaronland/go-aws-dynamodb # github.com/aaronland/go-aws-session v0.2.1 @@ -86,12 +86,11 @@ github.com/aws/aws-sdk-go/service/sso/ssoiface github.com/aws/aws-sdk-go/service/ssooidc github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface -# github.com/aws/aws-sdk-go-v2 v1.31.0 +# github.com/aws/aws-sdk-go-v2 v1.32.4 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/defaults github.com/aws/aws-sdk-go-v2/aws/middleware -github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics github.com/aws/aws-sdk-go-v2/aws/protocol/query github.com/aws/aws-sdk-go-v2/aws/protocol/restjson github.com/aws/aws-sdk-go-v2/aws/protocol/xml @@ -114,11 +113,11 @@ github.com/aws/aws-sdk-go-v2/internal/shareddefaults github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/config v1.27.27 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/config v1.27.39 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/config -# github.com/aws/aws-sdk-go-v2/credentials v1.17.27 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/credentials v1.17.41 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/credentials github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds github.com/aws/aws-sdk-go-v2/credentials/endpointcreds @@ -126,42 +125,42 @@ github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client github.com/aws/aws-sdk-go-v2/credentials/processcreds github.com/aws/aws-sdk-go-v2/credentials/ssocreds github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/internal/ini -# github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.25.5 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/cognitoidentity v1.26.3 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/cognitoidentity github.com/aws/aws-sdk-go-v2/service/cognitoidentity/internal/endpoints github.com/aws/aws-sdk-go-v2/service/cognitoidentity/types -# github.com/aws/aws-sdk-go-v2/service/dynamodb v1.35.4 +# github.com/aws/aws-sdk-go-v2/service/dynamodb v1.36.5 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/dynamodb github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/customizations github.com/aws/aws-sdk-go-v2/service/dynamodb/internal/endpoints github.com/aws/aws-sdk-go-v2/service/dynamodb/types -# github.com/aws/aws-sdk-go-v2/service/iam v1.34.3 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/iam v1.36.3 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/iam github.com/aws/aws-sdk-go-v2/service/iam/internal/endpoints github.com/aws/aws-sdk-go-v2/service/iam/types -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 +# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.19 +# github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.4 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18 +# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url # github.com/aws/aws-sdk-go-v2/service/sns v1.31.3 @@ -169,32 +168,32 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url github.com/aws/aws-sdk-go-v2/service/sns github.com/aws/aws-sdk-go-v2/service/sns/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sns/types -# github.com/aws/aws-sdk-go-v2/service/sqs v1.34.7 +# github.com/aws/aws-sdk-go-v2/service/sqs v1.36.3 ## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/sqs github.com/aws/aws-sdk-go-v2/service/sqs/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sqs/types -# github.com/aws/aws-sdk-go-v2/service/ssm v1.52.4 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/ssm v1.54.3 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ssm github.com/aws/aws-sdk-go-v2/service/ssm/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssm/types -# github.com/aws/aws-sdk-go-v2/service/sso v1.22.4 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/sso github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sso/types -# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.4 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/ssooidc github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.30.3 -## explicit; go 1.20 +# github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 +## explicit; go 1.21 github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.21.0 +# github.com/aws/smithy-go v1.22.0 ## explicit; go 1.21 github.com/aws/smithy-go github.com/aws/smithy-go/auth @@ -280,7 +279,7 @@ github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.2 ## explicit; go 1.12 github.com/modern-go/reflect2 -# github.com/redis/go-redis/v9 v9.6.1 +# github.com/redis/go-redis/v9 v9.7.0 ## explicit; go 1.18 github.com/redis/go-redis/v9 github.com/redis/go-redis/v9/internal @@ -290,13 +289,17 @@ github.com/redis/go-redis/v9/internal/pool github.com/redis/go-redis/v9/internal/proto github.com/redis/go-redis/v9/internal/rand github.com/redis/go-redis/v9/internal/util -# github.com/sfomuseum/go-activitypub v0.0.0-20241003223003-48bbe22fd99a +# github.com/sfomuseum/go-activitypub v0.0.2 ## explicit; go 1.23 github.com/sfomuseum/go-activitypub github.com/sfomuseum/go-activitypub/ap github.com/sfomuseum/go-activitypub/crypto +github.com/sfomuseum/go-activitypub/database +github.com/sfomuseum/go-activitypub/deliver +github.com/sfomuseum/go-activitypub/html github.com/sfomuseum/go-activitypub/id -github.com/sfomuseum/go-activitypub/slog +github.com/sfomuseum/go-activitypub/posts +github.com/sfomuseum/go-activitypub/queue github.com/sfomuseum/go-activitypub/sqlite github.com/sfomuseum/go-activitypub/uris github.com/sfomuseum/go-activitypub/webfinger @@ -304,7 +307,7 @@ github.com/sfomuseum/go-activitypub/webfinger ## explicit; go 1.16 github.com/sfomuseum/go-flags/flagset github.com/sfomuseum/go-flags/multi -# github.com/sfomuseum/go-pubsub v0.0.18 +# github.com/sfomuseum/go-pubsub v0.0.19 ## explicit; go 1.23 github.com/sfomuseum/go-pubsub github.com/sfomuseum/go-pubsub/publisher @@ -349,7 +352,7 @@ go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate -# gocloud.dev v0.39.0 +# gocloud.dev v0.40.0 ## explicit; go 1.21.0 gocloud.dev/aws gocloud.dev/docstore @@ -406,7 +409,7 @@ golang.org/x/sync/errgroup golang.org/x/sys/cpu golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/text v0.18.0 +# golang.org/x/text v0.19.0 ## explicit; go 1.18 golang.org/x/text/encoding golang.org/x/text/encoding/charmap