handler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: Apache-2.0 Imports: 30 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OwnerKey       = "app/owner/"
	ServiceKey     = "app/service/"
	ReservationKey = "app/reservation/"
	BuildLogsKey   = "app/buildlogs/"

	NameFormat = regexp.MustCompilePOSIX("^[a-z0-9]+$")
)
View Source
var (
	// hardcoded list of supported regions
	GoogleRegions = []string{"europe-west1", "us-central1", "us-east1", "us-west1", "asia-east1"}

	// hardcoded list of valid repos
	GitRepos = []string{"github.com", "gitlab.org", "bitbucket.org"}

	GitIgnore = []string{
		".git",
		"dist",
		"node_modules",
		"vendor",
		"*.jar",
	}
)

Functions

This section is empty.

Types

type App

type App struct{}

func (*App) Reserve

func (a *App) Reserve(ctx context.Context, req *pb.ReserveRequest, rsp *pb.ReserveResponse) error

Call is a single request handler called via client.Call or the generated client code

func (*App) Resolve

func (a *App) Resolve(ctx context.Context, req *pb.ResolveRequest, rsp *pb.ResolveResponse) error

type GoogleApp

type GoogleApp struct {

	// Embed the app handler
	*App
	// contains filtered or unexported fields
}

func New

func New(svc *service.Service) *GoogleApp

func (*GoogleApp) Delete

func (e *GoogleApp) Delete(ctx context.Context, req *pb.DeleteRequest, rsp *pb.DeleteResponse) error

func (*GoogleApp) DeleteData added in v0.25.0

func (e *GoogleApp) DeleteData(ctx context.Context, request *adminpb.DeleteDataRequest, response *adminpb.DeleteDataResponse) error

func (*GoogleApp) List

func (e *GoogleApp) List(ctx context.Context, req *pb.ListRequest, rsp *pb.ListResponse) error

func (*GoogleApp) Logs added in v0.26.0

func (e *GoogleApp) Logs(ctx context.Context, req *pb.LogsRequest, rsp *pb.LogsResponse) error

func (*GoogleApp) Regions

func (e *GoogleApp) Regions(ctx context.Context, req *pb.RegionsRequest, rsp *pb.RegionsResponse) error

func (*GoogleApp) Run

func (e *GoogleApp) Run(ctx context.Context, req *pb.RunRequest, rsp *pb.RunResponse) error

func (*GoogleApp) Status

func (e *GoogleApp) Status(ctx context.Context, req *pb.StatusRequest, rsp *pb.StatusResponse) error

func (*GoogleApp) Update

func (e *GoogleApp) Update(ctx context.Context, req *pb.UpdateRequest, rsp *pb.UpdateResponse) error

func (*GoogleApp) Usage added in v0.26.0

func (e *GoogleApp) Usage(ctx context.Context, request *adminpb.UsageRequest, response *adminpb.UsageResponse) error

func (*GoogleApp) WriteGcloudIgnore added in v0.26.0

func (e *GoogleApp) WriteGcloudIgnore(dir string) error

type Reservation

type Reservation struct {
	// The app name
	Name string `json:"name"`
	// The owner e.g tenant id
	Owner string `json:"owner"`
	// Uniq associated token
	Token string `json:"token"`
	// Time of creation
	Created time.Time `json:"created"`
	// The expiry time
	Expires time.Time `json:"expires"`
}

Jump to

Keyboard shortcuts

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