Documentation
¶
Index ¶
- Constants
- func BuildEndpoint(c *gin.Context)
- func ErrorResponse(c *gin.Context, status int, err error)
- func GetClientID(c *gin.Context) (string, error)
- func HandleError(c *gin.Context, status int, e error)
- func ListProductionsEndpoint(c *gin.Context)
- func ProductionEndpoint(c *gin.Context)
- func RedirectToStorageEndpoint(c *gin.Context)
- func ResourceEndpoint(c *gin.Context)
- func StandardResponse(c *gin.Context, status int, res interface{})
- type Header
Constants ¶
View Source
const ( // AdminNamespacePrefix namespace for internal admin endpoints AdminNamespacePrefix = "/_a" // NamespacePrefix namespace for the CLI. Should not be used directly. NamespacePrefix = "/a/v1" // AuthenticationRoute is used to create and verify a token AuthenticationRoute = "/token" // ProductionRoute route to ProductionEndpoint ProductionRoute = "/new" // ResourceRoute route to ResourceEndpoint ResourceRoute = "/update/:parent/:kind/:id" // ListRoute route to ListProductionsEndpoint ListRoute = "/list" // BuildRoute route to BuildEndpoint BuildRoute = "/build" )
Variables ¶
This section is empty.
Functions ¶
func ErrorResponse ¶
ErrorResponse responds with an ErrorObject
func GetClientID ¶
GetClientID extracts the ClientID from the token
func HandleError ¶
HandleError is just a convenience method to avoid boiler-plate code
func ListProductionsEndpoint ¶
ListProductionsEndpoint creates an new show and does all the background setup
func ProductionEndpoint ¶
ProductionEndpoint creates an new show and does all the background setup
func RedirectToStorageEndpoint ¶
RedirectToStorageEndpoint redirects requests to Cloud Storage
func ResourceEndpoint ¶
ResourceEndpoint creates or updates a resource
func StandardResponse ¶
StandardResponse is the default way to respond to API requests
Types ¶
type Header ¶
type Header struct {
Range string `header:"Range"`
UserAgent string `header:"User-Agent"`
Forwarded string `header:"Forwarded"`
XForwardedFor string `header:"X-Forwarded-For"`
XForwwardedHost string `header:"X-Forwarded-Host"`
Referer string `header:"Referer"`
}
Header extracts the relevant HTTP header stuff
Click to show internal directories.
Click to hide internal directories.