mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-25 11:44:16 +00:00
37 lines
898 B
Go
37 lines
898 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"time"
|
|
|
|
"github.com/distribution/distribution/v3/registry"
|
|
_ "github.com/distribution/distribution/v3/registry/auth/token"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/filesystem"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/inmemory"
|
|
_ "github.com/distribution/distribution/v3/registry/storage/driver/s3-aws"
|
|
|
|
// Register our custom middleware
|
|
_ "atcr.io/pkg/middleware"
|
|
|
|
"atcr.io/pkg/auth/oauth"
|
|
"atcr.io/pkg/auth/token"
|
|
"atcr.io/pkg/middleware"
|
|
)
|
|
|
|
func main() {
|
|
// The serve command is registered in serve.go via init()
|
|
// Just execute the root command
|
|
if err := registry.RootCmd.Execute(); err != nil {
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
// Suppress unused import warnings
|
|
var _ = fmt.Sprint
|
|
var _ = os.Stdout
|
|
var _ = time.Now
|
|
var _ = oauth.NewRefresher
|
|
var _ = token.NewIssuer
|
|
var _ = middleware.SetGlobalRefresher
|