all repos

onasty @ 42ac36cd430f8bcb20a54be349a6538ecc81ebd4

a one-time notes service
21 files changed, 1313 insertions(+), 0 deletions(-)
init commit, idk why am i doing this to myself, help please

actually it is not the first time of starting this project
first iteration was just become a mess so it's new one
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-06-13 00:32:19 +0300
Authored at: 2024-06-13 00:27:23 +0300
A .env.example
···
        
        1
        +APP_ENV="debug"

      
        
        2
        +SERVER_PORT=3000

      
        
        3
        +

      
        
        4
        +LOG_LEVEL="debug"

      
        
        5
        +LOG_FORMAT="text"

      
        
        6
        +

      
        
        7
        +POSTGRES_USERNAME="onasty"

      
        
        8
        +POSTGRES_PASSWORD="qwerty"

      
        
        9
        +POSTGRES_HOST="127.0.0.1"

      
        
        10
        +POSTGRES_PORT=5432

      
        
        11
        +POSTGRES_DATABASE="onasty"

      
        
        12
        +POSTGRESQL_DSN="postgres://$POSTGRES_USERNAME:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DATABASE?sslmode=disable"

      
A .gitignore
···
        
        1
        +/.bin/

      
        
        2
        +/.docker/

      
        
        3
        +/.env*

      
        
        4
        +!/.env.example

      
A .golangci.yaml
···
        
        1
        +run:

      
        
        2
        +  timeout: 3m

      
        
        3
        +  tests: true

      
        
        4
        +

      
        
        5
        +linters:

      
        
        6
        +  # fast: true

      
        
        7
        +  disable-all: true

      
        
        8
        +  enable:

      
        
        9
        +    - errcheck # checking for unchecked errors

      
        
        10
        +    - gosimple # specializes in simplifying a code

      
        
        11
        +    - govet # reports suspicious constructs, such as Printf calls whose arguments do not align with the format string

      
        
        12
        +    - staticcheck # is a go vet on steroids, applying a ton of static analysis checks

      
        
        13
        +    - ineffassign # detects when assignments to existing variables are not used

      
        
        14
        +    - typecheck # like the front-end of a Go compiler, parses and type-checks Go code

      
        
        15
        +    - unused # checks for unused constants, variables, functions and types

      
        
        16
        +    ## disabled by default

      
        
        17
        +    - asasalint # checks for pass []any as any in variadic func(...any)

      
        
        18
        +    - asciicheck # checks that your code does not contain non-ASCII identifiers

      
        
        19
        +    - bidichk # checks for dangerous unicode character sequences

      
        
        20
        +    - bodyclose # checks whether HTTP response body is closed successfully

      
        
        21
        +    - cyclop # checks function and package cyclomatic complexity

      
        
        22
        +    - dupl # tool for code clone detection

      
        
        23
        +    - durationcheck # checks for two durations multiplied together

      
        
        24
        +    - errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error

      
        
        25
        +    - errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13

      
        
        26
        +    - exhaustive # checks exhaustiveness of enum switch statements

      
        
        27
        +    - exportloopref # checks for pointers to enclosing loop variables

      
        
        28
        +    - forbidigo # forbids identifiers

      
        
        29
        +    - funlen # tool for detection of long functions

      
        
        30
        +    - gocheckcompilerdirectives # validates go compiler directive comments (//go:)

      
        
        31
        +    - gochecknoinits # checks that no init functions are present in Go code

      
        
        32
        +    - gochecksumtype # checks exhaustiveness on Go "sum types"

      
        
        33
        +    - goconst # finds repeated strings that could be replaced by a constant

      
        
        34
        +    - gocritic # provides diagnostics that check for bugs, performance and style issues

      
        
        35
        +    - gocyclo # computes and checks the cyclomatic complexity of functions

      
        
        36
        +    - goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt

      
        
        37
        +    - gofumpt

      
        
        38
        +    - gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod

      
        
        39
        +    - goprintffuncname # checks that printf-like functions are named with f at the end

      
        
        40
        +    - gosec # inspects source code for security problems

      
        
        41
        +    - lll # reports long lines

      
        
        42
        +    - loggercheck # checks key value pairs for common logger libraries (kitlog,klog,logr,zap)

      
        
        43
        +    - makezero # finds slice declarations with non-zero initial length

      
        
        44
        +    - mirror # reports wrong mirror patterns of bytes/strings usage

      
        
        45
        +    - musttag # enforces field tags in (un)marshaled structs

      
        
        46
        +    - nakedret # finds naked returns in functions greater than a specified function length

      
        
        47
        +    - nestif # reports deeply nested if statements

      
        
        48
        +    - nilerr # finds the code that returns nil even if it checks that the error is not nil

      
        
        49
        +    - nilnil # checks that there is no simultaneous return of nil error and an invalid value

      
        
        50
        +    - noctx # finds sending http request without context.Context

      
        
        51
        +    - nolintlint # reports ill-formed or insufficient nolint directives

      
        
        52
        +    - nonamedreturns # reports all named returns

      
        
        53
        +    - nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL

      
        
        54
        +    - perfsprint # checks that fmt.Sprintf can be replaced with a faster alternative

      
        
        55
        +    - predeclared # finds code that shadows one of Go's predeclared identifiers

      
        
        56
        +    - promlinter # checks Prometheus metrics naming via promlint

      
        
        57
        +    - protogetter # reports direct reads from proto message fields when getters should be used

      
        
        58
        +    - reassign # checks that package variables are not reassigned

      
        
        59
        +    - revive # fast, configurable, extensible, flexible, and beautiful linter for Go, drop-in replacement of golint

      
        
        60
        +    - rowserrcheck # checks whether Err of rows is checked successfully

      
        
        61
        +    - sloglint # ensure consistent code style when using log/slog

      
        
        62
        +    - sqlclosecheck # checks that sql.Rows and sql.Stmt are closed

      
        
        63
        +    - stylecheck # is a replacement for golint

      
        
        64
        +    - tenv # detects using os.Setenv instead of t.Setenv since Go1.17

      
        
        65
        +    - testableexamples # checks if examples are testable (have an expected output)

      
        
        66
        +    - testifylint # checks usage of github.com/stretchr/testify

      
        
        67
        +    - tparallel # detects inappropriate usage of t.Parallel() method in your Go test codes

      
        
        68
        +    - unconvert # removes unnecessary type conversions

      
        
        69
        +    - unparam # reports unused function parameters

      
        
        70
        +    - usestdlibvars # detects the possibility to use variables/constants from the Go standard library

      
        
        71
        +    - wastedassign # finds wasted assignment statements

      
        
        72
        +    - whitespace # detects leading and trailing whitespace

      
        
        73
        +

      
        
        74
        +linters-settings:

      
        
        75
        +  cyclop:

      
        
        76
        +    # The maximal code complexity to report.

      
        
        77
        +    # Default: 10

      
        
        78
        +    max-complexity: 30

      
        
        79
        +    # The maximal average package complexity.

      
        
        80
        +    # If it's higher than 0.0 (float) the check is enabled

      
        
        81
        +    # Default: 0.0

      
        
        82
        +    package-average: 10.0

      
        
        83
        +

      
        
        84
        +  errcheck:

      
        
        85
        +    # Report about not checking of errors in type assertions: `a := b.(MyStruct)`.

      
        
        86
        +    # Such cases aren't reported by default.

      
        
        87
        +    # Default: false

      
        
        88
        +    check-type-assertions: true

      
        
        89
        +

      
        
        90
        +  funlen:

      
        
        91
        +    # Checks the number of lines in a function.

      
        
        92
        +    # If lower than 0, disable the check.

      
        
        93
        +    # Default: 60

      
        
        94
        +    lines: 100

      
        
        95
        +    # Checks the number of statements in a function.

      
        
        96
        +    # If lower than 0, disable the check.

      
        
        97
        +    # Default: 40

      
        
        98
        +    statements: 50

      
        
        99
        +    # Ignore comments when counting lines.

      
        
        100
        +    # Default false

      
        
        101
        +    ignore-comments: true

      
        
        102
        +

      
        
        103
        +  gocritic:

      
        
        104
        +    # Settings passed to gocritic.

      
        
        105
        +    # The settings key is the name of a supported gocritic checker.

      
        
        106
        +    # The list of supported checkers can be find in https://go-critic.github.io/overview.

      
        
        107
        +    settings:

      
        
        108
        +      captLocal:

      
        
        109
        +        # Whether to restrict checker to params only.

      
        
        110
        +        # Default: true

      
        
        111
        +        paramsOnly: false

      
        
        112
        +      underef:

      
        
        113
        +        # Whether to skip (*x).method() calls where x is a pointer receiver.

      
        
        114
        +        # Default: true

      
        
        115
        +        skipRecvDeref: false

      
        
        116
        +

      
        
        117
        +  govet:

      
        
        118
        +    enable-all: true

      
        
        119
        +    disable:

      
        
        120
        +      - fieldalignment # too strict

      
        
        121
        +

      
        
        122
        +  nakedret:

      
        
        123
        +    # the gods will judge me but I just don't like naked returns at all

      
        
        124
        +    max-func-lines: 0

      
        
        125
        +

      
        
        126
        +issues:

      
        
        127
        +  # Maximum count of issues with the same text.

      
        
        128
        +  # Set to 0 to disable.

      
        
        129
        +  # Default: 3

      
        
        130
        +  max-same-issues: 50

      
        
        131
        +

      
        
        132
        +  exclude-rules:

      
        
        133
        +    - source: "//noinspection"

      
        
        134
        +      linters: [ gocritic ]

      
        
        135
        +    - path: "_test\\.go"

      
        
        136
        +      linters:

      
        
        137
        +        - bodyclose

      
        
        138
        +        - dupl

      
        
        139
        +        - funlen

      
        
        140
        +        - goerr113

      
        
        141
        +        - goconst

      
        
        142
        +        - gosec

      
        
        143
        +        - noctx

      
        
        144
        +        - wrapcheck

      
        
        145
        +        - lll

      
A Taskfile.yml
···
        
        1
        +version: "3"

      
        
        2
        +

      
        
        3
        +dotenv:

      
        
        4
        +  - ".env"

      
        
        5
        +

      
        
        6
        +includes:

      
        
        7
        +  migrate: ./migrations/Taskfile.yml

      
        
        8
        +

      
        
        9
        +tasks:

      
        
        10
        +  build:

      
        
        11
        +    - go build -o .bin/onasty ./cmd/server/

      
        
        12
        +

      
        
        13
        +  run:

      
        
        14
        +    - task: build

      
        
        15
        +    - .bin/onasty

      
        
        16
        +

      
        
        17
        +  lint:

      
        
        18
        +    - golangci-lint run

      
        
        19
        +

      
        
        20
        +  docker:up:

      
        
        21
        +    - docker compose up -d

      
        
        22
        +

      
        
        23
        +  test:unit:

      
        
        24
        +    - go test -v --short ./...

      
        
        25
        +

      
        
        26
        +  test:e2e:

      
        
        27
        +    - go test -v ./e2e/

      
A cmd/server/main.go
···
        
        1
        +package main

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"context"

      
        
        5
        +	"errors"

      
        
        6
        +	"fmt"

      
        
        7
        +	"log/slog"

      
        
        8
        +	"net/http"

      
        
        9
        +	"os"

      
        
        10
        +	"os/signal"

      
        
        11
        +

      
        
        12
        +	"github.com/gin-gonic/gin"

      
        
        13
        +	"github.com/olexsmir/onasty/internal/config"

      
        
        14
        +	"github.com/olexsmir/onasty/internal/service/usersrv"

      
        
        15
        +	"github.com/olexsmir/onasty/internal/store/psql/userepo"

      
        
        16
        +	"github.com/olexsmir/onasty/internal/store/psqlutil"

      
        
        17
        +	httptransport "github.com/olexsmir/onasty/internal/transport/http"

      
        
        18
        +	"github.com/olexsmir/onasty/internal/transport/http/httpserver"

      
        
        19
        +)

      
        
        20
        +

      
        
        21
        +func main() {

      
        
        22
        +	if err := run(context.Background()); err != nil {

      
        
        23
        +		fmt.Fprintf(os.Stderr, "error: %v\n", err)

      
        
        24
        +		os.Exit(1)

      
        
        25
        +	}

      
        
        26
        +}

      
        
        27
        +

      
        
        28
        +func run(ctx context.Context) error {

      
        
        29
        +	ctx, cancel := context.WithCancel(ctx)

      
        
        30
        +	defer cancel()

      
        
        31
        +

      
        
        32
        +	cfg := config.NewConfig()

      
        
        33
        +	if err := setupLogger(cfg); err != nil {

      
        
        34
        +		return err

      
        
        35
        +	}

      
        
        36
        +

      
        
        37
        +	if !cfg.IsDevMode() {

      
        
        38
        +		gin.SetMode(gin.ReleaseMode)

      
        
        39
        +	}

      
        
        40
        +

      
        
        41
        +	psqlDB, err := psqlutil.Connect(ctx, cfg.PostgresDSN)

      
        
        42
        +	if err != nil {

      
        
        43
        +		return err

      
        
        44
        +	}

      
        
        45
        +

      
        
        46
        +	// app deps

      
        
        47
        +	userepo := userepo.New(psqlDB)

      
        
        48
        +	usersrv := usersrv.New(userepo)

      
        
        49
        +

      
        
        50
        +	handler := httptransport.NewTransport(usersrv)

      
        
        51
        +

      
        
        52
        +	// http server

      
        
        53
        +	srv := httpserver.NewServer(cfg.ServerPort, handler.Handler())

      
        
        54
        +	go func() {

      
        
        55
        +		slog.Info("starting http server", "port", cfg.ServerPort)

      
        
        56
        +		if err := srv.Start(); !errors.Is(err, http.ErrServerClosed) {

      
        
        57
        +			slog.Error("failed to start http server", "error", err)

      
        
        58
        +		}

      
        
        59
        +	}()

      
        
        60
        +

      
        
        61
        +	// graceful shutdown

      
        
        62
        +	quit := make(chan os.Signal, 1)

      
        
        63
        +	signal.Notify(quit, os.Interrupt)

      
        
        64
        +	<-quit

      
        
        65
        +

      
        
        66
        +	if err := srv.Stop(ctx); err != nil {

      
        
        67
        +		return errors.Join(errors.New("failed to stop http server"), err)

      
        
        68
        +	}

      
        
        69
        +

      
        
        70
        +	if err := psqlDB.Close(); err != nil {

      
        
        71
        +		return errors.Join(errors.New("failed to close postgres connection"), err)

      
        
        72
        +	}

      
        
        73
        +

      
        
        74
        +	return nil

      
        
        75
        +}

      
        
        76
        +

      
        
        77
        +func setupLogger(cfg *config.Config) error {

      
        
        78
        +	loggerLevels := map[string]slog.Level{

      
        
        79
        +		"info":  slog.LevelInfo,

      
        
        80
        +		"debug": slog.LevelDebug,

      
        
        81
        +		"error": slog.LevelError,

      
        
        82
        +		"warn":  slog.LevelWarn,

      
        
        83
        +	}

      
        
        84
        +

      
        
        85
        +	logLevel, ok := loggerLevels[cfg.LogLevel]

      
        
        86
        +	if !ok {

      
        
        87
        +		return errors.New("unknown log level")

      
        
        88
        +	}

      
        
        89
        +

      
        
        90
        +	var slogHandler slog.Handler

      
        
        91
        +	switch cfg.LogFormat {

      
        
        92
        +	case "json":

      
        
        93
        +		slogHandler = slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{Level: logLevel})

      
        
        94
        +	case "text":

      
        
        95
        +		slogHandler = slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: logLevel})

      
        
        96
        +	default:

      
        
        97
        +		return errors.New("unknown log format")

      
        
        98
        +	}

      
        
        99
        +

      
        
        100
        +	slog.SetDefault(slog.New(slogHandler))

      
        
        101
        +

      
        
        102
        +	return nil

      
        
        103
        +}

      
A docker-compose.yml
···
        
        1
        +services:

      
        
        2
        +  postgres:

      
        
        3
        +    image: postgres:16

      
        
        4
        +    container_name: onasty-postgres

      
        
        5
        +    environment:

      
        
        6
        +      POSTGRES_USER: onasty

      
        
        7
        +      POSTGRES_PASSWORD: qwerty

      
        
        8
        +      POSTGRES_DB: onasty

      
        
        9
        +    volumes:

      
        
        10
        +      - .docker/postgres:/var/lib/postgresql/data

      
        
        11
        +    ports:

      
        
        12
        +      - 5432:5432

      
A e2e/e2e_test.go
···
        
        1
        +package e2e

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"context"

      
        
        5
        +	"fmt"

      
        
        6
        +	"net/http"

      
        
        7
        +	"testing"

      
        
        8
        +

      
        
        9
        +	"github.com/gin-gonic/gin"

      
        
        10
        +	"github.com/golang-migrate/migrate/v4"

      
        
        11
        +	"github.com/golang-migrate/migrate/v4/database/pgx"

      
        
        12
        +	"github.com/jackc/pgx/v5/stdlib"

      
        
        13
        +	"github.com/olexsmir/onasty/internal/service/usersrv"

      
        
        14
        +	"github.com/olexsmir/onasty/internal/store/psql/userepo"

      
        
        15
        +	"github.com/olexsmir/onasty/internal/store/psqlutil"

      
        
        16
        +	httptransport "github.com/olexsmir/onasty/internal/transport/http"

      
        
        17
        +	"github.com/stretchr/testify/require"

      
        
        18
        +	"github.com/stretchr/testify/suite"

      
        
        19
        +	"github.com/testcontainers/testcontainers-go"

      
        
        20
        +	"github.com/testcontainers/testcontainers-go/modules/postgres"

      
        
        21
        +	"github.com/testcontainers/testcontainers-go/wait"

      
        
        22
        +

      
        
        23
        +	_ "github.com/golang-migrate/migrate/v4/source/file"

      
        
        24
        +)

      
        
        25
        +

      
        
        26
        +type (

      
        
        27
        +	stopDBFunc   func()

      
        
        28
        +	AppTestSuite struct {

      
        
        29
        +		suite.Suite

      
        
        30
        +

      
        
        31
        +		ctx     context.Context

      
        
        32
        +		require *require.Assertions

      
        
        33
        +

      
        
        34
        +		postgresDB   *psqlutil.DB

      
        
        35
        +		stopPostgres stopDBFunc

      
        
        36
        +

      
        
        37
        +		router http.Handler

      
        
        38
        +	}

      
        
        39
        +)

      
        
        40
        +

      
        
        41
        +func TestAppSuite(t *testing.T) {

      
        
        42
        +	if testing.Short() {

      
        
        43
        +		t.Skip()

      
        
        44
        +	}

      
        
        45
        +

      
        
        46
        +	// gin output is too verbose(and annoying) in tests

      
        
        47
        +	gin.SetMode(gin.TestMode)

      
        
        48
        +

      
        
        49
        +	suite.Run(t, new(AppTestSuite))

      
        
        50
        +}

      
        
        51
        +

      
        
        52
        +func (s *AppTestSuite) SetupSuite() {

      
        
        53
        +	s.ctx = context.Background()

      
        
        54
        +	s.require = s.Require()

      
        
        55
        +

      
        
        56
        +	db, stop, err := s.prepPostgres()

      
        
        57
        +	s.Require().NoError(err)

      
        
        58
        +

      
        
        59
        +	s.postgresDB = db

      
        
        60
        +	s.stopPostgres = stop

      
        
        61
        +

      
        
        62
        +	s.initDeps()

      
        
        63
        +}

      
        
        64
        +

      
        
        65
        +func (s *AppTestSuite) TearDownSuite() {

      
        
        66
        +	s.stopPostgres()

      
        
        67
        +}

      
        
        68
        +

      
        
        69
        +// initDeps initializes the dependencies for the app

      
        
        70
        +// and sets up the router for tests

      
        
        71
        +func (s *AppTestSuite) initDeps() {

      
        
        72
        +	userepo := userepo.New(s.postgresDB)

      
        
        73
        +	usersrv := usersrv.New(userepo)

      
        
        74
        +

      
        
        75
        +	handler := httptransport.NewTransport(usersrv)

      
        
        76
        +	s.router = handler.Handler()

      
        
        77
        +}

      
        
        78
        +

      
        
        79
        +func (s *AppTestSuite) prepPostgres() (*psqlutil.DB, stopDBFunc, error) {

      
        
        80
        +	dbCredential := "testing"

      
        
        81
        +	postgresContainer, err := postgres.RunContainer(

      
        
        82
        +		s.ctx,

      
        
        83
        +		testcontainers.WithImage("postgres:16-alpine"),

      
        
        84
        +		postgres.WithUsername(dbCredential),

      
        
        85
        +		postgres.WithPassword(dbCredential),

      
        
        86
        +		postgres.WithDatabase(dbCredential),

      
        
        87
        +		testcontainers.WithWaitStrategy(

      
        
        88
        +			wait.ForListeningPort("5432/tcp")),

      
        
        89
        +	)

      
        
        90
        +	s.require.NoError(err)

      
        
        91
        +

      
        
        92
        +	stop := func() {

      
        
        93
        +		err = postgresContainer.Terminate(s.ctx)

      
        
        94
        +		s.require.NoError(err)

      
        
        95
        +	}

      
        
        96
        +

      
        
        97
        +	// connect to the db

      
        
        98
        +	host, err := postgresContainer.Host(s.ctx)

      
        
        99
        +	s.require.NoError(err)

      
        
        100
        +

      
        
        101
        +	port, err := postgresContainer.MappedPort(s.ctx, "5432/tcp")

      
        
        102
        +	s.require.NoError(err)

      
        
        103
        +

      
        
        104
        +	db, err := psqlutil.Connect(

      
        
        105
        +		s.ctx,

      
        
        106
        +		fmt.Sprintf( //nolint:nosprintfhostport

      
        
        107
        +			"postgres://%s:%s@%s:%s/%s",

      
        
        108
        +			dbCredential,

      
        
        109
        +			dbCredential,

      
        
        110
        +			host,

      
        
        111
        +			port,

      
        
        112
        +			dbCredential,

      
        
        113
        +		),

      
        
        114
        +	)

      
        
        115
        +	s.require.NoError(err)

      
        
        116
        +

      
        
        117
        +	// run migrations

      
        
        118
        +	sdb := stdlib.OpenDBFromPool(db.Pool)

      
        
        119
        +	driver, err := pgx.WithInstance(sdb, &pgx.Config{})

      
        
        120
        +	s.require.NoError(err)

      
        
        121
        +

      
        
        122
        +	m, err := migrate.NewWithDatabaseInstance(

      
        
        123
        +		"file://../migrations/",

      
        
        124
        +		"pgxv5", driver,

      
        
        125
        +	)

      
        
        126
        +	s.require.NoError(err)

      
        
        127
        +

      
        
        128
        +	err = m.Up()

      
        
        129
        +	s.require.NoError(err)

      
        
        130
        +

      
        
        131
        +	return db, stop, driver.Close()

      
        
        132
        +}

      
A go.mod
···
        
        1
        +module github.com/olexsmir/onasty

      
        
        2
        +

      
        
        3
        +go 1.22.3

      
        
        4
        +

      
        
        5
        +require (

      
        
        6
        +	github.com/gin-gonic/gin v1.10.0

      
        
        7
        +	github.com/gofrs/uuid/v5 v5.0.0

      
        
        8
        +	github.com/golang-migrate/migrate/v4 v4.17.1

      
        
        9
        +	github.com/jackc/pgx-gofrs-uuid v0.0.0-20230224015001-1d428863c2e2

      
        
        10
        +	github.com/jackc/pgx/v5 v5.6.0

      
        
        11
        +	github.com/stretchr/testify v1.9.0

      
        
        12
        +	github.com/testcontainers/testcontainers-go v0.31.0

      
        
        13
        +	github.com/testcontainers/testcontainers-go/modules/postgres v0.31.0

      
        
        14
        +)

      
        
        15
        +

      
        
        16
        +require (

      
        
        17
        +	dario.cat/mergo v1.0.0 // indirect

      
        
        18
        +	github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect

      
        
        19
        +	github.com/Microsoft/go-winio v0.6.1 // indirect

      
        
        20
        +	github.com/Microsoft/hcsshim v0.11.4 // indirect

      
        
        21
        +	github.com/bytedance/sonic v1.11.6 // indirect

      
        
        22
        +	github.com/bytedance/sonic/loader v0.1.1 // indirect

      
        
        23
        +	github.com/cenkalti/backoff/v4 v4.2.1 // indirect

      
        
        24
        +	github.com/cloudwego/base64x v0.1.4 // indirect

      
        
        25
        +	github.com/cloudwego/iasm v0.2.0 // indirect

      
        
        26
        +	github.com/containerd/containerd v1.7.15 // indirect

      
        
        27
        +	github.com/containerd/log v0.1.0 // indirect

      
        
        28
        +	github.com/cpuguy83/dockercfg v0.3.1 // indirect

      
        
        29
        +	github.com/davecgh/go-spew v1.1.1 // indirect

      
        
        30
        +	github.com/distribution/reference v0.5.0 // indirect

      
        
        31
        +	github.com/docker/docker v25.0.5+incompatible // indirect

      
        
        32
        +	github.com/docker/go-connections v0.5.0 // indirect

      
        
        33
        +	github.com/docker/go-units v0.5.0 // indirect

      
        
        34
        +	github.com/felixge/httpsnoop v1.0.4 // indirect

      
        
        35
        +	github.com/gabriel-vasile/mimetype v1.4.3 // indirect

      
        
        36
        +	github.com/gin-contrib/sse v0.1.0 // indirect

      
        
        37
        +	github.com/go-logr/logr v1.4.1 // indirect

      
        
        38
        +	github.com/go-logr/stdr v1.2.2 // indirect

      
        
        39
        +	github.com/go-ole/go-ole v1.2.6 // indirect

      
        
        40
        +	github.com/go-playground/locales v0.14.1 // indirect

      
        
        41
        +	github.com/go-playground/universal-translator v0.18.1 // indirect

      
        
        42
        +	github.com/go-playground/validator/v10 v10.20.0 // indirect

      
        
        43
        +	github.com/goccy/go-json v0.10.2 // indirect

      
        
        44
        +	github.com/gogo/protobuf v1.3.2 // indirect

      
        
        45
        +	github.com/golang/protobuf v1.5.4 // indirect

      
        
        46
        +	github.com/google/uuid v1.6.0 // indirect

      
        
        47
        +	github.com/hashicorp/errwrap v1.1.0 // indirect

      
        
        48
        +	github.com/hashicorp/go-multierror v1.1.1 // indirect

      
        
        49
        +	github.com/jackc/chunkreader/v2 v2.0.1 // indirect

      
        
        50
        +	github.com/jackc/pgconn v1.14.3 // indirect

      
        
        51
        +	github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa // indirect

      
        
        52
        +	github.com/jackc/pgio v1.0.0 // indirect

      
        
        53
        +	github.com/jackc/pgpassfile v1.0.0 // indirect

      
        
        54
        +	github.com/jackc/pgproto3/v2 v2.3.3 // indirect

      
        
        55
        +	github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect

      
        
        56
        +	github.com/jackc/pgtype v1.14.0 // indirect

      
        
        57
        +	github.com/jackc/pgx/v4 v4.18.2 // indirect

      
        
        58
        +	github.com/jackc/puddle/v2 v2.2.1 // indirect

      
        
        59
        +	github.com/json-iterator/go v1.1.12 // indirect

      
        
        60
        +	github.com/klauspost/compress v1.16.0 // indirect

      
        
        61
        +	github.com/klauspost/cpuid/v2 v2.2.7 // indirect

      
        
        62
        +	github.com/leodido/go-urn v1.4.0 // indirect

      
        
        63
        +	github.com/lib/pq v1.10.9 // indirect

      
        
        64
        +	github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect

      
        
        65
        +	github.com/magiconair/properties v1.8.7 // indirect

      
        
        66
        +	github.com/mattn/go-isatty v0.0.20 // indirect

      
        
        67
        +	github.com/moby/patternmatcher v0.6.0 // indirect

      
        
        68
        +	github.com/moby/sys/sequential v0.5.0 // indirect

      
        
        69
        +	github.com/moby/sys/user v0.1.0 // indirect

      
        
        70
        +	github.com/moby/term v0.5.0 // indirect

      
        
        71
        +	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect

      
        
        72
        +	github.com/modern-go/reflect2 v1.0.2 // indirect

      
        
        73
        +	github.com/morikuni/aec v1.0.0 // indirect

      
        
        74
        +	github.com/opencontainers/go-digest v1.0.0 // indirect

      
        
        75
        +	github.com/opencontainers/image-spec v1.1.0 // indirect

      
        
        76
        +	github.com/pelletier/go-toml/v2 v2.2.2 // indirect

      
        
        77
        +	github.com/pkg/errors v0.9.1 // indirect

      
        
        78
        +	github.com/pmezard/go-difflib v1.0.0 // indirect

      
        
        79
        +	github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect

      
        
        80
        +	github.com/rogpeppe/go-internal v1.12.0 // indirect

      
        
        81
        +	github.com/shirou/gopsutil/v3 v3.23.12 // indirect

      
        
        82
        +	github.com/shoenig/go-m1cpu v0.1.6 // indirect

      
        
        83
        +	github.com/sirupsen/logrus v1.9.3 // indirect

      
        
        84
        +	github.com/tklauser/go-sysconf v0.3.12 // indirect

      
        
        85
        +	github.com/tklauser/numcpus v0.6.1 // indirect

      
        
        86
        +	github.com/twitchyliquid64/golang-asm v0.15.1 // indirect

      
        
        87
        +	github.com/ugorji/go/codec v1.2.12 // indirect

      
        
        88
        +	github.com/yusufpapurcu/wmi v1.2.3 // indirect

      
        
        89
        +	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect

      
        
        90
        +	go.opentelemetry.io/otel v1.24.0 // indirect

      
        
        91
        +	go.opentelemetry.io/otel/metric v1.24.0 // indirect

      
        
        92
        +	go.opentelemetry.io/otel/trace v1.24.0 // indirect

      
        
        93
        +	go.uber.org/atomic v1.7.0 // indirect

      
        
        94
        +	golang.org/x/arch v0.8.0 // indirect

      
        
        95
        +	golang.org/x/crypto v0.23.0 // indirect

      
        
        96
        +	golang.org/x/mod v0.16.0 // indirect

      
        
        97
        +	golang.org/x/net v0.25.0 // indirect

      
        
        98
        +	golang.org/x/sync v0.5.0 // indirect

      
        
        99
        +	golang.org/x/sys v0.20.0 // indirect

      
        
        100
        +	golang.org/x/text v0.15.0 // indirect

      
        
        101
        +	golang.org/x/time v0.5.0 // indirect

      
        
        102
        +	golang.org/x/tools v0.13.0 // indirect

      
        
        103
        +	google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect

      
        
        104
        +	google.golang.org/grpc v1.59.0 // indirect

      
        
        105
        +	google.golang.org/protobuf v1.34.1 // indirect

      
        
        106
        +	gopkg.in/yaml.v3 v3.0.1 // indirect

      
        
        107
        +)

      
A go.sum
···
        
        1
        +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=

      
        
        2
        +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=

      
        
        3
        +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU=

      
        
        4
        +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=

      
        
        5
        +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=

      
        
        6
        +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=

      
        
        7
        +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=

      
        
        8
        +github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=

      
        
        9
        +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=

      
        
        10
        +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=

      
        
        11
        +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=

      
        
        12
        +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=

      
        
        13
        +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w=

      
        
        14
        +github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=

      
        
        15
        +github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=

      
        
        16
        +github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=

      
        
        17
        +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=

      
        
        18
        +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=

      
        
        19
        +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=

      
        
        20
        +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=

      
        
        21
        +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=

      
        
        22
        +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=

      
        
        23
        +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=

      
        
        24
        +github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=

      
        
        25
        +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=

      
        
        26
        +github.com/containerd/containerd v1.7.15 h1:afEHXdil9iAm03BmhjzKyXnnEBtjaLJefdU7DV0IFes=

      
        
        27
        +github.com/containerd/containerd v1.7.15/go.mod h1:ISzRRTMF8EXNpJlTzyr2XMhN+j9K302C21/+cr3kUnY=

      
        
        28
        +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=

      
        
        29
        +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=

      
        
        30
        +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=

      
        
        31
        +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=

      
        
        32
        +github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E=

      
        
        33
        +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=

      
        
        34
        +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=

      
        
        35
        +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=

      
        
        36
        +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=

      
        
        37
        +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

      
        
        38
        +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

      
        
        39
        +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

      
        
        40
        +github.com/dhui/dktest v0.4.1 h1:/w+IWuDXVymg3IrRJCHHOkMK10m9aNVMOyD0X12YVTg=

      
        
        41
        +github.com/dhui/dktest v0.4.1/go.mod h1:DdOqcUpL7vgyP4GlF3X3w7HbSlz8cEQzwewPveYEQbA=

      
        
        42
        +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=

      
        
        43
        +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=

      
        
        44
        +github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=

      
        
        45
        +github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=

      
        
        46
        +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=

      
        
        47
        +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=

      
        
        48
        +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=

      
        
        49
        +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=

      
        
        50
        +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=

      
        
        51
        +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=

      
        
        52
        +github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=

      
        
        53
        +github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=

      
        
        54
        +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=

      
        
        55
        +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=

      
        
        56
        +github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=

      
        
        57
        +github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=

      
        
        58
        +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=

      
        
        59
        +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=

      
        
        60
        +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=

      
        
        61
        +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=

      
        
        62
        +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=

      
        
        63
        +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=

      
        
        64
        +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=

      
        
        65
        +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=

      
        
        66
        +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=

      
        
        67
        +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=

      
        
        68
        +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=

      
        
        69
        +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=

      
        
        70
        +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=

      
        
        71
        +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=

      
        
        72
        +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=

      
        
        73
        +github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=

      
        
        74
        +github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=

      
        
        75
        +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=

      
        
        76
        +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=

      
        
        77
        +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=

      
        
        78
        +github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=

      
        
        79
        +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=

      
        
        80
        +github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M=

      
        
        81
        +github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=

      
        
        82
        +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=

      
        
        83
        +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=

      
        
        84
        +github.com/golang-migrate/migrate/v4 v4.17.1 h1:4zQ6iqL6t6AiItphxJctQb3cFqWiSpMnX7wLTPnnYO4=

      
        
        85
        +github.com/golang-migrate/migrate/v4 v4.17.1/go.mod h1:m8hinFyWBn0SA4QKHuKh175Pm9wjmxj3S2Mia7dbXzM=

      
        
        86
        +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=

      
        
        87
        +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=

      
        
        88
        +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=

      
        
        89
        +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=

      
        
        90
        +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=

      
        
        91
        +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=

      
        
        92
        +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=

      
        
        93
        +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=

      
        
        94
        +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=

      
        
        95
        +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=

      
        
        96
        +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=

      
        
        97
        +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=

      
        
        98
        +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=

      
        
        99
        +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I=

      
        
        100
        +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=

      
        
        101
        +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=

      
        
        102
        +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=

      
        
        103
        +github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=

      
        
        104
        +github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=

      
        
        105
        +github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=

      
        
        106
        +github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=

      
        
        107
        +github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=

      
        
        108
        +github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=

      
        
        109
        +github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=

      
        
        110
        +github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=

      
        
        111
        +github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=

      
        
        112
        +github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=

      
        
        113
        +github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w=

      
        
        114
        +github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM=

      
        
        115
        +github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa h1:s+4MhCQ6YrzisK6hFJUX53drDT4UsSW3DEhKn0ifuHw=

      
        
        116
        +github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds=

      
        
        117
        +github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=

      
        
        118
        +github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=

      
        
        119
        +github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=

      
        
        120
        +github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=

      
        
        121
        +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=

      
        
        122
        +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=

      
        
        123
        +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=

      
        
        124
        +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=

      
        
        125
        +github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=

      
        
        126
        +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=

      
        
        127
        +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=

      
        
        128
        +github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=

      
        
        129
        +github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=

      
        
        130
        +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=

      
        
        131
        +github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=

      
        
        132
        +github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag=

      
        
        133
        +github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=

      
        
        134
        +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=

      
        
        135
        +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=

      
        
        136
        +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=

      
        
        137
        +github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=

      
        
        138
        +github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=

      
        
        139
        +github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=

      
        
        140
        +github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=

      
        
        141
        +github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw=

      
        
        142
        +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=

      
        
        143
        +github.com/jackc/pgx-gofrs-uuid v0.0.0-20230224015001-1d428863c2e2 h1:QWdhlQz98hUe1xmjADOl2mr8ERLrOqj0KWLdkrnNsRQ=

      
        
        144
        +github.com/jackc/pgx-gofrs-uuid v0.0.0-20230224015001-1d428863c2e2/go.mod h1:Ti7pyNDU/UpXKmBTeFgxTvzYDM9xHLiYKMsLdt4b9cg=

      
        
        145
        +github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=

      
        
        146
        +github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=

      
        
        147
        +github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=

      
        
        148
        +github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=

      
        
        149
        +github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU=

      
        
        150
        +github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=

      
        
        151
        +github.com/jackc/pgx/v5 v5.6.0 h1:SWJzexBzPL5jb0GEsrPMLIsi/3jOo7RHlzTjcAeDrPY=

      
        
        152
        +github.com/jackc/pgx/v5 v5.6.0/go.mod h1:DNZ/vlrUnhWCoFGxHAG8U2ljioxukquj7utPDgtQdTw=

      
        
        153
        +github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=

      
        
        154
        +github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=

      
        
        155
        +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=

      
        
        156
        +github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=

      
        
        157
        +github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=

      
        
        158
        +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=

      
        
        159
        +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=

      
        
        160
        +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=

      
        
        161
        +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=

      
        
        162
        +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4=

      
        
        163
        +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=

      
        
        164
        +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=

      
        
        165
        +github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=

      
        
        166
        +github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=

      
        
        167
        +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=

      
        
        168
        +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=

      
        
        169
        +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=

      
        
        170
        +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=

      
        
        171
        +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=

      
        
        172
        +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=

      
        
        173
        +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=

      
        
        174
        +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=

      
        
        175
        +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=

      
        
        176
        +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=

      
        
        177
        +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=

      
        
        178
        +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=

      
        
        179
        +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=

      
        
        180
        +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=

      
        
        181
        +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=

      
        
        182
        +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=

      
        
        183
        +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=

      
        
        184
        +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=

      
        
        185
        +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=

      
        
        186
        +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=

      
        
        187
        +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=

      
        
        188
        +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=

      
        
        189
        +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=

      
        
        190
        +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=

      
        
        191
        +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=

      
        
        192
        +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=

      
        
        193
        +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=

      
        
        194
        +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=

      
        
        195
        +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=

      
        
        196
        +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=

      
        
        197
        +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=

      
        
        198
        +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=

      
        
        199
        +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc=

      
        
        200
        +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo=

      
        
        201
        +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg=

      
        
        202
        +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU=

      
        
        203
        +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=

      
        
        204
        +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=

      
        
        205
        +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=

      
        
        206
        +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=

      
        
        207
        +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=

      
        
        208
        +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=

      
        
        209
        +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=

      
        
        210
        +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=

      
        
        211
        +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=

      
        
        212
        +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=

      
        
        213
        +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=

      
        
        214
        +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=

      
        
        215
        +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=

      
        
        216
        +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=

      
        
        217
        +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=

      
        
        218
        +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

      
        
        219
        +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=

      
        
        220
        +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

      
        
        221
        +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

      
        
        222
        +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=

      
        
        223
        +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=

      
        
        224
        +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=

      
        
        225
        +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=

      
        
        226
        +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=

      
        
        227
        +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=

      
        
        228
        +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=

      
        
        229
        +github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=

      
        
        230
        +github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=

      
        
        231
        +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=

      
        
        232
        +github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4=

      
        
        233
        +github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM=

      
        
        234
        +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=

      
        
        235
        +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ=

      
        
        236
        +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU=

      
        
        237
        +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k=

      
        
        238
        +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=

      
        
        239
        +github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=

      
        
        240
        +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=

      
        
        241
        +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=

      
        
        242
        +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=

      
        
        243
        +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=

      
        
        244
        +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=

      
        
        245
        +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

      
        
        246
        +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=

      
        
        247
        +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=

      
        
        248
        +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=

      
        
        249
        +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=

      
        
        250
        +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=

      
        
        251
        +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=

      
        
        252
        +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

      
        
        253
        +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=

      
        
        254
        +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=

      
        
        255
        +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=

      
        
        256
        +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=

      
        
        257
        +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=

      
        
        258
        +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=

      
        
        259
        +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=

      
        
        260
        +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=

      
        
        261
        +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=

      
        
        262
        +github.com/testcontainers/testcontainers-go v0.31.0 h1:W0VwIhcEVhRflwL9as3dhY6jXjVCA27AkmbnZ+UTh3U=

      
        
        263
        +github.com/testcontainers/testcontainers-go v0.31.0/go.mod h1:D2lAoA0zUFiSY+eAflqK5mcUx/A5hrrORaEQrd0SefI=

      
        
        264
        +github.com/testcontainers/testcontainers-go/modules/postgres v0.31.0 h1:isAwFS3KNKRbJMbWv+wolWqOFUECmjYZ+sIRZCIBc/E=

      
        
        265
        +github.com/testcontainers/testcontainers-go/modules/postgres v0.31.0/go.mod h1:ZNYY8vumNCEG9YI59A9d6/YaMY49uwRhmeU563EzFGw=

      
        
        266
        +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=

      
        
        267
        +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=

      
        
        268
        +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=

      
        
        269
        +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=

      
        
        270
        +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=

      
        
        271
        +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=

      
        
        272
        +github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=

      
        
        273
        +github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=

      
        
        274
        +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

      
        
        275
        +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

      
        
        276
        +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=

      
        
        277
        +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=

      
        
        278
        +github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=

      
        
        279
        +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk=

      
        
        280
        +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw=

      
        
        281
        +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=

      
        
        282
        +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=

      
        
        283
        +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U=

      
        
        284
        +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE=

      
        
        285
        +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg=

      
        
        286
        +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU=

      
        
        287
        +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=

      
        
        288
        +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco=

      
        
        289
        +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o=

      
        
        290
        +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A=

      
        
        291
        +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI=

      
        
        292
        +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU=

      
        
        293
        +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=

      
        
        294
        +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=

      
        
        295
        +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=

      
        
        296
        +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=

      
        
        297
        +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=

      
        
        298
        +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=

      
        
        299
        +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=

      
        
        300
        +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=

      
        
        301
        +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=

      
        
        302
        +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=

      
        
        303
        +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=

      
        
        304
        +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=

      
        
        305
        +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=

      
        
        306
        +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=

      
        
        307
        +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=

      
        
        308
        +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=

      
        
        309
        +golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=

      
        
        310
        +golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=

      
        
        311
        +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=

      
        
        312
        +golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=

      
        
        313
        +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=

      
        
        314
        +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=

      
        
        315
        +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=

      
        
        316
        +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=

      
        
        317
        +golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=

      
        
        318
        +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=

      
        
        319
        +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=

      
        
        320
        +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=

      
        
        321
        +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=

      
        
        322
        +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=

      
        
        323
        +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=

      
        
        324
        +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=

      
        
        325
        +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=

      
        
        326
        +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=

      
        
        327
        +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=

      
        
        328
        +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=

      
        
        329
        +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=

      
        
        330
        +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=

      
        
        331
        +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=

      
        
        332
        +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=

      
        
        333
        +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=

      
        
        334
        +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=

      
        
        335
        +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=

      
        
        336
        +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=

      
        
        337
        +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=

      
        
        338
        +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

      
        
        339
        +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

      
        
        340
        +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

      
        
        341
        +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=

      
        
        342
        +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=

      
        
        343
        +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

      
        
        344
        +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

      
        
        345
        +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=

      
        
        346
        +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        347
        +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        348
        +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        349
        +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        350
        +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        351
        +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        352
        +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        353
        +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        354
        +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        355
        +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        356
        +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

      
        
        357
        +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

      
        
        358
        +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

      
        
        359
        +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

      
        
        360
        +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

      
        
        361
        +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

      
        
        362
        +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

      
        
        363
        +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

      
        
        364
        +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

      
        
        365
        +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=

      
        
        366
        +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

      
        
        367
        +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=

      
        
        368
        +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=

      
        
        369
        +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=

      
        
        370
        +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=

      
        
        371
        +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

      
        
        372
        +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=

      
        
        373
        +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=

      
        
        374
        +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=

      
        
        375
        +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=

      
        
        376
        +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=

      
        
        377
        +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=

      
        
        378
        +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=

      
        
        379
        +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=

      
        
        380
        +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

      
        
        381
        +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=

      
        
        382
        +golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=

      
        
        383
        +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=

      
        
        384
        +golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=

      
        
        385
        +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=

      
        
        386
        +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=

      
        
        387
        +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=

      
        
        388
        +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=

      
        
        389
        +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=

      
        
        390
        +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=

      
        
        391
        +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=

      
        
        392
        +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=

      
        
        393
        +golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

      
        
        394
        +golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

      
        
        395
        +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

      
        
        396
        +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

      
        
        397
        +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

      
        
        398
        +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

      
        
        399
        +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA=

      
        
        400
        +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k=

      
        
        401
        +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870=

      
        
        402
        +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik=

      
        
        403
        +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE=

      
        
        404
        +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=

      
        
        405
        +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=

      
        
        406
        +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=

      
        
        407
        +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=

      
        
        408
        +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

      
        
        409
        +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

      
        
        410
        +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=

      
        
        411
        +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

      
        
        412
        +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=

      
        
        413
        +gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=

      
        
        414
        +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

      
        
        415
        +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

      
        
        416
        +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

      
        
        417
        +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

      
        
        418
        +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY=

      
        
        419
        +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=

      
        
        420
        +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=

      
        
        421
        +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=

      
        
        422
        +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=

      
A internal/config/config.go
···
        
        1
        +package config

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"os"

      
        
        5
        +)

      
        
        6
        +

      
        
        7
        +type Config struct {

      
        
        8
        +	AppEnv     string

      
        
        9
        +	ServerPort string

      
        
        10
        +

      
        
        11
        +	LogLevel  string

      
        
        12
        +	LogFormat string

      
        
        13
        +

      
        
        14
        +	PostgresDSN string

      
        
        15
        +}

      
        
        16
        +

      
        
        17
        +func NewConfig() *Config {

      
        
        18
        +	return &Config{

      
        
        19
        +		AppEnv:      getenvOrDefault("APP_ENV", "debug"),

      
        
        20
        +		ServerPort:  getenvOrDefault("SERVER_PORT", "3000"),

      
        
        21
        +		LogLevel:    getenvOrDefault("LOG_LEVEL", "debug"),

      
        
        22
        +		LogFormat:   getenvOrDefault("LOG_FORMAT", "json"),

      
        
        23
        +		PostgresDSN: getenvOrDefault("POSTGRESQL_DSN", ""),

      
        
        24
        +	}

      
        
        25
        +}

      
        
        26
        +

      
        
        27
        +func (c *Config) IsDevMode() bool {

      
        
        28
        +	return c.AppEnv == "debug" || c.AppEnv == "test"

      
        
        29
        +}

      
        
        30
        +

      
        
        31
        +func getenvOrDefault(key, def string) string {

      
        
        32
        +	if v, ok := os.LookupEnv(key); ok {

      
        
        33
        +		return v

      
        
        34
        +	}

      
        
        35
        +	return def

      
        
        36
        +}

      
A internal/service/usersrv/usersrv.go
···
        
        1
        +package usersrv

      
        
        2
        +

      
        
        3
        +import "github.com/olexsmir/onasty/internal/store/psql/userepo"

      
        
        4
        +

      
        
        5
        +type UserServicer interface {

      
        
        6
        +	SignUp() error

      
        
        7
        +}

      
        
        8
        +

      
        
        9
        +type UserSrv struct {

      
        
        10
        +	store userepo.UserStorer

      
        
        11
        +}

      
        
        12
        +

      
        
        13
        +func New(store userepo.UserStorer) UserServicer {

      
        
        14
        +	return &UserSrv{

      
        
        15
        +		store: store,

      
        
        16
        +	}

      
        
        17
        +}

      
        
        18
        +

      
        
        19
        +// type SignUp

      
        
        20
        +func (s *UserSrv) SignUp() error {

      
        
        21
        +	return nil

      
        
        22
        +}

      
A internal/store/psql/userepo/userepo.go
···
        
        1
        +package userepo

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"github.com/gofrs/uuid/v5"

      
        
        5
        +	"github.com/olexsmir/onasty/internal/store/psqlutil"

      
        
        6
        +)

      
        
        7
        +

      
        
        8
        +type UserStorer interface {

      
        
        9
        +	SignUp(inp SignUpInput) (uuid.UUID, error)

      
        
        10
        +}

      
        
        11
        +

      
        
        12
        +type UserRepo struct {

      
        
        13
        +	db *psqlutil.DB

      
        
        14
        +}

      
        
        15
        +

      
        
        16
        +func New(db *psqlutil.DB) UserStorer {

      
        
        17
        +	return &UserRepo{

      
        
        18
        +		db: db,

      
        
        19
        +	}

      
        
        20
        +}

      
        
        21
        +

      
        
        22
        +type SignUpInput struct{}

      
        
        23
        +

      
        
        24
        +func (r *UserRepo) SignUp(_ SignUpInput) (uuid.UUID, error) {

      
        
        25
        +	return uuid.UUID{}, nil

      
        
        26
        +}

      
A internal/store/psqlutil/psqlutil.go
···
        
        1
        +package psqlutil

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"context"

      
        
        5
        +

      
        
        6
        +	pgxuuid "github.com/jackc/pgx-gofrs-uuid"

      
        
        7
        +	"github.com/jackc/pgx/v5"

      
        
        8
        +	"github.com/jackc/pgx/v5/pgxpool"

      
        
        9
        +)

      
        
        10
        +

      
        
        11
        +type DB struct{ *pgxpool.Pool }

      
        
        12
        +

      
        
        13
        +func Connect(ctx context.Context, dsn string) (*DB, error) {

      
        
        14
        +	dbConf, err := pgxpool.ParseConfig(dsn)

      
        
        15
        +	if err != nil {

      
        
        16
        +		return nil, err

      
        
        17
        +	}

      
        
        18
        +

      
        
        19
        +	dbConf.AfterConnect = func(_ context.Context, c *pgx.Conn) error {

      
        
        20
        +		pgxuuid.Register(c.TypeMap())

      
        
        21
        +		return nil

      
        
        22
        +	}

      
        
        23
        +

      
        
        24
        +	db, err := pgxpool.NewWithConfig(ctx, dbConf)

      
        
        25
        +	if err != nil {

      
        
        26
        +		return nil, err

      
        
        27
        +	}

      
        
        28
        +

      
        
        29
        +	if err := db.Ping(ctx); err != nil {

      
        
        30
        +		return nil, err

      
        
        31
        +	}

      
        
        32
        +

      
        
        33
        +	return &DB{

      
        
        34
        +		Pool: db,

      
        
        35
        +	}, nil

      
        
        36
        +}

      
        
        37
        +

      
        
        38
        +func (db *DB) Close() error {

      
        
        39
        +	db.Pool.Close()

      
        
        40
        +	return nil

      
        
        41
        +}

      
A internal/transport/http/apiv1/apiv1.go
···
        
        1
        +package apiv1

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"github.com/gin-gonic/gin"

      
        
        5
        +	"github.com/olexsmir/onasty/internal/service/usersrv"

      
        
        6
        +)

      
        
        7
        +

      
        
        8
        +type APIV1 struct {

      
        
        9
        +	userSrv usersrv.UserServicer

      
        
        10
        +}

      
        
        11
        +

      
        
        12
        +func NewAPIV1(us usersrv.UserServicer) *APIV1 {

      
        
        13
        +	return &APIV1{

      
        
        14
        +		userSrv: us,

      
        
        15
        +	}

      
        
        16
        +}

      
        
        17
        +

      
        
        18
        +func (a *APIV1) Routes(r *gin.RouterGroup) {

      
        
        19
        +	auth := r.Group("/auth")

      
        
        20
        +	{

      
        
        21
        +		auth.POST("/signup", a.signUpHandler)

      
        
        22
        +		auth.POST("/signin", a.signInHandler)

      
        
        23
        +		auth.POST("/refresh-tokens", a.refreshTokensHandler)

      
        
        24
        +

      
        
        25
        +		authorized := auth.Group("/", a.authorizedMiddleware)

      
        
        26
        +		{

      
        
        27
        +			authorized.POST("/logout", a.logOutHandler)

      
        
        28
        +		}

      
        
        29
        +	}

      
        
        30
        +}

      
A internal/transport/http/apiv1/auth.go
···
        
        1
        +package apiv1

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"net/http"

      
        
        5
        +

      
        
        6
        +	"github.com/gin-gonic/gin"

      
        
        7
        +)

      
        
        8
        +

      
        
        9
        +type signUpRequest struct {

      
        
        10
        +	Email    string `json:"email"`

      
        
        11
        +	Password string `json:"password"`

      
        
        12
        +}

      
        
        13
        +

      
        
        14
        +func (a *APIV1) signUpHandler(c *gin.Context) {

      
        
        15
        +	var req signUpRequest

      
        
        16
        +	if err := c.ShouldBindJSON(&req); err != nil {

      
        
        17
        +		newError(c, http.StatusBadRequest, "invalid request")

      
        
        18
        +		return

      
        
        19
        +	}

      
        
        20
        +}

      
        
        21
        +

      
        
        22
        +func (a *APIV1) signInHandler(_ *gin.Context) {}

      
        
        23
        +

      
        
        24
        +func (a *APIV1) refreshTokensHandler(_ *gin.Context) {}

      
        
        25
        +

      
        
        26
        +func (a *APIV1) logOutHandler(_ *gin.Context) {}

      
A internal/transport/http/apiv1/middleware.go
···
        
        1
        +package apiv1

      
        
        2
        +

      
        
        3
        +import "github.com/gin-gonic/gin"

      
        
        4
        +

      
        
        5
        +func (a *APIV1) authorizedMiddleware(_ *gin.Context) {}

      
        
        6
        +

      
        
        7
        +func (a *APIV1) couldBeAuthorizedMiddleware(_ *gin.Context) { //nolint:unused

      
        
        8
        +}

      
A internal/transport/http/apiv1/response.go
···
        
        1
        +package apiv1

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"log/slog"

      
        
        5
        +	"net/http"

      
        
        6
        +

      
        
        7
        +	"github.com/gin-gonic/gin"

      
        
        8
        +)

      
        
        9
        +

      
        
        10
        +type response struct {

      
        
        11
        +	Message string `json:"message"`

      
        
        12
        +}

      
        
        13
        +

      
        
        14
        +func newError(c *gin.Context, status int, msg string) {

      
        
        15
        +	slog.With("status", status).Error(msg)

      
        
        16
        +	c.AbortWithStatusJSON(status, response{msg})

      
        
        17
        +}

      
        
        18
        +

      
        
        19
        +func newInternalError(c *gin.Context, err error, msg ...string) {

      
        
        20
        +	slog.With("status", "internal error").Error(err.Error())

      
        
        21
        +

      
        
        22
        +	if len(msg) != 0 {

      
        
        23
        +		c.AbortWithStatusJSON(http.StatusInternalServerError, response{

      
        
        24
        +			Message: msg[0],

      
        
        25
        +		})

      
        
        26
        +		return

      
        
        27
        +	}

      
        
        28
        +

      
        
        29
        +	c.AbortWithStatusJSON(http.StatusInternalServerError, response{

      
        
        30
        +		Message: "internal error",

      
        
        31
        +	})

      
        
        32
        +}

      
A internal/transport/http/http.go
···
        
        1
        +package http

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"net/http"

      
        
        5
        +

      
        
        6
        +	"github.com/gin-gonic/gin"

      
        
        7
        +	"github.com/olexsmir/onasty/internal/service/usersrv"

      
        
        8
        +	"github.com/olexsmir/onasty/internal/transport/http/apiv1"

      
        
        9
        +)

      
        
        10
        +

      
        
        11
        +type Transport struct {

      
        
        12
        +	usersrv usersrv.UserServicer

      
        
        13
        +}

      
        
        14
        +

      
        
        15
        +func NewTransport(us usersrv.UserServicer) *Transport {

      
        
        16
        +	return &Transport{

      
        
        17
        +		usersrv: us,

      
        
        18
        +	}

      
        
        19
        +}

      
        
        20
        +

      
        
        21
        +func (t *Transport) Handler() http.Handler {

      
        
        22
        +	r := gin.New()

      
        
        23
        +	r.Use(

      
        
        24
        +		gin.Recovery(),

      
        
        25
        +		t.logger(),

      
        
        26
        +	)

      
        
        27
        +

      
        
        28
        +	api := r.Group("/api")

      
        
        29
        +	api.GET("/ping", t.pingHandler)

      
        
        30
        +	apiv1.NewAPIV1(t.usersrv).Routes(api.Group("/v1"))

      
        
        31
        +

      
        
        32
        +	return r.Handler()

      
        
        33
        +}

      
        
        34
        +

      
        
        35
        +func (*Transport) pingHandler(c *gin.Context) {

      
        
        36
        +	c.JSON(http.StatusOK, gin.H{"message": "pong"})

      
        
        37
        +}

      
A internal/transport/http/httpserver/httpserver.go
···
        
        1
        +package httpserver

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"context"

      
        
        5
        +	"net/http"

      
        
        6
        +	"time"

      
        
        7
        +)

      
        
        8
        +

      
        
        9
        +type Server struct {

      
        
        10
        +	http *http.Server

      
        
        11
        +}

      
        
        12
        +

      
        
        13
        +func NewServer(port string, handler http.Handler) *Server {

      
        
        14
        +	// TODO: add those settings to the config module

      
        
        15
        +	return &Server{

      
        
        16
        +		http: &http.Server{

      
        
        17
        +			Addr:           ":" + port,

      
        
        18
        +			Handler:        handler,

      
        
        19
        +			ReadTimeout:    10 * time.Second,

      
        
        20
        +			WriteTimeout:   10 * time.Second,

      
        
        21
        +			MaxHeaderBytes: 1 << 20, // 1mb

      
        
        22
        +		},

      
        
        23
        +	}

      
        
        24
        +}

      
        
        25
        +

      
        
        26
        +func (s *Server) Start() error {

      
        
        27
        +	return s.http.ListenAndServe()

      
        
        28
        +}

      
        
        29
        +

      
        
        30
        +func (s *Server) Stop(ctx context.Context) error {

      
        
        31
        +	return s.http.Shutdown(ctx)

      
        
        32
        +}

      
A internal/transport/http/middlewares.go
···
        
        1
        +package http

      
        
        2
        +

      
        
        3
        +import (

      
        
        4
        +	"log/slog"

      
        
        5
        +	"time"

      
        
        6
        +

      
        
        7
        +	"github.com/gin-gonic/gin"

      
        
        8
        +)

      
        
        9
        +

      
        
        10
        +func (t *Transport) logger() gin.HandlerFunc {

      
        
        11
        +	return func(c *gin.Context) {

      
        
        12
        +		start := time.Now()

      
        
        13
        +		path := c.Request.URL.Path

      
        
        14
        +		raw := c.Request.URL.RawQuery

      
        
        15
        +

      
        
        16
        +		c.Next()

      
        
        17
        +		latency := time.Since(start)

      
        
        18
        +

      
        
        19
        +		if raw != "" {

      
        
        20
        +			path = path + "?" + raw

      
        
        21
        +		}

      
        
        22
        +

      
        
        23
        +		lvl := slog.LevelInfo

      
        
        24
        +		if c.Writer.Status() >= 500 {

      
        
        25
        +			lvl = slog.LevelError

      
        
        26
        +		}

      
        
        27
        +

      
        
        28
        +		slog.LogAttrs(

      
        
        29
        +			c.Request.Context(),

      
        
        30
        +			lvl,

      
        
        31
        +			c.Errors.ByType(gin.ErrorTypePrivate).String(),

      
        
        32
        +			slog.String("latency", latency.String()),

      
        
        33
        +			slog.String("method", c.Request.Method),

      
        
        34
        +			slog.Int("status_code", c.Writer.Status()),

      
        
        35
        +			slog.String("path", path),

      
        
        36
        +			slog.String("client_ip", c.ClientIP()),

      
        
        37
        +			slog.Int("body_size", c.Writer.Size()),

      
        
        38
        +		)

      
        
        39
        +	}

      
        
        40
        +}

      
A migrations/Taskfile.yml
···
        
        1
        +version: "3"

      
        
        2
        +

      
        
        3
        +env:

      
        
        4
        +  MIGRATIONS_DIR: ./migrations/

      
        
        5
        +

      
        
        6
        +tasks:

      
        
        7
        +  new:

      
        
        8
        +    desc: create new migration `new -- <migrationName>`

      
        
        9
        +    cmds:

      
        
        10
        +      - migrate create -ext sql -dir {{.MIGRATIONS_DIR}} {{ .CLI_ARGS }}

      
        
        11
        +

      
        
        12
        +  up:

      
        
        13
        +    - migrate -database $POSTGRESQL_DSN  -path {{.MIGRATIONS_DIR}} up

      
        
        14
        +

      
        
        15
        +  down:

      
        
        16
        +    - migrate -database $POSTGRESQL_DSN -path {{.MIGRATIONS_DIR}} down 1

      
        
        17
        +

      
        
        18
        +  drop:

      
        
        19
        +    - migrate -database $POSTGRESQL_DSN -path {{.MIGRATIONS_DIR}} drop