diff --git a/cmd/cache/main.go b/cmd/cache/main.go index 0db3723ab09cb4cf45928bcbffbdd264324875e6..059172e0033b1f7f82317ceef215e958286ce359 100644 --- a/cmd/cache/main.go +++ b/cmd/cache/main.go @@ -20,6 +20,7 @@ import ( goahealthsrv "code.vereign.com/gaiax/tsa/cache/gen/http/health/server" goaopenapisrv "code.vereign.com/gaiax/tsa/cache/gen/http/openapi/server" "code.vereign.com/gaiax/tsa/cache/gen/openapi" + "code.vereign.com/gaiax/tsa/cache/internal/clients/event" "code.vereign.com/gaiax/tsa/cache/internal/clients/redis" "code.vereign.com/gaiax/tsa/cache/internal/config" "code.vereign.com/gaiax/tsa/cache/internal/service" @@ -47,13 +48,20 @@ func main() { // create redis client redis := redis.New(cfg.Redis.Addr, cfg.Redis.User, cfg.Redis.Pass, cfg.Redis.DB, cfg.Redis.TTL) + // create event client + events, err := event.New(cfg.Nats.Addr, cfg.Nats.Subject) + if err != nil { + log.Fatalf("failed to create events client: %v", err) + } + defer events.CLose(context.Background()) + // create services var ( cacheSvc goacache.Service healthSvc goahealth.Service ) { - cacheSvc = cache.New(redis, logger) + cacheSvc = cache.New(redis, events, logger) healthSvc = health.New() } diff --git a/design/design.go b/design/design.go index df4c8c84acb64044fe38b34e5487573297d43302..5d526681e7f636984e8229fb5ffd58e2cbb519d5 100644 --- a/design/design.go +++ b/design/design.go @@ -88,6 +88,30 @@ var _ = Service("cache", func() { Response(StatusCreated) }) }) + + Method("SetExternal", func() { + Description("Set an external JSON value in the cache and provide an event for the input.") + + Payload(CacheSetRequest) + Result(Empty) + + HTTP(func() { + POST("/v1/external/cache") + + Header("key:x-cache-key", String, "Cache entry key", func() { + Example("did:web:example.com") + }) + Header("namespace:x-cache-namespace", String, "Cache entry namespace", func() { + Example("Login") + }) + Header("scope:x-cache-scope", String, "Cache entry scope", func() { + Example("administration") + }) + Body("data") + + Response(StatusOK) + }) + }) }) var _ = Service("openapi", func() { diff --git a/gen/cache/client.go b/gen/cache/client.go index d076c91f9ce19b9aa45fb2e4abeaa45e808603c3..29eb7ec4715d877ccf5818551b9ba11faf704298 100644 --- a/gen/cache/client.go +++ b/gen/cache/client.go @@ -15,15 +15,17 @@ import ( // Client is the "cache" service client. type Client struct { - GetEndpoint goa.Endpoint - SetEndpoint goa.Endpoint + GetEndpoint goa.Endpoint + SetEndpoint goa.Endpoint + SetExternalEndpoint goa.Endpoint } // NewClient initializes a "cache" service client given the endpoints. -func NewClient(get, set goa.Endpoint) *Client { +func NewClient(get, set, setExternal goa.Endpoint) *Client { return &Client{ - GetEndpoint: get, - SetEndpoint: set, + GetEndpoint: get, + SetEndpoint: set, + SetExternalEndpoint: setExternal, } } @@ -42,3 +44,9 @@ func (c *Client) Set(ctx context.Context, p *CacheSetRequest) (err error) { _, err = c.SetEndpoint(ctx, p) return } + +// SetExternal calls the "SetExternal" endpoint of the "cache" service. +func (c *Client) SetExternal(ctx context.Context, p *CacheSetRequest) (err error) { + _, err = c.SetExternalEndpoint(ctx, p) + return +} diff --git a/gen/cache/endpoints.go b/gen/cache/endpoints.go index c3d44cb790448204680ba0f060701a6bfffede4c..6192aaaa49f1db860dd47f3933f043a0685b57e6 100644 --- a/gen/cache/endpoints.go +++ b/gen/cache/endpoints.go @@ -15,15 +15,17 @@ import ( // Endpoints wraps the "cache" service endpoints. type Endpoints struct { - Get goa.Endpoint - Set goa.Endpoint + Get goa.Endpoint + Set goa.Endpoint + SetExternal goa.Endpoint } // NewEndpoints wraps the methods of the "cache" service with endpoints. func NewEndpoints(s Service) *Endpoints { return &Endpoints{ - Get: NewGetEndpoint(s), - Set: NewSetEndpoint(s), + Get: NewGetEndpoint(s), + Set: NewSetEndpoint(s), + SetExternal: NewSetExternalEndpoint(s), } } @@ -31,6 +33,7 @@ func NewEndpoints(s Service) *Endpoints { func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) { e.Get = m(e.Get) e.Set = m(e.Set) + e.SetExternal = m(e.SetExternal) } // NewGetEndpoint returns an endpoint function that calls the method "Get" of @@ -50,3 +53,12 @@ func NewSetEndpoint(s Service) goa.Endpoint { return nil, s.Set(ctx, p) } } + +// NewSetExternalEndpoint returns an endpoint function that calls the method +// "SetExternal" of service "cache". +func NewSetExternalEndpoint(s Service) goa.Endpoint { + return func(ctx context.Context, req interface{}) (interface{}, error) { + p := req.(*CacheSetRequest) + return nil, s.SetExternal(ctx, p) + } +} diff --git a/gen/cache/service.go b/gen/cache/service.go index bfae15ea75b37201caac3dc39b8ea600f82c19b3..2c1dcd3e5389febd511c65c1a05861f48c17dc7f 100644 --- a/gen/cache/service.go +++ b/gen/cache/service.go @@ -17,6 +17,8 @@ type Service interface { Get(context.Context, *CacheGetRequest) (res interface{}, err error) // Set a JSON value in the cache. Set(context.Context, *CacheSetRequest) (err error) + // Set an external JSON value in the cache and provide an event for the input. + SetExternal(context.Context, *CacheSetRequest) (err error) } // ServiceName is the name of the service as defined in the design. This is the @@ -27,7 +29,7 @@ const ServiceName = "cache" // MethodNames lists the service method names as defined in the design. These // are the same values that are set in the endpoint request contexts under the // MethodKey key. -var MethodNames = [2]string{"Get", "Set"} +var MethodNames = [3]string{"Get", "Set", "SetExternal"} // CacheGetRequest is the payload type of the cache service Get method. type CacheGetRequest struct { diff --git a/gen/http/cache/client/cli.go b/gen/http/cache/client/cli.go index 813a41a7f13f7eb4f83ad939e50e08e0a813f1a9..dc478e33096dfdc9fb4a4f6f31829b65af333ba9 100644 --- a/gen/http/cache/client/cli.go +++ b/gen/http/cache/client/cli.go @@ -76,3 +76,41 @@ func BuildSetPayload(cacheSetBody string, cacheSetKey string, cacheSetNamespace return res, nil } + +// BuildSetExternalPayload builds the payload for the cache SetExternal +// endpoint from CLI flags. +func BuildSetExternalPayload(cacheSetExternalBody string, cacheSetExternalKey string, cacheSetExternalNamespace string, cacheSetExternalScope string) (*cache.CacheSetRequest, error) { + var err error + var body interface{} + { + err = json.Unmarshal([]byte(cacheSetExternalBody), &body) + if err != nil { + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "\"Enim vel.\"") + } + } + var key string + { + key = cacheSetExternalKey + } + var namespace *string + { + if cacheSetExternalNamespace != "" { + namespace = &cacheSetExternalNamespace + } + } + var scope *string + { + if cacheSetExternalScope != "" { + scope = &cacheSetExternalScope + } + } + v := body + res := &cache.CacheSetRequest{ + Data: v, + } + res.Key = key + res.Namespace = namespace + res.Scope = scope + + return res, nil +} diff --git a/gen/http/cache/client/client.go b/gen/http/cache/client/client.go index f813e4412a506fd9efed09bd9b534d490a5b8576..8aa120fa7621b3e36c6b7ff5404a6d659976eb8a 100644 --- a/gen/http/cache/client/client.go +++ b/gen/http/cache/client/client.go @@ -23,6 +23,10 @@ type Client struct { // Set Doer is the HTTP client used to make requests to the Set endpoint. SetDoer goahttp.Doer + // SetExternal Doer is the HTTP client used to make requests to the SetExternal + // endpoint. + SetExternalDoer goahttp.Doer + // RestoreResponseBody controls whether the response bodies are reset after // decoding so they can be read again. RestoreResponseBody bool @@ -45,6 +49,7 @@ func NewClient( return &Client{ GetDoer: doer, SetDoer: doer, + SetExternalDoer: doer, RestoreResponseBody: restoreBody, scheme: scheme, host: host, @@ -100,3 +105,27 @@ func (c *Client) Set() goa.Endpoint { return decodeResponse(resp) } } + +// SetExternal returns an endpoint that makes HTTP requests to the cache +// service SetExternal server. +func (c *Client) SetExternal() goa.Endpoint { + var ( + encodeRequest = EncodeSetExternalRequest(c.encoder) + decodeResponse = DecodeSetExternalResponse(c.decoder, c.RestoreResponseBody) + ) + return func(ctx context.Context, v interface{}) (interface{}, error) { + req, err := c.BuildSetExternalRequest(ctx, v) + if err != nil { + return nil, err + } + err = encodeRequest(req, v) + if err != nil { + return nil, err + } + resp, err := c.SetExternalDoer.Do(req) + if err != nil { + return nil, goahttp.ErrRequestError("cache", "SetExternal", err) + } + return decodeResponse(resp) + } +} diff --git a/gen/http/cache/client/encode_decode.go b/gen/http/cache/client/encode_decode.go index 623765fd4fc138164971ad9ba9dcd35000665f70..785e039021e041b2a690caaa2e253321606e5213 100644 --- a/gen/http/cache/client/encode_decode.go +++ b/gen/http/cache/client/encode_decode.go @@ -161,3 +161,73 @@ func DecodeSetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody } } } + +// BuildSetExternalRequest instantiates a HTTP request object with method and +// path set to call the "cache" service "SetExternal" endpoint +func (c *Client) BuildSetExternalRequest(ctx context.Context, v interface{}) (*http.Request, error) { + u := &url.URL{Scheme: c.scheme, Host: c.host, Path: SetExternalCachePath()} + req, err := http.NewRequest("POST", u.String(), nil) + if err != nil { + return nil, goahttp.ErrInvalidURL("cache", "SetExternal", u.String(), err) + } + if ctx != nil { + req = req.WithContext(ctx) + } + + return req, nil +} + +// EncodeSetExternalRequest returns an encoder for requests sent to the cache +// SetExternal server. +func EncodeSetExternalRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error { + return func(req *http.Request, v interface{}) error { + p, ok := v.(*cache.CacheSetRequest) + if !ok { + return goahttp.ErrInvalidType("cache", "SetExternal", "*cache.CacheSetRequest", v) + } + { + head := p.Key + req.Header.Set("x-cache-key", head) + } + if p.Namespace != nil { + head := *p.Namespace + req.Header.Set("x-cache-namespace", head) + } + if p.Scope != nil { + head := *p.Scope + req.Header.Set("x-cache-scope", head) + } + body := p.Data + if err := encoder(req).Encode(&body); err != nil { + return goahttp.ErrEncodingError("cache", "SetExternal", err) + } + return nil + } +} + +// DecodeSetExternalResponse returns a decoder for responses returned by the +// cache SetExternal endpoint. restoreBody controls whether the response body +// should be restored after having been read. +func DecodeSetExternalResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) { + return func(resp *http.Response) (interface{}, error) { + if restoreBody { + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + defer func() { + resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + }() + } else { + defer resp.Body.Close() + } + switch resp.StatusCode { + case http.StatusOK: + return nil, nil + default: + body, _ := ioutil.ReadAll(resp.Body) + return nil, goahttp.ErrInvalidResponse("cache", "SetExternal", resp.StatusCode, string(body)) + } + } +} diff --git a/gen/http/cache/client/paths.go b/gen/http/cache/client/paths.go index 90588e4bae0c42a9b125238089f4519ae1b13a5f..51262f0095ae475c9693bf7a3f03498e749301ee 100644 --- a/gen/http/cache/client/paths.go +++ b/gen/http/cache/client/paths.go @@ -16,3 +16,8 @@ func GetCachePath() string { func SetCachePath() string { return "/v1/cache" } + +// SetExternalCachePath returns the URL path to the cache service SetExternal HTTP endpoint. +func SetExternalCachePath() string { + return "/v1/external/cache" +} diff --git a/gen/http/cache/server/encode_decode.go b/gen/http/cache/server/encode_decode.go index a58b4a904640446b1bd0173754f71e47cf72aed3..91d08e0c2585e5c4c2e516eade739f92c821e77d 100644 --- a/gen/http/cache/server/encode_decode.go +++ b/gen/http/cache/server/encode_decode.go @@ -110,3 +110,54 @@ func DecodeSetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Dec return payload, nil } } + +// EncodeSetExternalResponse returns an encoder for responses returned by the +// cache SetExternal endpoint. +func EncodeSetExternalResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error { + return func(ctx context.Context, w http.ResponseWriter, v interface{}) error { + w.WriteHeader(http.StatusOK) + return nil + } +} + +// DecodeSetExternalRequest returns a decoder for requests sent to the cache +// SetExternal endpoint. +func DecodeSetExternalRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error) { + return func(r *http.Request) (interface{}, error) { + var ( + body interface{} + err error + ) + err = decoder(r).Decode(&body) + if err != nil { + if err == io.EOF { + return nil, goa.MissingPayloadError() + } + return nil, goa.DecodePayloadError(err.Error()) + } + + var ( + key string + namespace *string + scope *string + ) + key = r.Header.Get("x-cache-key") + if key == "" { + err = goa.MergeErrors(err, goa.MissingFieldError("x-cache-key", "header")) + } + namespaceRaw := r.Header.Get("x-cache-namespace") + if namespaceRaw != "" { + namespace = &namespaceRaw + } + scopeRaw := r.Header.Get("x-cache-scope") + if scopeRaw != "" { + scope = &scopeRaw + } + if err != nil { + return nil, err + } + payload := NewSetExternalCacheSetRequest(body, key, namespace, scope) + + return payload, nil + } +} diff --git a/gen/http/cache/server/paths.go b/gen/http/cache/server/paths.go index 31e15617209f7986fb54b5cf611ad1ed57c8d457..993ce049fb4165aec35367a89851b71521217029 100644 --- a/gen/http/cache/server/paths.go +++ b/gen/http/cache/server/paths.go @@ -16,3 +16,8 @@ func GetCachePath() string { func SetCachePath() string { return "/v1/cache" } + +// SetExternalCachePath returns the URL path to the cache service SetExternal HTTP endpoint. +func SetExternalCachePath() string { + return "/v1/external/cache" +} diff --git a/gen/http/cache/server/server.go b/gen/http/cache/server/server.go index dd65640c9087f7a8309277bd5933ee1e75f42f4f..02b431715b04ae46ae92f18631a9103302263f01 100644 --- a/gen/http/cache/server/server.go +++ b/gen/http/cache/server/server.go @@ -18,9 +18,10 @@ import ( // Server lists the cache service endpoint HTTP handlers. type Server struct { - Mounts []*MountPoint - Get http.Handler - Set http.Handler + Mounts []*MountPoint + Get http.Handler + Set http.Handler + SetExternal http.Handler } // ErrorNamer is an interface implemented by generated error structs that @@ -58,9 +59,11 @@ func New( Mounts: []*MountPoint{ {"Get", "GET", "/v1/cache"}, {"Set", "POST", "/v1/cache"}, + {"SetExternal", "POST", "/v1/external/cache"}, }, - Get: NewGetHandler(e.Get, mux, decoder, encoder, errhandler, formatter), - Set: NewSetHandler(e.Set, mux, decoder, encoder, errhandler, formatter), + Get: NewGetHandler(e.Get, mux, decoder, encoder, errhandler, formatter), + Set: NewSetHandler(e.Set, mux, decoder, encoder, errhandler, formatter), + SetExternal: NewSetExternalHandler(e.SetExternal, mux, decoder, encoder, errhandler, formatter), } } @@ -71,12 +74,14 @@ func (s *Server) Service() string { return "cache" } func (s *Server) Use(m func(http.Handler) http.Handler) { s.Get = m(s.Get) s.Set = m(s.Set) + s.SetExternal = m(s.SetExternal) } // Mount configures the mux to serve the cache endpoints. func Mount(mux goahttp.Muxer, h *Server) { MountGetHandler(mux, h.Get) MountSetHandler(mux, h.Set) + MountSetExternalHandler(mux, h.SetExternal) } // Mount configures the mux to serve the cache endpoints. @@ -185,3 +190,54 @@ func NewSetHandler( } }) } + +// MountSetExternalHandler configures the mux to serve the "cache" service +// "SetExternal" endpoint. +func MountSetExternalHandler(mux goahttp.Muxer, h http.Handler) { + f, ok := h.(http.HandlerFunc) + if !ok { + f = func(w http.ResponseWriter, r *http.Request) { + h.ServeHTTP(w, r) + } + } + mux.Handle("POST", "/v1/external/cache", f) +} + +// NewSetExternalHandler creates a HTTP handler which loads the HTTP request +// and calls the "cache" service "SetExternal" endpoint. +func NewSetExternalHandler( + endpoint goa.Endpoint, + mux goahttp.Muxer, + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(err error) goahttp.Statuser, +) http.Handler { + var ( + decodeRequest = DecodeSetExternalRequest(mux, decoder) + encodeResponse = EncodeSetExternalResponse(encoder) + encodeError = goahttp.ErrorEncoder(encoder, formatter) + ) + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) + ctx = context.WithValue(ctx, goa.MethodKey, "SetExternal") + ctx = context.WithValue(ctx, goa.ServiceKey, "cache") + payload, err := decodeRequest(r) + if err != nil { + if err := encodeError(ctx, w, err); err != nil { + errhandler(ctx, w, err) + } + return + } + res, err := endpoint(ctx, payload) + if err != nil { + if err := encodeError(ctx, w, err); err != nil { + errhandler(ctx, w, err) + } + return + } + if err := encodeResponse(ctx, w, res); err != nil { + errhandler(ctx, w, err) + } + }) +} diff --git a/gen/http/cache/server/types.go b/gen/http/cache/server/types.go index 3efce37e69eeeb477c4424845f5f22afb2197710..72a044ca2c523025a76b41fd6a398a7e6e4b8c77 100644 --- a/gen/http/cache/server/types.go +++ b/gen/http/cache/server/types.go @@ -33,3 +33,17 @@ func NewSetCacheSetRequest(body interface{}, key string, namespace *string, scop return res } + +// NewSetExternalCacheSetRequest builds a cache service SetExternal endpoint +// payload. +func NewSetExternalCacheSetRequest(body interface{}, key string, namespace *string, scope *string) *cache.CacheSetRequest { + v := body + res := &cache.CacheSetRequest{ + Data: v, + } + res.Key = key + res.Namespace = namespace + res.Scope = scope + + return res +} diff --git a/gen/http/cli/cache/cli.go b/gen/http/cli/cache/cli.go index 2b5bb1e94f74ca1ec99b453d3beaff6e7a5ab6aa..603d6a7ea77805733ef64ac4ae061c0ce103c40c 100644 --- a/gen/http/cli/cache/cli.go +++ b/gen/http/cli/cache/cli.go @@ -25,7 +25,7 @@ import ( // func UsageCommands() string { return `health (liveness|readiness) -cache (get|set) +cache (get|set|set-external) ` } @@ -64,6 +64,12 @@ func ParseEndpoint( cacheSetKeyFlag = cacheSetFlags.String("key", "REQUIRED", "") cacheSetNamespaceFlag = cacheSetFlags.String("namespace", "", "") cacheSetScopeFlag = cacheSetFlags.String("scope", "", "") + + cacheSetExternalFlags = flag.NewFlagSet("set-external", flag.ExitOnError) + cacheSetExternalBodyFlag = cacheSetExternalFlags.String("body", "REQUIRED", "") + cacheSetExternalKeyFlag = cacheSetExternalFlags.String("key", "REQUIRED", "") + cacheSetExternalNamespaceFlag = cacheSetExternalFlags.String("namespace", "", "") + cacheSetExternalScopeFlag = cacheSetExternalFlags.String("scope", "", "") ) healthFlags.Usage = healthUsage healthLivenessFlags.Usage = healthLivenessUsage @@ -72,6 +78,7 @@ func ParseEndpoint( cacheFlags.Usage = cacheUsage cacheGetFlags.Usage = cacheGetUsage cacheSetFlags.Usage = cacheSetUsage + cacheSetExternalFlags.Usage = cacheSetExternalUsage if err := flag.CommandLine.Parse(os.Args[1:]); err != nil { return nil, nil, err @@ -125,6 +132,9 @@ func ParseEndpoint( case "set": epf = cacheSetFlags + case "set-external": + epf = cacheSetExternalFlags + } } @@ -166,6 +176,9 @@ func ParseEndpoint( case "set": endpoint = c.Set() data, err = cachec.BuildSetPayload(*cacheSetBodyFlag, *cacheSetKeyFlag, *cacheSetNamespaceFlag, *cacheSetScopeFlag) + case "set-external": + endpoint = c.SetExternal() + data, err = cachec.BuildSetExternalPayload(*cacheSetExternalBodyFlag, *cacheSetExternalKeyFlag, *cacheSetExternalNamespaceFlag, *cacheSetExternalScopeFlag) } } } @@ -219,6 +232,7 @@ Usage: COMMAND: get: Get JSON value from the cache. set: Set a JSON value in the cache. + set-external: Set an external JSON value in the cache and provide an event for the input. Additional help: %[1]s cache COMMAND --help @@ -250,3 +264,17 @@ Example: %[1]s cache set --body "Quasi ut." --key "Quasi perspiciatis." --namespace "Accusantium animi non alias." --scope "Esse inventore ullam placeat aut." `, os.Args[0]) } + +func cacheSetExternalUsage() { + fmt.Fprintf(os.Stderr, `%[1]s [flags] cache set-external -body JSON -key STRING -namespace STRING -scope STRING + +Set an external JSON value in the cache and provide an event for the input. + -body JSON: + -key STRING: + -namespace STRING: + -scope STRING: + +Example: + %[1]s cache set-external --body "Enim vel." --key "Quisquam ab dolores distinctio quis." --namespace "Optio aliquam error nam." --scope "Recusandae illo." +`, os.Args[0]) +} diff --git a/gen/http/openapi.json b/gen/http/openapi.json index 2370bc6db32845023a201b929d950f54a833cbe5..09b30f74eef160ebfc93377244c4a4019f86c262 100644 --- a/gen/http/openapi.json +++ b/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Cache Service","description":"The cache service exposes interface for working with Redis.","version":""},"host":"localhost:8083","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/liveness":{"get":{"tags":["health"],"summary":"Liveness health","operationId":"health#Liveness","responses":{"200":{"description":"OK response."}},"schemes":["http"]}},"/readiness":{"get":{"tags":["health"],"summary":"Readiness health","operationId":"health#Readiness","responses":{"200":{"description":"OK response."}},"schemes":["http"]}},"/v1/cache":{"get":{"tags":["cache"],"summary":"Get cache","description":"Get JSON value from the cache.","operationId":"cache#Get","produces":["application/json"],"parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","required":true,"type":"string"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","required":false,"type":"string"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","required":false,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"type":"string","format":"binary"}}},"schemes":["http"]},"post":{"tags":["cache"],"summary":"Set cache","description":"Set a JSON value in the cache.","operationId":"cache#Set","parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","required":true,"type":"string"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","required":false,"type":"string"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","required":false,"type":"string"},{"name":"any","in":"body","required":true,"schema":{"type":"string","format":"binary"}}],"responses":{"201":{"description":"Created response."}},"schemes":["http"]}}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Cache Service","description":"The cache service exposes interface for working with Redis.","version":""},"host":"localhost:8083","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/liveness":{"get":{"tags":["health"],"summary":"Liveness health","operationId":"health#Liveness","responses":{"200":{"description":"OK response."}},"schemes":["http"]}},"/readiness":{"get":{"tags":["health"],"summary":"Readiness health","operationId":"health#Readiness","responses":{"200":{"description":"OK response."}},"schemes":["http"]}},"/v1/cache":{"get":{"tags":["cache"],"summary":"Get cache","description":"Get JSON value from the cache.","operationId":"cache#Get","produces":["application/json"],"parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","required":true,"type":"string"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","required":false,"type":"string"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","required":false,"type":"string"}],"responses":{"200":{"description":"OK response.","schema":{"type":"string","format":"binary"}}},"schemes":["http"]},"post":{"tags":["cache"],"summary":"Set cache","description":"Set a JSON value in the cache.","operationId":"cache#Set","parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","required":true,"type":"string"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","required":false,"type":"string"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","required":false,"type":"string"},{"name":"any","in":"body","required":true,"schema":{"type":"string","format":"binary"}}],"responses":{"201":{"description":"Created response."}},"schemes":["http"]}},"/v1/external/cache":{"post":{"tags":["cache"],"summary":"SetExternal cache","description":"Set an external JSON value in the cache and provide an event for the input.","operationId":"cache#SetExternal","parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","required":true,"type":"string"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","required":false,"type":"string"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","required":false,"type":"string"},{"name":"any","in":"body","required":true,"schema":{"type":"string","format":"binary"}}],"responses":{"200":{"description":"OK response."}},"schemes":["http"]}}}} \ No newline at end of file diff --git a/gen/http/openapi.yaml b/gen/http/openapi.yaml index 4cd6fad9099a1009f12801ad407bb893254fef2a..5fdfb3dc37291447ae33a5211af7ab4e9401fab0 100644 --- a/gen/http/openapi.yaml +++ b/gen/http/openapi.yaml @@ -101,3 +101,38 @@ paths: description: Created response. schemes: - http + /v1/external/cache: + post: + tags: + - cache + summary: SetExternal cache + description: Set an external JSON value in the cache and provide an event for + the input. + operationId: cache#SetExternal + parameters: + - name: x-cache-key + in: header + description: Cache entry key + required: true + type: string + - name: x-cache-namespace + in: header + description: Cache entry namespace + required: false + type: string + - name: x-cache-scope + in: header + description: Cache entry scope + required: false + type: string + - name: any + in: body + required: true + schema: + type: string + format: binary + responses: + "200": + description: OK response. + schemes: + - http diff --git a/gen/http/openapi3.json b/gen/http/openapi3.json index e32b4621b30aed7e9fef74ade57dad6b2249c0c1..8d4aa5274b05969283f7034a291da6ac37702cb3 100644 --- a/gen/http/openapi3.json +++ b/gen/http/openapi3.json @@ -1 +1 @@ -{"openapi":"3.0.3","info":{"title":"Cache Service","description":"The cache service exposes interface for working with Redis.","version":"1.0"},"servers":[{"url":"http://localhost:8083","description":"Cache Server"}],"paths":{"/liveness":{"get":{"tags":["health"],"summary":"Liveness health","operationId":"health#Liveness","responses":{"200":{"description":"OK response."}}}},"/readiness":{"get":{"tags":["health"],"summary":"Readiness health","operationId":"health#Readiness","responses":{"200":{"description":"OK response."}}}},"/v1/cache":{"get":{"tags":["cache"],"summary":"Get cache","description":"Get JSON value from the cache.","operationId":"cache#Get","parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Cache entry key","example":"did:web:example.com"},"example":"did:web:example.com"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry namespace","example":"Login"},"example":"Login"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry scope","example":"administration"},"example":"administration"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Qui iusto enim est dolores dolorem et.","format":"binary"},"example":"Quisquam ab dolores distinctio quis."}}}}},"post":{"tags":["cache"],"summary":"Set cache","description":"Set a JSON value in the cache.","operationId":"cache#Set","parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Cache entry key","example":"did:web:example.com"},"example":"did:web:example.com"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry namespace","example":"Login"},"example":"Login"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry scope","example":"administration"},"example":"administration"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"string","example":"Et illum fugiat ut.","format":"binary"},"example":"Optio aliquam error nam."}}},"responses":{"201":{"description":"Created response."}}}}},"components":{},"tags":[{"name":"health","description":"Health service provides health check endpoints."},{"name":"cache","description":"Cache service allows storing and retrieving data from distributed cache."}]} \ No newline at end of file +{"openapi":"3.0.3","info":{"title":"Cache Service","description":"The cache service exposes interface for working with Redis.","version":"1.0"},"servers":[{"url":"http://localhost:8083","description":"Cache Server"}],"paths":{"/liveness":{"get":{"tags":["health"],"summary":"Liveness health","operationId":"health#Liveness","responses":{"200":{"description":"OK response."}}}},"/readiness":{"get":{"tags":["health"],"summary":"Readiness health","operationId":"health#Readiness","responses":{"200":{"description":"OK response."}}}},"/v1/cache":{"get":{"tags":["cache"],"summary":"Get cache","description":"Get JSON value from the cache.","operationId":"cache#Get","parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Cache entry key","example":"did:web:example.com"},"example":"did:web:example.com"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry namespace","example":"Login"},"example":"Login"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry scope","example":"administration"},"example":"administration"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"string","example":"Delectus quaerat molestiae placeat nemo.","format":"binary"},"example":"Quia dolores rem."}}}}},"post":{"tags":["cache"],"summary":"Set cache","description":"Set a JSON value in the cache.","operationId":"cache#Set","parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Cache entry key","example":"did:web:example.com"},"example":"did:web:example.com"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry namespace","example":"Login"},"example":"Login"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry scope","example":"administration"},"example":"administration"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"string","example":"Quis rerum velit sunt rerum dignissimos at.","format":"binary"},"example":"Est illum."}}},"responses":{"201":{"description":"Created response."}}}},"/v1/external/cache":{"post":{"tags":["cache"],"summary":"SetExternal cache","description":"Set an external JSON value in the cache and provide an event for the input.","operationId":"cache#SetExternal","parameters":[{"name":"x-cache-key","in":"header","description":"Cache entry key","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Cache entry key","example":"did:web:example.com"},"example":"did:web:example.com"},{"name":"x-cache-namespace","in":"header","description":"Cache entry namespace","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry namespace","example":"Login"},"example":"Login"},{"name":"x-cache-scope","in":"header","description":"Cache entry scope","allowEmptyValue":true,"schema":{"type":"string","description":"Cache entry scope","example":"administration"},"example":"administration"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"string","example":"Molestiae minima.","format":"binary"},"example":"Repellendus quo."}}},"responses":{"200":{"description":"OK response."}}}}},"components":{},"tags":[{"name":"health","description":"Health service provides health check endpoints."},{"name":"cache","description":"Cache service allows storing and retrieving data from distributed cache."}]} \ No newline at end of file diff --git a/gen/http/openapi3.yaml b/gen/http/openapi3.yaml index 625d26c77e0a17d0ab83f4257520e224c556580c..1f2e00e2fc30b205cc56e9fc04b524a98c77cf5d 100644 --- a/gen/http/openapi3.yaml +++ b/gen/http/openapi3.yaml @@ -68,9 +68,9 @@ paths: application/json: schema: type: string - example: Qui iusto enim est dolores dolorem et. + example: Delectus quaerat molestiae placeat nemo. format: binary - example: Quisquam ab dolores distinctio quis. + example: Quia dolores rem. post: tags: - cache @@ -112,12 +112,61 @@ paths: application/json: schema: type: string - example: Et illum fugiat ut. + example: Quis rerum velit sunt rerum dignissimos at. format: binary - example: Optio aliquam error nam. + example: Est illum. responses: "201": description: Created response. + /v1/external/cache: + post: + tags: + - cache + summary: SetExternal cache + description: Set an external JSON value in the cache and provide an event for + the input. + operationId: cache#SetExternal + parameters: + - name: x-cache-key + in: header + description: Cache entry key + allowEmptyValue: true + required: true + schema: + type: string + description: Cache entry key + example: did:web:example.com + example: did:web:example.com + - name: x-cache-namespace + in: header + description: Cache entry namespace + allowEmptyValue: true + schema: + type: string + description: Cache entry namespace + example: Login + example: Login + - name: x-cache-scope + in: header + description: Cache entry scope + allowEmptyValue: true + schema: + type: string + description: Cache entry scope + example: administration + example: administration + requestBody: + required: true + content: + application/json: + schema: + type: string + example: Molestiae minima. + format: binary + example: Repellendus quo. + responses: + "200": + description: OK response. components: {} tags: - name: health diff --git a/go.mod b/go.mod index 616009be42a045932c4f1d15735bcb317052dad1..5c9dbb866b00fadabd9401f068fcb376666b0b93 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.17 require ( code.vereign.com/gaiax/tsa/golib v0.0.0-20220321093827-5fdf8f34aad9 + github.com/cloudevents/sdk-go/protocol/nats/v2 v2.10.1 + github.com/cloudevents/sdk-go/v2 v2.10.1 github.com/go-redis/redis/v8 v8.11.5 github.com/kelseyhightower/envconfig v1.4.0 github.com/stretchr/testify v1.7.0 @@ -18,17 +20,22 @@ require ( github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect github.com/dimfeld/httptreemux/v5 v5.4.0 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/gopherjs/gopherjs v0.0.0-20220221023154-0b2280d3ff96 // indirect + github.com/google/go-cmp v0.5.6 // indirect github.com/gorilla/websocket v1.5.0 // indirect + github.com/json-iterator/go v1.1.11 // indirect github.com/jtolds/gls v4.20.0+incompatible // indirect github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect + github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/nats-io/nats.go v1.11.1-0.20210623165838-4b75fc59ae30 // indirect + github.com/nats-io/nkeys v0.3.0 // indirect + github.com/nats-io/nuid v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect - github.com/smartystreets/assertions v1.2.1 // indirect github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect + golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf // indirect golang.org/x/tools v0.1.10 // indirect @@ -36,3 +43,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) + +require ( + github.com/google/uuid v1.3.0 + github.com/gopherjs/gopherjs v0.0.0-20220221023154-0b2280d3ff96 // indirect + github.com/smartystreets/assertions v1.2.1 // indirect +) diff --git a/go.sum b/go.sum index 5fb6c68f73fa4b030fbc627154504d2e96c82076..39b37a9dbdc9f3b2bb37c37f16e6b1e80fb689df 100644 --- a/go.sum +++ b/go.sum @@ -57,6 +57,10 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudevents/sdk-go/protocol/nats/v2 v2.10.1 h1:vhMEC9zc6nIw3HwxaFZF/lT/uTftXx9h++f0KyXJazM= +github.com/cloudevents/sdk-go/protocol/nats/v2 v2.10.1/go.mod h1:9l2pSSkH9AvMCwK8Rscwqtsni30UIWNj/EmgtmaRMmc= +github.com/cloudevents/sdk-go/v2 v2.10.1 h1:qNFovJ18fWOd8Q9ydWJPk1oiFudXyv1GxJIP7MwPjuM= +github.com/cloudevents/sdk-go/v2 v2.10.1/go.mod h1:GpCBmUj7DIRiDhVvsK5d6WCbgTWs8DxAWTRtAwQmIXs= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -130,6 +134,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -144,6 +149,7 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gxui v0.0.0-20151028112939-f85e0a97b3a4 h1:OL2d27ueTKnlQJoqLW2fc9pWYulFnJYLWzomGV7HqZo= @@ -164,6 +170,7 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -201,6 +208,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -210,6 +219,8 @@ github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dv github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.11.12 h1:famVnQVu7QwryBN4jNseQdUKES71ZAOnB6UQQJPZvqk= +github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -227,6 +238,8 @@ github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0Re github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= @@ -235,9 +248,24 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/nats-io/jwt v1.2.2 h1:w3GMTO969dFg+UOKTmmyuu7IGdusK+7Ytlt//OYH/uU= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3 h1:i/O6cmIsjpcQyWDYNcq2JyZ3/VTF8SJ4JWluI5OhpvI= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.3.4 h1:WcNa6HDFX8gjZPHb8CJ9wxRHEjJSlhWUb/MKb6/mlUY= +github.com/nats-io/nats-server/v2 v2.3.4/go.mod h1:3mtbaN5GkCo/Z5T3nNj0I0/W1fPkKzLiDC6jjWJKp98= +github.com/nats-io/nats.go v1.11.1-0.20210623165838-4b75fc59ae30 h1:9GqilBhZaR3xYis0JgMlJjNw933WIobdjKhilXm+Vls= +github.com/nats-io/nats.go v1.11.1-0.20210623165838-4b75fc59ae30/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= @@ -298,6 +326,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -317,12 +347,15 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= @@ -334,8 +367,12 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -444,6 +481,7 @@ golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -508,6 +546,9 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -672,6 +713,7 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/clients/event/client.go b/internal/clients/event/client.go new file mode 100644 index 0000000000000000000000000000000000000000..3e97ae0ca92bd36f4b07b32567bc9b8accfea617 --- /dev/null +++ b/internal/clients/event/client.go @@ -0,0 +1,79 @@ +package event + +import ( + "context" + "fmt" + + "time" + + "github.com/cloudevents/sdk-go/protocol/nats/v2" + cloudevents "github.com/cloudevents/sdk-go/v2" + "github.com/cloudevents/sdk-go/v2/event" + "github.com/google/uuid" +) + +const eventType = "cache_set_event" + +type Client struct { + sender *nats.Sender + events cloudevents.Client +} + +type Data struct { + Key string `json:"key"` +} + +func New(addr, subject string) (*Client, error) { + // create cloudevents nats sender + // other protocol implementations: https://github.com/cloudevents/sdk-go/tree/main/protocol + sender, err := nats.NewSender(addr, subject, nats.NatsOptions()) + if err != nil { + return nil, err + } + + // create cloudevents client + eventsClient, err := cloudevents.NewClient(sender) + if err != nil { + return nil, err + } + + return &Client{ + sender: sender, + events: eventsClient, + }, nil +} + +func (c *Client) Send(ctx context.Context, key string) error { + e, err := newEvent(key) + if err != nil { + return err + } + + res := c.events.Send(ctx, *e) + if cloudevents.IsUndelivered(res) { + return fmt.Errorf("failed to send event for key: %s, reason: %v", key, res) + } + + return nil +} + +func (c *Client) CLose(ctx context.Context) error { + return c.sender.Close(ctx) +} + +func newEvent(key string) (*event.Event, error) { + e := cloudevents.NewEvent() + e.SetID(uuid.NewString()) // required field + e.SetSource("cache") // required field + e.SetType(eventType) // required field + e.SetTime(time.Now()) + + err := e.SetData(event.ApplicationJSON, &Data{ + Key: key, + }) + if err != nil { + return nil, err + } + + return &e, nil +} diff --git a/internal/config/config.go b/internal/config/config.go index cdcfee1f3b5454ec096f6e787dd4a5552dd53fd4..6800576cf0c74dc12eff92556d325721fa3de623 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -5,6 +5,7 @@ import "time" type Config struct { HTTP httpConfig Redis redisConfig + Nats natsConfig LogLevel string `envconfig:"LOG_LEVEL" default:"INFO"` } @@ -24,3 +25,8 @@ type redisConfig struct { DB int `envconfig:"REDIS_DB" default:"0"` TTL time.Duration `envconfig:"REDIS_EXPIRATION"` // no default expiration, keys are set to live forever } + +type natsConfig struct { + Addr string `envconfig:"NATS_ADDR" required:"true"` + Subject string `envconfig:"NATS_SUBJECT" default:"external"` +} diff --git a/internal/service/cache/cachefakes/fake_events.go b/internal/service/cache/cachefakes/fake_events.go new file mode 100644 index 0000000000000000000000000000000000000000..ae04df06db658092d83df0ba9c9d506fccc2d11a --- /dev/null +++ b/internal/service/cache/cachefakes/fake_events.go @@ -0,0 +1,114 @@ +// Code generated by counterfeiter. DO NOT EDIT. +package cachefakes + +import ( + "context" + "sync" + + "code.vereign.com/gaiax/tsa/cache/internal/service/cache" +) + +type FakeEvents struct { + SendStub func(context.Context, string) error + sendMutex sync.RWMutex + sendArgsForCall []struct { + arg1 context.Context + arg2 string + } + sendReturns struct { + result1 error + } + sendReturnsOnCall map[int]struct { + result1 error + } + invocations map[string][][]interface{} + invocationsMutex sync.RWMutex +} + +func (fake *FakeEvents) Send(arg1 context.Context, arg2 string) error { + fake.sendMutex.Lock() + ret, specificReturn := fake.sendReturnsOnCall[len(fake.sendArgsForCall)] + fake.sendArgsForCall = append(fake.sendArgsForCall, struct { + arg1 context.Context + arg2 string + }{arg1, arg2}) + stub := fake.SendStub + fakeReturns := fake.sendReturns + fake.recordInvocation("Send", []interface{}{arg1, arg2}) + fake.sendMutex.Unlock() + if stub != nil { + return stub(arg1, arg2) + } + if specificReturn { + return ret.result1 + } + return fakeReturns.result1 +} + +func (fake *FakeEvents) SendCallCount() int { + fake.sendMutex.RLock() + defer fake.sendMutex.RUnlock() + return len(fake.sendArgsForCall) +} + +func (fake *FakeEvents) SendCalls(stub func(context.Context, string) error) { + fake.sendMutex.Lock() + defer fake.sendMutex.Unlock() + fake.SendStub = stub +} + +func (fake *FakeEvents) SendArgsForCall(i int) (context.Context, string) { + fake.sendMutex.RLock() + defer fake.sendMutex.RUnlock() + argsForCall := fake.sendArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2 +} + +func (fake *FakeEvents) SendReturns(result1 error) { + fake.sendMutex.Lock() + defer fake.sendMutex.Unlock() + fake.SendStub = nil + fake.sendReturns = struct { + result1 error + }{result1} +} + +func (fake *FakeEvents) SendReturnsOnCall(i int, result1 error) { + fake.sendMutex.Lock() + defer fake.sendMutex.Unlock() + fake.SendStub = nil + if fake.sendReturnsOnCall == nil { + fake.sendReturnsOnCall = make(map[int]struct { + result1 error + }) + } + fake.sendReturnsOnCall[i] = struct { + result1 error + }{result1} +} + +func (fake *FakeEvents) Invocations() map[string][][]interface{} { + fake.invocationsMutex.RLock() + defer fake.invocationsMutex.RUnlock() + fake.sendMutex.RLock() + defer fake.sendMutex.RUnlock() + copiedInvocations := map[string][][]interface{}{} + for key, value := range fake.invocations { + copiedInvocations[key] = value + } + return copiedInvocations +} + +func (fake *FakeEvents) recordInvocation(key string, args []interface{}) { + fake.invocationsMutex.Lock() + defer fake.invocationsMutex.Unlock() + if fake.invocations == nil { + fake.invocations = map[string][][]interface{}{} + } + if fake.invocations[key] == nil { + fake.invocations[key] = [][]interface{}{} + } + fake.invocations[key] = append(fake.invocations[key], args) +} + +var _ cache.Events = new(FakeEvents) diff --git a/internal/service/cache/service.go b/internal/service/cache/service.go index dddcc536b7fa04bbed72147d8a5fa93b200589e9..71eaca6e453a5593c34cba38ca1f6e185930d688 100644 --- a/internal/service/cache/service.go +++ b/internal/service/cache/service.go @@ -12,20 +12,27 @@ import ( ) //go:generate counterfeiter . Cache +//go:generate counterfeiter . Events type Cache interface { Get(ctx context.Context, key string) ([]byte, error) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error } +type Events interface { + Send(ctx context.Context, key string) error +} + type Service struct { cache Cache + events Events logger *zap.Logger } -func New(cache Cache, logger *zap.Logger) *Service { +func New(cache Cache, events Events, logger *zap.Logger) *Service { return &Service{ cache: cache, + events: events, logger: logger, } } @@ -38,16 +45,8 @@ func (s *Service) Get(ctx context.Context, req *cache.CacheGetRequest) (interfac return nil, errors.New(errors.BadRequest, "missing key") } - var namespace, scope string - if req.Namespace != nil { - namespace = *req.Namespace - } - if req.Scope != nil { - scope = *req.Scope - } - // create key from the input fields - key := makeCacheKey(req.Key, namespace, scope) + key := makeCacheKey(req.Key, req.Namespace, req.Scope) data, err := s.cache.Get(ctx, key) if err != nil { logger.Error("error getting value from cache", zap.String("key", key), zap.Error(err)) @@ -74,18 +73,10 @@ func (s *Service) Set(ctx context.Context, req *cache.CacheSetRequest) error { return errors.New(errors.BadRequest, "missing key") } - var namespace, scope string - if req.Namespace != nil { - namespace = *req.Namespace - } - if req.Scope != nil { - scope = *req.Scope - } - // TODO(kinkov): issue #3 - evaluate key metadata (key, namespace and scope) and set TTL over a policy execution // create key from the input fields - key := makeCacheKey(req.Key, namespace, scope) + key := makeCacheKey(req.Key, req.Namespace, req.Scope) // encode payload to json bytes for storing in cache value, err := json.Marshal(req.Data) if err != nil { @@ -101,13 +92,35 @@ func (s *Service) Set(ctx context.Context, req *cache.CacheSetRequest) error { return nil } -func makeCacheKey(key, namespace, scope string) string { +// SetExternal sets an external JSON value in the cache and provide an event for the input. +func (s *Service) SetExternal(ctx context.Context, req *cache.CacheSetRequest) error { + logger := s.logger.With(zap.String("operation", "setExternal")) + + // set value in cache + if err := s.Set(ctx, req); err != nil { + logger.Error("error setting external input in cache", zap.Error(err)) + return errors.New("error setting external input in cache", err) + } + + // create key from the input fields + key := makeCacheKey(req.Key, req.Namespace, req.Scope) + + // send an event for the input + if err := s.events.Send(ctx, key); err != nil { + logger.Error("error sending an event for external input", zap.Error(err)) + return errors.New("error sending an event for external input", err) + } + + return nil +} + +func makeCacheKey(key string, namespace, scope *string) string { k := key - if namespace != "" { - k += "," + namespace + if namespace != nil && *namespace != "" { + k += "," + *namespace } - if scope != "" { - k += "," + scope + if scope != nil && *scope != "" { + k += "," + *scope } return k } diff --git a/internal/service/cache/service_test.go b/internal/service/cache/service_test.go index 4e09e0314fde2420325949fbbd17e6e3f8d4d338..c9e4c0b4137ccf6a527a908e80205a94b902d13c 100644 --- a/internal/service/cache/service_test.go +++ b/internal/service/cache/service_test.go @@ -16,7 +16,7 @@ import ( ) func TestNew(t *testing.T) { - svc := cache.New(nil, zap.NewNop()) + svc := cache.New(nil, nil, zap.NewNop()) assert.Implements(t, (*goacache.Service)(nil), svc) } @@ -100,7 +100,7 @@ func TestService_Get(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - svc := cache.New(test.cache, zap.NewNop()) + svc := cache.New(test.cache, nil, zap.NewNop()) res, err := svc.Get(context.Background(), test.req) if err == nil { assert.Empty(t, test.errtext) @@ -169,7 +169,7 @@ func TestService_Set(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - svc := cache.New(test.cache, zap.NewNop()) + svc := cache.New(test.cache, nil, zap.NewNop()) err := svc.Set(context.Background(), test.req) if err == nil { assert.Empty(t, test.errtext) @@ -183,3 +183,86 @@ func TestService_Set(t *testing.T) { }) } } + +func TestService_SetExternal(t *testing.T) { + tests := []struct { + name string + cache *cachefakes.FakeCache + events *cachefakes.FakeEvents + req *goacache.CacheSetRequest + + res interface{} + errkind errors.Kind + errtext string + }{ + { + name: "error setting external input in cache", + req: &goacache.CacheSetRequest{ + Key: "key", + Namespace: ptr.String("namespace"), + Scope: ptr.String("scope"), + Data: map[string]interface{}{"test": "value"}, + }, + cache: &cachefakes.FakeCache{ + SetStub: func(ctx context.Context, key string, value []byte, ttl time.Duration) error { + return errors.New(errors.Timeout, "some error") + }, + }, + errkind: errors.Timeout, + errtext: "some error", + }, + { + name: "error sending an event for external input", + req: &goacache.CacheSetRequest{ + Key: "key", + Namespace: ptr.String("namespace"), + Scope: ptr.String("scope"), + Data: map[string]interface{}{"test": "value"}, + }, + cache: &cachefakes.FakeCache{ + SetStub: func(ctx context.Context, key string, value []byte, ttl time.Duration) error { + return nil + }, + }, + events: &cachefakes.FakeEvents{SendStub: func(ctx context.Context, s string) error { + return errors.New(errors.Unknown, "failed to send event") + }}, + errkind: errors.Unknown, + errtext: "failed to send event", + }, + { + name: "successfully set value in cache and send an event to events", + req: &goacache.CacheSetRequest{ + Key: "key", + Namespace: ptr.String("namespace"), + Scope: ptr.String("scope"), + Data: map[string]interface{}{"test": "value"}, + }, + cache: &cachefakes.FakeCache{ + SetStub: func(ctx context.Context, key string, value []byte, ttl time.Duration) error { + return nil + }, + }, + events: &cachefakes.FakeEvents{SendStub: func(ctx context.Context, s string) error { + return nil + }}, + errtext: "", + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + svc := cache.New(test.cache, test.events, zap.NewNop()) + err := svc.SetExternal(context.Background(), test.req) + if err == nil { + assert.Empty(t, test.errtext) + } else { + assert.Error(t, err) + e, ok := err.(*errors.Error) + assert.True(t, ok) + assert.Equal(t, test.errkind, e.Kind) + assert.Contains(t, e.Error(), test.errtext) + } + }) + } +} diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/LICENSE b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/LICENSE differ diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/doc.go b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..f0d9887b0cb7f7b4b5ca28631ee90b2aad9bf27b Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/message.go b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/message.go new file mode 100644 index 0000000000000000000000000000000000000000..63e4b86138c5c80a191a817b2b6131862f8f3475 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/message.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/options.go b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/options.go new file mode 100644 index 0000000000000000000000000000000000000000..a842177ae42a9549251c48810886929177d2d7d8 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/options.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/protocol.go b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/protocol.go new file mode 100644 index 0000000000000000000000000000000000000000..d8de1bba64b250f73374610ad716cda8136371b5 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/protocol.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/receiver.go b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/receiver.go new file mode 100644 index 0000000000000000000000000000000000000000..b7c738876de0e77d48dd0507a70783e0f4b1039e Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/receiver.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/sender.go b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/sender.go new file mode 100644 index 0000000000000000000000000000000000000000..adf8fc9c891ec77ebbfdcacce6c11de5b0750d25 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/sender.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/subscriber.go b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/subscriber.go new file mode 100644 index 0000000000000000000000000000000000000000..a644173cbd1a72806132b4061f0c7278a4557649 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/subscriber.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/write_message.go b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/write_message.go new file mode 100644 index 0000000000000000000000000000000000000000..13c57f38f7766b15611be7508935a4e756402356 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/protocol/nats/v2/write_message.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/LICENSE b/vendor/github.com/cloudevents/sdk-go/v2/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/LICENSE differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/alias.go b/vendor/github.com/cloudevents/sdk-go/v2/alias.go new file mode 100644 index 0000000000000000000000000000000000000000..e7ed3a357ea53758c469f9a4f99c3cab6485fbc6 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/alias.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/binary_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/binary_writer.go new file mode 100644 index 0000000000000000000000000000000000000000..97f2c4dd7435f062a0404df32d27a4014e57fc5e Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/binary_writer.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..8fa999789f90b927a044e0bc8a8015f897f6b115 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go new file mode 100644 index 0000000000000000000000000000000000000000..16611a3d757af396ec7a13ae9cb0cd9ee178b119 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/event_message.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/event_message.go new file mode 100644 index 0000000000000000000000000000000000000000..f82c729c4457184b3fdac8e105bcf3750dc1e713 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/event_message.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/finish_message.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/finish_message.go new file mode 100644 index 0000000000000000000000000000000000000000..8b51c4c6106e730c4f7ce997eb503b9c5a4cca55 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/finish_message.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..54c3f1a8c7e64f13e87a1a901550a22f1fe3e405 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/format/format.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/format/format.go new file mode 100644 index 0000000000000000000000000000000000000000..2d840025ea5fb2200242148680ef468cfcb509cc Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/format/format.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/message.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/message.go new file mode 100644 index 0000000000000000000000000000000000000000..e30e150c02a8ca32841036a5027cec3180bd1e32 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/message.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/attributes.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/attributes.go new file mode 100644 index 0000000000000000000000000000000000000000..3c3021d4641a15914915ecb016fef31dbd6e03e8 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/attributes.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..44c0b3145bc92e65721a94b5677a3826ab6493c7 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/match_exact_version.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/match_exact_version.go new file mode 100644 index 0000000000000000000000000000000000000000..110787ddc385efc442c6dc884a5ff259be328cb9 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/match_exact_version.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/spec.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/spec.go new file mode 100644 index 0000000000000000000000000000000000000000..7fa0f5840d3b016ca6defe4d89be54a866e60fd1 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/spec/spec.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/structured_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/structured_writer.go new file mode 100644 index 0000000000000000000000000000000000000000..60256f2b3c7bd449a994b841565aab2876ddc078 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/structured_writer.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/to_event.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/to_event.go new file mode 100644 index 0000000000000000000000000000000000000000..339a7833c34e73ce4a1ee357f73913e426da4065 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/to_event.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/transformer.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/transformer.go new file mode 100644 index 0000000000000000000000000000000000000000..de3bec44fa06871de2d99375940095225c6c31b4 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/transformer.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/binding/write.go b/vendor/github.com/cloudevents/sdk-go/v2/binding/write.go new file mode 100644 index 0000000000000000000000000000000000000000..cb498e62dee92cfb2bc19efe996fd51bae801a0a Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/binding/write.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/client.go b/vendor/github.com/cloudevents/sdk-go/v2/client/client.go new file mode 100644 index 0000000000000000000000000000000000000000..ea8fbfbb4db1c4bb5c485267a41b0687c938c9ec Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/client.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/client_http.go b/vendor/github.com/cloudevents/sdk-go/v2/client/client_http.go new file mode 100644 index 0000000000000000000000000000000000000000..d48cc204258d0f4bd36f59fac59fc862c1a50a79 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/client_http.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/client_observed.go b/vendor/github.com/cloudevents/sdk-go/v2/client/client_observed.go new file mode 100644 index 0000000000000000000000000000000000000000..82985b8a7f7891a08d4963ab6d1c8230f19e1102 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/client_observed.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/defaulters.go b/vendor/github.com/cloudevents/sdk-go/v2/client/defaulters.go new file mode 100644 index 0000000000000000000000000000000000000000..7bfebf35c83fa0991a1d45d9ad5d658828c8a6a3 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/defaulters.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/client/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..e09962ce6f55bcd25f71a2ac535ab61df76f808b Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/http_receiver.go b/vendor/github.com/cloudevents/sdk-go/v2/client/http_receiver.go new file mode 100644 index 0000000000000000000000000000000000000000..94a4b4e65e403f3fd0af45e6ffe26b7746ed0bad Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/http_receiver.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/invoker.go b/vendor/github.com/cloudevents/sdk-go/v2/client/invoker.go new file mode 100644 index 0000000000000000000000000000000000000000..403fb0f5598a1099486d2cf26e1e4810b1d64b8f Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/invoker.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/observability.go b/vendor/github.com/cloudevents/sdk-go/v2/client/observability.go new file mode 100644 index 0000000000000000000000000000000000000000..75005d3bb5cf269b44d4a562e291d7e2bf1b3912 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/observability.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/options.go b/vendor/github.com/cloudevents/sdk-go/v2/client/options.go new file mode 100644 index 0000000000000000000000000000000000000000..938478162b03b4169d30ea3866834e81fc4fe819 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/options.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/client/receiver.go b/vendor/github.com/cloudevents/sdk-go/v2/client/receiver.go new file mode 100644 index 0000000000000000000000000000000000000000..b1ab532d7922bb56fe7ebabbf9095b6d0792c9b4 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/client/receiver.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/context.go b/vendor/github.com/cloudevents/sdk-go/v2/context/context.go new file mode 100644 index 0000000000000000000000000000000000000000..fc9ef0315f45d0c56be94e7a0264de2b6d65d09d Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/context/context.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/delegating.go b/vendor/github.com/cloudevents/sdk-go/v2/context/delegating.go new file mode 100644 index 0000000000000000000000000000000000000000..434a4da7a017c85cf2a4bd59c33fe7211c4a2ed1 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/context/delegating.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/context/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..0b2dcaf709d9cd0100ba41aa3f6d6eff061c5253 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/context/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/logger.go b/vendor/github.com/cloudevents/sdk-go/v2/context/logger.go new file mode 100644 index 0000000000000000000000000000000000000000..b3087a79fe8c29edefee91a01aef8eb3851eae20 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/context/logger.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/context/retry.go b/vendor/github.com/cloudevents/sdk-go/v2/context/retry.go new file mode 100644 index 0000000000000000000000000000000000000000..ec17df72e7efd6a61401b662a70dc2dd17801a21 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/context/retry.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/content_type.go b/vendor/github.com/cloudevents/sdk-go/v2/event/content_type.go new file mode 100644 index 0000000000000000000000000000000000000000..a49522f82f53279db317c814d39ae57a57602742 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/content_type.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/data_content_encoding.go b/vendor/github.com/cloudevents/sdk-go/v2/event/data_content_encoding.go new file mode 100644 index 0000000000000000000000000000000000000000..cf2152693bf5c5f05a9e9950c3ffd08eec93cfac Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/data_content_encoding.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/codec.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/codec.go new file mode 100644 index 0000000000000000000000000000000000000000..3e077740b565cefc3798e55930625dc39c9800c3 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/codec.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..b681af8872f2ba1e46f5429290bf3167473f41c3 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/data.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/data.go new file mode 100644 index 0000000000000000000000000000000000000000..734ade59fa93046cbfd5d446b3bfb145c2716070 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/data.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..33e1323c72e9cf95eaa2883af92324455437ddf2 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/json/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/data.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/data.go new file mode 100644 index 0000000000000000000000000000000000000000..761a101139d5db6fa39529d9a290b77c0a1d9a84 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/data.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..af10577aaebf966b5379360cf68f7deffcfafd1f Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/text/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/data.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/data.go new file mode 100644 index 0000000000000000000000000000000000000000..de68ec3dce5e5e9662614be68cab233c87dbf830 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/data.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..c8d73213f2a482d5922035984ee359db09700f77 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/datacodec/xml/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/event/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..31c22ce677b349e7299e53228e7ad51982307440 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event.go new file mode 100644 index 0000000000000000000000000000000000000000..94b5aa0ada3095b47c26205f9edc48e104cf47bc Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/event.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_data.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_data.go new file mode 100644 index 0000000000000000000000000000000000000000..8fc449ed94e48fd9e56d82e818490895797ff6c4 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/event_data.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_interface.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_interface.go new file mode 100644 index 0000000000000000000000000000000000000000..2809fed57d2a87ed44c0114b9e18f25c8f420787 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/event_interface.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_marshal.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_marshal.go new file mode 100644 index 0000000000000000000000000000000000000000..c5f2dc03c7db4775a61a900bb970e639c9ccd939 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/event_marshal.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_reader.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_reader.go new file mode 100644 index 0000000000000000000000000000000000000000..9d1aeeb65d0849fa2c891a378a13112644744add Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/event_reader.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_unmarshal.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_unmarshal.go new file mode 100644 index 0000000000000000000000000000000000000000..138c398abc737f9511bebb50611cd3ec3888eb02 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/event_unmarshal.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_validation.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_validation.go new file mode 100644 index 0000000000000000000000000000000000000000..958ecc47d214bf0a661e1dc322ad5cd0321d9010 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/event_validation.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/event_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/event/event_writer.go new file mode 100644 index 0000000000000000000000000000000000000000..ddfb1be38cf321e33ff74889707e6da85a977c66 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/event_writer.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext.go new file mode 100644 index 0000000000000000000000000000000000000000..a39565afaef7ea521ae9fd6a7d7c2996cdc7b66c Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03.go new file mode 100644 index 0000000000000000000000000000000000000000..c511c81c4585664ab69630d43e4db433b000a03c Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_reader.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_reader.go new file mode 100644 index 0000000000000000000000000000000000000000..2cd27a705732c14e7d8ad5d25fcde0e8d0667c08 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_reader.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_writer.go new file mode 100644 index 0000000000000000000000000000000000000000..5d664635ec61950f12d9f344449cdbab99d157fc Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v03_writer.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1.go new file mode 100644 index 0000000000000000000000000000000000000000..8f164502b0539082fcc867e820dadcf7b5a6f445 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_reader.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_reader.go new file mode 100644 index 0000000000000000000000000000000000000000..74f73b029df2bae84655c6f8bfd973adcb043879 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_reader.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_writer.go b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_writer.go new file mode 100644 index 0000000000000000000000000000000000000000..5f2aca763b7d432ce55a412f38d9f6c313712663 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/eventcontext_v1_writer.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/event/extensions.go b/vendor/github.com/cloudevents/sdk-go/v2/event/extensions.go new file mode 100644 index 0000000000000000000000000000000000000000..6c4193f348405dbd6e58e5ef634123de0407d585 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/event/extensions.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..f826a1841dbc9acd07d44e41bf3eb1612d545c53 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/error.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/error.go new file mode 100644 index 0000000000000000000000000000000000000000..a3f335261d0c8bdb683a6c3aa66e88b655e8dc28 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/error.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/abuse_protection.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/abuse_protection.go new file mode 100644 index 0000000000000000000000000000000000000000..89222a20cf188048519c3e45c2f8e7e79358ea8c Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/abuse_protection.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/context.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/context.go new file mode 100644 index 0000000000000000000000000000000000000000..0eec396a1e679eb2a497afd48ae6989f45f53e46 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/context.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..3428ea3875542f6874f02c1e2d36fd4403a2495b Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/headers.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/headers.go new file mode 100644 index 0000000000000000000000000000000000000000..055a5c4ddf90408fd9713bab87bd0dd22e8cd4bf Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/headers.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/message.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/message.go new file mode 100644 index 0000000000000000000000000000000000000000..e7e51d034baeed0a97138b58987108b90850bd5f Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/message.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/options.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/options.go new file mode 100644 index 0000000000000000000000000000000000000000..5e400905a701b8dc7a8ba0457776ba4c819de45c Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/options.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol.go new file mode 100644 index 0000000000000000000000000000000000000000..06204b2a1f0712f8baad3a0a03944fb00228a45b Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_lifecycle.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_lifecycle.go new file mode 100644 index 0000000000000000000000000000000000000000..dacfd30f61cef596cf7a9d189f72d0b6ee149a84 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_lifecycle.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_rate.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_rate.go new file mode 100644 index 0000000000000000000000000000000000000000..9c4c10a293c086822ccb4bdb011c19caed55c0a4 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_rate.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_retry.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_retry.go new file mode 100644 index 0000000000000000000000000000000000000000..71e7346f304d4f6fb176013093a11ea112595eda Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/protocol_retry.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/result.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/result.go new file mode 100644 index 0000000000000000000000000000000000000000..7a0b2626cf94ea0dc746a09bd4063bef7ccc7e01 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/result.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/retries_result.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/retries_result.go new file mode 100644 index 0000000000000000000000000000000000000000..f4046d52230a9c1c3d772cc68fbb03de895a6b27 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/retries_result.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_request.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_request.go new file mode 100644 index 0000000000000000000000000000000000000000..43ad36180c160248ec0139b743aeec392029619b Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_request.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_responsewriter.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_responsewriter.go new file mode 100644 index 0000000000000000000000000000000000000000..41385dab14e75597137d1b29fb6182b524c31441 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/http/write_responsewriter.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/inbound.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/inbound.go new file mode 100644 index 0000000000000000000000000000000000000000..e7a74294d053413bfb9dcb5ada5c39c276a43d4b Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/inbound.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/lifecycle.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/lifecycle.go new file mode 100644 index 0000000000000000000000000000000000000000..4a058c9629fa4c8cde34d702d82f4a4a1c0078d5 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/lifecycle.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/outbound.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/outbound.go new file mode 100644 index 0000000000000000000000000000000000000000..e44fa432a7812276bf5866738d76d0c987b657c6 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/outbound.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/protocol/result.go b/vendor/github.com/cloudevents/sdk-go/v2/protocol/result.go new file mode 100644 index 0000000000000000000000000000000000000000..eae64e018cd78b94ba1ffc455762b76e2353f2de Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/protocol/result.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/staticcheck.conf b/vendor/github.com/cloudevents/sdk-go/v2/staticcheck.conf new file mode 100644 index 0000000000000000000000000000000000000000..d6f269556ec5cc4dbd4307dc960b4c2e7adf951f Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/staticcheck.conf differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/allocate.go b/vendor/github.com/cloudevents/sdk-go/v2/types/allocate.go new file mode 100644 index 0000000000000000000000000000000000000000..814626874645e1849f1208b7378fce7435d10bec Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/types/allocate.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/doc.go b/vendor/github.com/cloudevents/sdk-go/v2/types/doc.go new file mode 100644 index 0000000000000000000000000000000000000000..cf7a94f35c04184637c65b016a7cb72d28e5a240 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/types/doc.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/timestamp.go b/vendor/github.com/cloudevents/sdk-go/v2/types/timestamp.go new file mode 100644 index 0000000000000000000000000000000000000000..ff049727dd4ba1a9e25b3a854805d2b8b298cf9c Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/types/timestamp.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/uri.go b/vendor/github.com/cloudevents/sdk-go/v2/types/uri.go new file mode 100644 index 0000000000000000000000000000000000000000..bed608094cd949d97b7d1f8dafc5680d53fb9cab Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/types/uri.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/uriref.go b/vendor/github.com/cloudevents/sdk-go/v2/types/uriref.go new file mode 100644 index 0000000000000000000000000000000000000000..22fa123145d49104f5566a84e7ea0fe11ea62288 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/types/uriref.go differ diff --git a/vendor/github.com/cloudevents/sdk-go/v2/types/value.go b/vendor/github.com/cloudevents/sdk-go/v2/types/value.go new file mode 100644 index 0000000000000000000000000000000000000000..f643d0aa512eaa1e527816d053482cf152caa815 Binary files /dev/null and b/vendor/github.com/cloudevents/sdk-go/v2/types/value.go differ diff --git a/vendor/github.com/json-iterator/go/.codecov.yml b/vendor/github.com/json-iterator/go/.codecov.yml new file mode 100644 index 0000000000000000000000000000000000000000..955dc0be5fa67651f73927238c3ba011186af65f Binary files /dev/null and b/vendor/github.com/json-iterator/go/.codecov.yml differ diff --git a/vendor/github.com/json-iterator/go/.gitignore b/vendor/github.com/json-iterator/go/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..15556530a85421a47fc1fa355773e29768a715a5 Binary files /dev/null and b/vendor/github.com/json-iterator/go/.gitignore differ diff --git a/vendor/github.com/json-iterator/go/.travis.yml b/vendor/github.com/json-iterator/go/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..449e67cd01acba105df358ccac3c32f0693f3f1a Binary files /dev/null and b/vendor/github.com/json-iterator/go/.travis.yml differ diff --git a/vendor/github.com/json-iterator/go/Gopkg.lock b/vendor/github.com/json-iterator/go/Gopkg.lock new file mode 100644 index 0000000000000000000000000000000000000000..c8a9fbb3871b0e32024cf102cfd6d5d175c3cda5 Binary files /dev/null and b/vendor/github.com/json-iterator/go/Gopkg.lock differ diff --git a/vendor/github.com/json-iterator/go/Gopkg.toml b/vendor/github.com/json-iterator/go/Gopkg.toml new file mode 100644 index 0000000000000000000000000000000000000000..313a0f887b6f412639bdfed98411843830275d8d Binary files /dev/null and b/vendor/github.com/json-iterator/go/Gopkg.toml differ diff --git a/vendor/github.com/json-iterator/go/LICENSE b/vendor/github.com/json-iterator/go/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2cf4f5ab28e9c50b4553caadfc0d978edd0d4adb Binary files /dev/null and b/vendor/github.com/json-iterator/go/LICENSE differ diff --git a/vendor/github.com/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md new file mode 100644 index 0000000000000000000000000000000000000000..52b111d5f36ef2313f57fe70f58e41e866046bef Binary files /dev/null and b/vendor/github.com/json-iterator/go/README.md differ diff --git a/vendor/github.com/json-iterator/go/adapter.go b/vendor/github.com/json-iterator/go/adapter.go new file mode 100644 index 0000000000000000000000000000000000000000..92d2cc4a3dd5ce61d6d90d7b1c3c8cb155366c55 Binary files /dev/null and b/vendor/github.com/json-iterator/go/adapter.go differ diff --git a/vendor/github.com/json-iterator/go/any.go b/vendor/github.com/json-iterator/go/any.go new file mode 100644 index 0000000000000000000000000000000000000000..f6b8aeab0a12dd61faf85156fd8dea10c96a8c9c Binary files /dev/null and b/vendor/github.com/json-iterator/go/any.go differ diff --git a/vendor/github.com/json-iterator/go/any_array.go b/vendor/github.com/json-iterator/go/any_array.go new file mode 100644 index 0000000000000000000000000000000000000000..0449e9aa428aeba21696ecd1511880db12ee4445 Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_array.go differ diff --git a/vendor/github.com/json-iterator/go/any_bool.go b/vendor/github.com/json-iterator/go/any_bool.go new file mode 100644 index 0000000000000000000000000000000000000000..9452324af5b17483f48e7b453c44266c3078032b Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_bool.go differ diff --git a/vendor/github.com/json-iterator/go/any_float.go b/vendor/github.com/json-iterator/go/any_float.go new file mode 100644 index 0000000000000000000000000000000000000000..35fdb09497fa86e5fbc84ad288cbfe8f012c9521 Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_float.go differ diff --git a/vendor/github.com/json-iterator/go/any_int32.go b/vendor/github.com/json-iterator/go/any_int32.go new file mode 100644 index 0000000000000000000000000000000000000000..1b56f399150d9c3012babf663da40b1e2ac3e939 Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_int32.go differ diff --git a/vendor/github.com/json-iterator/go/any_int64.go b/vendor/github.com/json-iterator/go/any_int64.go new file mode 100644 index 0000000000000000000000000000000000000000..c440d72b6d3ae1438fc92cd29e501ffac250e4e5 Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_int64.go differ diff --git a/vendor/github.com/json-iterator/go/any_invalid.go b/vendor/github.com/json-iterator/go/any_invalid.go new file mode 100644 index 0000000000000000000000000000000000000000..1d859eac3274a44b956e5d559cb1ed2dd8843ae1 Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_invalid.go differ diff --git a/vendor/github.com/json-iterator/go/any_nil.go b/vendor/github.com/json-iterator/go/any_nil.go new file mode 100644 index 0000000000000000000000000000000000000000..d04cb54c11c1e57eb1d9cd820b00f402c9ed5c3c Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_nil.go differ diff --git a/vendor/github.com/json-iterator/go/any_number.go b/vendor/github.com/json-iterator/go/any_number.go new file mode 100644 index 0000000000000000000000000000000000000000..9d1e901a66ad36f15646eebbdfde5f80fae5a6b8 Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_number.go differ diff --git a/vendor/github.com/json-iterator/go/any_object.go b/vendor/github.com/json-iterator/go/any_object.go new file mode 100644 index 0000000000000000000000000000000000000000..c44ef5c989a46a629432c809faed5f77c0b676b8 Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_object.go differ diff --git a/vendor/github.com/json-iterator/go/any_str.go b/vendor/github.com/json-iterator/go/any_str.go new file mode 100644 index 0000000000000000000000000000000000000000..1f12f6612de98255335e5dccf6200355ef27363f Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_str.go differ diff --git a/vendor/github.com/json-iterator/go/any_uint32.go b/vendor/github.com/json-iterator/go/any_uint32.go new file mode 100644 index 0000000000000000000000000000000000000000..656bbd33d7ee9d7dcd153603a21c66851bc19511 Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_uint32.go differ diff --git a/vendor/github.com/json-iterator/go/any_uint64.go b/vendor/github.com/json-iterator/go/any_uint64.go new file mode 100644 index 0000000000000000000000000000000000000000..7df2fce33ba971b51129ce73359ca3c3038cfdee Binary files /dev/null and b/vendor/github.com/json-iterator/go/any_uint64.go differ diff --git a/vendor/github.com/json-iterator/go/build.sh b/vendor/github.com/json-iterator/go/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..b45ef688313ec5063cd21ac84ee5ed87d3849c38 Binary files /dev/null and b/vendor/github.com/json-iterator/go/build.sh differ diff --git a/vendor/github.com/json-iterator/go/config.go b/vendor/github.com/json-iterator/go/config.go new file mode 100644 index 0000000000000000000000000000000000000000..2adcdc3b790e53e4192655b15680a596a52449dd Binary files /dev/null and b/vendor/github.com/json-iterator/go/config.go differ diff --git a/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md b/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md new file mode 100644 index 0000000000000000000000000000000000000000..3095662b0610038098235c19a7a5b13dd12dd4be Binary files /dev/null and b/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md differ diff --git a/vendor/github.com/json-iterator/go/iter.go b/vendor/github.com/json-iterator/go/iter.go new file mode 100644 index 0000000000000000000000000000000000000000..29b31cf78950654b3478784fda9d024212db75ff Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter.go differ diff --git a/vendor/github.com/json-iterator/go/iter_array.go b/vendor/github.com/json-iterator/go/iter_array.go new file mode 100644 index 0000000000000000000000000000000000000000..204fe0e0922aa0582eada026b3ee4af5f7cf25f7 Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter_array.go differ diff --git a/vendor/github.com/json-iterator/go/iter_float.go b/vendor/github.com/json-iterator/go/iter_float.go new file mode 100644 index 0000000000000000000000000000000000000000..8a3d8b6fb43c25b814f25d221ce4e78381925289 Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter_float.go differ diff --git a/vendor/github.com/json-iterator/go/iter_int.go b/vendor/github.com/json-iterator/go/iter_int.go new file mode 100644 index 0000000000000000000000000000000000000000..d786a89fe1a3ddc36d7289ccccbe7a8d8d22295a Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter_int.go differ diff --git a/vendor/github.com/json-iterator/go/iter_object.go b/vendor/github.com/json-iterator/go/iter_object.go new file mode 100644 index 0000000000000000000000000000000000000000..58ee89c849e7bbff01577ce657502f34b8125c85 Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter_object.go differ diff --git a/vendor/github.com/json-iterator/go/iter_skip.go b/vendor/github.com/json-iterator/go/iter_skip.go new file mode 100644 index 0000000000000000000000000000000000000000..e91eefb15becf2fdd007fd3c992814d8c4e2cfa0 Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter_skip.go differ diff --git a/vendor/github.com/json-iterator/go/iter_skip_sloppy.go b/vendor/github.com/json-iterator/go/iter_skip_sloppy.go new file mode 100644 index 0000000000000000000000000000000000000000..9303de41e40050de20fd5256bad35932e038b930 Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter_skip_sloppy.go differ diff --git a/vendor/github.com/json-iterator/go/iter_skip_strict.go b/vendor/github.com/json-iterator/go/iter_skip_strict.go new file mode 100644 index 0000000000000000000000000000000000000000..6cf66d0438dbe20df79f41293919436a304f2f5c Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter_skip_strict.go differ diff --git a/vendor/github.com/json-iterator/go/iter_str.go b/vendor/github.com/json-iterator/go/iter_str.go new file mode 100644 index 0000000000000000000000000000000000000000..adc487ea80483cbc892f0438c3133705cbcb46cd Binary files /dev/null and b/vendor/github.com/json-iterator/go/iter_str.go differ diff --git a/vendor/github.com/json-iterator/go/jsoniter.go b/vendor/github.com/json-iterator/go/jsoniter.go new file mode 100644 index 0000000000000000000000000000000000000000..c2934f916eb3031985b3e4c9ccc238cb5ec182fa Binary files /dev/null and b/vendor/github.com/json-iterator/go/jsoniter.go differ diff --git a/vendor/github.com/json-iterator/go/pool.go b/vendor/github.com/json-iterator/go/pool.go new file mode 100644 index 0000000000000000000000000000000000000000..e2389b56cfff3ce31c878ef99a4a55471d2dc53b Binary files /dev/null and b/vendor/github.com/json-iterator/go/pool.go differ diff --git a/vendor/github.com/json-iterator/go/reflect.go b/vendor/github.com/json-iterator/go/reflect.go new file mode 100644 index 0000000000000000000000000000000000000000..39acb320ace720d5051e5178e655bafc0710b173 Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_array.go b/vendor/github.com/json-iterator/go/reflect_array.go new file mode 100644 index 0000000000000000000000000000000000000000..13a0b7b0878cb7e6f379bb548e526a0efdce3713 Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_array.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_dynamic.go b/vendor/github.com/json-iterator/go/reflect_dynamic.go new file mode 100644 index 0000000000000000000000000000000000000000..8b6bc8b4332869236aa7b7374ee6b6803f5645d6 Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_dynamic.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_extension.go b/vendor/github.com/json-iterator/go/reflect_extension.go new file mode 100644 index 0000000000000000000000000000000000000000..74a97bfe5abfb228c2dec33be40f1292b9605338 Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_extension.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_json_number.go b/vendor/github.com/json-iterator/go/reflect_json_number.go new file mode 100644 index 0000000000000000000000000000000000000000..98d45c1ec25500f9d7f7c944286e26bbc5d321ae Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_json_number.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_json_raw_message.go b/vendor/github.com/json-iterator/go/reflect_json_raw_message.go new file mode 100644 index 0000000000000000000000000000000000000000..eba434f2f16a39ce12253ed08857549d60941142 Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_json_raw_message.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_map.go b/vendor/github.com/json-iterator/go/reflect_map.go new file mode 100644 index 0000000000000000000000000000000000000000..58296713013531babbf1c8bbf2e646ac489e1d39 Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_map.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_marshaler.go b/vendor/github.com/json-iterator/go/reflect_marshaler.go new file mode 100644 index 0000000000000000000000000000000000000000..3e21f3756717ac3e2a8c271bcc27888a95cac2fb Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_marshaler.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_native.go b/vendor/github.com/json-iterator/go/reflect_native.go new file mode 100644 index 0000000000000000000000000000000000000000..f88722d14d198fe477bd69ae05bd405625be974d Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_native.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_optional.go b/vendor/github.com/json-iterator/go/reflect_optional.go new file mode 100644 index 0000000000000000000000000000000000000000..fa71f47489121bdb7f593f7aa3696d546dd64832 Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_optional.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_slice.go b/vendor/github.com/json-iterator/go/reflect_slice.go new file mode 100644 index 0000000000000000000000000000000000000000..9441d79df33b45495d1628e71d13da7d35b9da24 Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_slice.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_struct_decoder.go b/vendor/github.com/json-iterator/go/reflect_struct_decoder.go new file mode 100644 index 0000000000000000000000000000000000000000..92ae912dc2482051af984a674696c3aca7668acd Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_struct_decoder.go differ diff --git a/vendor/github.com/json-iterator/go/reflect_struct_encoder.go b/vendor/github.com/json-iterator/go/reflect_struct_encoder.go new file mode 100644 index 0000000000000000000000000000000000000000..152e3ef5a93c6e375ed1c3ea34e66e821ef5b9ac Binary files /dev/null and b/vendor/github.com/json-iterator/go/reflect_struct_encoder.go differ diff --git a/vendor/github.com/json-iterator/go/stream.go b/vendor/github.com/json-iterator/go/stream.go new file mode 100644 index 0000000000000000000000000000000000000000..23d8a3ad6b1269c4396e45430a67521493915e2e Binary files /dev/null and b/vendor/github.com/json-iterator/go/stream.go differ diff --git a/vendor/github.com/json-iterator/go/stream_float.go b/vendor/github.com/json-iterator/go/stream_float.go new file mode 100644 index 0000000000000000000000000000000000000000..826aa594ac6f34a832fd3a4b8e4dea654278dc3b Binary files /dev/null and b/vendor/github.com/json-iterator/go/stream_float.go differ diff --git a/vendor/github.com/json-iterator/go/stream_int.go b/vendor/github.com/json-iterator/go/stream_int.go new file mode 100644 index 0000000000000000000000000000000000000000..d1059ee4c20e3739a39eb09c448c7b60a02f4d63 Binary files /dev/null and b/vendor/github.com/json-iterator/go/stream_int.go differ diff --git a/vendor/github.com/json-iterator/go/stream_str.go b/vendor/github.com/json-iterator/go/stream_str.go new file mode 100644 index 0000000000000000000000000000000000000000..54c2ba0b3a2d9716669b2bc4f99c4f0a95da2233 Binary files /dev/null and b/vendor/github.com/json-iterator/go/stream_str.go differ diff --git a/vendor/github.com/json-iterator/go/test.sh b/vendor/github.com/json-iterator/go/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..f4e7c0b2c945a7552f9133ddf210301f5d39d55b Binary files /dev/null and b/vendor/github.com/json-iterator/go/test.sh differ diff --git a/vendor/github.com/modern-go/concurrent/LICENSE b/vendor/github.com/modern-go/concurrent/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 Binary files /dev/null and b/vendor/github.com/modern-go/concurrent/LICENSE differ diff --git a/vendor/github.com/modern-go/concurrent/README.md b/vendor/github.com/modern-go/concurrent/README.md new file mode 100644 index 0000000000000000000000000000000000000000..91d6adb3fa2f8dc2327e4efc4864871b6ca8b09d Binary files /dev/null and b/vendor/github.com/modern-go/concurrent/README.md differ diff --git a/vendor/github.com/modern-go/concurrent/executor.go b/vendor/github.com/modern-go/concurrent/executor.go new file mode 100644 index 0000000000000000000000000000000000000000..56e5d22bf9d6a96a4e17ef59612ac61fbdee1323 Binary files /dev/null and b/vendor/github.com/modern-go/concurrent/executor.go differ diff --git a/vendor/github.com/modern-go/concurrent/go_above_19.go b/vendor/github.com/modern-go/concurrent/go_above_19.go new file mode 100644 index 0000000000000000000000000000000000000000..a9f2593478f89a4f2f4e6fc0532ad66c67d01d45 Binary files /dev/null and b/vendor/github.com/modern-go/concurrent/go_above_19.go differ diff --git a/vendor/github.com/modern-go/concurrent/go_below_19.go b/vendor/github.com/modern-go/concurrent/go_below_19.go new file mode 100644 index 0000000000000000000000000000000000000000..3f79f4fe481d3be6b195cb9a00cc97cc6e4c858f Binary files /dev/null and b/vendor/github.com/modern-go/concurrent/go_below_19.go differ diff --git a/vendor/github.com/modern-go/concurrent/unbounded_executor.go b/vendor/github.com/modern-go/concurrent/unbounded_executor.go new file mode 100644 index 0000000000000000000000000000000000000000..70a1cf0f1834daf2d69b5b160b27854324b874de Binary files /dev/null and b/vendor/github.com/modern-go/concurrent/unbounded_executor.go differ diff --git a/vendor/github.com/modern-go/reflect2/.gitignore b/vendor/github.com/modern-go/reflect2/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7b26c946dc6c79f2daf40411c5671cdee7719cdf Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/.gitignore differ diff --git a/vendor/github.com/modern-go/reflect2/.travis.yml b/vendor/github.com/modern-go/reflect2/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..fbb43744d94b22d382113d787f7441cccf8c0a86 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/.travis.yml differ diff --git a/vendor/github.com/modern-go/reflect2/Gopkg.lock b/vendor/github.com/modern-go/reflect2/Gopkg.lock new file mode 100644 index 0000000000000000000000000000000000000000..2a3a69893b5082ff44b0d3b8e77be923e2c56151 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/Gopkg.lock differ diff --git a/vendor/github.com/modern-go/reflect2/Gopkg.toml b/vendor/github.com/modern-go/reflect2/Gopkg.toml new file mode 100644 index 0000000000000000000000000000000000000000..2f4f4dbdcc5e525ede8544077e741dcff3265a8b Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/Gopkg.toml differ diff --git a/vendor/github.com/modern-go/reflect2/LICENSE b/vendor/github.com/modern-go/reflect2/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/LICENSE differ diff --git a/vendor/github.com/modern-go/reflect2/README.md b/vendor/github.com/modern-go/reflect2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..6f968aab9ecbaeb92002a65d39f49682324387f3 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/README.md differ diff --git a/vendor/github.com/modern-go/reflect2/go_above_17.go b/vendor/github.com/modern-go/reflect2/go_above_17.go new file mode 100644 index 0000000000000000000000000000000000000000..5c1cea8683ab30bf9aa5074043a1d5f630bd4374 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/go_above_17.go differ diff --git a/vendor/github.com/modern-go/reflect2/go_above_19.go b/vendor/github.com/modern-go/reflect2/go_above_19.go new file mode 100644 index 0000000000000000000000000000000000000000..c7e3b780116a3d19511c794daec40e65d74d9a5b Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/go_above_19.go differ diff --git a/vendor/github.com/modern-go/reflect2/go_below_17.go b/vendor/github.com/modern-go/reflect2/go_below_17.go new file mode 100644 index 0000000000000000000000000000000000000000..65a93c889b77723b90545591ad3f34918b2e5e6c Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/go_below_17.go differ diff --git a/vendor/github.com/modern-go/reflect2/go_below_19.go b/vendor/github.com/modern-go/reflect2/go_below_19.go new file mode 100644 index 0000000000000000000000000000000000000000..b050ef70cddbdc5d5c297ba16f0b0d114859e6bf Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/go_below_19.go differ diff --git a/vendor/github.com/modern-go/reflect2/reflect2.go b/vendor/github.com/modern-go/reflect2/reflect2.go new file mode 100644 index 0000000000000000000000000000000000000000..63b49c799194729a141e9e03029d8b86b58171f9 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/reflect2.go differ diff --git a/vendor/github.com/modern-go/reflect2/reflect2_amd64.s b/vendor/github.com/modern-go/reflect2/reflect2_amd64.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/reflect2_kind.go b/vendor/github.com/modern-go/reflect2/reflect2_kind.go new file mode 100644 index 0000000000000000000000000000000000000000..62f299e40453622ade6e53e91beba8b5694ffc3d Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/reflect2_kind.go differ diff --git a/vendor/github.com/modern-go/reflect2/relfect2_386.s b/vendor/github.com/modern-go/reflect2/relfect2_386.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s b/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/relfect2_arm.s b/vendor/github.com/modern-go/reflect2/relfect2_arm.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/relfect2_arm64.s b/vendor/github.com/modern-go/reflect2/relfect2_arm64.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s b/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s b/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s b/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/relfect2_s390x.s b/vendor/github.com/modern-go/reflect2/relfect2_s390x.s new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/vendor/github.com/modern-go/reflect2/safe_field.go b/vendor/github.com/modern-go/reflect2/safe_field.go new file mode 100644 index 0000000000000000000000000000000000000000..d4ba1f4f80e979f5157832f1f5014b9a63edbd9d Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/safe_field.go differ diff --git a/vendor/github.com/modern-go/reflect2/safe_map.go b/vendor/github.com/modern-go/reflect2/safe_map.go new file mode 100644 index 0000000000000000000000000000000000000000..88362205a2bb5d724b841bce797c75ff9893bb63 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/safe_map.go differ diff --git a/vendor/github.com/modern-go/reflect2/safe_slice.go b/vendor/github.com/modern-go/reflect2/safe_slice.go new file mode 100644 index 0000000000000000000000000000000000000000..bcce6fd20e5cfa99137433e84e033eaf7e162a82 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/safe_slice.go differ diff --git a/vendor/github.com/modern-go/reflect2/safe_struct.go b/vendor/github.com/modern-go/reflect2/safe_struct.go new file mode 100644 index 0000000000000000000000000000000000000000..e5fb9b313ecdbad6ec3a57cf39872ab3a7dbc564 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/safe_struct.go differ diff --git a/vendor/github.com/modern-go/reflect2/safe_type.go b/vendor/github.com/modern-go/reflect2/safe_type.go new file mode 100644 index 0000000000000000000000000000000000000000..ee4e7bb6edfdd031eb6fc2c06a7550e249a6d0b7 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/safe_type.go differ diff --git a/vendor/github.com/modern-go/reflect2/test.sh b/vendor/github.com/modern-go/reflect2/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..3d2b9768ce6113106bb4d18ce6179a9ce4a79c80 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/test.sh differ diff --git a/vendor/github.com/modern-go/reflect2/type_map.go b/vendor/github.com/modern-go/reflect2/type_map.go new file mode 100644 index 0000000000000000000000000000000000000000..3acfb55803a832c5ea743febea5a9bcf3c875b3f Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/type_map.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_array.go b/vendor/github.com/modern-go/reflect2/unsafe_array.go new file mode 100644 index 0000000000000000000000000000000000000000..76cbdba6eb1bb5814a1b0449f7c0706066badc2f Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_array.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_eface.go b/vendor/github.com/modern-go/reflect2/unsafe_eface.go new file mode 100644 index 0000000000000000000000000000000000000000..805010f3a0c553db57da2e791ebbe15672b798a5 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_eface.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_field.go b/vendor/github.com/modern-go/reflect2/unsafe_field.go new file mode 100644 index 0000000000000000000000000000000000000000..5eb53130a20980ff9a150b60d3086b57077d9ddb Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_field.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_iface.go b/vendor/github.com/modern-go/reflect2/unsafe_iface.go new file mode 100644 index 0000000000000000000000000000000000000000..b60195533ccf5f8bdb8087ac0a009b9be3b456a0 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_iface.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_link.go b/vendor/github.com/modern-go/reflect2/unsafe_link.go new file mode 100644 index 0000000000000000000000000000000000000000..57229c8db4170696bffde7177553a6d42c738e2f Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_link.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_map.go b/vendor/github.com/modern-go/reflect2/unsafe_map.go new file mode 100644 index 0000000000000000000000000000000000000000..f2e76e6bb1491d1d47253252d66433386446ffc1 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_map.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_ptr.go b/vendor/github.com/modern-go/reflect2/unsafe_ptr.go new file mode 100644 index 0000000000000000000000000000000000000000..8e5ec9cf45ed86b762db6244e2cb31b5b7dcead4 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_ptr.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_slice.go b/vendor/github.com/modern-go/reflect2/unsafe_slice.go new file mode 100644 index 0000000000000000000000000000000000000000..1c6d876c7f50256a9d8e44f0a00cddcce3ff0b60 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_slice.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_struct.go b/vendor/github.com/modern-go/reflect2/unsafe_struct.go new file mode 100644 index 0000000000000000000000000000000000000000..804d9166397bb34b841b3081773a381c0758ca50 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_struct.go differ diff --git a/vendor/github.com/modern-go/reflect2/unsafe_type.go b/vendor/github.com/modern-go/reflect2/unsafe_type.go new file mode 100644 index 0000000000000000000000000000000000000000..13941716ce3a2591df867f64b888266ef080e520 Binary files /dev/null and b/vendor/github.com/modern-go/reflect2/unsafe_type.go differ diff --git a/vendor/github.com/nats-io/nats.go/.gitignore b/vendor/github.com/nats-io/nats.go/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a9977fce5d004055e7b0db9aa31c11f08d21417f Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/.gitignore differ diff --git a/vendor/github.com/nats-io/nats.go/.travis.yml b/vendor/github.com/nats-io/nats.go/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..89c5c11f4135c7e08e867bc6e87fef3cbe0a0687 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/.travis.yml differ diff --git a/vendor/github.com/nats-io/nats.go/CODE-OF-CONDUCT.md b/vendor/github.com/nats-io/nats.go/CODE-OF-CONDUCT.md new file mode 100644 index 0000000000000000000000000000000000000000..b850d49ee6c70f32e032a1b71d50d3d3c1c7e278 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/CODE-OF-CONDUCT.md differ diff --git a/vendor/github.com/nats-io/nats.go/GOVERNANCE.md b/vendor/github.com/nats-io/nats.go/GOVERNANCE.md new file mode 100644 index 0000000000000000000000000000000000000000..1d5a7be3e5139ecd2669f8e17aaa76ab6c555f34 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/GOVERNANCE.md differ diff --git a/vendor/github.com/nats-io/nats.go/LICENSE b/vendor/github.com/nats-io/nats.go/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/LICENSE differ diff --git a/vendor/github.com/nats-io/nats.go/MAINTAINERS.md b/vendor/github.com/nats-io/nats.go/MAINTAINERS.md new file mode 100644 index 0000000000000000000000000000000000000000..232146550fbd6e07fcab09b5e37a3bdaa89e820d Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/MAINTAINERS.md differ diff --git a/vendor/github.com/nats-io/nats.go/README.md b/vendor/github.com/nats-io/nats.go/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f6ecfc500af50ea9bd018001f78efaffe42597d6 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/README.md differ diff --git a/vendor/github.com/nats-io/nats.go/TODO.md b/vendor/github.com/nats-io/nats.go/TODO.md new file mode 100644 index 0000000000000000000000000000000000000000..213aaeca86806505444e1d62e60665bbd52a758b Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/TODO.md differ diff --git a/vendor/github.com/nats-io/nats.go/context.go b/vendor/github.com/nats-io/nats.go/context.go new file mode 100644 index 0000000000000000000000000000000000000000..666a483ad66cb1df65b431e01a81a0e26334190b Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/context.go differ diff --git a/vendor/github.com/nats-io/nats.go/dependencies.md b/vendor/github.com/nats-io/nats.go/dependencies.md new file mode 100644 index 0000000000000000000000000000000000000000..cc986b277141feff521b96af26672cab6bded4c2 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/dependencies.md differ diff --git a/vendor/github.com/nats-io/nats.go/enc.go b/vendor/github.com/nats-io/nats.go/enc.go new file mode 100644 index 0000000000000000000000000000000000000000..181ef5aa778333dd5e543893f693546a16cb0f28 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/enc.go differ diff --git a/vendor/github.com/nats-io/nats.go/encoders/builtin/default_enc.go b/vendor/github.com/nats-io/nats.go/encoders/builtin/default_enc.go new file mode 100644 index 0000000000000000000000000000000000000000..46d918eea64472d24834941c08af85df2bedd465 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/encoders/builtin/default_enc.go differ diff --git a/vendor/github.com/nats-io/nats.go/encoders/builtin/gob_enc.go b/vendor/github.com/nats-io/nats.go/encoders/builtin/gob_enc.go new file mode 100644 index 0000000000000000000000000000000000000000..632bcbd395da93b82e3121e442e35de34dddd930 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/encoders/builtin/gob_enc.go differ diff --git a/vendor/github.com/nats-io/nats.go/encoders/builtin/json_enc.go b/vendor/github.com/nats-io/nats.go/encoders/builtin/json_enc.go new file mode 100644 index 0000000000000000000000000000000000000000..c9670f3131d4a8a8883829b1e35f40ffcf4442ac Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/encoders/builtin/json_enc.go differ diff --git a/vendor/github.com/nats-io/nats.go/go_test.mod b/vendor/github.com/nats-io/nats.go/go_test.mod new file mode 100644 index 0000000000000000000000000000000000000000..3c47e8128f0626be4fbc02a8b244284fadb08b1d Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/go_test.mod differ diff --git a/vendor/github.com/nats-io/nats.go/go_test.sum b/vendor/github.com/nats-io/nats.go/go_test.sum new file mode 100644 index 0000000000000000000000000000000000000000..09550633595e72b7754963f0ab95191ec7572245 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/go_test.sum differ diff --git a/vendor/github.com/nats-io/nats.go/js.go b/vendor/github.com/nats-io/nats.go/js.go new file mode 100644 index 0000000000000000000000000000000000000000..7a0b8e4742900a0d63b70d41f850327b6a8f1c25 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/js.go differ diff --git a/vendor/github.com/nats-io/nats.go/jsm.go b/vendor/github.com/nats-io/nats.go/jsm.go new file mode 100644 index 0000000000000000000000000000000000000000..e485ae14ac8d64a024800b460f5884a4dbf7778d Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/jsm.go differ diff --git a/vendor/github.com/nats-io/nats.go/nats.go b/vendor/github.com/nats-io/nats.go/nats.go new file mode 100644 index 0000000000000000000000000000000000000000..502168340444fd0010553df280121417aa4a8051 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/nats.go differ diff --git a/vendor/github.com/nats-io/nats.go/netchan.go b/vendor/github.com/nats-io/nats.go/netchan.go new file mode 100644 index 0000000000000000000000000000000000000000..3f2a33e6095e0aa7e7ac62c9a779a40e2d9663b2 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/netchan.go differ diff --git a/vendor/github.com/nats-io/nats.go/parser.go b/vendor/github.com/nats-io/nats.go/parser.go new file mode 100644 index 0000000000000000000000000000000000000000..c9cbfeb655bf332eb2cf9526c15adef2d23f3d3b Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/parser.go differ diff --git a/vendor/github.com/nats-io/nats.go/timer.go b/vendor/github.com/nats-io/nats.go/timer.go new file mode 100644 index 0000000000000000000000000000000000000000..1216762d42205d551a0410bae610894da408eef8 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/timer.go differ diff --git a/vendor/github.com/nats-io/nats.go/util/tls.go b/vendor/github.com/nats-io/nats.go/util/tls.go new file mode 100644 index 0000000000000000000000000000000000000000..53ff9aa2b48c83d82487d4e13c2f5156d52d7186 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/util/tls.go differ diff --git a/vendor/github.com/nats-io/nats.go/util/tls_go17.go b/vendor/github.com/nats-io/nats.go/util/tls_go17.go new file mode 100644 index 0000000000000000000000000000000000000000..fd646d31b95ca37b64f81a6ff28a67ecaf211b36 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/util/tls_go17.go differ diff --git a/vendor/github.com/nats-io/nats.go/ws.go b/vendor/github.com/nats-io/nats.go/ws.go new file mode 100644 index 0000000000000000000000000000000000000000..4231f102e3bd20cc8122c94404845bf1189d92b6 Binary files /dev/null and b/vendor/github.com/nats-io/nats.go/ws.go differ diff --git a/vendor/github.com/nats-io/nkeys/.gitignore b/vendor/github.com/nats-io/nkeys/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..9dca5eb4b3c0a16d92a2fb5b2f16c689b35ad068 Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/.gitignore differ diff --git a/vendor/github.com/nats-io/nkeys/.goreleaser.yml b/vendor/github.com/nats-io/nkeys/.goreleaser.yml new file mode 100644 index 0000000000000000000000000000000000000000..6df08becf4a4ef3371707af377b354c2e2c53951 Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/.goreleaser.yml differ diff --git a/vendor/github.com/nats-io/nkeys/.travis.yml b/vendor/github.com/nats-io/nkeys/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..c13448e2799091da27e405b0ae13038e2969a4a0 Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/.travis.yml differ diff --git a/vendor/github.com/nats-io/nkeys/GOVERNANCE.md b/vendor/github.com/nats-io/nkeys/GOVERNANCE.md new file mode 100644 index 0000000000000000000000000000000000000000..744d3bc2b550942cf59773c2568a21d678891568 Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/GOVERNANCE.md differ diff --git a/vendor/github.com/nats-io/nkeys/LICENSE b/vendor/github.com/nats-io/nkeys/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/LICENSE differ diff --git a/vendor/github.com/nats-io/nkeys/MAINTAINERS.md b/vendor/github.com/nats-io/nkeys/MAINTAINERS.md new file mode 100644 index 0000000000000000000000000000000000000000..232146550fbd6e07fcab09b5e37a3bdaa89e820d Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/MAINTAINERS.md differ diff --git a/vendor/github.com/nats-io/nkeys/README.md b/vendor/github.com/nats-io/nkeys/README.md new file mode 100644 index 0000000000000000000000000000000000000000..13032c56afb2d4e6086f986769c0e91837b922cc Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/README.md differ diff --git a/vendor/github.com/nats-io/nkeys/TODO.md b/vendor/github.com/nats-io/nkeys/TODO.md new file mode 100644 index 0000000000000000000000000000000000000000..2649c9e59b90cba7d3aed8bc3f003298c82bac7a Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/TODO.md differ diff --git a/vendor/github.com/nats-io/nkeys/crc16.go b/vendor/github.com/nats-io/nkeys/crc16.go new file mode 100644 index 0000000000000000000000000000000000000000..c3356cf93ea349ae2e7e80933615266c63c8b8cc Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/crc16.go differ diff --git a/vendor/github.com/nats-io/nkeys/creds_utils.go b/vendor/github.com/nats-io/nkeys/creds_utils.go new file mode 100644 index 0000000000000000000000000000000000000000..e1c3d941fb9aba4c5d1ab3809e0ba6a43f66cebc Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/creds_utils.go differ diff --git a/vendor/github.com/nats-io/nkeys/keypair.go b/vendor/github.com/nats-io/nkeys/keypair.go new file mode 100644 index 0000000000000000000000000000000000000000..acd86743d6c9d3c13dca3ec86240104a4bf18f2b Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/keypair.go differ diff --git a/vendor/github.com/nats-io/nkeys/main.go b/vendor/github.com/nats-io/nkeys/main.go new file mode 100644 index 0000000000000000000000000000000000000000..47d01c5696834ee4301c15814d8f150cada09bfb Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/main.go differ diff --git a/vendor/github.com/nats-io/nkeys/public.go b/vendor/github.com/nats-io/nkeys/public.go new file mode 100644 index 0000000000000000000000000000000000000000..cb7927a67895bf3cd87e1b139cb12e328c9be478 Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/public.go differ diff --git a/vendor/github.com/nats-io/nkeys/strkey.go b/vendor/github.com/nats-io/nkeys/strkey.go new file mode 100644 index 0000000000000000000000000000000000000000..324ea638f9db0d09077f2b062e61bcfebc3a853f Binary files /dev/null and b/vendor/github.com/nats-io/nkeys/strkey.go differ diff --git a/vendor/github.com/nats-io/nuid/.gitignore b/vendor/github.com/nats-io/nuid/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..daf913b1b347aae6de6f48d599bc89ef8c8693d6 Binary files /dev/null and b/vendor/github.com/nats-io/nuid/.gitignore differ diff --git a/vendor/github.com/nats-io/nuid/.travis.yml b/vendor/github.com/nats-io/nuid/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..52be726578e52105e035ae52fb16ca61ac63e9cf Binary files /dev/null and b/vendor/github.com/nats-io/nuid/.travis.yml differ diff --git a/vendor/github.com/nats-io/nuid/GOVERNANCE.md b/vendor/github.com/nats-io/nuid/GOVERNANCE.md new file mode 100644 index 0000000000000000000000000000000000000000..01aee70d40929feb68cd35daeb905adbee245d89 Binary files /dev/null and b/vendor/github.com/nats-io/nuid/GOVERNANCE.md differ diff --git a/vendor/github.com/nats-io/nuid/LICENSE b/vendor/github.com/nats-io/nuid/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 Binary files /dev/null and b/vendor/github.com/nats-io/nuid/LICENSE differ diff --git a/vendor/github.com/nats-io/nuid/MAINTAINERS.md b/vendor/github.com/nats-io/nuid/MAINTAINERS.md new file mode 100644 index 0000000000000000000000000000000000000000..6d0ed3e31f96a7af9089cc786a49dcbe6943f598 Binary files /dev/null and b/vendor/github.com/nats-io/nuid/MAINTAINERS.md differ diff --git a/vendor/github.com/nats-io/nuid/README.md b/vendor/github.com/nats-io/nuid/README.md new file mode 100644 index 0000000000000000000000000000000000000000..16e539485c473d2aa0621685ef7df63d1b9b542a Binary files /dev/null and b/vendor/github.com/nats-io/nuid/README.md differ diff --git a/vendor/github.com/nats-io/nuid/nuid.go b/vendor/github.com/nats-io/nuid/nuid.go new file mode 100644 index 0000000000000000000000000000000000000000..8134c7646751e270beca2f20dbfd83c8889538f4 Binary files /dev/null and b/vendor/github.com/nats-io/nuid/nuid.go differ diff --git a/vendor/golang.org/x/crypto/AUTHORS b/vendor/golang.org/x/crypto/AUTHORS new file mode 100644 index 0000000000000000000000000000000000000000..2b00ddba0dfee1022198444c16670d443840ef86 Binary files /dev/null and b/vendor/golang.org/x/crypto/AUTHORS differ diff --git a/vendor/golang.org/x/crypto/CONTRIBUTORS b/vendor/golang.org/x/crypto/CONTRIBUTORS new file mode 100644 index 0000000000000000000000000000000000000000..1fbd3e976faf5af5bbd1d8268a70399234969ae4 Binary files /dev/null and b/vendor/golang.org/x/crypto/CONTRIBUTORS differ diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..6a66aea5eafe0ca6a688840c47219556c552488e Binary files /dev/null and b/vendor/golang.org/x/crypto/LICENSE differ diff --git a/vendor/golang.org/x/crypto/PATENTS b/vendor/golang.org/x/crypto/PATENTS new file mode 100644 index 0000000000000000000000000000000000000000..733099041f84fa1e58611ab2e11af51c1f26d1d2 Binary files /dev/null and b/vendor/golang.org/x/crypto/PATENTS differ diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go new file mode 100644 index 0000000000000000000000000000000000000000..71ad917dadd8dc6af16289290c37878a84c242f8 Binary files /dev/null and b/vendor/golang.org/x/crypto/ed25519/ed25519.go differ diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go b/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go new file mode 100644 index 0000000000000000000000000000000000000000..b5974dc8b27bb23f1f7d0771f024d8bc1486292a Binary files /dev/null and b/vendor/golang.org/x/crypto/ed25519/ed25519_go113.go differ diff --git a/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go new file mode 100644 index 0000000000000000000000000000000000000000..e39f086c1d87dbedcb0cd0ccb4d302bae2c04dbc Binary files /dev/null and b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/const.go differ diff --git a/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go new file mode 100644 index 0000000000000000000000000000000000000000..fd03c252af427bd27eda3a787c6062b949c65d5f Binary files /dev/null and b/vendor/golang.org/x/crypto/ed25519/internal/edwards25519/edwards25519.go differ diff --git a/vendor/modules.txt b/vendor/modules.txt index ad4af521473b392041f7318f49db06b68ffc74e4..e0b12d6fc467751fed55c70a0200521d050bb7a7 100644 Binary files a/vendor/modules.txt and b/vendor/modules.txt differ