This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set in args | |
# TARGET_KEY= | |
# WRAPPING_KEY= | |
TEMP_AES_KEY=/tmp/TEMP_AES_KEY | |
WRAPPED_KEY=/tmp/WRAPPED_KEY | |
echo "WRAPPING_KEY: " ${WRAPPING_KEY}; \ | |
echo "TARGET_KEY: " ${TARGET_KEY}; \ | |
echo "TEMP_AES_KEY: " ${TEMP_AES_KEY}; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func NewStoreWithTestDatabase(ctx context.Context) (*store.Store, func() error, error) { | |
// uses a sensible default on windows (tcp/http) and linux/osx (socket) | |
pool, err := dockertest.NewPool("") | |
if err != nil { | |
return nil, nil, errs.Wrap(err, "could not construct pool", nil) | |
} | |
// uses pool to try to connect to Docker | |
err = pool.Client.Ping() | |
if err != nil { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Middleware is a type alias for a function that | |
// accepts an http.Handler as the "next" handler in a chain | |
// and returns an http.Handler that will be executed before that handler. | |
type Middleware func(httprouter.Handle) httprouter.Handle | |
// MiddlewareChain represents a chain of middleware functions that can be | |
// assigned to wrap a handler function. | |
type MiddlewareChain []Middleware | |
// NewMiddlewareChain is a constructor for a chain of middlewares. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dev: | |
env $$(grep -v '^#' .env | xargs) modd |