Documentation
¶
Index ¶
- func Empty(c *gin.Context, response EmptyResponse)
- func JSON[T Payload](c *gin.Context, response JSONResponse[T])
- func Text(c *gin.Context, response TextResponse)
- type CreateCacheEntryPayload
- type EmptyPayload
- type EmptyResponse
- type ErrorPayload
- type FinalizeCacheEntryUploadPayload
- type GetCacheEntryDownloadURLPayload
- type JSONBody
- type JSONResponse
- func CacheMiss() JSONResponse[EmptyPayload]
- func CreateCacheEntry(uploadURL string) JSONResponse[CreateCacheEntryPayload]
- func Error(status int, message string) JSONResponse[ErrorPayload]
- func FinalizeCacheEntryUpload(entryID string) JSONResponse[FinalizeCacheEntryUploadPayload]
- func GetCacheEntryDownloadURL(downloadURL, matchedKey string) JSONResponse[GetCacheEntryDownloadURLPayload]
- func NotImplemented() JSONResponse[ErrorPayload]
- type Payload
- type TextResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Empty ¶
func Empty(c *gin.Context, response EmptyResponse)
func Text ¶
func Text(c *gin.Context, response TextResponse)
Types ¶
type CreateCacheEntryPayload ¶
type CreateCacheEntryPayload struct {
SignedUploadURL string `json:"signed_upload_url"`
}
type EmptyPayload ¶
type EmptyPayload struct{}
type EmptyResponse ¶
func AzureCreated ¶
func AzureCreated(requestID string) EmptyResponse
type ErrorPayload ¶
type ErrorPayload struct {
Error string `json:"error"`
}
type FinalizeCacheEntryUploadPayload ¶
type FinalizeCacheEntryUploadPayload struct {
EntryID string `json:"entry_id"`
}
type JSONBody ¶
type JSONBody[T Payload] struct { // contains filtered or unexported fields }
func (JSONBody[T]) MarshalJSON ¶
type JSONResponse ¶
func CacheMiss ¶
func CacheMiss() JSONResponse[EmptyPayload]
func CreateCacheEntry ¶
func CreateCacheEntry(uploadURL string) JSONResponse[CreateCacheEntryPayload]
func Error ¶
func Error(status int, message string) JSONResponse[ErrorPayload]
func FinalizeCacheEntryUpload ¶
func FinalizeCacheEntryUpload(entryID string) JSONResponse[FinalizeCacheEntryUploadPayload]
func GetCacheEntryDownloadURL ¶
func GetCacheEntryDownloadURL(downloadURL, matchedKey string) JSONResponse[GetCacheEntryDownloadURLPayload]
func NotImplemented ¶
func NotImplemented() JSONResponse[ErrorPayload]
type TextResponse ¶
func PlainOK ¶
func PlainOK(body string) TextResponse
Click to show internal directories.
Click to hide internal directories.