Skip to content

Commit

Permalink
fix: name, typo
Browse files Browse the repository at this point in the history
  • Loading branch information
wafuwafu13 committed Apr 22, 2023
1 parent 99cb998 commit 8dbfe7b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions events/ecs_container_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,39 @@ type ECSContainerInstanceEvent struct {
}

type ECSContainerInstanceEventDetailType struct {
AgentConnected bool `json:"agentConnected"`
Attributes []Attribute `json:"attributes"`
ClusterARN string `json:"clusterArn"`
ContainerInstanceARN string `json:"containerInstanceArn"`
EC2InstanceID string `json:"ec2InstanceId"`
RegisteredResources []Resource `json:"registeredResources"`
RemainingResources []Resource `json:"remainingResources"`
Status string `json:"status"`
Version int `json:"version"`
VersionInfo VersionInfo `json:"versionInfo"`
UpdatedAt time.Time `json:"updatedAt"`
AgentConnected bool `json:"agentConnected"`
Attributes []ECSContainerInstanceEventAttribute `json:"attributes"`
ClusterARN string `json:"clusterArn"`
ContainerInstanceARN string `json:"containerInstanceArn"`
EC2InstanceID string `json:"ec2InstanceId"`
RegisteredResources []ECSContainerInstanceEventResource `json:"registeredResources"`
RemainingResources []ECSContainerInstanceEventResource `json:"remainingResources"`
Status string `json:"status"`
Version int `json:"version"`
VersionInfo ECSContainerInstanceEventVersionInfo `json:"versionInfo"`
UpdatedAt time.Time `json:"updatedAt"`
}

type Attribute struct {
type ECSContainerInstanceEventAttribute struct {
Name string `json:"name"`
}

type Resource struct {
type ECSContainerInstanceEventResource struct {
Name string `json:"name"`
Type string `json:"type"`
IntegerValue int `json:"integerValue,omitempty"`
StringSetValue []*string `json:"stringSetValue,omitempty"`
}

type VersionInfo struct {
type ECSContainerInstanceEventVersionInfo struct {
AgentHash string `json:"agentHash"`
AgentVersion string `json:"agentVersion"`
DockerVersion string `json:"dockerVersion"`
}

// MarshalJSON implements cuustom marshaling to marshal the struct into JSON format while preserving an empty string slice in `StringSetValue` field.
func (r Resource) MarshalJSON() ([]byte, error) {
type Alias Resource
// MarshalJSON implements custom marshaling to marshal the struct into JSON format while preserving an empty string slice in `StringSetValue` field.
func (r ECSContainerInstanceEventResource) MarshalJSON() ([]byte, error) {
type Alias ECSContainerInstanceEventResource
aux := struct {
StringSetValue json.RawMessage `json:"stringSetValue,omitempty"`
Alias
Expand Down
2 changes: 1 addition & 1 deletion events/ecs_container_instance_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
package events

import (
Expand Down

0 comments on commit 8dbfe7b

Please sign in to comment.