зеркало из https://github.com/Azure/buffalo-azure.git
Backing off using a useful time construct.
Because the time string is provided by the event publisher, we can't have nice things. They can choose whatever format they want, it may not even be valid.
This commit is contained in:
Родитель
5205436578
Коммит
90fae33743
|
@ -24,7 +24,7 @@ func ExampleCache() {
|
|||
myCache.Clear()
|
||||
fmt.Println(myCache.List())
|
||||
// Output:
|
||||
// [{ [] Microsoft.Storage.BlobCreated 0001-01-01 00:00:00 +0000 UTC } { [] Contoso.Buffalo.CacheProd 0001-01-01 00:00:00 +0000 UTC }]
|
||||
// [{ [] Microsoft.Storage.BlobCreated } { [] Contoso.Buffalo.CacheProd }]
|
||||
// []
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/buffalo"
|
||||
)
|
||||
|
@ -19,7 +18,7 @@ type Event struct {
|
|||
Subject string `json:"subject"`
|
||||
Data json.RawMessage `json:"data"`
|
||||
EventType string `json:"eventType"`
|
||||
EventTime time.Time `json:"eventTime"`
|
||||
EventTime string `json:"eventTime"`
|
||||
MetadataVersion string `json:"metadataVersion"`
|
||||
DataVersion string `json:"dataVersion"`
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче