mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-06 08:50:04 -06:00
Merge pull request #8305 from dolthub/bh/signed-commits
Bh/signed commits
This commit is contained in:
@@ -69,6 +69,7 @@ func CreateCommitArgParser() *argparser.ArgParser {
|
||||
ap.SupportsFlag(AllFlag, "a", "Adds all existing, changed tables (but not new tables) in the working set to the staged set.")
|
||||
ap.SupportsFlag(UpperCaseAllFlag, "A", "Adds all tables and databases (including new tables) in the working set to the staged set.")
|
||||
ap.SupportsFlag(AmendFlag, "", "Amend previous commit")
|
||||
ap.SupportsOptionalString(SignFlag, "S", "key-id", "Sign the commit using GPG. If no key-id is provided the key-id is taken from 'user.signingkey' the in the configuration")
|
||||
return ap
|
||||
}
|
||||
|
||||
@@ -279,6 +280,7 @@ func CreateLogArgParser(isTableFunction bool) *argparser.ArgParser {
|
||||
ap.SupportsFlag(ParentsFlag, "", "Shows all parents of each commit in the log.")
|
||||
ap.SupportsString(DecorateFlag, "", "decorate_fmt", "Shows refs next to commits. Valid options are short, full, no, and auto")
|
||||
ap.SupportsStringList(NotFlag, "", "revision", "Excludes commits from revision.")
|
||||
ap.SupportsFlag(ShowSignatureFlag, "", "Shows the signature of each commit.")
|
||||
if isTableFunction {
|
||||
ap.SupportsStringList(TablesFlag, "t", "table", "Restricts the log to commits that modified the specified tables.")
|
||||
} else {
|
||||
|
||||
@@ -66,6 +66,8 @@ const (
|
||||
SetUpstreamFlag = "set-upstream"
|
||||
ShallowFlag = "shallow"
|
||||
ShowIgnoredFlag = "ignored"
|
||||
ShowSignatureFlag = "show-signature"
|
||||
SignFlag = "gpg-sign"
|
||||
SilentFlag = "silent"
|
||||
SingleBranchFlag = "single-branch"
|
||||
SkipEmptyFlag = "skip-empty"
|
||||
|
||||
@@ -53,9 +53,13 @@ func SetIOStreams(inStream io.ReadCloser, outStream io.WriteCloser) {
|
||||
}
|
||||
|
||||
func InitIO() (restoreIO func()) {
|
||||
outFile := filepath.Join(os.TempDir(), uuid.New().String())
|
||||
return InitIOWithFile(outFile)
|
||||
}
|
||||
|
||||
func InitIOWithFile(outFile string) (restoreIO func()) {
|
||||
stdOut, stdErr := os.Stdout, os.Stderr
|
||||
|
||||
outFile := filepath.Join(os.TempDir(), uuid.New().String())
|
||||
f, err := os.Create(outFile)
|
||||
|
||||
if err == nil {
|
||||
|
||||
@@ -206,7 +206,7 @@ hint: commit your changes (dolt commit -am \"<message>\") or reset them (dolt re
|
||||
pager := outputpager.Start()
|
||||
defer pager.Stop()
|
||||
|
||||
PrintCommitInfo(pager, 0, false, "auto", commit)
|
||||
PrintCommitInfo(pager, 0, false, false, "auto", commit)
|
||||
})
|
||||
|
||||
return nil
|
||||
|
||||
@@ -181,7 +181,7 @@ func performCommit(ctx context.Context, commandStr string, args []string, cliCtx
|
||||
pager := outputpager.Start()
|
||||
defer pager.Stop()
|
||||
|
||||
PrintCommitInfo(pager, 0, false, "auto", commit)
|
||||
PrintCommitInfo(pager, 0, false, false, "auto", commit)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -268,6 +268,18 @@ func constructParametrizedDoltCommitQuery(msg string, apr *argparser.ArgParseRes
|
||||
writeToBuffer("--skip-empty")
|
||||
}
|
||||
|
||||
cfgSign := cliCtx.Config().GetStringOrDefault("sqlserver.global.gpgsign", "")
|
||||
if apr.Contains(cli.SignFlag) || strings.ToLower(cfgSign) == "true" {
|
||||
writeToBuffer("--gpg-sign")
|
||||
|
||||
gpgKey := apr.GetValueOrDefault(cli.SignFlag, "")
|
||||
if gpgKey != "" {
|
||||
param = true
|
||||
writeToBuffer("?")
|
||||
params = append(params, gpgKey)
|
||||
}
|
||||
}
|
||||
|
||||
buffer.WriteString(")")
|
||||
return buffer.String(), params, nil
|
||||
}
|
||||
|
||||
@@ -280,10 +280,14 @@ func getExistingTables(revisions []string, queryist cli.Queryist, sqlCtx *sql.Co
|
||||
|
||||
// logCommits takes a list of sql rows that have only 1 column, commit hash, and retrieves the commit info for each hash to be printed to std out
|
||||
func logCommits(apr *argparser.ArgParseResults, commitHashes []sql.Row, queryist cli.Queryist, sqlCtx *sql.Context) error {
|
||||
opts := commitInfoOptions{
|
||||
showSignature: apr.Contains(cli.ShowSignatureFlag),
|
||||
}
|
||||
|
||||
var commitsInfo []CommitInfo
|
||||
for _, hash := range commitHashes {
|
||||
cmHash := hash[0].(string)
|
||||
commit, err := getCommitInfo(queryist, sqlCtx, cmHash)
|
||||
commit, err := getCommitInfoWithOptions(queryist, sqlCtx, cmHash, opts)
|
||||
if commit == nil {
|
||||
return fmt.Errorf("no commits found for ref %s", cmHash)
|
||||
}
|
||||
@@ -338,7 +342,7 @@ func logCompact(pager *outputpager.Pager, apr *argparser.ArgParseResults, commit
|
||||
|
||||
func logDefault(pager *outputpager.Pager, apr *argparser.ArgParseResults, commits []CommitInfo, sqlCtx *sql.Context, queryist cli.Queryist) error {
|
||||
for _, comm := range commits {
|
||||
PrintCommitInfo(pager, apr.GetIntOrDefault(cli.MinParentsFlag, 0), apr.Contains(cli.ParentsFlag), apr.GetValueOrDefault(cli.DecorateFlag, "auto"), &comm)
|
||||
PrintCommitInfo(pager, apr.GetIntOrDefault(cli.MinParentsFlag, 0), apr.Contains(cli.ParentsFlag), apr.Contains(cli.ShowSignatureFlag), apr.GetValueOrDefault(cli.DecorateFlag, "auto"), &comm)
|
||||
if apr.Contains(cli.StatFlag) {
|
||||
if comm.parentHashes != nil && len(comm.parentHashes) == 1 { // don't print stats for merge commits
|
||||
diffStats := make(map[string]*merge.MergeStats)
|
||||
|
||||
@@ -398,7 +398,7 @@ func printMergeStats(fastForward bool,
|
||||
pager := outputpager.Start()
|
||||
defer pager.Stop()
|
||||
|
||||
PrintCommitInfo(pager, 0, false, "auto", commit)
|
||||
PrintCommitInfo(pager, 0, false, false, "auto", commit)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ func (cmd PullCmd) Exec(ctx context.Context, commandStr string, args []string, d
|
||||
pager := outputpager.Start()
|
||||
defer pager.Stop()
|
||||
|
||||
PrintCommitInfo(pager, 0, false, "auto", commit)
|
||||
PrintCommitInfo(pager, 0, false, false, "auto", commit)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -144,7 +144,7 @@ func (cmd RevertCmd) Exec(ctx context.Context, commandStr string, args []string,
|
||||
pager := outputpager.Start()
|
||||
defer pager.Stop()
|
||||
|
||||
PrintCommitInfo(pager, 0, false, "auto", commit)
|
||||
PrintCommitInfo(pager, 0, false, false, "auto", commit)
|
||||
})
|
||||
|
||||
return 0
|
||||
|
||||
@@ -326,7 +326,7 @@ func fetchAndPrintCommit(queryist cli.Queryist, sqlCtx *sql.Context, opts *showO
|
||||
pager := outputpager.Start()
|
||||
defer pager.Stop()
|
||||
|
||||
PrintCommitInfo(pager, 0, opts.showParents, opts.decoration, commit)
|
||||
PrintCommitInfo(pager, 0, opts.showParents, false, opts.decoration, commit)
|
||||
})
|
||||
|
||||
if len(parents) == 0 {
|
||||
|
||||
197
go/cmd/dolt/commands/signed_commits_test.go
Normal file
197
go/cmd/dolt/commands/signed_commits_test.go
Normal file
@@ -0,0 +1,197 @@
|
||||
// Copyright 2024 Dolthub, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package commands
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/dolthub/dolt/go/cmd/dolt/cli"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/env"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/argparser"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/config"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/filesys"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/gpg"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const keyId = "573DA8C6366D04E35CDB1A44E09A0B208F666373"
|
||||
|
||||
func importKey(t *testing.T, ctx context.Context) {
|
||||
err := gpg.ImportKey(ctx, "testdata/signed_commits/private.pgp")
|
||||
require.NoError(t, err)
|
||||
|
||||
ok, err := gpg.HasKey(ctx, keyId)
|
||||
require.NoError(t, err)
|
||||
require.True(t, ok)
|
||||
}
|
||||
|
||||
func setupTestDB(t *testing.T, ctx context.Context, fs filesys.Filesys) string {
|
||||
dir, err := os.MkdirTemp(os.TempDir(), "signed_commits")
|
||||
require.NoError(t, err)
|
||||
dbDir := filepath.Join(dir, "db")
|
||||
err = filesys.CopyDir("testdata/signed_commits/db/", dbDir, fs)
|
||||
require.NoError(t, err)
|
||||
|
||||
log.Println(dbDir)
|
||||
return dbDir
|
||||
}
|
||||
|
||||
func TestSignAndVerifyCommit(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
localCfg map[string]string
|
||||
commitArgs []string
|
||||
expectErr bool
|
||||
}{
|
||||
{
|
||||
name: "sign commit with command line key id",
|
||||
localCfg: map[string]string{},
|
||||
commitArgs: []string{"-S", keyId, "-m", "test commit"},
|
||||
expectErr: false,
|
||||
},
|
||||
{
|
||||
name: "sign no key id, no keyid in config",
|
||||
localCfg: map[string]string{},
|
||||
commitArgs: []string{"-S", "-m", "test commit"},
|
||||
expectErr: true,
|
||||
},
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
importKey(t, ctx)
|
||||
dbDir := setupTestDB(t, ctx, filesys.LocalFS)
|
||||
|
||||
global := map[string]string{
|
||||
"user.name": "First Last",
|
||||
"user.email": "test@dolthub.com",
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
apr, err := cli.CreateCommitArgParser().Parse(test.commitArgs)
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = execCommand(ctx, dbDir, CommitCmd{}, test.commitArgs, apr, map[string]string{}, global)
|
||||
|
||||
if test.expectErr {
|
||||
require.Error(t, err)
|
||||
return
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
args := []string{"--show-signature"}
|
||||
apr, err = cli.CreateLogArgParser(false).Parse(args)
|
||||
require.NoError(t, err)
|
||||
|
||||
logOutput, err := execCommand(ctx, dbDir, LogCmd{}, args, apr, map[string]string{}, global)
|
||||
require.NoError(t, err)
|
||||
require.Contains(t, logOutput, "Good signature from \"Test User <test@dolthub.com>\"")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func execCommand(ctx context.Context, wd string, cmd cli.Command, args []string, apr *argparser.ArgParseResults, local, global map[string]string) (output string, err error) {
|
||||
err = os.Chdir(wd)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error changing directory to %s: %w", wd, err)
|
||||
return
|
||||
}
|
||||
|
||||
var fs filesys.Filesys
|
||||
fs, err = filesys.LocalFilesysWithWorkingDir(wd)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error creating local filesystem with working directory %s: %w", wd, err)
|
||||
return
|
||||
}
|
||||
|
||||
dEnv := env.Load(context.Background(), testHomeDirFunc, fs, ".", "test")
|
||||
|
||||
ch := config.NewConfigHierarchy()
|
||||
if global != nil {
|
||||
ch.AddConfig("global", config.NewMapConfig(global))
|
||||
}
|
||||
|
||||
if local != nil {
|
||||
ch.AddConfig("local", config.NewMapConfig(local))
|
||||
}
|
||||
|
||||
cfg := env.NewTestDoltCliConfigFromHierarchy(ch, fs)
|
||||
|
||||
mr, err := env.MultiEnvForDirectory(ctx, ch, fs, dEnv.Version, dEnv)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error creating multi repo: %w", err)
|
||||
return
|
||||
}
|
||||
|
||||
latebind, verr := BuildSqlEngineQueryist(ctx, dEnv.FS, mr, &cli.UserPassword{}, apr)
|
||||
if verr != nil {
|
||||
err = fmt.Errorf("error building sql engine: %w", verr)
|
||||
return
|
||||
}
|
||||
|
||||
cliCtx, err := cli.NewCliContext(apr, cfg, latebind)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error creating cli context: %w", err)
|
||||
return
|
||||
}
|
||||
|
||||
initialOut := os.Stdout
|
||||
initialErr := os.Stderr
|
||||
f, err := os.CreateTemp(os.TempDir(), "signed-commit-test-*")
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error creating temp file: %w", err)
|
||||
return
|
||||
}
|
||||
|
||||
os.Stdout = f
|
||||
os.Stderr = f
|
||||
restoreIO := cli.InitIO()
|
||||
|
||||
defer func() {
|
||||
closeErr := f.Close()
|
||||
if closeErr != nil && err == nil {
|
||||
err = fmt.Errorf("error closing temp file: %w", closeErr)
|
||||
}
|
||||
|
||||
restoreIO()
|
||||
|
||||
os.Stdout = initialOut
|
||||
os.Stderr = initialErr
|
||||
|
||||
outputBytes, readOutputErr := os.ReadFile(f.Name())
|
||||
if readOutputErr != nil && err == nil {
|
||||
err = fmt.Errorf("error reading temp file: %w", readOutputErr)
|
||||
return
|
||||
}
|
||||
|
||||
output = string(outputBytes)
|
||||
}()
|
||||
|
||||
n := cmd.Exec(ctx, cmd.Name(), args, dEnv, cliCtx)
|
||||
if n != 0 {
|
||||
err = fmt.Errorf("command %s %s exited with code %d", cmd.Name(), strings.Join(args, " "), n)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
1
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/config.json
vendored
Executable file
1
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/config.json
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{}
|
||||
0
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/noms/LOCK
vendored
Normal file
0
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/noms/LOCK
vendored
Normal file
BIN
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/noms/journal.idx
vendored
Normal file
BIN
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/noms/journal.idx
vendored
Normal file
Binary file not shown.
1
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/noms/manifest
vendored
Normal file
1
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/noms/manifest
vendored
Normal file
@@ -0,0 +1 @@
|
||||
5:__DOLT__:brqj5m8e9b0s0rtjmhqp4pn1k8e2akqv:8m5mnvhavk3k6b409fajpv9iipokkeuj:00000000000000000000000000000000:vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv:34
|
||||
BIN
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/noms/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vendored
Normal file
BIN
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/noms/vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vendored
Normal file
Binary file not shown.
6
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/repo_state.json
vendored
Executable file
6
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/repo_state.json
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"head": "refs/heads/main",
|
||||
"remotes": {},
|
||||
"backups": {},
|
||||
"branches": {}
|
||||
}
|
||||
1
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/config.json
vendored
Executable file
1
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/config.json
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{}
|
||||
0
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/noms/LOCK
vendored
Normal file
0
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/noms/LOCK
vendored
Normal file
BIN
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/noms/journal.idx
vendored
Normal file
BIN
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/noms/journal.idx
vendored
Normal file
Binary file not shown.
1
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/noms/manifest
vendored
Normal file
1
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/noms/manifest
vendored
Normal file
@@ -0,0 +1 @@
|
||||
5:__DOLT__:jrhi6484op854sujfe0pcqpkme0i6bto:mt40uhrd930kmdnu07taara6u8ecm84d:00000000000000000000000000000000:vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv:9
|
||||
Binary file not shown.
6
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/repo_state.json
vendored
Executable file
6
go/cmd/dolt/commands/testdata/signed_commits/db/.dolt/stats/.dolt/repo_state.json
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"head": "refs/heads/main",
|
||||
"remotes": {},
|
||||
"backups": {},
|
||||
"branches": {}
|
||||
}
|
||||
81
go/cmd/dolt/commands/testdata/signed_commits/private.pgp
vendored
Normal file
81
go/cmd/dolt/commands/testdata/signed_commits/private.pgp
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
|
||||
lQVXBGbXZJ8BDAC13zW1ncGNBLNPOUcoSDrs++wqv4nkpxPQSOAkSljDwJlwAGeC
|
||||
UFhKRZdAxh71kw4iEeaOQISynRE6xtRvEZArVZPWBUboFaSp7vu9AYADEutYqU6G
|
||||
/47lFf3PyQNSvRcgNaLYkxKQqg+rpZQYbnUD4b4y3suYSeTvAnAXwp6EAyHc0fuC
|
||||
MmcVzRCVjkqLH0ycqAu+wbXS+5OuoJrPTOpSppX5Q89oZzt4bOBorAY1TeHi9uHZ
|
||||
8aF5LZosKetQU6bonIaMQZ10L0j99dd6+dOWysmzH7//aI3RjLwp2GnX290opP99
|
||||
L2ZrqjTKqViOS8RSfEscToEE4lYefAzoGUeF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JROTH/WccU21PH4yo3d5
|
||||
Jav4mZMQI7WFGFCT177pEqbTRcmgU+/P396JAbwEGAEIACYWIQRXPajGNm0E41zb
|
||||
GkTgmgsgj2ZjcwUCZtdknwIbDAUJA8JnAAAKCRDgmgsgj2Zjc7gUDACg+WvCyA8K
|
||||
1LMgjIxEGySflZTRoJpexcQe8l4eSUJ8M4efxk4QwGjv4O7uVgooXcOxxQKSeLRx
|
||||
3mbVKhZgiUr9RUPozg2h/eyaROnur0Pff3AVtfwtDjaPlv3vPBx4MS5XBMS8q2/h
|
||||
s4J1WAlQcGu0dNKCAuX2IOWa7+HAUfOWi4CTz11GMZQ95aeZoBgIqzHkX7BM0BfN
|
||||
jpKR5IH7gATNjtYAf2ld1DtSO44po/MuaR1FUUYMOkqlHN5fHGD+rYFSB2x7SKjw
|
||||
BNtxQE3boKI+HN8faVuOwXhoiP4aTsrI5NdDhWMvqye17qBqdk8Y0XoZ+q25NQHb
|
||||
cXicy7bhBVJGMATNnf8jbyVO5zbNwUATEYS5frY+9mx0lLYk2yIJQavdemEM4d0q
|
||||
k9h5boXVbAwcsL6MY0jlc8u9BfbA7am1X+Jxxe5scg7v7vsqmtZKzBVBxdRwoN7t
|
||||
tuG+dNCRwXPHbeCxqu4UJyDG9yXULeWi5tKHu/CmoJoom0+M4B7Ln/I=
|
||||
=WzPV
|
||||
-----END PGP PRIVATE KEY BLOCK-----
|
||||
@@ -557,7 +557,7 @@ func GetDoltStatus(queryist cli.Queryist, sqlCtx *sql.Context) (stagedChangedTab
|
||||
}
|
||||
|
||||
// PrintCommitInfo prints the given commit in the format used by log and show.
|
||||
func PrintCommitInfo(pager *outputpager.Pager, minParents int, showParents bool, decoration string, comm *CommitInfo) {
|
||||
func PrintCommitInfo(pager *outputpager.Pager, minParents int, showParents, showSignatures bool, decoration string, comm *CommitInfo) {
|
||||
color.NoColor = false
|
||||
if len(comm.parentHashes) < minParents {
|
||||
return
|
||||
@@ -583,6 +583,14 @@ func PrintCommitInfo(pager *outputpager.Pager, minParents int, showParents bool,
|
||||
}
|
||||
}
|
||||
|
||||
if showSignatures && len(comm.commitMeta.Signature) > 0 {
|
||||
signatureLines := strings.Split(comm.commitMeta.Signature, "\n")
|
||||
for _, line := range signatureLines {
|
||||
pager.Writer.Write([]byte("\n"))
|
||||
pager.Writer.Write([]byte(color.CyanString(line)))
|
||||
}
|
||||
}
|
||||
|
||||
pager.Writer.Write([]byte(fmt.Sprintf("\nAuthor: %s <%s>", comm.commitMeta.Name, comm.commitMeta.Email)))
|
||||
|
||||
timeStr := comm.commitMeta.FormatTS()
|
||||
@@ -641,17 +649,34 @@ func printRefs(pager *outputpager.Pager, comm *CommitInfo, decoration string) {
|
||||
pager.Writer.Write([]byte(yellow.Sprintf("%s) ", joinedReferences)))
|
||||
}
|
||||
|
||||
type commitInfoOptions struct {
|
||||
showSignature bool
|
||||
}
|
||||
|
||||
// getCommitInfo returns the commit info for the given ref.
|
||||
func getCommitInfo(queryist cli.Queryist, sqlCtx *sql.Context, ref string) (*CommitInfo, error) {
|
||||
return getCommitInfoWithOptions(queryist, sqlCtx, ref, commitInfoOptions{})
|
||||
}
|
||||
|
||||
func getCommitInfoWithOptions(queryist cli.Queryist, sqlCtx *sql.Context, ref string, opts commitInfoOptions) (*CommitInfo, error) {
|
||||
hashOfHead, err := getHashOf(queryist, sqlCtx, "HEAD")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting hash of HEAD: %v", err)
|
||||
}
|
||||
|
||||
q, err := dbr.InterpolateForDialect("select * from dolt_log(?, '--parents', '--decorate=full')", []interface{}{ref}, dialect.MySQL)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error interpolating query: %v", err)
|
||||
var q string
|
||||
if opts.showSignature {
|
||||
q, err = dbr.InterpolateForDialect("select * from dolt_log(?, '--parents', '--decorate=full', '--show-signature')", []interface{}{ref}, dialect.MySQL)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error interpolating query: %v", err)
|
||||
}
|
||||
} else {
|
||||
q, err = dbr.InterpolateForDialect("select * from dolt_log(?, '--parents', '--decorate=full')", []interface{}{ref}, dialect.MySQL)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error interpolating query: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
rows, err := GetRowsForSql(queryist, sqlCtx, q)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting logs for ref '%s': %v", ref, err)
|
||||
@@ -672,8 +697,14 @@ func getCommitInfo(queryist cli.Queryist, sqlCtx *sql.Context, ref string) (*Com
|
||||
message := row[4].(string)
|
||||
parent := row[5].(string)
|
||||
height := uint64(len(rows))
|
||||
|
||||
isHead := commitHash == hashOfHead
|
||||
|
||||
var signature string
|
||||
if len(row) > 7 {
|
||||
signature = row[7].(string)
|
||||
}
|
||||
|
||||
localBranchesForHash, err := getBranchesForHash(queryist, sqlCtx, commitHash, true)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error getting branches for hash '%s': %v", commitHash, err)
|
||||
@@ -694,6 +725,7 @@ func getCommitInfo(queryist cli.Queryist, sqlCtx *sql.Context, ref string) (*Com
|
||||
Timestamp: timestamp,
|
||||
Description: message,
|
||||
UserTimestamp: int64(timestamp),
|
||||
Signature: signature,
|
||||
},
|
||||
commitHash: commitHash,
|
||||
height: height,
|
||||
|
||||
@@ -214,7 +214,15 @@ func (rcv *Commit) MutateUserTimestampMillis(n int64) bool {
|
||||
return rcv._tab.MutateInt64Slot(20, n)
|
||||
}
|
||||
|
||||
const CommitNumFields = 9
|
||||
func (rcv *Commit) Signature() []byte {
|
||||
o := flatbuffers.UOffsetT(rcv._tab.Offset(22))
|
||||
if o != 0 {
|
||||
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
const CommitNumFields = 10
|
||||
|
||||
func CommitStart(builder *flatbuffers.Builder) {
|
||||
builder.StartObject(CommitNumFields)
|
||||
@@ -255,6 +263,9 @@ func CommitAddTimestampMillis(builder *flatbuffers.Builder, timestampMillis uint
|
||||
func CommitAddUserTimestampMillis(builder *flatbuffers.Builder, userTimestampMillis int64) {
|
||||
builder.PrependInt64Slot(8, userTimestampMillis, 0)
|
||||
}
|
||||
func CommitAddSignature(builder *flatbuffers.Builder, signature flatbuffers.UOffsetT) {
|
||||
builder.PrependUOffsetTSlot(9, flatbuffers.UOffsetT(signature), 0)
|
||||
}
|
||||
func CommitEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
||||
return builder.EndObject()
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ require (
|
||||
github.com/go-sql-driver/mysql v1.7.2-0.20231213112541-0004702b931d
|
||||
github.com/gocraft/dbr/v2 v2.7.2
|
||||
github.com/golang/snappy v0.0.4
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/jpillora/backoff v1.0.0
|
||||
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d
|
||||
github.com/mattn/go-isatty v0.0.17
|
||||
|
||||
@@ -362,8 +362,8 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3
|
||||
github.com/google/uuid v1.0.0/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.2.0/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=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
go 1.22.2
|
||||
go 1.22.5
|
||||
|
||||
toolchain go1.22.7
|
||||
|
||||
use (
|
||||
.
|
||||
|
||||
209
go/go.work.sum
209
go/go.work.sum
@@ -52,6 +52,7 @@ cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8o
|
||||
cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo=
|
||||
cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE=
|
||||
cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI=
|
||||
cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
|
||||
cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
|
||||
cloud.google.com/go/contactcenterinsights v1.10.0 h1:YR2aPedGVQPpFBZXJnPkqRj8M//8veIZZH5ZvICoXnI=
|
||||
cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM=
|
||||
@@ -250,16 +251,33 @@ cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvo
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=
|
||||
gioui.org v0.0.0-20210308172011-57750fc8a0a6 h1:K72hopUosKG3ntOPNG4OzzbuhxGuVf06fa2la1/H/Ho=
|
||||
gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
|
||||
github.com/AlecAivazis/survey/v2 v2.3.6/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI=
|
||||
github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U=
|
||||
github.com/Azure/azure-sdk-for-go v59.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
|
||||
github.com/Azure/azure-storage-blob-go v0.14.0 h1:1BCg74AmVdYwO3dlKwtFU1V0wU2PZdREkXvAmZJRUlM=
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
|
||||
github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.13 h1:Mp5hbtOePIzM8pJVRa3YLrWWmZtoxRXqUEzCfJt3+/Q=
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ=
|
||||
github.com/Azure/go-autorest/autorest/azure/cli v0.4.4/go.mod h1:yAQ2b6eP/CmLPnmLvxtT1ALIY3OR1oFcCqVBi8vHiTc=
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=
|
||||
github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
|
||||
github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE=
|
||||
github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E=
|
||||
github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg=
|
||||
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
|
||||
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
|
||||
github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
|
||||
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
|
||||
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
|
||||
github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
|
||||
github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=
|
||||
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
|
||||
@@ -267,42 +285,87 @@ github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAU
|
||||
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
|
||||
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
|
||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw=
|
||||
github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
|
||||
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9 h1:7kQgkwGRoLzC9K0oyXdJo7nve/bynv/KwUsxbiTlzAM=
|
||||
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19 h1:iXUgAaqDcIUGbRoy2TdeofRG/j1zpGRSEmNK05T+bi8=
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.1501/go.mod h1:RcDobYh8k5VP6TNybz9m++gL3ijVI5wueVr0EM10VsU=
|
||||
github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible/go.mod h1:LDQHRZylxvcg8H7wBIDfvO5g/cy4/sz1iucBlc2l3Jw=
|
||||
github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
|
||||
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
||||
github.com/antchfx/xmlquery v1.3.5/go.mod h1:64w0Xesg2sTaawIdNqMB+7qaW/bSqkQm+ssPaCMWNnc=
|
||||
github.com/antchfx/xpath v1.1.10/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk=
|
||||
github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg=
|
||||
github.com/apache/arrow/go/v12 v12.0.0 h1:xtZE63VWl7qLdB0JObIXvvhGjoVNrQ9ciIHG2OK5cmc=
|
||||
github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg=
|
||||
github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY=
|
||||
github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
|
||||
github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc=
|
||||
github.com/apparentlymart/go-shquot v0.0.1/go.mod h1:lw58XsE5IgUXZ9h0cxnypdx31p9mPFIVEQ9P3c7MlrU=
|
||||
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
|
||||
github.com/apparentlymart/go-userdirs v0.0.0-20200915174352-b0c018a67c13/go.mod h1:7kfpUbyCdGJ9fDRCp3fopPQi5+cKNHgTE4ZuNrO71Cw=
|
||||
github.com/apparentlymart/go-versions v1.0.2/go.mod h1:YF5j7IQtrOAOnsGkniupEA5bfCjzd7i14yu0shZavyM=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=
|
||||
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=
|
||||
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw=
|
||||
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
|
||||
github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY=
|
||||
github.com/aws/aws-sdk-go-v2 v1.7.1 h1:TswSc7KNqZ/K1Ijt3IkpXk/2+62vi3Q82Yrr5wSbRBQ=
|
||||
github.com/aws/aws-sdk-go-v2 v1.25.3/go.mod h1:35hUlJVYd+M++iLI3ALmVwMOyRYMmRqUXpTtRGW+K9I=
|
||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1/go.mod h1:sxpLb+nZk7tIfCWChfd+h4QwHNUR57d8hA1cleTkjJo=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.5.0 h1:tRQcWXVmO7wC+ApwYc2LiYKfIBoIrdzcJ+7HIh6AlR0=
|
||||
github.com/aws/aws-sdk-go-v2/config v1.27.7/go.mod h1:PH0/cNpoMO+B04qET699o5W92Ca79fVtbUnvMIZro4I=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.3.1 h1:fFeqL5+9kwFKsCb2oci5yAIDsWYqn/Nga8oQ5bIasI8=
|
||||
github.com/aws/aws-sdk-go-v2/credentials v1.17.7/go.mod h1:UQi7LMR0Vhvs+44w5ec8Q+VS+cd10cjwgHwiVkE0YGU=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.3.0 h1:s4vtv3Mv1CisI3qm2HGHi1Ls9ZtbCOEqeQn6oz7fTyU=
|
||||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.15.3/go.mod h1:/fYB+FZbDlwlAiynK9KDXlzZl3ANI9JkD0Uhz5FjNT4=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.3.2 h1:fzEMxnHQWh+bUV0ZzfhMbgUG8zjIPnAgApjtdHtC9Yg=
|
||||
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.9/go.mod h1:GyJJTZoHVuENM4TeJEl5Ffs4W9m19u+4wKJcDi/GZ4A=
|
||||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.3/go.mod h1:oQZXg3c6SNeY6OZrDY+xHcF4VGIEoNotX2B4PrDeoJI=
|
||||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.3/go.mod h1:vCKrdLXtybdf/uQd/YfVR2r5pcbNuEYKzMQpcxmeSJw=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.1.1 h1:SDLwr1NKyowP7uqxuLNdvFZhjnoVWxNv456zAp+ZFjU=
|
||||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY=
|
||||
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3/go.mod h1:V8MuRVcCRt5h1S+Fwu8KbC7l/gBGo3yBAyUbJM2IJOk=
|
||||
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.30.4/go.mod h1:HOZYCpIko/NOS693uPQINLs7drzMjRtIN1+XRL8IkfA=
|
||||
github.com/aws/aws-sdk-go-v2/service/iam v1.28.5/go.mod h1:kKI0gdVsf+Ev9knh/3lBJbchtX5LLNH25lAzx3KDj3Q=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.2.1 h1:s/uV8UyMB4UcO0ERHxG9BJhYJAD9MiY0QeYvJmlC7PE=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5/go.mod h1:FCOPWGjsshkkICJIn9hq9xr6dLKtyaWpuUojiN3W1/8=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.4/go.mod h1:Egp7w6xf3EzlnfkfnMbDtHtts8H21B9QrCvc+3NNT24=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.2.1 h1:VJe/XEhrfyfBLupcGg1BfUSK2VMZNdbDcZQ49jnp+h0=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.5/go.mod h1:cl9HGLV66EnCmMNzq4sYOti+/xo8w34CsgzVtm2GgsY=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.5.1 h1:1ds3HkMQEBx9XvOkqsPuqBmNFn0w8XEDuB4LOi6KepU=
|
||||
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3/go.mod h1:oFcjjUq5Hm09N9rpxTdeMeLeQcxS7mIkBkL8qUKng+A=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.11.1 h1:HiXhafnqG0AkVJIZA/BHhFvuc/8xFdUO1uaeqF2Artc=
|
||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.51.4/go.mod h1:MGTaf3x/+z7ZGugCGvepnx2DS6+caCYYqKhzVoLNYPk=
|
||||
github.com/aws/aws-sdk-go-v2/service/sqs v1.29.5/go.mod h1:mCUv04gd/7g+/HNzDB4X6dzJuygji0ckvB3Lg/TdG5Y=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.3.1 h1:H2ZLWHUbbeYtghuqCY5s/7tbBM99PAwCioRJF8QvV/U=
|
||||
github.com/aws/aws-sdk-go-v2/service/sso v1.20.2/go.mod h1:Vv9Xyk1KMHXrR3vNQe8W5LMFdTjSeWk0gBZBzvf3Qa0=
|
||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.2/go.mod h1:JYzLoEVeLXk+L4tn1+rrkfhkxl6mLDEVaDSvGq9og90=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.6.0 h1:Y9r6mrzOyAYz4qKaluSH19zqH1236il/nGbsPKOUT0s=
|
||||
github.com/aws/aws-sdk-go-v2/service/sts v1.28.4/go.mod h1:+K1rNPVyGxkRuv9NNiaZ4YhBFuyw2MMA9SlIJ1Zlpz8=
|
||||
github.com/aws/smithy-go v1.6.0 h1:T6puApfBcYiTIsaI+SYWqanjMt5pc3aoyyDrI+0YH54=
|
||||
github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
|
||||
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
|
||||
github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
|
||||
github.com/bmatcuk/doublestar/v4 v4.6.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
|
||||
github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs=
|
||||
github.com/bradleyfalzon/ghinstallation/v2 v2.1.0/go.mod h1:Xg3xPRN5Mcq6GDqeUVhFbjEWMb4JHCyWEeeBGEYQoTU=
|
||||
github.com/casbin/casbin/v2 v2.1.2 h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g=
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
|
||||
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
|
||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo=
|
||||
github.com/cli/go-gh v1.0.0/go.mod h1:bqxLdCoTZ73BuiPEJx4olcO/XKhVZaFDchFagYRBweE=
|
||||
github.com/cli/safeexec v1.0.0/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q=
|
||||
github.com/cli/shurcooL-graphql v0.0.2/go.mod h1:tlrLmw/n5Q/+4qSvosT+9/W5zc8ZMjnJeYBxSdb4nWA=
|
||||
github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=
|
||||
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
|
||||
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk=
|
||||
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k=
|
||||
@@ -317,48 +380,72 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBt
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
|
||||
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
|
||||
github.com/dolthub/go-mysql-server v0.18.2-0.20240812011431-f3892cc42bbf h1:F4OT8cjaQzGlLne9vp7/q0i5QFsQE2OUWIaL5thO5qA=
|
||||
github.com/dolthub/go-mysql-server v0.18.2-0.20240812011431-f3892cc42bbf/go.mod h1:PwuemL+YK+YiWcUFhknixeqNLjJNfCx7KDsHNajx9fM=
|
||||
github.com/dolthub/go-mysql-server v0.18.2-0.20240827100900-3bf086dd5c18 h1:1lgwZvnecrjoc9v0iqxjdKBvaasAPiQzty40uTKOHsE=
|
||||
github.com/dolthub/go-mysql-server v0.18.2-0.20240827100900-3bf086dd5c18/go.mod h1:nbdOzd0ceWONE80vbfwoRBjut7z3CIj69ZgDF/cKuaA=
|
||||
github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ=
|
||||
github.com/dylanmei/winrmtest v0.0.0-20210303004826-fbc9ae56efb6/go.mod h1:6BLLhzn1VEiJ4veuAGhINBTrBlV889Wd+aU4auxKOww=
|
||||
github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw=
|
||||
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
|
||||
github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=
|
||||
github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f h1:7T++XKzy4xg7PKy+bM+Sa9/oe1OC88yz2hXQUISoXfA=
|
||||
github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q=
|
||||
github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM=
|
||||
github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
|
||||
github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=
|
||||
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw=
|
||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/go-fonts/stix v0.1.0 h1:UlZlgrvvmT/58o573ot7NFw0vZasZ5I6bcIft/oMdgg=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I=
|
||||
github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw=
|
||||
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
|
||||
github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
|
||||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||
github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=
|
||||
github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg=
|
||||
github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
|
||||
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
|
||||
github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=
|
||||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gogo/googleapis v1.1.0 h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
|
||||
github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE=
|
||||
github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ=
|
||||
github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo=
|
||||
github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
|
||||
github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g=
|
||||
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM=
|
||||
github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
|
||||
github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-github/v45 v45.2.0/go.mod h1:FObaZJEDSTa/WGCzZ2Z3eoCDXWJKMenWWTrd8jrta28=
|
||||
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
|
||||
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99 h1:Ak8CrdlwwXwAZxzS66vgPt4U8yUZX7JwLvVR58FN5jM=
|
||||
github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c h1:Lh2aW+HnU2Nbe1gqD9SOJLJxW1jBMmQOktN2acDyJk8=
|
||||
@@ -367,67 +454,129 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
|
||||
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=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
|
||||
github.com/hashicorp/aws-sdk-go-base/v2 v2.0.0-beta.45/go.mod h1:roO9Btzl+fvOFhvDN7CuPf6n60K6Yh0ykzwxhwbMK90=
|
||||
github.com/hashicorp/cli v1.1.6/go.mod h1:MPon5QYlgjjo0BSoAiN0ESeT5fRzDjVRp+uioJ0piz4=
|
||||
github.com/hashicorp/consul/api v1.3.0 h1:HXNYlRkkM/t+Y/Yhxtwcy02dlYwIaoxzvxPnS+cqy78=
|
||||
github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ=
|
||||
github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ=
|
||||
github.com/hashicorp/copywrite v0.16.3/go.mod h1:wl92lMJ9VBqxH9M5KWfseHzXtjj7Q2u5LnKhpS0Rclo=
|
||||
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
|
||||
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-azure-helpers v0.43.0/go.mod h1:ofh+59GPB8g/lWI08711STfrIPSPOlXQkuMc8rovpBk=
|
||||
github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-getter v1.7.5/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744=
|
||||
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=
|
||||
github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=
|
||||
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI=
|
||||
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
||||
github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I=
|
||||
github.com/hashicorp/go-slug v0.15.0/go.mod h1:THWVTAXwJEinbsp4/bBRcmbaO5EYNLTqxbG4tZ3gCYQ=
|
||||
github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=
|
||||
github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE=
|
||||
github.com/hashicorp/go-tfe v1.58.0/go.mod h1:XnTtBj3tVQ4uFkcFsv8Grn+O1CVcIcceL1uc2AgUcaU=
|
||||
github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
|
||||
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E=
|
||||
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/hcl/v2 v2.20.0/go.mod h1:WmcD/Ym72MDOOx5F62Ly+leloeu6H7m0pG7VBiU6pQk=
|
||||
github.com/hashicorp/jsonapi v1.3.1/go.mod h1:kWfdn49yCjQvbpnvY1dxxAuAFzISwrrMDQOcu6NsFoM=
|
||||
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
|
||||
github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs=
|
||||
github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=
|
||||
github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=
|
||||
github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
|
||||
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
|
||||
github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM=
|
||||
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
|
||||
github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
|
||||
github.com/henvic/httpretty v0.0.6/go.mod h1:X38wLjWXHkXT7r2+uK8LjCMne9rsuNaBLJ+5cU2/Pmo=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
github.com/hudl/fargo v1.3.0 h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w=
|
||||
github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
|
||||
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c=
|
||||
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA=
|
||||
github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930 h1:v4CYlQ+HeysPHsr2QFiEO60gKqnvn1xwvuKhhAhuEkk=
|
||||
github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag=
|
||||
github.com/jedib0t/go-pretty/v6 v6.4.4/go.mod h1:MgmISkTWDSFu0xOqiZ0mKNntMQ2mDgOcwOkwBEkMDJI=
|
||||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
|
||||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||
github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
|
||||
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5 h1:PJr+ZMXIecYc1Ey2zucXdR73SMBtgjPgwa31099IMv0=
|
||||
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY=
|
||||
github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
|
||||
github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4=
|
||||
github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE=
|
||||
github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
|
||||
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
|
||||
github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
|
||||
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
|
||||
github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
|
||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo=
|
||||
github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/lyft/protoc-gen-star v0.5.2 h1:ICQPpOr4uO46eme1Y5Jj0fnJkc9/upQ9xxt0+2AmUDQ=
|
||||
github.com/lyft/protoc-gen-star/v2 v2.0.1 h1:keaAo8hRuAT0O3DfJ/wM3rufbAjGeJ1lAtWZHDjKGB0=
|
||||
github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o=
|
||||
github.com/lyft/protoc-gen-star/v2 v2.0.3 h1:/3+/2sWyXeMLzKd1bX+ixWKgEMsULrIivpDsuaF441o=
|
||||
github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk=
|
||||
github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA=
|
||||
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/manicminer/hamilton v0.44.0/go.mod h1:lbVyngC+/nCWuDp8UhC6Bw+bh7jcP/E+YwqzHTmzemk=
|
||||
github.com/manicminer/hamilton-autorest v0.2.0/go.mod h1:NselDpNTImEmOc/fa41kPg6YhDt/6S95ejWbTGZ6tlg=
|
||||
github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc=
|
||||
github.com/masterzen/winrm v0.0.0-20200615185753-c42b5136ff88/go.mod h1:a2HXwefeat3evJHxFXSayvRHpYEPJYtErl4uIzfaUqY=
|
||||
github.com/mattn/go-ieproxy v0.0.1 h1:qiyop7gCflfhwCzGyeT0gro3sF9AIg9HU98JORTkqfI=
|
||||
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
|
||||
github.com/mergestat/timediff v0.0.3/go.mod h1:yvMUaRu2oetc+9IbPLYBJviz6sA7xz8OXMDfhBl7YSI=
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA=
|
||||
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=
|
||||
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
|
||||
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI=
|
||||
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE=
|
||||
github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
|
||||
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
|
||||
github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-linereader v0.0.0-20190213213312-1b945b3263eb/go.mod h1:OaY7UOoTkkrX3wRwjpYRKafIkkyeD0UtweSHAWWiqQM=
|
||||
github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
|
||||
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
|
||||
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
|
||||
github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc=
|
||||
github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4=
|
||||
github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=
|
||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/mozillazg/go-httpheader v0.3.0/go.mod h1:PuT8h0pw6efvp8ZeUec1Rs7dwjK08bt6gKSReGMqtdA=
|
||||
github.com/muesli/termenv v0.12.0/go.mod h1:WCCv32tusQ/EEZ5S8oUIIrC/nIuBcxCVqlN4Xfkv+7A=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
|
||||
github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI=
|
||||
github.com/nats-io/nats-server/v2 v2.1.2 h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc=
|
||||
@@ -437,8 +586,11 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA=
|
||||
github.com/ncw/swift v1.0.52 h1:ACF3JufDGgeKp/9mrDgQlEgS8kRYC4XKcuzj/8EJjQU=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs=
|
||||
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U=
|
||||
github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk=
|
||||
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78=
|
||||
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs=
|
||||
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU=
|
||||
@@ -448,6 +600,7 @@ github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7l
|
||||
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
|
||||
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU=
|
||||
github.com/openzipkin/zipkin-go v0.2.2 h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI=
|
||||
github.com/packer-community/winrmcp v0.0.0-20221126162354-6e900dd2c68f/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
|
||||
github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=
|
||||
github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117 h1:7822vZ646Atgxkp3tqrSufChvAAYgIy+iFEGpQntwlI=
|
||||
@@ -458,10 +611,14 @@ github.com/phpdave11/gofpdi v1.0.13 h1:o61duiW8M9sMlkVXWlvP92sZJtGKENvW3VExs6dZu
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
|
||||
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/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pkg/sftp v1.13.0 h1:Riw6pgOKK41foc1I1Uu03CjvbLZDXeGpInycM4shXoI=
|
||||
github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=
|
||||
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
|
||||
github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
|
||||
github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
|
||||
github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY=
|
||||
github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
|
||||
github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
|
||||
github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk=
|
||||
@@ -469,6 +626,7 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245 h1:K1Xf3bKttbF+koVGaX5xngRIZ5bVjbmPnaxE/dR08uY=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M=
|
||||
github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA=
|
||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
||||
@@ -476,41 +634,78 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykE
|
||||
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
|
||||
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
|
||||
github.com/spf13/afero v1.3.3 h1:p5gZEKLYoL7wh8VrJesMaYeNxdEd1v3cb4irOk9zB54=
|
||||
github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
|
||||
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
|
||||
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
|
||||
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
|
||||
github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw=
|
||||
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.588/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sts v1.0.588/go.mod h1:vPvXNb+zBZVJfZCIKWcYxLpGzgScKKgiPUArobWZ+nU=
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag v1.0.233/go.mod h1:sX14+NSvMjOhNFaMtP2aDy6Bss8PyFXij21gpY6+DAs=
|
||||
github.com/tencentyun/cos-go-sdk-v5 v0.7.42/go.mod h1:LUFnaqRmGk6pEHOaRmdn2dCZR2j0cSsM5xowWFPTPao=
|
||||
github.com/thanhpk/randstr v1.0.4/go.mod h1:M/H2P1eNLZzlDwAzpkkkUvoyNNMbzRGhESZuEQk3r0U=
|
||||
github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e/go.mod h1:/Tnicc6m/lsJE0irFMA0LfIwTBo4QP7A8IfyIv4zZKI=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=
|
||||
github.com/tombuildsstuff/giovanni v0.15.1/go.mod h1:0TZugJPEtqzPlMpuJHYfXY6Dq2uLPrXf98D2XQSxNbA=
|
||||
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
|
||||
github.com/urfave/cli/v2 v2.11.0 h1:c6bD90aLd2iEsokxhxkY5Er0zA2V9fId2aJfwmrF+do=
|
||||
github.com/urfave/cli/v2 v2.11.0/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo=
|
||||
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
|
||||
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
|
||||
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
|
||||
github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
||||
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
|
||||
github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
|
||||
github.com/zclconf/go-cty-debug v0.0.0-20240417160409-8c45e122ae1a/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM=
|
||||
github.com/zclconf/go-cty-yaml v1.0.3/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs=
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0=
|
||||
go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8=
|
||||
go.opentelemetry.io/contrib/exporters/autoexport v0.45.0/go.mod h1:9hFI4YY6Ehe9enzw9qGlKAjJGQAtEo75Ysrb3byOZtI=
|
||||
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.46.1/go.mod h1:h0dNRrQsnnlMonPE/+FXrXtDYZEyZSTaIOfs+n8P/RQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU=
|
||||
go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw=
|
||||
go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
|
||||
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
|
||||
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
|
||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=
|
||||
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
|
||||
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=
|
||||
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
|
||||
golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk=
|
||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY=
|
||||
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools/cmd/cover v0.1.0-deprecated/go.mod h1:hMDiIvlpN1NoVgmjLjUJE9tMHyxHjFX7RuQ+rW12mSA=
|
||||
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc=
|
||||
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk=
|
||||
google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64=
|
||||
google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108=
|
||||
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig=
|
||||
google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc h1:g3hIDl0jRNd9PPTs2uBzYuaD5mQuwOkZY0vSc0LR32o=
|
||||
@@ -528,16 +723,30 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQ
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25 h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I=
|
||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||
gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw=
|
||||
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM=
|
||||
gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI=
|
||||
gopkg.in/jcmturner/gokrb5.v7 v7.3.0 h1:0709Jtq/6QXEuWRfAm260XqlpcwL1vxtO1tUE2qK8Z4=
|
||||
gopkg.in/jcmturner/rpc.v1 v1.1.0 h1:QHIUxTX1ISuAv9dD2wJ9HWQVuWDX/Zc0PfeC2tjc4rU=
|
||||
gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=
|
||||
gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w=
|
||||
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
|
||||
honnef.co/go/tools v0.1.3 h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o=
|
||||
honnef.co/go/tools v0.5.0-0.dev.0.20230826160118-ad5ca31ff221/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0=
|
||||
k8s.io/api v0.25.5/go.mod h1:RzplZX0Z8rV/WhSTfEvnyd91bBhBQTRWo85qBQwRmb8=
|
||||
k8s.io/apimachinery v0.25.5/go.mod h1:1S2i1QHkmxc8+EZCIxe/fX5hpldVXk4gvnJInMEb8D4=
|
||||
k8s.io/client-go v0.25.5/go.mod h1:bOeoaUUdpyz3WDFGo+Xm3nOQFh2KuYXRDwrvbAPtFQA=
|
||||
k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU=
|
||||
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=
|
||||
rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY=
|
||||
rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM=
|
||||
|
||||
18
go/libraries/doltcore/env/config.go
vendored
18
go/libraries/doltcore/env/config.go
vendored
@@ -72,6 +72,24 @@ type DoltCliConfig struct {
|
||||
|
||||
var _ config.ReadableConfig = &DoltCliConfig{}
|
||||
|
||||
func NewTestDoltCliConfig(gcfg, lcfg config.ReadWriteConfig, fs filesys.Filesys) *DoltCliConfig {
|
||||
cfgHierarchy := config.NewConfigHierarchy()
|
||||
|
||||
if gcfg != nil {
|
||||
cfgHierarchy.AddConfig(globalConfigName, gcfg)
|
||||
}
|
||||
|
||||
if lcfg != nil {
|
||||
cfgHierarchy.AddConfig(localConfigName, lcfg)
|
||||
}
|
||||
|
||||
return &DoltCliConfig{cfgHierarchy, cfgHierarchy, fs}
|
||||
}
|
||||
|
||||
func NewTestDoltCliConfigFromHierarchy(ch *config.ConfigHierarchy, fs filesys.Filesys) *DoltCliConfig {
|
||||
return &DoltCliConfig{ch, ch, fs}
|
||||
}
|
||||
|
||||
func LoadDoltCliConfig(hdp HomeDirProvider, fs filesys.ReadWriteFS) (*DoltCliConfig, error) {
|
||||
ch := config.NewConfigHierarchy()
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/merge"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/schema"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/gpg"
|
||||
"github.com/dolthub/dolt/go/store/hash"
|
||||
)
|
||||
|
||||
@@ -44,9 +45,10 @@ type LogTableFunction struct {
|
||||
notRevisionStrs []string
|
||||
tableNames []string
|
||||
|
||||
minParents int
|
||||
showParents bool
|
||||
decoration string
|
||||
minParents int
|
||||
showParents bool
|
||||
showSignature bool
|
||||
decoration string
|
||||
|
||||
database sql.Database
|
||||
}
|
||||
@@ -140,6 +142,10 @@ func (ltf *LogTableFunction) getOptionsString() string {
|
||||
options = append(options, fmt.Sprintf("--%s", cli.ParentsFlag))
|
||||
}
|
||||
|
||||
if ltf.showSignature {
|
||||
options = append(options, fmt.Sprintf("--%s", cli.ShowSignatureFlag))
|
||||
}
|
||||
|
||||
if len(ltf.decoration) > 0 && ltf.decoration != "auto" {
|
||||
options = append(options, fmt.Sprintf("--%s %s", cli.DecorateFlag, ltf.decoration))
|
||||
}
|
||||
@@ -161,6 +167,9 @@ func (ltf *LogTableFunction) Schema() sql.Schema {
|
||||
if shouldDecorateWithRefs(ltf.decoration) {
|
||||
logSchema = append(logSchema, &sql.Column{Name: "refs", Type: types.Text})
|
||||
}
|
||||
if ltf.showSignature {
|
||||
logSchema = append(logSchema, &sql.Column{Name: "signature", Type: types.Text})
|
||||
}
|
||||
|
||||
return logSchema
|
||||
}
|
||||
@@ -253,6 +262,7 @@ func (ltf *LogTableFunction) addOptions(expression []sql.Expression) error {
|
||||
|
||||
ltf.minParents = minParents
|
||||
ltf.showParents = apr.Contains(cli.ParentsFlag)
|
||||
ltf.showSignature = apr.Contains(cli.ShowSignatureFlag)
|
||||
|
||||
decorateOption := apr.GetValueOrDefault(cli.DecorateFlag, "auto")
|
||||
switch decorateOption {
|
||||
@@ -593,11 +603,12 @@ var _ sql.RowIter = (*logTableFunctionRowIter)(nil)
|
||||
|
||||
// logTableFunctionRowIter is a sql.RowIter implementation which iterates over each commit as if it's a row in the table.
|
||||
type logTableFunctionRowIter struct {
|
||||
child doltdb.CommitItr
|
||||
showParents bool
|
||||
decoration string
|
||||
cHashToRefs map[hash.Hash][]string
|
||||
headHash hash.Hash
|
||||
child doltdb.CommitItr
|
||||
showParents bool
|
||||
showSignature bool
|
||||
decoration string
|
||||
cHashToRefs map[hash.Hash][]string
|
||||
headHash hash.Hash
|
||||
|
||||
tableNames []string
|
||||
}
|
||||
@@ -614,12 +625,13 @@ func (ltf *LogTableFunction) NewLogTableFunctionRowIter(ctx *sql.Context, ddb *d
|
||||
}
|
||||
|
||||
return &logTableFunctionRowIter{
|
||||
child: child,
|
||||
showParents: ltf.showParents,
|
||||
decoration: ltf.decoration,
|
||||
cHashToRefs: cHashToRefs,
|
||||
headHash: h,
|
||||
tableNames: tableNames,
|
||||
child: child,
|
||||
showParents: ltf.showParents,
|
||||
showSignature: ltf.showSignature,
|
||||
decoration: ltf.decoration,
|
||||
cHashToRefs: cHashToRefs,
|
||||
headHash: h,
|
||||
tableNames: tableNames,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -654,12 +666,13 @@ func (ltf *LogTableFunction) NewDotDotLogTableFunctionRowIter(ctx *sql.Context,
|
||||
}
|
||||
|
||||
return &logTableFunctionRowIter{
|
||||
child: child,
|
||||
showParents: ltf.showParents,
|
||||
decoration: ltf.decoration,
|
||||
cHashToRefs: cHashToRefs,
|
||||
headHash: headHash,
|
||||
tableNames: tableNames,
|
||||
child: child,
|
||||
showParents: ltf.showParents,
|
||||
showSignature: ltf.showSignature,
|
||||
decoration: ltf.decoration,
|
||||
cHashToRefs: cHashToRefs,
|
||||
headHash: headHash,
|
||||
tableNames: tableNames,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -764,6 +777,19 @@ func (itr *logTableFunctionRowIter) Next(ctx *sql.Context) (sql.Row, error) {
|
||||
row = row.Append(sql.NewRow(getRefsString(branchNames, isHead)))
|
||||
}
|
||||
|
||||
if itr.showSignature {
|
||||
if len(meta.Signature) > 0 {
|
||||
out, err := gpg.Verify(ctx, []byte(meta.Signature))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
row = row.Append(sql.NewRow(string(out)))
|
||||
} else {
|
||||
row = row.Append(sql.NewRow(""))
|
||||
}
|
||||
}
|
||||
|
||||
return row, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ package dprocedures
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/dolthub/go-mysql-server/sql"
|
||||
"github.com/dolthub/go-mysql-server/sql/types"
|
||||
@@ -24,8 +25,10 @@ import (
|
||||
"github.com/dolthub/dolt/go/cmd/dolt/cli"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/branch_control"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/dconfig"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/doltdb"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/env/actions"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/dsess"
|
||||
"github.com/dolthub/dolt/go/libraries/utils/gpg"
|
||||
"github.com/dolthub/dolt/go/store/datas"
|
||||
)
|
||||
|
||||
@@ -152,7 +155,7 @@ func doDoltCommit(ctx *sql.Context, args []string) (string, bool, error) {
|
||||
}
|
||||
}
|
||||
|
||||
pendingCommit, err := dSess.NewPendingCommit(ctx, dbName, roots, actions.CommitStagedProps{
|
||||
csp := actions.CommitStagedProps{
|
||||
Message: msg,
|
||||
Date: t,
|
||||
AllowEmpty: apr.Contains(cli.AllowEmptyFlag),
|
||||
@@ -161,7 +164,14 @@ func doDoltCommit(ctx *sql.Context, args []string) (string, bool, error) {
|
||||
Force: apr.Contains(cli.ForceFlag),
|
||||
Name: name,
|
||||
Email: email,
|
||||
})
|
||||
}
|
||||
|
||||
shouldSign, err := dsess.GetBooleanSystemVar(ctx, "gpgsign")
|
||||
if err != nil {
|
||||
return "", false, fmt.Errorf("failed to get gpgsign: %w", err)
|
||||
}
|
||||
|
||||
pendingCommit, err := dSess.NewPendingCommit(ctx, dbName, roots, csp)
|
||||
if err != nil {
|
||||
return "", false, err
|
||||
}
|
||||
@@ -173,6 +183,31 @@ func doDoltCommit(ctx *sql.Context, args []string) (string, bool, error) {
|
||||
return "", false, errors.New("nothing to commit")
|
||||
}
|
||||
|
||||
if apr.Contains(cli.SignFlag) || shouldSign {
|
||||
keyId := apr.GetValueOrDefault(cli.SignFlag, "")
|
||||
|
||||
if keyId == "" {
|
||||
v, err := ctx.GetSessionVariable(ctx, "signingkey")
|
||||
if err != nil && !sql.ErrUnknownSystemVariable.Is(err) {
|
||||
return "", false, fmt.Errorf("failed to get signingkey: %w", err)
|
||||
} else if err == nil {
|
||||
keyId = v.(string)
|
||||
}
|
||||
}
|
||||
|
||||
strToSign, err := commitSignatureStr(ctx, dbName, roots, csp)
|
||||
if err != nil {
|
||||
return "", false, err
|
||||
}
|
||||
|
||||
signature, err := gpg.Sign(ctx, keyId, []byte(strToSign))
|
||||
if err != nil {
|
||||
return "", false, err
|
||||
}
|
||||
|
||||
pendingCommit.CommitOptions.Meta.Signature = string(signature)
|
||||
}
|
||||
|
||||
newCommit, err := dSess.DoltCommit(ctx, dbName, dSess.GetTransaction(), pendingCommit)
|
||||
if err != nil {
|
||||
return "", false, err
|
||||
@@ -206,3 +241,27 @@ func getDoltArgs(ctx *sql.Context, row sql.Row, children []sql.Expression) ([]st
|
||||
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func commitSignatureStr(ctx *sql.Context, dbName string, roots doltdb.Roots, csp actions.CommitStagedProps) (string, error) {
|
||||
var lines []string
|
||||
lines = append(lines, fmt.Sprint("db: ", dbName))
|
||||
lines = append(lines, fmt.Sprint("Message: ", csp.Message))
|
||||
lines = append(lines, fmt.Sprint("Name: ", csp.Name))
|
||||
lines = append(lines, fmt.Sprint("Email: ", csp.Email))
|
||||
lines = append(lines, fmt.Sprint("Date: ", csp.Date.String()))
|
||||
|
||||
head, err := roots.Head.HashOf()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
staged, err := roots.Staged.HashOf()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
lines = append(lines, fmt.Sprint("Head: ", head.String()))
|
||||
lines = append(lines, fmt.Sprint("Staged: ", staged.String()))
|
||||
|
||||
return strings.Join(lines, "\n"), nil
|
||||
}
|
||||
|
||||
@@ -200,9 +200,9 @@ func TestGetPersistedValue(t *testing.T) {
|
||||
ExpectedRes: uint64(7),
|
||||
},
|
||||
{
|
||||
Name: "activate_all_roles_on_login",
|
||||
Value: "true",
|
||||
Err: true,
|
||||
Name: "activate_all_roles_on_login",
|
||||
Value: "true",
|
||||
ExpectedRes: int8(1),
|
||||
},
|
||||
{
|
||||
Name: "activate_all_roles_on_login",
|
||||
@@ -215,9 +215,9 @@ func TestGetPersistedValue(t *testing.T) {
|
||||
ExpectedRes: int8(1),
|
||||
},
|
||||
{
|
||||
Name: "activate_all_roles_on_login",
|
||||
Value: "false",
|
||||
Err: true,
|
||||
Name: "activate_all_roles_on_login",
|
||||
Value: "false",
|
||||
ExpectedRes: int8(0),
|
||||
},
|
||||
{
|
||||
Name: "activate_all_roles_on_login",
|
||||
|
||||
@@ -1655,12 +1655,15 @@ func getPersistedValue(conf config.ReadableConfig, k string) (interface{}, error
|
||||
var res interface{}
|
||||
switch value.(type) {
|
||||
case int8:
|
||||
v = asIntIfBoolValue(v)
|
||||
var tmp int64
|
||||
tmp, err = strconv.ParseInt(v, 10, 8)
|
||||
res = int8(tmp)
|
||||
case int, int16, int32, int64:
|
||||
v = asIntIfBoolValue(v)
|
||||
res, err = strconv.ParseInt(v, 10, 64)
|
||||
case uint, uint8, uint16, uint32, uint64:
|
||||
v = asIntIfBoolValue(v)
|
||||
res, err = strconv.ParseUint(v, 10, 64)
|
||||
case float32, float64:
|
||||
res, err = strconv.ParseFloat(v, 64)
|
||||
@@ -1679,6 +1682,17 @@ func getPersistedValue(conf config.ReadableConfig, k string) (interface{}, error
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func asIntIfBoolValue(v string) string {
|
||||
lower := strings.ToLower(v)
|
||||
if lower == "true" {
|
||||
return "1"
|
||||
} else if lower == "false" {
|
||||
return "0"
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
// setPersistedValue casts and persists a key value pair assuming thread safety
|
||||
func setPersistedValue(conf config.WritableConfig, key string, value interface{}) error {
|
||||
switch v := value.(type) {
|
||||
|
||||
@@ -256,6 +256,245 @@ var DoltSystemVariables = []sql.SystemVariable{
|
||||
}
|
||||
|
||||
func AddDoltSystemVariables() {
|
||||
sql.SystemVariables.AddSystemVariables([]sql.SystemVariable{
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: "log_bin_branch",
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Persist),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType("log_bin_branch"),
|
||||
Default: "main",
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.DoltOverrideSchema,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Both),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.DoltOverrideSchema),
|
||||
Default: "",
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.ReplicateToRemote,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.ReplicateToRemote),
|
||||
Default: "",
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.ReplicationRemoteURLTemplate,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.ReplicationRemoteURLTemplate),
|
||||
Default: "",
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.ReadReplicaRemote,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.ReadReplicaRemote),
|
||||
Default: "",
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.ReadReplicaForcePull,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.ReadReplicaForcePull),
|
||||
Default: int8(1),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.SkipReplicationErrors,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.SkipReplicationErrors),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.ReplicateHeads,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.ReplicateHeads),
|
||||
Default: "",
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.ReplicateAllHeads,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.ReplicateAllHeads),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.AsyncReplication,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.AsyncReplication),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{ // If true, causes a Dolt commit to occur when you commit a transaction.
|
||||
Name: dsess.DoltCommitOnTransactionCommit,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Both),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.DoltCommitOnTransactionCommit),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{ // If set, use this message for automatic Dolt commits
|
||||
Name: dsess.DoltCommitOnTransactionCommitMessage,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Both),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.DoltCommitOnTransactionCommitMessage),
|
||||
Default: nil,
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.TransactionsDisabledSysVar,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Session),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.TransactionsDisabledSysVar),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{ // If true, disables the conflict and constraint violation check when you commit a transaction.
|
||||
Name: dsess.ForceTransactionCommit,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Both),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.ForceTransactionCommit),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.CurrentBatchModeKey,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Session),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemIntType(dsess.CurrentBatchModeKey, -9223372036854775808, 9223372036854775807, false),
|
||||
Default: int64(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{ // If true, disables the conflict violation check when you commit a transaction.
|
||||
Name: dsess.AllowCommitConflicts,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Session),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.AllowCommitConflicts),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.AwsCredsFile,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Session),
|
||||
Dynamic: false,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.AwsCredsFile),
|
||||
Default: nil,
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.AwsCredsProfile,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Session),
|
||||
Dynamic: false,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.AwsCredsProfile),
|
||||
Default: nil,
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.AwsCredsRegion,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Session),
|
||||
Dynamic: false,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemStringType(dsess.AwsCredsRegion),
|
||||
Default: nil,
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.ShowBranchDatabases,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Both),
|
||||
Dynamic: true,
|
||||
SetVarHintApplies: false,
|
||||
Type: types.NewSystemBoolType(dsess.ShowBranchDatabases),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.DoltClusterAckWritesTimeoutSecs,
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Persist),
|
||||
Type: types.NewSystemIntType(dsess.DoltClusterAckWritesTimeoutSecs, 0, 60, false),
|
||||
Default: int64(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.ShowSystemTables,
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Both),
|
||||
Type: types.NewSystemBoolType(dsess.ShowSystemTables),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: "dolt_dont_merge_json",
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Both),
|
||||
Type: types.NewSystemBoolType("dolt_dont_merge_json"),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.DoltStatsAutoRefreshEnabled,
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Type: types.NewSystemBoolType(dsess.DoltStatsAutoRefreshEnabled),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.DoltStatsBootstrapEnabled,
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Type: types.NewSystemBoolType(dsess.DoltStatsBootstrapEnabled),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.DoltStatsMemoryOnly,
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Type: types.NewSystemBoolType(dsess.DoltStatsMemoryOnly),
|
||||
Default: int8(0),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.DoltStatsAutoRefreshThreshold,
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Type: types.NewSystemDoubleType(dsess.DoltStatsAutoRefreshEnabled, 0, 10),
|
||||
Default: float64(.5),
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.DoltStatsAutoRefreshInterval,
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Type: types.NewSystemIntType(dsess.DoltStatsAutoRefreshInterval, 0, math.MaxInt, false),
|
||||
Default: 120,
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: dsess.DoltStatsBranches,
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Global),
|
||||
Type: types.NewSystemStringType(dsess.DoltStatsBranches),
|
||||
Default: "",
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: "signingkey",
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_PersistOnly),
|
||||
Type: types.NewSystemStringType("signingkey"),
|
||||
Default: "",
|
||||
},
|
||||
&sql.MysqlSystemVariable{
|
||||
Name: "gpgsign",
|
||||
Dynamic: true,
|
||||
Scope: sql.GetMysqlScope(sql.SystemVariableScope_PersistOnly),
|
||||
Type: types.NewSystemBoolType("gpgsign"),
|
||||
Default: int8(0),
|
||||
},
|
||||
})
|
||||
sql.SystemVariables.AddSystemVariables(DoltSystemVariables)
|
||||
}
|
||||
|
||||
|
||||
@@ -64,3 +64,7 @@ const PushAutoSetupRemote = "push.autosetupremote"
|
||||
const ProfileKey = "profile"
|
||||
|
||||
const VersionCheckDisabled = "versioncheck.disabled"
|
||||
|
||||
const SignCommitsKey = "commit.gpgsign"
|
||||
|
||||
const GPGSigningKeyKey = "user.signingkey"
|
||||
|
||||
@@ -17,8 +17,10 @@ package filesys
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -146,3 +148,48 @@ func CopyFile(srcPath, destPath string, srcFS, destFS Filesys) (err error) {
|
||||
_, err = io.Copy(wr, rd)
|
||||
return
|
||||
}
|
||||
|
||||
// CopyDir does a recursive copy of the src directory into the dest directory.
|
||||
func CopyDir(src, dest string, fs Filesys) error {
|
||||
absSrc, err := fs.Abs(src)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error getting absolute path for %s: %w", src, err)
|
||||
}
|
||||
|
||||
err = fs.MkDirs(dest)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating directory %s: %w", dest, err)
|
||||
}
|
||||
|
||||
itrErr := fs.Iter(absSrc, true, func(path string, size int64, isDir bool) (stop bool) {
|
||||
relPath := path[len(absSrc):]
|
||||
destPath := filepath.Join(dest, relPath)
|
||||
if isDir {
|
||||
err = fs.MkDirs(destPath)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error creating directory %s: %w", destPath, err)
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
var data []byte
|
||||
data, err = fs.ReadFile(path)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error reading file %s: %w", path, err)
|
||||
return true
|
||||
}
|
||||
|
||||
err = fs.WriteFile(destPath, data, os.ModePerm)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error writing file %s: %w", destPath, err)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return itrErr
|
||||
}
|
||||
|
||||
233
go/libraries/utils/gpg/sign.go
Normal file
233
go/libraries/utils/gpg/sign.go
Normal file
@@ -0,0 +1,233 @@
|
||||
// Copyright 2024 Dolthub, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package gpg
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"io"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
func execGpgAndReadOutput(ctx context.Context, in []byte, args []string) (*bytes.Buffer, *bytes.Buffer, error) {
|
||||
cmdStr := fmt.Sprintf("gpg %s", strings.Join(args, " "))
|
||||
cmd := exec.CommandContext(ctx, "gpg", args...)
|
||||
|
||||
stdOut, err := cmd.StdoutPipe()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to get stdout for command '%s': %w", cmdStr, err)
|
||||
}
|
||||
|
||||
stdErr, err := cmd.StderrPipe()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to get stderr for command '%s': %w", cmdStr, err)
|
||||
}
|
||||
|
||||
stdIn, err := cmd.StdinPipe()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to get stdin for command '%s': %w", cmdStr, err)
|
||||
}
|
||||
|
||||
err = cmd.Start()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to start command '%s': %w", cmdStr, err)
|
||||
}
|
||||
|
||||
eg, egCtx := errgroup.WithContext(ctx)
|
||||
outBuf := listenToOut(egCtx, eg, stdOut)
|
||||
errBuf := listenToOut(egCtx, eg, stdErr)
|
||||
|
||||
n, err := io.Copy(stdIn, strings.NewReader(string(in)))
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to write stdin for command '%s': %w", cmdStr, err)
|
||||
} else if n < int64(len(in)) {
|
||||
return nil, nil, fmt.Errorf("failed to write stdin for command '%s': EOF before all bytes written", cmd)
|
||||
}
|
||||
|
||||
err = stdIn.Close()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to close stdin for command '%s': %w", cmdStr, err)
|
||||
}
|
||||
|
||||
var exitCode int
|
||||
for {
|
||||
state, err := cmd.Process.Wait()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to wait for command '%s': %w", cmdStr, err)
|
||||
}
|
||||
|
||||
if !state.Exited() {
|
||||
continue
|
||||
}
|
||||
|
||||
exitCode = state.ExitCode()
|
||||
break
|
||||
}
|
||||
|
||||
err = eg.Wait()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to read output for command '%s': %w", cmdStr, err)
|
||||
}
|
||||
|
||||
if exitCode != 0 {
|
||||
return nil, nil, fmt.Errorf("command '%s' exited with code %d. stdout: '%s', stderr: '%s'", cmdStr, exitCode, outBuf.String(), errBuf.String())
|
||||
}
|
||||
|
||||
return outBuf, errBuf, nil
|
||||
}
|
||||
|
||||
// ImportKey imports a key from a file using gpg
|
||||
func ImportKey(ctx context.Context, keyFile string) error {
|
||||
args := []string{"--import", keyFile}
|
||||
_, ioErr, err := execGpgAndReadOutput(ctx, nil, args)
|
||||
|
||||
if err != nil && ioErr != nil && len(ioErr.String()) > 0 {
|
||||
err = fmt.Errorf("`gpg --import %s` error gpg_output: %s - %w", keyFile, ioErr.String(), err)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// ListKey returns the output of `gpg --list-keys`
|
||||
func ListKeys(ctx context.Context) ([]byte, error) {
|
||||
args := []string{"--list-keys"}
|
||||
outBuf, _, err := execGpgAndReadOutput(ctx, nil, args)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return outBuf.Bytes(), nil
|
||||
}
|
||||
|
||||
// HasKey returns true if the key with the given keyId is present when `gpg --list-keys` is run
|
||||
func HasKey(ctx context.Context, keyId string) (bool, error) {
|
||||
args := []string{"--list-keys", keyId}
|
||||
outBuf, _, err := execGpgAndReadOutput(ctx, nil, args)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return strings.Contains(outBuf.String(), keyId), nil
|
||||
}
|
||||
|
||||
// Sign signs a message using the key with the given keyId
|
||||
func Sign(ctx context.Context, keyId string, message []byte) ([]byte, error) {
|
||||
args := []string{"--clear-sign", "-u", keyId}
|
||||
outBuf, _, err := execGpgAndReadOutput(ctx, message, args)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return outBuf.Bytes(), nil
|
||||
}
|
||||
|
||||
// Verify verifies a signature
|
||||
func Verify(ctx context.Context, signature []byte) ([]byte, error) {
|
||||
args := []string{"--verify"}
|
||||
_, errBuf, err := execGpgAndReadOutput(ctx, signature, args)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return errBuf.Bytes(), nil
|
||||
}
|
||||
|
||||
func listenToOut(ctx context.Context, eg *errgroup.Group, r io.Reader) *bytes.Buffer {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
eg.Go(func() error {
|
||||
_, err := io.Copy(buf, r)
|
||||
return err
|
||||
})
|
||||
return buf
|
||||
}
|
||||
|
||||
// DecodeAllPEMBlocks decodes all PEM blocks from a byte slice.
|
||||
func DecodeAllPEMBlocks(bs []byte) ([]*pem.Block, error) {
|
||||
const beginHeaderPrefix = "BEGIN "
|
||||
const pemSeperator = "-----"
|
||||
|
||||
sections := strings.Split(string(bs), pemSeperator)
|
||||
filtered := make([]string, 0, len(sections))
|
||||
|
||||
for i, section := range sections {
|
||||
section := strings.TrimSpace(section)
|
||||
|
||||
if i == 0 || i == len(sections)-1 {
|
||||
if section == "" {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
filtered = append(filtered, section)
|
||||
}
|
||||
|
||||
pemBlocks := make([]*pem.Block, 0, len(filtered))
|
||||
for i := 0; i < len(filtered); {
|
||||
headerName := filtered[i]
|
||||
i++
|
||||
|
||||
if strings.HasPrefix(headerName, beginHeaderPrefix) {
|
||||
headerName = headerName[len(beginHeaderPrefix):]
|
||||
|
||||
body := filtered[i]
|
||||
i++
|
||||
|
||||
headers := make(map[string]string)
|
||||
lines := strings.Split(body, "\n")
|
||||
for j, line := range lines {
|
||||
trimmed := strings.TrimSpace(line)
|
||||
tokens := strings.Split(trimmed, ":")
|
||||
if len(tokens) == 2 {
|
||||
headers[strings.TrimSpace(tokens[0])] = strings.TrimSpace(tokens[1])
|
||||
} else {
|
||||
if j > 0 {
|
||||
if lines[j] == "" {
|
||||
j++
|
||||
}
|
||||
|
||||
lines = lines[j:]
|
||||
}
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
body = strings.Join(lines, "\n")
|
||||
pemBlocks = append(pemBlocks, &pem.Block{
|
||||
Type: headerName,
|
||||
Headers: headers,
|
||||
Bytes: []byte(body),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return pemBlocks, nil
|
||||
}
|
||||
|
||||
// GetBlocksOfType returns all PEM blocks of a given type.
|
||||
func GetBlocksOfType(blocks []*pem.Block, blTypeStr string) []*pem.Block {
|
||||
var ret []*pem.Block
|
||||
for _, block := range blocks {
|
||||
if block.Type == blTypeStr {
|
||||
ret = append(ret, block)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
91
go/libraries/utils/gpg/sign_test.go
Normal file
91
go/libraries/utils/gpg/sign_test.go
Normal file
@@ -0,0 +1,91 @@
|
||||
// Copyright 2024 Dolthub, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package gpg
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var keyId = "573DA8C6366D04E35CDB1A44E09A0B208F666373"
|
||||
|
||||
func signTestSetup(t *testing.T, ctx context.Context) {
|
||||
err := ImportKey(ctx, "testdata/private.pgp")
|
||||
require.NoError(t, err)
|
||||
|
||||
ok, err := HasKey(ctx, keyId)
|
||||
require.NoError(t, err)
|
||||
require.True(t, ok)
|
||||
}
|
||||
|
||||
func TestSign(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
signTestSetup(t, ctx)
|
||||
|
||||
message := []byte("I did a thing")
|
||||
signature, err := Sign(ctx, keyId, message)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, signature)
|
||||
require.NotEmpty(t, signature)
|
||||
|
||||
output, err := Verify(context.Background(), signature)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, output)
|
||||
}
|
||||
|
||||
func TestDecodeAllPemBlocks(t *testing.T) {
|
||||
pemBlock := `
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
I did a thing
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAEBCAAdFiEER5iynKkClFLRA7HjiPZM4pgm2koFAmbH0PIACgkQiPZM4pgm
|
||||
2kpiyRAAjyMs8dkydx87w2N8aM7skbOzfk7Xhg+NJYS+MVk465EHSfW5WQZmXdbu
|
||||
jupH3FPmB1UiiGTCP7Igrhl/KU9WrEXLvrYBI07aHly0bRiy6COd6E/+YIEz0uaW
|
||||
nfbcHgR9zkVxl5lj42HReGUnkbK9KYbu32AZznu8F5/qlHOA7e06ILivyKrRXkRT
|
||||
vbC/IaW0pRRJqTDylAEFEDsIYP2pFhIgIE/aEoid6Bb93yh1jmZTci6aOWd0B5o7
|
||||
hLWFJAmyFSiMAi+WrWnKAD9xeq5gGJjpyWNW7XpeIQ7E/xUeLeHvvrgnOd9O5w8n
|
||||
hFqz7IV6EMXc6dFz/sivusnb0viTUS2fsqsS2k4vA/1SyoE5ffTM/BFpWBCevAmi
|
||||
og0VVLur5OcijL+hyGXuuOVSgKkiuu6KKjg/Qer3/iJB5KYIlDoZIjSevLP2O6ZD
|
||||
FM/wBFp6aBIhh/dl/1DqW6F0HM23J5dIV5SAf7uLPHN7nKky6XcFiILRrET1uC6R
|
||||
j9KK38Dhaa4o30uf5RZsSy03hP/mUCS+U5NVREnN12Z3RETSkarfZ3wgiV2ftMup
|
||||
z22q4wvtUGB5whOZ5D3PW7df5LREGbxfKvn159a3OccEKa3UURWDF3V63apV2OMN
|
||||
YN6Sszg+o8Aw0AT4M6nrLTe3YaIE6sR4YMxOCSOPAT9oSDg1t5s=
|
||||
=fklH
|
||||
-----END PGP SIGNATURE-----`
|
||||
|
||||
pemBlocks, err := DecodeAllPEMBlocks([]byte(pemBlock))
|
||||
require.NoError(t, err)
|
||||
fmt.Println(len(pemBlocks))
|
||||
require.Len(t, pemBlocks, 2)
|
||||
require.True(t, containsBlockOfType(pemBlocks, "PGP SIGNED MESSAGE"))
|
||||
require.True(t, containsBlockOfType(pemBlocks, "PGP SIGNATURE"))
|
||||
|
||||
}
|
||||
|
||||
func containsBlockOfType(blocks []*pem.Block, blockType string) bool {
|
||||
for _, block := range blocks {
|
||||
if block.Type == blockType {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
81
go/libraries/utils/gpg/testdata/private.pgp
vendored
Normal file
81
go/libraries/utils/gpg/testdata/private.pgp
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
|
||||
lQVXBGbXZJ8BDAC13zW1ncGNBLNPOUcoSDrs++wqv4nkpxPQSOAkSljDwJlwAGeC
|
||||
UFhKRZdAxh71kw4iEeaOQISynRE6xtRvEZArVZPWBUboFaSp7vu9AYADEutYqU6G
|
||||
/47lFf3PyQNSvRcgNaLYkxKQqg+rpZQYbnUD4b4y3suYSeTvAnAXwp6EAyHc0fuC
|
||||
MmcVzRCVjkqLH0ycqAu+wbXS+5OuoJrPTOpSppX5Q89oZzt4bOBorAY1TeHi9uHZ
|
||||
8aF5LZosKetQU6bonIaMQZ10L0j99dd6+dOWysmzH7//aI3RjLwp2GnX290opP99
|
||||
L2ZrqjTKqViOS8RSfEscToEE4lYefAzoGUeFqF/+fO64tfnOMxeyUP+f2yN+UgYe
|
||||
OuYWtSKqsnVOwijH6MvrmdAP3yk1Bt3878+FRlcYctbFnAj01wu0spFs9n1Uo98x
|
||||
n7OIth+c+jfvHCwXlVq4tSq2RhP2SqN1nFfleDE69QiNL5UzhThWHMv3OrO9b+oI
|
||||
hfMQCF8d+7NWHgkAEQEAAQAL+LnGx5Y9Dvh9VKwYVhdPsOFidFs2TCTEhfi8eDiZ
|
||||
uRI8Kn+96f2zFHzJmTcRKY6wKD+lCV1FikbpKjBf6Z+K0TlysRBtU4C+mvT6qSrn
|
||||
3VtGeCCY0R4U7mITlLArJLnfbT/5id6wXMZo8JjlCeHq8pyEe0R7UHy+/psmYlni
|
||||
8wjmKjDmTYMw+RvL3KToNDzoO9nJzjWMqa5aTQCU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FSB2x7SKjw
|
||||
BNtxQE3boKI+HN8faVuOwXhoiP4aTsrI5NdDhWMvqye17qBqdk8Y0XoZ+q25NQHb
|
||||
cXicy7bhBVJGMATNnf8jbyVO5zbNwUATEYS5frY+9mx0lLYk2yIJQavdemEM4d0q
|
||||
k9h5boXVbAwcsL6MY0jlc8u9BfbA7am1X+Jxxe5scg7v7vsqmtZKzBVBxdRwoN7t
|
||||
tuG+dNCRwXPHbeCxqu4UJyDG9yXULeWi5tKHu/CmoJoom0+M4B7Ln/I=
|
||||
=WzPV
|
||||
-----END PGP PRIVATE KEY BLOCK-----
|
||||
@@ -28,6 +28,7 @@ table Commit {
|
||||
description:string (required);
|
||||
timestamp_millis:uint64;
|
||||
user_timestamp_millis:int64;
|
||||
signature:string;
|
||||
}
|
||||
|
||||
// KEEP THIS IN SYNC WITH fileidentifiers.go
|
||||
|
||||
@@ -174,6 +174,12 @@ func commit_flatbuffer(vaddr hash.Hash, opts CommitOptions, heights []uint64, pa
|
||||
nameoff := builder.CreateString(opts.Meta.Name)
|
||||
emailoff := builder.CreateString(opts.Meta.Email)
|
||||
descoff := builder.CreateString(opts.Meta.Description)
|
||||
|
||||
var sigoff flatbuffers.UOffsetT
|
||||
if len(opts.Meta.Signature) != 0 {
|
||||
sigoff = builder.CreateString(opts.Meta.Signature)
|
||||
}
|
||||
|
||||
serial.CommitStart(builder)
|
||||
serial.CommitAddRoot(builder, vaddroff)
|
||||
serial.CommitAddHeight(builder, maxheight+1)
|
||||
@@ -184,6 +190,7 @@ func commit_flatbuffer(vaddr hash.Hash, opts CommitOptions, heights []uint64, pa
|
||||
serial.CommitAddDescription(builder, descoff)
|
||||
serial.CommitAddTimestampMillis(builder, opts.Meta.Timestamp)
|
||||
serial.CommitAddUserTimestampMillis(builder, opts.Meta.UserTimestamp)
|
||||
serial.CommitAddSignature(builder, sigoff)
|
||||
|
||||
bytes := serial.FinishMessage(builder, serial.CommitEnd(builder), []byte(serial.CommitFileID))
|
||||
return bytes, maxheight + 1
|
||||
@@ -582,6 +589,7 @@ func GetCommitMeta(ctx context.Context, cv types.Value) (*CommitMeta, error) {
|
||||
ret.Description = string(cmsg.Description())
|
||||
ret.Timestamp = cmsg.TimestampMillis()
|
||||
ret.UserTimestamp = cmsg.UserTimestampMillis()
|
||||
ret.Signature = string(cmsg.Signature())
|
||||
return ret, nil
|
||||
}
|
||||
c, ok := cv.(types.Struct)
|
||||
|
||||
@@ -34,6 +34,7 @@ const (
|
||||
commitMetaTimestampKey = "timestamp"
|
||||
commitMetaUserTSKey = "user_timestamp"
|
||||
commitMetaVersionKey = "metaversion"
|
||||
commitMetaSignature = "signature"
|
||||
|
||||
commitMetaStName = "metadata"
|
||||
commitMetaVersion = "1.0"
|
||||
@@ -60,6 +61,7 @@ type CommitMeta struct {
|
||||
Timestamp uint64
|
||||
Description string
|
||||
UserTimestamp int64
|
||||
Signature string
|
||||
}
|
||||
|
||||
// NewCommitMeta creates a CommitMeta instance from a name, email, and description and uses the current time for the
|
||||
@@ -118,7 +120,7 @@ func NewCommitMetaWithUserTS(name, email, desc string, userTS time.Time) (*Commi
|
||||
committerDateMillis := uint64(CommitterDate().UnixMilli())
|
||||
authorDateMillis := userTS.UnixMilli()
|
||||
|
||||
return &CommitMeta{n, e, committerDateMillis, d, authorDateMillis}, nil
|
||||
return &CommitMeta{n, e, committerDateMillis, d, authorDateMillis, ""}, nil
|
||||
}
|
||||
|
||||
func getRequiredFromSt(st types.Struct, k string) (types.Value, error) {
|
||||
@@ -164,12 +166,21 @@ func CommitMetaFromNomsSt(st types.Struct) (*CommitMeta, error) {
|
||||
userTS = types.Int(int64(uint64(ts.(types.Uint))))
|
||||
}
|
||||
|
||||
signature, ok, err := st.MaybeGet(commitMetaSignature)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !ok {
|
||||
signature = types.String("")
|
||||
}
|
||||
|
||||
return &CommitMeta{
|
||||
string(n.(types.String)),
|
||||
string(e.(types.String)),
|
||||
uint64(ts.(types.Uint)),
|
||||
string(d.(types.String)),
|
||||
int64(userTS.(types.Int)),
|
||||
string(signature.(types.String)),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -181,6 +192,7 @@ func (cm *CommitMeta) toNomsStruct(nbf *types.NomsBinFormat) (types.Struct, erro
|
||||
commitMetaTimestampKey: types.Uint(cm.Timestamp),
|
||||
commitMetaVersionKey: types.String(commitMetaVersion),
|
||||
commitMetaUserTSKey: types.Int(cm.UserTimestamp),
|
||||
commitMetaSignature: types.String(cm.Signature),
|
||||
}
|
||||
|
||||
return types.NewStruct(nbf, commitMetaStName, metadata)
|
||||
|
||||
81
integration-tests/bats/private.pgp
Normal file
81
integration-tests/bats/private.pgp
Normal file
@@ -0,0 +1,81 @@
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
|
||||
lQVXBGbXZJ8BDAC13zW1ncGNBLNPOUcoSDrs++wqv4nkpxPQSOAkSljDwJlwAGeC
|
||||
UFhKRZdAxh71kw4iEeaOQISynRE6xtRvEZArVZPWBUboFaSp7vu9AYADEutYqU6G
|
||||
/47lFf3PyQNSvRcgNaLYkxKQqg+rpZQYbnUD4b4y3suYSeTvAnAXwp6EAyHc0fuC
|
||||
MmcVzRCVjkqLH0ycqAu+wbXS+5OuoJrPTOpSppX5Q89oZzt4bOBorAY1TeHi9uHZ
|
||||
8aF5LZosKetQU6bonIaMQZ10L0j99dd6+dOWysmzH7//aI3RjLwp2GnX290opP99
|
||||
L2ZrqjTKqViOS8RSfEscToEE4lYefAzoGUeFqF/+fO64tfnOMxeyUP+f2yN+UgYe
|
||||
OuYWtSKqsnVOwijH6MvrmdAP3yk1Bt3878+FRlcYctbFnAj01wu0spFs9n1Uo98x
|
||||
n7OIth+c+jfvHCwXlVq4tSq2RhP2SqN1nFfleDE69QiNL5UzhThWHMv3OrO9b+oI
|
||||
hfMQCF8d+7NWHgkAEQEAAQAL+LnGx5Y9Dvh9VKwYVhdPsOFidFs2TCTEhfi8eDiZ
|
||||
uRI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2h/eyaROnur0Pff3AVtfwtDjaPlv3vPBx4MS5XBMS8q2/h
|
||||
s4J1WAlQcGu0dNKCAuX2IOWa7+HAUfOWi4CTz11GMZQ95aeZoBgIqzHkX7BM0BfN
|
||||
jpKR5IH7gATNjtYAf2ld1DtSO44po/MuaR1FUUYMOkqlHN5fHGD+rYFSB2x7SKjw
|
||||
BNtxQE3boKI+HN8faVuOwXhoiP4aTsrI5NdDhWMvqye17qBqdk8Y0XoZ+q25NQHb
|
||||
cXicy7bhBVJGMATNnf8jbyVO5zbNwUATEYS5frY+9mx0lLYk2yIJQavdemEM4d0q
|
||||
k9h5boXVbAwcsL6MY0jlc8u9BfbA7am1X+Jxxe5scg7v7vsqmtZKzBVBxdRwoN7t
|
||||
tuG+dNCRwXPHbeCxqu4UJyDG9yXULeWi5tKHu/CmoJoom0+M4B7Ln/I=
|
||||
=WzPV
|
||||
-----END PGP PRIVATE KEY BLOCK-----
|
||||
144
integration-tests/bats/signed.bats
Normal file
144
integration-tests/bats/signed.bats
Normal file
@@ -0,0 +1,144 @@
|
||||
#!/usr/bin/env bats
|
||||
load $BATS_TEST_DIRNAME/helper/common.bash
|
||||
|
||||
setup() {
|
||||
setup_common
|
||||
}
|
||||
|
||||
teardown() {
|
||||
assert_feature_version
|
||||
teardown_common
|
||||
}
|
||||
|
||||
# init_gpg() {
|
||||
# # check for existence of public.gpg and private.gpg
|
||||
# run gpg --list-keys
|
||||
# echo gpg --list-keys: \"$output\"
|
||||
# if [[ "$output" =~ "573DA8C6366D04E35CDB1A44E09A0B208F666373" ]]; then
|
||||
# echo "key exists"
|
||||
# else
|
||||
# echo "importing $BATS_TEST_DIRNAME/private.pgp"
|
||||
# run gpg --import "$BATS_TEST_DIRNAME/private.pgp"
|
||||
# echo gpg --import $BATS_TEST_DIRNAME/private.pgp: \"$output\"
|
||||
# [ "$status" -eq 0 ]
|
||||
# fi
|
||||
# }
|
||||
|
||||
# @test "signed: dolt commit with key specified on command line" {
|
||||
# init_gpg
|
||||
# run dolt sql -q "CREATE TABLE t (pk INT primary key);"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt add .
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt commit -m "initial commit"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt sql -q "INSERT INTO t VALUES (1);"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt add .
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt commit -S "573DA8C6366D04E35CDB1A44E09A0B208F666373" -m "signed commit"
|
||||
# echo $output
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt log --show-signature
|
||||
# echo $output
|
||||
# [ "$status" -eq 0 ]
|
||||
# [[ "$output" =~ 'gpg: Good signature from "Test User <test@dolthub.com>"' ]] || false
|
||||
# }
|
||||
#
|
||||
# @test "signed: dolt commit with key specified in config" {
|
||||
# init_gpg
|
||||
# run dolt config --global --add sqlserver.global.signingkey "573DA8C6366D04E35CDB1A44E09A0B208F666373"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt sql -q "CREATE TABLE t (pk INT primary key);"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt add .
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt commit -m "initial commit"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt sql -q "INSERT INTO t VALUES (1);"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt add .
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt commit -S -m "signed commit"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt log --show-signature
|
||||
# [ "$status" -eq 0 ]
|
||||
# [[ "$output" =~ 'gpg: Good signature from "Test User <test@dolthub.com>"' ]] || false
|
||||
# }
|
||||
|
||||
# @test "signed: signing by default using the config" {
|
||||
# init_gpg
|
||||
# run dolt config --global --add sqlserver.global.signingkey "573DA8C6366D04E35CDB1A44E09A0B208F666373"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt config --global --add sqlserver.global.gpgsign true
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt sql -q "CREATE TABLE t (pk INT primary key);"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt add .
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt commit -m "initial commit"
|
||||
# echo $output
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt sql -q "INSERT INTO t VALUES (1);"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt add .
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt commit -m "signed commit without being specified on the command line"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt log --show-signature
|
||||
# [ "$status" -eq 0 ]
|
||||
# [[ "$output" =~ 'gpg: Good signature from "Test User <test@dolthub.com>"' ]] || false
|
||||
# }
|
||||
#
|
||||
# @test "signed: using stored procedure" {
|
||||
# init_gpg
|
||||
# run dolt config --global --add sqlserver.global.signingkey "573DA8C6366D04E35CDB1A44E09A0B208F666373"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt config --global --add sqlserver.global.gpgsign true
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt sql -q "CREATE TABLE t (pk INT primary key);"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt add .
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt commit -m "initial commit"
|
||||
# echo $output
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt sql -q "INSERT INTO t VALUES (1);"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt add .
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt sql -q "CALL dolt_commit('-m', 'signed commit');"
|
||||
# [ "$status" -eq 0 ]
|
||||
#
|
||||
# run dolt log --show-signature
|
||||
# [ "$status" -eq 0 ]
|
||||
# [[ "$output" =~ 'gpg: Good signature from "Test User <test@dolthub.com>"' ]] || false
|
||||
# }
|
||||
@@ -1,10 +1,12 @@
|
||||
module github.com/dolthub/dolt/integration-tests/go-sql-server-driver
|
||||
|
||||
go 1.22.2
|
||||
go 1.22.5
|
||||
|
||||
toolchain go1.22.7
|
||||
|
||||
require (
|
||||
github.com/dolthub/dolt/go v0.40.4
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/stretchr/testify v1.8.4
|
||||
golang.org/x/sync v0.7.0
|
||||
gopkg.in/square/go-jose.v2 v2.5.1
|
||||
|
||||
@@ -8,8 +8,8 @@ github.com/go-sql-driver/mysql v1.7.2-0.20231213112541-0004702b931d h1:QQP1nE4qh
|
||||
github.com/go-sql-driver/mysql v1.7.2-0.20231213112541-0004702b931d/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
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/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
|
||||
Reference in New Issue
Block a user