diff --git a/entoas/annotation.go b/entoas/annotation.go index 2759bc72e..1865afcb8 100644 --- a/entoas/annotation.go +++ b/entoas/annotation.go @@ -20,9 +20,12 @@ import ( "entgo.io/contrib/entoas/serialization" "entgo.io/ent/entc/gen" "entgo.io/ent/schema" + yaml "github.com/go-faster/yaml" "github.com/ogen-go/ogen" ) +const XOgenOperationGroup = "x-ogen-operation-group" + type ( // Annotation annotates fields and edges with metadata for spec generation. Annotation struct { @@ -46,16 +49,29 @@ type ( ReadOnly bool // Skip specifies that the field will be ignored in spec. Skip bool + // Extensions has map of OpenApi extenions + Extensions OgenExtensions } + OgenExtensions ogen.Extensions // OperationConfig holds meta information about a REST operation. OperationConfig struct { - Policy Policy - Groups serialization.Groups + Policy Policy + Groups serialization.Groups + Extensions OgenExtensions + } + // OpenApiExtension holds meta information about OpenApi extension + OpenApiExtension struct { + Name string + Value string } // OperationConfigOption allows managing OperationConfig using functional arguments. OperationConfigOption func(*OperationConfig) ) +func (o OgenExtensions) Schema() ogen.Extensions { + return ogen.Extensions(o) +} + // Groups returns a OperationConfigOption that adds the given serialization groups to a OperationConfig. func Groups(gs ...string) Annotation { return Annotation{Groups: gs} @@ -66,6 +82,43 @@ func OperationGroups(gs ...string) OperationConfigOption { return func(c *OperationConfig) { c.Groups = gs } } +func OperationExtentions(ext ...OpenApiExtension) OperationConfigOption { + return func(c *OperationConfig) { + if c.Extensions == nil { + c.Extensions = OgenExtensions{} + } + + for _, e := range ext { + c.Extensions[e.Name] = yaml.Node{Kind: yaml.ScalarNode, Value: e.Value} + } + } +} + +func Extensions(ext ...OpenApiExtension) Annotation { + exts := OgenExtensions{} + + for _, e := range ext { + exts[e.Name] = yaml.Node{Kind: yaml.ScalarNode, Value: e.Value} + } + + return Annotation{Extensions: exts} +} + +func OperationExtentionGroup(group string) OperationConfigOption { + return OperationExtentions(OpenApiExtensionOperationGroup(group)) +} + +func ExtentionOperationGroup(group string) Annotation { + return Extensions(OpenApiExtensionOperationGroup(group)) +} + +func OpenApiExtensionOperationGroup(group string) OpenApiExtension { + return OpenApiExtension{ + Name: XOgenOperationGroup, + Value: group, + } +} + // OperationPolicy returns a OperationConfigOption that sets the Policy of a OperationConfig to the given one. func OperationPolicy(p Policy) OperationConfigOption { return func(c *OperationConfig) { c.Policy = p } diff --git a/entoas/annotation_test.go b/entoas/annotation_test.go index f4a62dcf3..daa5fbfaf 100644 --- a/entoas/annotation_test.go +++ b/entoas/annotation_test.go @@ -36,19 +36,19 @@ func TestAnnotation(t *testing.T) { require.Equal(t, serialization.Groups{"create", "groups"}, a.Groups) a = CreateOperation(OperationGroups("create", "groups"), OperationPolicy(PolicyExpose)) - require.Equal(t, OperationConfig{PolicyExpose, serialization.Groups{"create", "groups"}}, a.Create) + require.Equal(t, OperationConfig{Policy: PolicyExpose, Groups: serialization.Groups{"create", "groups"}}, a.Create) a = ReadOperation(OperationGroups("read", "groups"), OperationPolicy(PolicyExpose)) - require.Equal(t, OperationConfig{PolicyExpose, serialization.Groups{"read", "groups"}}, a.Read) + require.Equal(t, OperationConfig{Policy: PolicyExpose, Groups: serialization.Groups{"read", "groups"}}, a.Read) a = UpdateOperation(OperationGroups("update", "groups"), OperationPolicy(PolicyExpose)) - require.Equal(t, OperationConfig{PolicyExpose, serialization.Groups{"update", "groups"}}, a.Update) + require.Equal(t, OperationConfig{Policy: PolicyExpose, Groups: serialization.Groups{"update", "groups"}}, a.Update) a = DeleteOperation(OperationGroups("delete", "groups"), OperationPolicy(PolicyExpose)) - require.Equal(t, OperationConfig{PolicyExpose, serialization.Groups{"delete", "groups"}}, a.Delete) + require.Equal(t, OperationConfig{Policy: PolicyExpose, Groups: serialization.Groups{"delete", "groups"}}, a.Delete) a = ListOperation(OperationGroups("list", "groups"), OperationPolicy(PolicyExpose)) - require.Equal(t, OperationConfig{PolicyExpose, serialization.Groups{"list", "groups"}}, a.List) + require.Equal(t, OperationConfig{Policy: PolicyExpose, Groups: serialization.Groups{"list", "groups"}}, a.List) b := Example("example") require.Equal(t, "example", b.Example) @@ -57,12 +57,18 @@ func TestAnnotation(t *testing.T) { require.Equal(t, ogen.Binary(), c.Schema) a = a.Merge(b).(Annotation).Merge(c).(Annotation) + // a.List.Extensions = ogen.Extensions{ + // "zxc": yaml.Node{Kind: yaml.ScalarNode, Value: "ccc"}, + // } ex := Annotation{ Example: "example", Schema: ogen.Binary(), List: OperationConfig{ Groups: serialization.Groups{"list", "groups"}, Policy: PolicyExpose, + // Extensions: ogen.Extensions{ + // "zxc": yaml.Node{Kind: yaml.ScalarNode, Value: "ccc"}, + // }, }, } require.Equal(t, ex, a) @@ -89,6 +95,7 @@ func TestAnnotation(t *testing.T) { require.NotNil(t, ac) ac, err = SchemaAnnotation(&gen.Type{Annotations: gen.Annotations{a.Name(): ex}}) require.NoError(t, err) + require.Equal(t, &ex, ac) ac, err = FieldAnnotation(new(gen.Field)) diff --git a/entoas/generator.go b/entoas/generator.go index 0a2d6f8ee..03747d375 100644 --- a/entoas/generator.go +++ b/entoas/generator.go @@ -195,12 +195,19 @@ func paths(g *gen.Graph, spec *ogen.Spec) error { } // root for all operations on this node. root := "/" + rules.Pluralize(strcase.KebabCase(n.Name)) + + ant := &Annotation{} + if err := ant.Decode(n.Annotations[ant.Name()]); err != nil { + return err + } + // Create operation. if contains(ops, OpCreate) { path(spec, root).Post, err = createOp(spec, n, cfg.AllowClientUUIDs) if err != nil { return err } + path(spec, root).Common.Extensions = ant.Extensions.Schema() } // Read operation. if contains(ops, OpRead) { @@ -208,6 +215,7 @@ func paths(g *gen.Graph, spec *ogen.Spec) error { if err != nil { return err } + path(spec, root+"/{id}").Common.Extensions = ant.Extensions.Schema() } // Update operation. if contains(ops, OpUpdate) { @@ -215,6 +223,7 @@ func paths(g *gen.Graph, spec *ogen.Spec) error { if err != nil { return err } + path(spec, root+"/{id}").Common.Extensions = ant.Extensions.Schema() } // Delete operation. if contains(ops, OpDelete) { @@ -222,6 +231,7 @@ func paths(g *gen.Graph, spec *ogen.Spec) error { if err != nil { return err } + path(spec, root+"/{id}").Common.Extensions = ant.Extensions.Schema() } // List operation. if contains(ops, OpList) { @@ -229,6 +239,7 @@ func paths(g *gen.Graph, spec *ogen.Spec) error { if err != nil { return err } + path(spec, root).Common.Extensions = ant.Extensions.Schema() } // Sub-Resource operations. for _, e := range n.Edges { @@ -243,6 +254,7 @@ func paths(g *gen.Graph, spec *ogen.Spec) error { if err != nil { return err } + path(spec, subRoot).Common.Extensions = ant.Extensions.Schema() } // List operation. if contains(ops, OpList) { @@ -250,6 +262,7 @@ func paths(g *gen.Graph, spec *ogen.Spec) error { if err != nil { return err } + path(spec, subRoot).Common.Extensions = ant.Extensions.Schema() } } } @@ -294,6 +307,13 @@ func createOp(spec *ogen.Spec, n *gen.Type, allowClientUUIDs bool) (*ogen.Operat spec.RefResponse(strconv.Itoa(http.StatusConflict)), spec.RefResponse(strconv.Itoa(http.StatusInternalServerError)), ) + + ant := &Annotation{} + if err := ant.Decode(n.Annotations[ant.Name()]); err != nil { + return nil, err + } + op.Common.Extensions = ant.Create.Extensions.Schema() + return op, nil } @@ -325,6 +345,13 @@ func readOp(spec *ogen.Spec, n *gen.Type) (*ogen.Operation, error) { spec.RefResponse(strconv.Itoa(http.StatusNotFound)), spec.RefResponse(strconv.Itoa(http.StatusInternalServerError)), ) + + ant := &Annotation{} + if err := ant.Decode(n.Annotations[ant.Name()]); err != nil { + return nil, err + } + op.Common.Extensions = ant.Read.Extensions.Schema() + return op, nil } @@ -359,6 +386,13 @@ func readEdgeOp(spec *ogen.Spec, n *gen.Type, e *gen.Edge) (*ogen.Operation, err spec.RefResponse(strconv.Itoa(http.StatusNotFound)), spec.RefResponse(strconv.Itoa(http.StatusInternalServerError)), ) + + ant := &Annotation{} + if err := ant.Decode(n.Annotations[ant.Name()]); err != nil { + return nil, err + } + op.Common.Extensions = ant.Read.Extensions.Schema() + return op, nil } @@ -395,6 +429,13 @@ func updateOp(spec *ogen.Spec, n *gen.Type) (*ogen.Operation, error) { spec.RefResponse(strconv.Itoa(http.StatusNotFound)), spec.RefResponse(strconv.Itoa(http.StatusInternalServerError)), ) + + ant := &Annotation{} + if err := ant.Decode(n.Annotations[ant.Name()]); err != nil { + return nil, err + } + op.Common.Extensions = ant.Update.Extensions.Schema() + return op, nil } @@ -421,6 +462,13 @@ func deleteOp(spec *ogen.Spec, n *gen.Type) (*ogen.Operation, error) { spec.RefResponse(strconv.Itoa(http.StatusNotFound)), spec.RefResponse(strconv.Itoa(http.StatusInternalServerError)), ) + + ant := &Annotation{} + if err := ant.Decode(n.Annotations[ant.Name()]); err != nil { + return nil, err + } + op.Common.Extensions = ant.Delete.Extensions.Schema() + return op, nil } @@ -466,6 +514,13 @@ func listOp(spec *ogen.Spec, n *gen.Type) (*ogen.Operation, error) { spec.RefResponse(strconv.Itoa(http.StatusNotFound)), spec.RefResponse(strconv.Itoa(http.StatusInternalServerError)), ) + + ant := &Annotation{} + if err := ant.Decode(n.Annotations[ant.Name()]); err != nil { + return nil, err + } + op.Common.Extensions = ant.List.Extensions.Schema() + return op, nil } @@ -512,6 +567,13 @@ func listEdgeOp(spec *ogen.Spec, n *gen.Type, e *gen.Edge) (*ogen.Operation, err spec.RefResponse(strconv.Itoa(http.StatusNotFound)), spec.RefResponse(strconv.Itoa(http.StatusInternalServerError)), ) + + ant := &Annotation{} + if err := ant.Decode(n.Annotations[ant.Name()]); err != nil { + return nil, err + } + op.Common.Extensions = ant.List.Extensions.Schema() + return op, nil } diff --git a/go.mod b/go.mod index cf1827938..91667609f 100644 --- a/go.mod +++ b/go.mod @@ -1,31 +1,32 @@ module entgo.io/contrib -go 1.21 +go 1.21.0 -toolchain go1.21.6 +toolchain go1.22.4 require ( entgo.io/ent v0.13.0 github.com/99designs/gqlgen v0.17.48 github.com/AlekSi/pointer v1.1.0 github.com/alecthomas/kong v0.7.0 + github.com/go-faster/yaml v0.4.6 github.com/go-openapi/inflect v0.19.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-multierror v1.1.1 github.com/jhump/protoreflect v1.10.1 github.com/mattn/go-sqlite3 v1.14.16 github.com/mitchellh/mapstructure v1.5.0 - github.com/ogen-go/ogen v0.56.1 + github.com/ogen-go/ogen v1.2.3-0.20240627205112-01e42b79fbda github.com/oklog/ulid/v2 v2.0.2 github.com/stoewer/go-strcase v1.2.0 github.com/stretchr/testify v1.9.0 github.com/vektah/gqlparser/v2 v2.5.12 github.com/vmihailenco/msgpack/v5 v5.0.0-beta.9 - go.uber.org/multierr v1.9.0 - go.uber.org/zap v1.24.0 - golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 + go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.27.0 + golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 golang.org/x/sync v0.7.0 - golang.org/x/tools v0.21.0 + golang.org/x/tools v0.22.0 google.golang.org/grpc v1.52.3 google.golang.org/protobuf v1.34.2 ) @@ -36,11 +37,11 @@ require ( github.com/agnivade/levenshtein v1.1.1 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dlclark/regexp2 v1.7.0 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/dlclark/regexp2 v1.11.0 // indirect + github.com/fatih/color v1.17.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-faster/errors v0.6.1 // indirect - github.com/go-faster/jx v0.40.0 // indirect + github.com/go-faster/errors v0.7.1 // indirect + github.com/go-faster/jx v1.1.0 // indirect github.com/go-faster/yamlx v0.4.1 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -58,11 +59,10 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/vmihailenco/tagparser v0.1.2 // indirect github.com/zclconf/go-cty v1.8.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect + golang.org/x/mod v0.18.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index b0d3778ec..d0c3416f7 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,6 @@ github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6 github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -39,18 +37,20 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= -github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= -github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI= +github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= -github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= -github.com/go-faster/jx v0.40.0 h1:Y9cDVPguBRX4WbZFJlEVHwA1/YDmWWOyHtzyfxaByk0= -github.com/go-faster/jx v0.40.0/go.mod h1:ALDOh8oc4TjEID/ytTY0Yqlf1ZnNAZ0GJF3SCNo2c8s= +github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg= +github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo= +github.com/go-faster/jx v1.1.0 h1:ZsW3wD+snOdmTDy9eIVgQdjUpXRRV4rqW8NS3t+20bg= +github.com/go-faster/jx v1.1.0/go.mod h1:vKDNikrKoyUmpzaJ0OkIkRQClNHFX/nF3dnTJZb3skg= +github.com/go-faster/yaml v0.4.6 h1:lOK/EhI04gCpPgPhgt0bChS6bvw7G3WwI8xxVe0sw9I= +github.com/go-faster/yaml v0.4.6/go.mod h1:390dRIvV4zbnO7qC9FGo6YYutc+wyyUSHBgbXL52eXk= github.com/go-faster/yamlx v0.4.1 h1:00RQkZopoLDF1SgBDJVHuN6epTOK7T0TkN427vbvEBk= github.com/go-faster/yamlx v0.4.1/go.mod h1:QXr/i3Z00jRhskgyWkoGsEdseebd/ZbZEpGS6DJv8oo= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= @@ -109,11 +109,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/logrusorgru/aurora/v3 v3.0.0 h1:R6zcoZZbvVcGMvDCKo45A9U/lzYyzl5NfYIvznmDfE4= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= @@ -126,11 +123,12 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/ogen-go/ogen v0.56.1 h1:nvjeoT8wBu4oYVK8b4veOjBHA1puwVEE56Enx2blNDI= github.com/ogen-go/ogen v0.56.1/go.mod h1:osu6PQcNyie8QsQcGk2P74HpCcxCL08mnbHmPmQm4rE= +github.com/ogen-go/ogen v1.2.2/go.mod h1:S8X2dBfTKlpy+pcGLXP+aLLzvUAXAvtONtuovrN3+gw= +github.com/ogen-go/ogen v1.2.3-0.20240627205112-01e42b79fbda h1:iwMZPmsdjxGoFl+Af9FUQB33Y7iMvxTM8i/od1dHJ7g= +github.com/ogen-go/ogen v1.2.3-0.20240627205112-01e42b79fbda/go.mod h1:S8X2dBfTKlpy+pcGLXP+aLLzvUAXAvtONtuovrN3+gw= github.com/oklog/ulid/v2 v2.0.2 h1:r4fFzBm+bv0wNKNh5eXTwU7i85y5x+uwkxCUTNVQqLc= github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -162,29 +160,27 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -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.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20221230185412-738e83a70c30 h1:m9O6OTJ627iFnN2JIWfdqlZCzneRO6EEBsHXI25P8ws= -golang.org/x/exp v0.0.0-20221230185412-738e83a70c30/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230725093048-515e97ebf090 h1:Di6/M8l0O2lCLc6VVRWhgCiApHV8MnQurBnFSHsQtNY= +golang.org/x/exp v0.0.0-20230725093048-515e97ebf090/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -195,8 +191,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -208,19 +204,16 @@ golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= 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= @@ -230,8 +223,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= -golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=