api

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NamespacePrefix namespace for the CLI. Should not be used directly.
	NamespacePrefix = "/a/v1"
	// GraphqlNamespacePrefix namespace for the GraphQL endpoints
	GraphqlNamespacePrefix = "/q"

	// AdminNamespacePrefix namespace for internal admin endpoints
	AdminNamespacePrefix = "/_a"
	// TaskNamespacePrefix namespace for internal Cloud Task callbacks
	TaskNamespacePrefix = "/_t"

	// AuthenticationRoute is used to create and verify a token
	AuthenticationRoute = "/token"

	// ProductionRoute route to ProductionEndpoint
	ProductionRoute = "/production"

	// ListProductionsRoute route to ListProductionsEndpoint
	ListProductionsRoute = "/productions"

	// GetResourceRoute route to ResourceEndpoint
	GetResourceRoute = "/resource/:prod/:kind/:id"

	// ListResourcesRoute route to ResourceEndpoint GET
	ListResourcesRoute = "/resource/:prod/:kind"

	// UpdateResourceRoute route to ResourceEndpoint POST,PUT
	UpdateResourceRoute = "/resource/:prod/:kind/:id"

	// DeleteResourceRoute route to ResourceEndpoint
	DeleteResourceRoute = "/resource/:prod/:kind/:id"

	// BuildRoute route to BuildEndpoint
	BuildRoute = "/build"

	// UploadRoute route to UploadEndpoint
	UploadRoute = "/upload/:prod"

	// ShowRoute route to show.json
	ShowRoute = "/s/:name"

	// FeedRoute route to feed.xml
	FeedRoute = "/s/:name/feed.xml"

	// GraphqlRoute route to GraphqlEndpoint
	GraphqlRoute = "/query"

	// GraphqlPlaygroundRoute route to GraphqlPlaygroundEndpoint
	GraphqlPlaygroundRoute = "/playground"
)

Variables

This section is empty.

Functions

func BuildEndpoint

func BuildEndpoint(c *gin.Context)

BuildEndpoint starts the build of the feed

func DeleteResourceEndpoint

func DeleteResourceEndpoint(c *gin.Context)

DeleteResourceEndpoint deletes a resource and its .yaml file

func GetGraphqlEndpoint

func GetGraphqlEndpoint() gin.HandlerFunc

GetGraphqlEndpoint maps the Graphql handler to gin

func GetGraphqlPlaygroundEndpoint

func GetGraphqlPlaygroundEndpoint() gin.HandlerFunc

GetGraphqlPlaygroundEndpoint maps the Playground handler to gin

func GetResourceEndpoint

func GetResourceEndpoint(c *gin.Context)

GetResourceEndpoint returns a resource

func HandleError

func HandleError(c *gin.Context, status int, e error)

HandleError is just a convenience method to avoid boiler-plate code

func ListProductionsEndpoint

func ListProductionsEndpoint(c *gin.Context)

ListProductionsEndpoint creates an new show and does all the background setup

func ListResourcesEndpoint

func ListResourcesEndpoint(c *gin.Context)

ListResourcesEndpoint returns a list of resources

func ProductionEndpoint

func ProductionEndpoint(c *gin.Context)

ProductionEndpoint creates an new show and does all the background setup

func ShowEndpoint

func ShowEndpoint(c *gin.Context)

ShowEndpoint returns the entire show as one json

func UpdateResourceEndpoint

func UpdateResourceEndpoint(c *gin.Context)

UpdateResourceEndpoint creates or updates a resource

func UploadEndpoint

func UploadEndpoint(c *gin.Context)

UploadEndpoint implements content upload

Types

This section is empty.

Jump to

Keyboard shortcuts

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