Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Terrarium - Providers]: Implementation of the provider registry protocol v1 #66

Merged
merged 11 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN apt-get update && \
apt-get install -y ca-certificates

FROM scratch
COPY --from=build /workspace/random.json /
COPY --from=build /workspace/terrarium /
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
ENTRYPOINT [ "/terrarium" ]
32 changes: 32 additions & 0 deletions cmd/rest_providers_v1.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package cmd

import (
providersv1 "github.com/terrariumcloud/terrarium/internal/restapi/providers/v1"

"github.com/spf13/cobra"
)

var mountPathProviders string

var providersV1Cmd = &cobra.Command{
Use: "providers.v1",
Short: "Starts the Terrarium REST API service implementing a read only version of the provider.v1 registry protocol",
Long: "Runs the Terrarium REST server for the implementation of the provider.v1 protocol",
Run: runRESTProvidersV1Server,
}

func init() {
providersV1Cmd.Flags().StringVarP(
&mountPathProviders,
"mount-path",
"m",
"providers",
"Mount path for the rest API server used to process request relative to a particular URL in a reverse proxy type setup",
)
rootCmd.AddCommand(providersV1Cmd)
}

func runRESTProvidersV1Server(cmd *cobra.Command, args []string) {
restAPIServer := providersv1.New()
startRESTAPIService("rest-providers-v1", mountPathProviders, restAPIServer)
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"modules.v1": "/modules/v1"
"modules.v1": "/modules/v1",
"providers.v1": "/providers/v1/"
}
10 changes: 5 additions & 5 deletions internal/restapi/browse/frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"files": {
"main.css": "/static/css/main.a593e941.css",
"main.js": "/static/js/main.248c1869.js",
"main.js": "/static/js/main.d65f24d1.js",
"static/js/496.c4cdc242.chunk.js": "/static/js/496.c4cdc242.chunk.js",
"static/media/not-found-1.jpg": "/static/media/not-found-1.3eec1753dacc2df2dcac.jpg",
"static/media/providers.svg": "/static/media/providers.6ba0b53e84665662440dd84573d617fb.svg",
"static/media/providers.svg": "/static/media/providers.b23747e853582f7fef85d036a949de8f.svg",
"static/media/server-error-1.jpg": "/static/media/server-error-1.6a4af50aed762b81d561.jpg",
"static/media/release.svg": "/static/media/release.08bd319f2eeb6be6a24e6af1ceb025dd.svg",
"static/media/release.svg": "/static/media/release.75050f51cb3da5cd45e3eb3dba9b8991.svg",
"static/media/modules.png": "/static/media/modules.df4734ecc28bffc1b755.png",
"index.html": "/index.html",
"main.a593e941.css.map": "/static/css/main.a593e941.css.map",
"main.248c1869.js.map": "/static/js/main.248c1869.js.map",
"main.d65f24d1.js.map": "/static/js/main.d65f24d1.js.map",
"496.c4cdc242.chunk.js.map": "/static/js/496.c4cdc242.chunk.js.map"
},
"entrypoints": [
"static/css/main.a593e941.css",
"static/js/main.248c1869.js"
"static/js/main.d65f24d1.js"
]
}
2 changes: 1 addition & 1 deletion internal/restapi/browse/frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Terrarium: Synamedia Terraform Registry</title><script defer="defer" src="/static/js/main.248c1869.js"></script><link href="/static/css/main.a593e941.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>Terrarium: Synamedia Terraform Registry</title><script defer="defer" src="/static/js/main.d65f24d1.js"></script><link href="/static/css/main.a593e941.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"modules.v1": "/modules/v1"
"modules.v1": "/modules/v1",
"providers.v1": "/providers/v1/"
}
Loading
Loading