From 59c107164d7707c053a1a226e9da51b98918f01d Mon Sep 17 00:00:00 2001 From: breadchris Date: Wed, 8 Mar 2023 06:25:51 -0800 Subject: [PATCH 1/2] add package reference embedding database --- .../tables/package_content_embedding.yaml | 7 ++ .../lunatrace/tables/package_package.yaml | 7 ++ .../tables/package_reference_content.yaml | 15 +++ .../down.sql | 2 + .../up.sql | 25 +++++ .../package/model/content_embedding.go | 20 ++++ .../package/model/reference_content.go | 23 +++++ .../package/table/content_embedding.go | 87 +++++++++++++++++ .../package/table/reference_content.go | 93 +++++++++++++++++++ 9 files changed, 279 insertions(+) create mode 100644 lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_content_embedding.yaml create mode 100644 lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_reference_content.yaml create mode 100644 lunatrace/bsl/hasura/migrations/lunatrace/1677850286590_package_reference_embeddings/down.sql create mode 100644 lunatrace/bsl/hasura/migrations/lunatrace/1677850286590_package_reference_embeddings/up.sql create mode 100644 lunatrace/gogen/sqlgen/lunatrace/package/model/content_embedding.go create mode 100644 lunatrace/gogen/sqlgen/lunatrace/package/model/reference_content.go create mode 100644 lunatrace/gogen/sqlgen/lunatrace/package/table/content_embedding.go create mode 100644 lunatrace/gogen/sqlgen/lunatrace/package/table/reference_content.go diff --git a/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_content_embedding.yaml b/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_content_embedding.yaml new file mode 100644 index 000000000..d88fae6f5 --- /dev/null +++ b/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_content_embedding.yaml @@ -0,0 +1,7 @@ +table: + name: content_embedding + schema: package +object_relationships: + - name: reference_content + using: + foreign_key_constraint_on: reference_content_id diff --git a/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_package.yaml b/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_package.yaml index aa284d287..066fc83d7 100644 --- a/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_package.yaml +++ b/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_package.yaml @@ -30,6 +30,13 @@ array_relationships: table: name: package_maintainer schema: package + - name: reference_contents + using: + foreign_key_constraint_on: + column: package_id + table: + name: reference_content + schema: package - name: releases using: foreign_key_constraint_on: diff --git a/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_reference_content.yaml b/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_reference_content.yaml new file mode 100644 index 000000000..825e12681 --- /dev/null +++ b/lunatrace/bsl/hasura/metadata/databases/lunatrace/tables/package_reference_content.yaml @@ -0,0 +1,15 @@ +table: + name: reference_content + schema: package +object_relationships: + - name: package + using: + foreign_key_constraint_on: package_id +array_relationships: + - name: content_embeddings + using: + foreign_key_constraint_on: + column: reference_content_id + table: + name: content_embedding + schema: package diff --git a/lunatrace/bsl/hasura/migrations/lunatrace/1677850286590_package_reference_embeddings/down.sql b/lunatrace/bsl/hasura/migrations/lunatrace/1677850286590_package_reference_embeddings/down.sql new file mode 100644 index 000000000..504ab7e04 --- /dev/null +++ b/lunatrace/bsl/hasura/migrations/lunatrace/1677850286590_package_reference_embeddings/down.sql @@ -0,0 +1,2 @@ +DROP TABLE "package"."content_embedding"; +DROP TABLE "package"."reference_content"; diff --git a/lunatrace/bsl/hasura/migrations/lunatrace/1677850286590_package_reference_embeddings/up.sql b/lunatrace/bsl/hasura/migrations/lunatrace/1677850286590_package_reference_embeddings/up.sql new file mode 100644 index 000000000..48c39ca7b --- /dev/null +++ b/lunatrace/bsl/hasura/migrations/lunatrace/1677850286590_package_reference_embeddings/up.sql @@ -0,0 +1,25 @@ +CREATE TABLE "package"."reference_content" ( + "id" uuid NOT NULL DEFAULT gen_random_uuid(), + "package_id" uuid NOT NULL REFERENCES "package"."package"("id") ON UPDATE cascade ON DELETE cascade, + "url" text NOT NULL, + "content" text NOT NULL, + "normalized_content" text NOT NULL, + "content_type" text NOT NULL, + "last_successful_fetch" timestamptz DEFAULT NULL, + PRIMARY KEY ("id"), + UNIQUE ("package_id", "url") +); + +CREATE TABLE "package"."content_embedding" ( + "id" uuid NOT NULL DEFAULT gen_random_uuid(), + "content_hash" text NOT NULL, + "reference_content_id" uuid NOT NULL REFERENCES "package"."reference_content"("id") ON UPDATE cascade ON DELETE cascade, + "content" text NOT NULL, + "embedding" vector (1536) NOT NULL, + PRIMARY KEY ("id"), + UNIQUE ("content_hash") +); + +CREATE INDEX ON "package"."content_embedding" + USING ivfflat (embedding vector_cosine_ops) + WITH (lists = 100); diff --git a/lunatrace/gogen/sqlgen/lunatrace/package/model/content_embedding.go b/lunatrace/gogen/sqlgen/lunatrace/package/model/content_embedding.go new file mode 100644 index 000000000..2a952760e --- /dev/null +++ b/lunatrace/gogen/sqlgen/lunatrace/package/model/content_embedding.go @@ -0,0 +1,20 @@ +// +// Code generated by go-jet DO NOT EDIT. +// +// WARNING: Changes to this file may cause incorrect behavior +// and will be lost if the code is regenerated +// + +package model + +import ( + "github.com/google/uuid" +) + +type ContentEmbedding struct { + ID uuid.UUID `sql:"primary_key"` + ContentHash string + ReferenceContentID uuid.UUID + Content string + Embedding string +} diff --git a/lunatrace/gogen/sqlgen/lunatrace/package/model/reference_content.go b/lunatrace/gogen/sqlgen/lunatrace/package/model/reference_content.go new file mode 100644 index 000000000..4d151e602 --- /dev/null +++ b/lunatrace/gogen/sqlgen/lunatrace/package/model/reference_content.go @@ -0,0 +1,23 @@ +// +// Code generated by go-jet DO NOT EDIT. +// +// WARNING: Changes to this file may cause incorrect behavior +// and will be lost if the code is regenerated +// + +package model + +import ( + "github.com/google/uuid" + "time" +) + +type ReferenceContent struct { + ID uuid.UUID `sql:"primary_key"` + PackageID uuid.UUID + URL string + Content string + NormalizedContent string + ContentType string + LastSuccessfulFetch *time.Time +} diff --git a/lunatrace/gogen/sqlgen/lunatrace/package/table/content_embedding.go b/lunatrace/gogen/sqlgen/lunatrace/package/table/content_embedding.go new file mode 100644 index 000000000..8a2da2112 --- /dev/null +++ b/lunatrace/gogen/sqlgen/lunatrace/package/table/content_embedding.go @@ -0,0 +1,87 @@ +// +// Code generated by go-jet DO NOT EDIT. +// +// WARNING: Changes to this file may cause incorrect behavior +// and will be lost if the code is regenerated +// + +package table + +import ( + "github.com/go-jet/jet/v2/postgres" +) + +var ContentEmbedding = newContentEmbeddingTable("package", "content_embedding", "") + +type contentEmbeddingTable struct { + postgres.Table + + //Columns + ID postgres.ColumnString + ContentHash postgres.ColumnString + ReferenceContentID postgres.ColumnString + Content postgres.ColumnString + Embedding postgres.ColumnString + + AllColumns postgres.ColumnList + MutableColumns postgres.ColumnList +} + +type ContentEmbeddingTable struct { + contentEmbeddingTable + + EXCLUDED contentEmbeddingTable +} + +// AS creates new ContentEmbeddingTable with assigned alias +func (a ContentEmbeddingTable) AS(alias string) *ContentEmbeddingTable { + return newContentEmbeddingTable(a.SchemaName(), a.TableName(), alias) +} + +// Schema creates new ContentEmbeddingTable with assigned schema name +func (a ContentEmbeddingTable) FromSchema(schemaName string) *ContentEmbeddingTable { + return newContentEmbeddingTable(schemaName, a.TableName(), a.Alias()) +} + +// WithPrefix creates new ContentEmbeddingTable with assigned table prefix +func (a ContentEmbeddingTable) WithPrefix(prefix string) *ContentEmbeddingTable { + return newContentEmbeddingTable(a.SchemaName(), prefix+a.TableName(), a.TableName()) +} + +// WithSuffix creates new ContentEmbeddingTable with assigned table suffix +func (a ContentEmbeddingTable) WithSuffix(suffix string) *ContentEmbeddingTable { + return newContentEmbeddingTable(a.SchemaName(), a.TableName()+suffix, a.TableName()) +} + +func newContentEmbeddingTable(schemaName, tableName, alias string) *ContentEmbeddingTable { + return &ContentEmbeddingTable{ + contentEmbeddingTable: newContentEmbeddingTableImpl(schemaName, tableName, alias), + EXCLUDED: newContentEmbeddingTableImpl("", "excluded", ""), + } +} + +func newContentEmbeddingTableImpl(schemaName, tableName, alias string) contentEmbeddingTable { + var ( + IDColumn = postgres.StringColumn("id") + ContentHashColumn = postgres.StringColumn("content_hash") + ReferenceContentIDColumn = postgres.StringColumn("reference_content_id") + ContentColumn = postgres.StringColumn("content") + EmbeddingColumn = postgres.StringColumn("embedding") + allColumns = postgres.ColumnList{IDColumn, ContentHashColumn, ReferenceContentIDColumn, ContentColumn, EmbeddingColumn} + mutableColumns = postgres.ColumnList{ContentHashColumn, ReferenceContentIDColumn, ContentColumn, EmbeddingColumn} + ) + + return contentEmbeddingTable{ + Table: postgres.NewTable(schemaName, tableName, alias, allColumns...), + + //Columns + ID: IDColumn, + ContentHash: ContentHashColumn, + ReferenceContentID: ReferenceContentIDColumn, + Content: ContentColumn, + Embedding: EmbeddingColumn, + + AllColumns: allColumns, + MutableColumns: mutableColumns, + } +} diff --git a/lunatrace/gogen/sqlgen/lunatrace/package/table/reference_content.go b/lunatrace/gogen/sqlgen/lunatrace/package/table/reference_content.go new file mode 100644 index 000000000..920091ddf --- /dev/null +++ b/lunatrace/gogen/sqlgen/lunatrace/package/table/reference_content.go @@ -0,0 +1,93 @@ +// +// Code generated by go-jet DO NOT EDIT. +// +// WARNING: Changes to this file may cause incorrect behavior +// and will be lost if the code is regenerated +// + +package table + +import ( + "github.com/go-jet/jet/v2/postgres" +) + +var ReferenceContent = newReferenceContentTable("package", "reference_content", "") + +type referenceContentTable struct { + postgres.Table + + //Columns + ID postgres.ColumnString + PackageID postgres.ColumnString + URL postgres.ColumnString + Content postgres.ColumnString + NormalizedContent postgres.ColumnString + ContentType postgres.ColumnString + LastSuccessfulFetch postgres.ColumnTimestampz + + AllColumns postgres.ColumnList + MutableColumns postgres.ColumnList +} + +type ReferenceContentTable struct { + referenceContentTable + + EXCLUDED referenceContentTable +} + +// AS creates new ReferenceContentTable with assigned alias +func (a ReferenceContentTable) AS(alias string) *ReferenceContentTable { + return newReferenceContentTable(a.SchemaName(), a.TableName(), alias) +} + +// Schema creates new ReferenceContentTable with assigned schema name +func (a ReferenceContentTable) FromSchema(schemaName string) *ReferenceContentTable { + return newReferenceContentTable(schemaName, a.TableName(), a.Alias()) +} + +// WithPrefix creates new ReferenceContentTable with assigned table prefix +func (a ReferenceContentTable) WithPrefix(prefix string) *ReferenceContentTable { + return newReferenceContentTable(a.SchemaName(), prefix+a.TableName(), a.TableName()) +} + +// WithSuffix creates new ReferenceContentTable with assigned table suffix +func (a ReferenceContentTable) WithSuffix(suffix string) *ReferenceContentTable { + return newReferenceContentTable(a.SchemaName(), a.TableName()+suffix, a.TableName()) +} + +func newReferenceContentTable(schemaName, tableName, alias string) *ReferenceContentTable { + return &ReferenceContentTable{ + referenceContentTable: newReferenceContentTableImpl(schemaName, tableName, alias), + EXCLUDED: newReferenceContentTableImpl("", "excluded", ""), + } +} + +func newReferenceContentTableImpl(schemaName, tableName, alias string) referenceContentTable { + var ( + IDColumn = postgres.StringColumn("id") + PackageIDColumn = postgres.StringColumn("package_id") + URLColumn = postgres.StringColumn("url") + ContentColumn = postgres.StringColumn("content") + NormalizedContentColumn = postgres.StringColumn("normalized_content") + ContentTypeColumn = postgres.StringColumn("content_type") + LastSuccessfulFetchColumn = postgres.TimestampzColumn("last_successful_fetch") + allColumns = postgres.ColumnList{IDColumn, PackageIDColumn, URLColumn, ContentColumn, NormalizedContentColumn, ContentTypeColumn, LastSuccessfulFetchColumn} + mutableColumns = postgres.ColumnList{PackageIDColumn, URLColumn, ContentColumn, NormalizedContentColumn, ContentTypeColumn, LastSuccessfulFetchColumn} + ) + + return referenceContentTable{ + Table: postgres.NewTable(schemaName, tableName, alias, allColumns...), + + //Columns + ID: IDColumn, + PackageID: PackageIDColumn, + URL: URLColumn, + Content: ContentColumn, + NormalizedContent: NormalizedContentColumn, + ContentType: ContentTypeColumn, + LastSuccessfulFetch: LastSuccessfulFetchColumn, + + AllColumns: allColumns, + MutableColumns: mutableColumns, + } +} From de48522806696beceaf48fb086a101918e5c04b4 Mon Sep 17 00:00:00 2001 From: breadchris Date: Thu, 9 Mar 2023 06:25:18 -0800 Subject: [PATCH 2/2] update go mod --- go.mod | 31 +++++++++++++++++++++---------- go.sum | 42 ++++++++++++++++++++++++++++++++---------- 2 files changed, 53 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index c7b58e8d6..4ec9cb08f 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,8 @@ require ( github.com/JohannesKaufmann/html-to-markdown v1.3.6 github.com/Joker/jade v1.1.3 github.com/Khan/genqlient v0.4.0 + github.com/PuerkitoBio/goquery v1.8.0 + github.com/PullRequestInc/go-gpt3 v1.1.11 github.com/adrg/xdg v0.4.0 github.com/advancedlogic/GoOse v0.0.0-20210820140952-9d5822d4a625 github.com/ajvpot/clifx v0.0.0-20220628211936-9cd4c559b7a3 @@ -19,12 +21,20 @@ require ( github.com/anchore/stereoscope v0.0.0-20221208011002-c5ff155d72f1 github.com/anchore/syft v0.63.0 github.com/apex/gateway v1.1.2 + github.com/aws/aws-cdk-go/awscdk v1.195.0-devpreview + github.com/aws/aws-cdk-go/awscdk/v2 v2.67.0 github.com/aws/aws-lambda-go v1.19.1 github.com/aws/aws-sdk-go v1.44.114 + github.com/aws/constructs-go/constructs/v10 v10.1.271 + github.com/aws/constructs-go/constructs/v3 v3.4.266 + github.com/aws/jsii-runtime-go v1.77.0 github.com/awslabs/aws-lambda-go-api-proxy v0.13.2 github.com/blang/semver/v4 v4.0.0 github.com/breadchris/ldapserver v1.1.0 + github.com/bwmarrin/discordgo v0.27.0 github.com/cenkalti/backoff/v4 v4.1.3 + github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9 + github.com/chromedp/chromedp v0.8.7 github.com/dmarkham/enumer v1.5.5 github.com/facebookincubator/nvdtools v0.1.4 github.com/gin-gonic/gin v1.8.1 @@ -43,7 +53,8 @@ require ( github.com/prometheus/procfs v0.8.0 github.com/rs/cors v1.8.2 github.com/rs/zerolog v1.29.0 - github.com/samber/lo v1.32.0 + github.com/samber/go-gpt-3-encoder v0.3.1 + github.com/samber/lo v1.37.0 github.com/schollz/progressbar/v3 v3.8.6 github.com/spf13/viper v1.13.0 github.com/stretchr/testify v1.8.1 @@ -57,6 +68,7 @@ require ( gocloud.dev v0.27.0 golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 golang.org/x/exp v0.0.0-20220823124025-807a23277127 + google.golang.org/grpc v1.50.1 gopkg.in/square/go-jose.v2 v2.6.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/gorm v1.23.5 @@ -77,12 +89,10 @@ require ( github.com/CycloneDX/cyclonedx-go v0.7.1-0.20221222100750-41a1ac565cce // indirect github.com/DataDog/zstd v1.4.5 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.1.1 // indirect + github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Masterminds/sprig/v3 v3.2.2 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/ProtonMail/go-crypto v0.0.0-20220824120805-4b6e5c587895 // indirect - github.com/PuerkitoBio/goquery v1.8.0 // indirect - github.com/PullRequestInc/go-gpt3 v1.1.11 // indirect github.com/ThalesIgnite/crypto11 v1.2.5 // indirect github.com/acobaugh/osrelease v0.1.0 // indirect github.com/acomagu/bufpipe v1.0.3 // indirect @@ -124,10 +134,11 @@ require ( github.com/blang/semver v3.5.1+incompatible // indirect github.com/bmatcuk/doublestar/v2 v2.0.4 // indirect github.com/bmatcuk/doublestar/v4 v4.0.2 // indirect + github.com/cdklabs/awscdk-asset-awscli-go/awscliv1/v2 v2.2.85 // indirect + github.com/cdklabs/awscdk-asset-kubectl-go/kubectlv20/v2 v2.1.1 // indirect + github.com/cdklabs/awscdk-asset-node-proxy-agent-go/nodeproxyagentv5/v2 v2.0.71 // indirect github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/chromedp/cdproto v0.0.0-20230220211738-2b1ec77315c9 // indirect - github.com/chromedp/chromedp v0.8.7 // indirect github.com/chromedp/sysutil v1.0.0 // indirect github.com/cloudflare/circl v1.1.0 // indirect github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect @@ -139,6 +150,7 @@ require ( github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/cyberphone/json-canonicalization v0.0.0-20210823021906-dc406ceaf94b // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dlclark/regexp2 v1.7.0 // indirect github.com/docker/cli v20.10.17+incompatible // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/docker v20.10.17+incompatible // indirect @@ -278,7 +290,6 @@ require ( github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/pierrec/lz4/v4 v4.1.15 // indirect - github.com/pinecone-io/go-pinecone v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.13.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect @@ -334,6 +345,7 @@ require ( github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + github.com/yuin/goldmark v1.4.14 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.etcd.io/etcd/api/v3 v3.6.0-alpha.0 // indirect go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0 // indirect @@ -359,7 +371,7 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/dig v1.14.0 // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/mod v0.8.0 // indirect golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1 // indirect golang.org/x/sync v0.1.0 // indirect @@ -367,12 +379,11 @@ require ( golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect - golang.org/x/tools v0.1.12 // indirect + golang.org/x/tools v0.6.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.99.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e // indirect - google.golang.org/grpc v1.50.1 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 823a3846d..f6a4456ef 100644 --- a/go.sum +++ b/go.sum @@ -215,8 +215,9 @@ github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF0 github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= @@ -370,6 +371,10 @@ github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= +github.com/aws/aws-cdk-go/awscdk v1.195.0-devpreview h1:BPFnGsV3yZ0myqiN9HAl3AAw3pGjd1n+j/h/QSVZOOA= +github.com/aws/aws-cdk-go/awscdk v1.195.0-devpreview/go.mod h1:HPs15vMAudAJZXOxjlyL2Vfq/SdIdOuKOkb7m0vrQL8= +github.com/aws/aws-cdk-go/awscdk/v2 v2.67.0 h1:fKxY8oYygqp5rScwd6SaPLVM85uK3WrFDOcknn/zo3Q= +github.com/aws/aws-cdk-go/awscdk/v2 v2.67.0/go.mod h1:VUgy7k4jFLyep9Mm4f1aKLpji2w5nQs7mxDrw49SN40= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-lambda-go v1.17.0/go.mod h1:FEwgPLE6+8wcGBTe5cJN3JWurd1Ztm9zN4jsXsjzKKw= github.com/aws/aws-lambda-go v1.19.1 h1:5iUHbIZ2sG6Yq/J1IN3sWm3+vAB1CWwhI21NffLNuNI= @@ -460,6 +465,12 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.6.0/go.mod h1:q7o0j7d7HrJk/vr9uUt3BV github.com/aws/aws-sdk-go-v2/service/sts v1.16.10/go.mod h1:cftkHYN6tCDNfkSasAmclSfl4l7cySoay8vz7p/ce0E= github.com/aws/aws-sdk-go-v2/service/sts v1.16.19 h1:9pPi0PsFNAGILFfPCk8Y0iyEBGc6lu6OQ97U7hmdesg= github.com/aws/aws-sdk-go-v2/service/sts v1.16.19/go.mod h1:h4J3oPZQbxLhzGnk+j9dfYHi5qIOVJ5kczZd658/ydM= +github.com/aws/constructs-go/constructs/v10 v10.1.271 h1:XI2zisEblfEE8zmotc8Lj7coCE2IryqjF+hJi59BgVY= +github.com/aws/constructs-go/constructs/v10 v10.1.271/go.mod h1:0kRYiOOoiEo4YOzVYzonyhdYs78G89qLl0YeasyIONA= +github.com/aws/constructs-go/constructs/v3 v3.4.266 h1:OXGWr/qs70HHa4G/+9NQAWC0Ku+HLeeOAZCayw0xRQ4= +github.com/aws/constructs-go/constructs/v3 v3.4.266/go.mod h1:Z0LosBfmtxXAjY6kAsDhNNqQ1Is3zfZzKfvn99phJaQ= +github.com/aws/jsii-runtime-go v1.77.0 h1:jhb0H395us+QzIG3yUuzgoP63cL2YQPnSlMQ572WoYM= +github.com/aws/jsii-runtime-go v1.77.0/go.mod h1:1YWJ9VJ3bwe03Nsq2rsGFA0uQIiJZo0FEKfxK6j7cGg= github.com/aws/smithy-go v1.6.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.12.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.13.3 h1:l7LYxGuzK6/K+NzJ2mC+VvLUbae0sL3bXU//04MkmnA= @@ -516,10 +527,18 @@ github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0Bsq github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bwmarrin/discordgo v0.27.0 h1:4ZK9KN+rGIxZ0fdGTmgdCcliQeW8Zhu6MnlFI92nf0Q= +github.com/bwmarrin/discordgo v0.27.0/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY= github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e/go.mod h1:9IOqJGCPMSc6E5ydlp5NIonxObaeu/Iub/X03EKPVYo= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= +github.com/cdklabs/awscdk-asset-awscli-go/awscliv1/v2 v2.2.85 h1:jBShDV9n1+A4UBPL/C6j8i5r5/CTdu6sfDY/AC3kn2g= +github.com/cdklabs/awscdk-asset-awscli-go/awscliv1/v2 v2.2.85/go.mod h1:nvX6KMbARCyDZKawXh7LoWP4GYtKNQs2gzl9OPOKCq8= +github.com/cdklabs/awscdk-asset-kubectl-go/kubectlv20/v2 v2.1.1 h1:l5N27aCCjAB5cgW5pI4/ujnasPL8hUcJ9KBxrKk6UiQ= +github.com/cdklabs/awscdk-asset-kubectl-go/kubectlv20/v2 v2.1.1/go.mod h1:CvFHBo0qcg8LUkJqIxQtP1rD/sNGv9bX3L2vHT2FUAo= +github.com/cdklabs/awscdk-asset-node-proxy-agent-go/nodeproxyagentv5/v2 v2.0.71 h1:w+FklmvxhlhA+lUbruXHNdLXqBhPBXZ0ZoFso++H1/8= +github.com/cdklabs/awscdk-asset-node-proxy-agent-go/nodeproxyagentv5/v2 v2.0.71/go.mod h1:ZB4c64jFJQ+AlbT/4PyAXD0tBKtHijCYPuTn7x7NKro= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= @@ -762,6 +781,8 @@ github.com/digitalocean/godo v1.81.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5 github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= +github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= +github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dmarkham/enumer v1.5.5 h1:LpOGL3PQTPOM87rgowZEf7Z5EmkgnKqUtS92Vo+vqzs= github.com/dmarkham/enumer v1.5.5/go.mod h1:qHwULwuCxYFAFM5KCkpF1U/U0BF5sNQKLccvUzKNY2w= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= @@ -1347,7 +1368,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4G github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2/go.mod h1:lsuH8kb4GlMdSlI4alNIBBSAt5CHJtg3i+0WuN9J5YM= github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.2/go.mod h1:chrfS3YoLAlKTRE5cFWvCbt8uGAjshktT4PveTUpsFQ= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= @@ -1664,6 +1684,7 @@ github.com/labstack/echo/v4 v4.1.17/go.mod h1:Tn2yRQL/UclUalpb5rPdXDevbkJ+lp/2sv github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= +github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80 h1:6Yzfa6GP0rIo/kULo2bwGEkFvCePZ3qHDDTC3/J9Swo= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -1982,6 +2003,7 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde h1:x0TT0RDC7UhAVbbWWBzr41ElhJx5tXPWkIHA2HWPRuw= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= @@ -2012,8 +2034,6 @@ github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9F github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pinecone-io/go-pinecone v0.3.0 h1:+t0CiYaaA+JN6YM9QRNlvfLEr2kkGzcVEj/xNmSAON4= -github.com/pinecone-io/go-pinecone v0.3.0/go.mod h1:VdSieE1r4jT3XydjFi+iL5w9qsGRz/x8LxWach2Hnv8= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -2156,8 +2176,10 @@ github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkB github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= -github.com/samber/lo v1.32.0 h1:MjbngaDxbQ+ockKTEoF0IQtW2lX1VgqZ5IBhxi4fmTU= -github.com/samber/lo v1.32.0/go.mod h1:HLeWcJRRyLKp3+/XBJvOrerCQn9mhdKMHyd7IRlgeQ8= +github.com/samber/go-gpt-3-encoder v0.3.1 h1:YWb9GsGYUgSX/wPtsEHjyNGRQXsQ9vDCg9SU2x9uMeU= +github.com/samber/go-gpt-3-encoder v0.3.1/go.mod h1:27nvdvk9ZtALyNtgs9JsPCMYja0Eleow/XzgjqwRtLU= +github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= +github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sassoftware/go-rpmutils v0.0.0-20190420191620-a8f1baeba37b/go.mod h1:am+Fp8Bt506lA3Rk3QCmSqmYmLMnPDhdDUcosQCAx+I= @@ -2335,7 +2357,6 @@ github.com/therootcompany/xz v1.0.1 h1:CmOtsn1CbtmyYiusbfmhmkpAAETj0wBIH6kCYaX+x github.com/therootcompany/xz v1.0.1/go.mod h1:3K3UH1yCKgBneZYhuQUvJ9HPD19UEXEI0BWbMn8qNMY= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4 h1:1i/Afw3rmaR1gF3sfVkG2X6ldkikQwA9zY380LrR5YI= github.com/theupdateframework/go-tuf v0.5.2-0.20220930112810-3890c1e7ace4/go.mod h1:vAqWV3zEs89byeFsAYoh/Q14vJTgJkHwnnRCWBBBINY= -github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M= github.com/tidwall/gjson v1.11.0 h1:C16pk7tQNiH6VlCrtIXL1w8GaOsi1X3W8KDkE1BuYd4= github.com/tidwall/gjson v1.11.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -2750,8 +2771,9 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -3232,8 +3254,8 @@ golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=