api

package
v0.0.0-...-8396750 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 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 CreateDeploymentParams

type CreateDeploymentParams struct{}

CreateDeploymentParams 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 PublishParams

type PublishParams struct {
	DeploymentID uuid.UUID `json:"deployment_id"`
}

PublishParams holds all the necessary fields to publish a specific deployment LIVE to your application.

type PublishResponse

type PublishResponse struct {
	DeploymentID uuid.UUID `json:"deployment_id"`
	URL          string    `json:"url"`
}

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.

type UpdateEndpointParams

type UpdateEndpointParams struct {
	Environment map[string]string `json:"environment"`
}

Jump to

Keyboard shortcuts

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