OSDN Git Service

modify ci
[bytom/vapor.git] / vendor / github.com / go-kit / kit / examples / shipping / handling / endpoint.go
diff --git a/vendor/github.com/go-kit/kit/examples/shipping/handling/endpoint.go b/vendor/github.com/go-kit/kit/examples/shipping/handling/endpoint.go
deleted file mode 100644 (file)
index 555d087..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package handling
-
-import (
-       "context"
-       "time"
-
-       "github.com/go-kit/kit/endpoint"
-
-       "github.com/go-kit/kit/examples/shipping/cargo"
-       "github.com/go-kit/kit/examples/shipping/location"
-       "github.com/go-kit/kit/examples/shipping/voyage"
-)
-
-type registerIncidentRequest struct {
-       ID             cargo.TrackingID
-       Location       location.UNLocode
-       Voyage         voyage.Number
-       EventType      cargo.HandlingEventType
-       CompletionTime time.Time
-}
-
-type registerIncidentResponse struct {
-       Err error `json:"error,omitempty"`
-}
-
-func (r registerIncidentResponse) error() error { return r.Err }
-
-func makeRegisterIncidentEndpoint(hs Service) endpoint.Endpoint {
-       return func(ctx context.Context, request interface{}) (interface{}, error) {
-               req := request.(registerIncidentRequest)
-               err := hs.RegisterHandlingEvent(req.CompletionTime, req.ID, req.Voyage, req.Location, req.EventType)
-               return registerIncidentResponse{Err: err}, nil
-       }
-}