Skip to content

Commit 891c21f

Browse files
ACLP: updating variable type for entity_ids for different service_types (#746)
* updating variable type for entity_ids for different service_types * update tests and comments * revert go.work.sum * Updated comment for lint issues --------- Co-authored-by: Ye Chen <[email protected]>
1 parent 4862b5f commit 891c21f

File tree

5 files changed

+544
-915
lines changed

5 files changed

+544
-915
lines changed

monitor_services_create_token.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ type MonitorServiceToken struct {
99
Token string `json:"token"`
1010
}
1111

12-
// Create token options
12+
// Create token options.
1313
type MonitorTokenCreateOptions struct {
14-
EntityIDs []int `json:"entity_ids"`
14+
// EntityIDs are expected to be type "any" as different service_types have different variable type for their entity_ids. For example, Linode has "int" entity_ids whereas object storage has "string" as entity_ids.
15+
EntityIDs []any `json:"entity_ids"`
1516
}
1617

1718
// CreateMonitorServiceTokenForServiceType to create token for a given serviceType

0 commit comments

Comments
 (0)