mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-28 23:08:47 +00:00
refactor: Replace interface{} with any type alias across codebase
- Replace interface{} with any in api_integration_test.go makeRequest method and test response maps
- Replace interface{} with any in logging.go WithField method and all logging function signatures
- Replace interface{} with any in middleware etag.go sync.Map.Range callback
- Replace interface{} with any in middleware redis_ratelimit.go RedisClientInterface and result parsing
- Replace interface{} with any in middleware redis_ratelimit_
This commit is contained in:
@@ -43,7 +43,7 @@ func CheckConnectivityHandler(client *es2.ES2Client) gin.HandlerFunc {
|
||||
_, err := client.GetProfileStatus(context.Background(), req)
|
||||
|
||||
connected := err == nil
|
||||
var errMsg interface{}
|
||||
var errMsg any
|
||||
if err != nil {
|
||||
errMsg = err.Error()
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ func OrderProfileHandlerWithRepo(client *es2.ES2Client, repo repository.ProfileR
|
||||
|
||||
// Send webhook notification for successful download
|
||||
if webhookClient != nil {
|
||||
go webhookClient.SendProfileDownloaded(context.Background(), order.ICCID, map[string]interface{}{
|
||||
go webhookClient.SendProfileDownloaded(context.Background(), order.ICCID, map[string]any{
|
||||
"imsi": order.IMSI,
|
||||
"profileType": order.ProfileType,
|
||||
"status": downloadResp.ExecutionStatus,
|
||||
@@ -141,10 +141,7 @@ func GetProfileHandlerWithRepo(client *es2.ES2Client, repo repository.ProfileRep
|
||||
func ListProfilesHandlerWithRepo(repo repository.ProfileRepository) gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
page := parsePositiveInt(c.Query("page"), 1)
|
||||
limit := parsePositiveInt(c.Query("limit"), 20)
|
||||
if limit > 100 {
|
||||
limit = 100
|
||||
}
|
||||
limit := min(parsePositiveInt(c.Query("limit"), 20), 100)
|
||||
|
||||
Logger.Info().Int("page", page).Int("limit", limit).Msg("Listing eSIM profiles")
|
||||
|
||||
@@ -194,7 +191,7 @@ func DeleteProfileHandlerWithRepo(client *es2.ES2Client, repo repository.Profile
|
||||
|
||||
// Send webhook notification for profile deletion
|
||||
if webhookClient != nil {
|
||||
go webhookClient.SendProfileDeleted(context.Background(), profileID, map[string]interface{}{
|
||||
go webhookClient.SendProfileDeleted(context.Background(), profileID, map[string]any{
|
||||
"executionStatus": deleteResp.ExecutionStatus,
|
||||
"statusMessage": deleteResp.StatusMessage,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user