api

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDecodeRequestBody = errors.New("could not decode the request body")
)

Functions

func ErrorResponse

func ErrorResponse(err error) errorResponse

Types

type CreateDeployParams

type CreateDeployParams struct{}

CreateDeployParams holds all the necessary fields to deploy a new function.

type CreateEndpointParams

type CreateEndpointParams struct {
	// Name of the endpoint
	Name string `json:"name"`
	// Runtime on which the code will be invoked. (go or js for now)
	Runtime string `json:"runtime"`
	// A map of environment variables
	Environment map[string]string `json:"environment"`
}

CreateEndpointParams holds all the necessary fields to create a new run application.

type CreateRollbackParams

type CreateRollbackParams struct {
	DeployID uuid.UUID `json:"deploy_id"`
}

CreateRollbackParams holds all the necessary fields to rollback your application to a specific deploy id (version).

type CreateRollbackResponse

type CreateRollbackResponse struct {
	DeployID uuid.UUID `json:"deploy_id"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server serves the public run API.

func NewServer

func NewServer(store storage.Store, metricStore storage.MetricStore, cache storage.ModCacher) *Server

NewServer returns a new server given a Store interface.

func (*Server) Listen

func (s *Server) Listen(addr string) error

Listen starts listening on the given address.

Jump to

Keyboard shortcuts

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