-
Notifications
You must be signed in to change notification settings - Fork 9
Add AWS VPC Lattice SDK-Compat Parity (73 Operations) #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
thzgajendra
merged 4 commits into
stackshy:development
from
thzgajendra:feat/aws-vpclattice-parity
Aug 7, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ac6d982
feat(aws): add VPC Lattice SDK-compat parity (73 operations)
thzgajendra b6bfd14
fix(aws): address VPC Lattice review — tags, cascade, counts, routing
thzgajendra bda25c2
Merge branch 'development' of https://github.com/stackshy/cloudemu in…
thzgajendra 541d4a6
fix(vpclattice): close S3-shadow residual by gating on identifier sha…
thzgajendra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| package vpclattice | ||
|
|
||
| import ( | ||
| "context" | ||
|
|
||
| "github.com/stackshy/cloudemu/v2/errors" | ||
| "github.com/stackshy/cloudemu/v2/internal/idgen" | ||
| "github.com/stackshy/cloudemu/v2/services/vpclattice/driver" | ||
| ) | ||
|
|
||
| func accessLogSubNotFound(id string) error { | ||
| return errors.Newf(errors.NotFound, "access log subscription %q not found", id) | ||
| } | ||
|
|
||
| func cloneAccessLogSub(a *driver.AccessLogSubscription) driver.AccessLogSubscription { return *a } | ||
|
|
||
| func (m *Mock) CreateAccessLogSubscription( | ||
| _ context.Context, resourceIdentifier, destinationARN, logType string, tags map[string]string, | ||
| ) (*driver.AccessLogSubscription, error) { | ||
| m.mu.Lock() | ||
| defer m.mu.Unlock() | ||
|
|
||
| id := idgen.GenerateID("als-") | ||
| a := &driver.AccessLogSubscription{ | ||
| ID: id, | ||
| ARN: m.arn("accesslogsubscription/" + id), | ||
| DestinationARN: destinationARN, | ||
| ResourceID: idFromIdentifier(resourceIdentifier), | ||
| ResourceARN: resourceIdentifier, | ||
| ServiceNetworkLogType: logType, | ||
| CreatedAt: m.now(), | ||
| LastUpdatedAt: m.now(), | ||
| } | ||
| m.accessLogSubs.Set(id, a) | ||
| m.writeTags(a.ARN, tags) | ||
|
|
||
| out := cloneAccessLogSub(a) | ||
|
|
||
| return &out, nil | ||
| } | ||
|
|
||
| func (m *Mock) GetAccessLogSubscription(_ context.Context, identifier string) (*driver.AccessLogSubscription, error) { | ||
| m.mu.Lock() | ||
| defer m.mu.Unlock() | ||
|
|
||
| id := idFromIdentifier(identifier) | ||
|
|
||
| a, ok := m.accessLogSubs.Get(id) | ||
| if !ok { | ||
| return nil, accessLogSubNotFound(id) | ||
| } | ||
|
|
||
| out := cloneAccessLogSub(a) | ||
|
|
||
| return &out, nil | ||
| } | ||
|
|
||
| func (m *Mock) UpdateAccessLogSubscription( | ||
| _ context.Context, identifier, destinationARN string, | ||
| ) (*driver.AccessLogSubscription, error) { | ||
| m.mu.Lock() | ||
| defer m.mu.Unlock() | ||
|
|
||
| id := idFromIdentifier(identifier) | ||
|
|
||
| a, ok := m.accessLogSubs.Get(id) | ||
| if !ok { | ||
| return nil, accessLogSubNotFound(id) | ||
| } | ||
|
|
||
| if destinationARN != "" { | ||
| a.DestinationARN = destinationARN | ||
| } | ||
|
|
||
| a.LastUpdatedAt = m.now() | ||
|
|
||
| out := cloneAccessLogSub(a) | ||
|
|
||
| return &out, nil | ||
| } | ||
|
|
||
| func (m *Mock) DeleteAccessLogSubscription(_ context.Context, identifier string) error { | ||
| m.mu.Lock() | ||
| defer m.mu.Unlock() | ||
|
|
||
| id := idFromIdentifier(identifier) | ||
|
|
||
| if !m.accessLogSubs.Has(id) { | ||
| return accessLogSubNotFound(id) | ||
| } | ||
|
|
||
| m.accessLogSubs.Delete(id) | ||
|
|
||
| return nil | ||
| } | ||
|
|
||
| func (m *Mock) ListAccessLogSubscriptions(_ context.Context) ([]driver.AccessLogSubscription, error) { | ||
| m.mu.Lock() | ||
| defer m.mu.Unlock() | ||
|
|
||
| return sortedValues(m.accessLogSubs.All(), cloneAccessLogSub), nil | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[STRUCTURE.md §3] Smashed multi-word filenames should be snake_case:
accesslogs.go→access_logs.go, and likewiseservice_networks.go,resource_gateways.go,resource_configs.go,domain_verifications.go,target_groups.go— in BOTHproviders/aws/vpclattice/andserver/aws/vpclattice/(a feature keeps the same filename across layers). New services now go through the STRUCTURE.md loop, so worth doing here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[STRUCTURE.md §3] Fixed. Renamed to snake_case in both layers:
access_logs.go,service_networks.go,resource_gateways.go,resource_configs.go,domain_verifications.go,target_groups.go(viagit mv).