admin

package
v0.22.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

admin

This directory contains the control-plane for multi-user, hosted deployments of Rill.

Running in development

  1. Create a .env file at the root of the repo containing:
RILL_ADMIN_DATABASE_DRIVER=postgres
RILL_ADMIN_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
RILL_ADMIN_HTTP_PORT=8080
RILL_ADMIN_GRPC_PORT=9090
RILL_ADMIN_SESSION_SECRET=secret
RILL_ADMIN_AUTH_DOMAIN=gorillio-stage.auth0.com
RILL_ADMIN_AUTH_CALLBACK_URL=http://localhost:8080/auth/callback
# Get these from https://auth0.com/ (or ask a colleague)
RILL_ADMIN_AUTH_CLIENT_ID=
RILL_ADMIN_AUTH_CLIENT_SECRET=
  1. In a separate terminal, run Postgres in the background:
docker-compose -f admin/docker-compose.yml up 
  1. Run the server:
go run ./cli admin start

You can now call the local admin server from the CLI by overriding the admin API URL. For example:

go run ./cli org create foo --api-url http://localhost:9090

Adding endpoints

We define our APIs using gRPC and use gRPC-Gateway to map the RPCs to a RESTful API. See proto/README.md for details.

To add a new endpoint:

  1. Describe the endpoint in proto/rill/admin/v1/api.proto
  2. Re-generate gRPC and OpenAPI interfaces by running make proto.generate
  3. Copy the new handler signature from the AdminServiceServer interface in proto/gen/rill/admin/v1/api_grpc_pb.go
  4. Paste the handler signature and implement it in a relevant file in admin/server/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	DatabaseDriver string
	DatabaseDSN    string
}

type Service

type Service struct {
	DB database.DB
	// contains filtered or unexported fields
}

func New

func New(opts *Options, logger *zap.Logger) (*Service, error)

func (*Service) Close

func (s *Service) Close() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL