github.com/fastly/cli@v1.7.2-0.20240304164155-9d0f1d77c3bf/pkg/commands/stats/obj.go (about)

     1  package stats
     2  
     3  // The structs in this file are similar to those in go-fastly, but
     4  // intended for json use rather than mapstructure.
     5  
     6  type statsResponse struct {
     7  	Status string            `json:"status"`
     8  	Msg    string            `json:"msg"`
     9  	Meta   statsResponseMeta `json:"meta"`
    10  
    11  	Data []statsResponseData `json:"data"`
    12  }
    13  
    14  type statsResponseMeta struct {
    15  	From   string `json:"from"`
    16  	To     string `json:"to"`
    17  	By     string `json:"by"`
    18  	Region string `json:"region"`
    19  }
    20  
    21  type statsResponseData map[string]any
    22  
    23  type realtimeResponse struct {
    24  	Timestamp uint64                 `json:"timestamp"`
    25  	Data      []realtimeResponseData `json:"data"`
    26  }
    27  
    28  type realtimeResponseData struct {
    29  	Recorded   float64           `json:"recorded"`
    30  	Aggregated statsResponseData `json:"aggregated"`
    31  }