Documentation ¶
Index ¶
- Constants
- func BuildRouter(db core.MetadataDatabase, store core.BlobStore, logRequests bool) http.Handler
- func CreateBlobInfo(r *http.Request, blob *core.BlobInfo) map[string]interface{}
- func GetRequestId(ctx context.Context) string
- func TagHeaderName(tagName string) string
- func ValidateAndStoreOptionalSystemTag(tagName string, tagValues []string, field **string, validator TagValidator) error
- func ValidateAndStoreTag(tags *core.BlobTags, tagName string, tagValues []string) error
- func ValidateGenericTagValues(tagName string, tagValues []string) error
- func ValidateOnlyOneTag(tagName string, tagValues []string) error
- func ValidateSubjectTagValue(tagName string, tagValues []string) error
- func ValidateTagName(tagName string, tagValues []string) error
- func ValidateTimeToLive(tagName string, tagValues []string) error
- type ErrorInfo
- type ErrorResponse
- type Handler
- func (handler *Handler) BlobDataResponse(w http.ResponseWriter, r *http.Request, blobInfo *core.BlobInfo)
- func (handler *Handler) BlobMetadataResponse(w http.ResponseWriter, r *http.Request, blobInfo *core.BlobInfo)
- func (handler *Handler) CreateBlob(w http.ResponseWriter, r *http.Request)
- func (handler *Handler) GetLatestBlobData(w http.ResponseWriter, r *http.Request)
- func (handler *Handler) MakeBlobEndpoint(responder Responder, grace time.Duration) http.HandlerFunc
- func (handler *Handler) SearchBlobs(w http.ResponseWriter, r *http.Request)
- type Responder
- type SearchResponse
- type TagValidator
Constants ¶
View Source
const ( TagHeaderPrefix = "Mrd-Tag-" NullSubject = "$null" )
Variables ¶
This section is empty.
Functions ¶
func BuildRouter ¶
func CreateBlobInfo ¶
func GetRequestId ¶ added in v0.0.8
Gets the ID for the current request or empty if there is none.
func TagHeaderName ¶
func ValidateAndStoreOptionalSystemTag ¶
func ValidateAndStoreOptionalSystemTag(tagName string, tagValues []string, field **string, validator TagValidator) error
func ValidateAndStoreTag ¶
func ValidateOnlyOneTag ¶
func ValidateSubjectTagValue ¶
func ValidateTagName ¶
func ValidateTimeToLive ¶ added in v0.0.5
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error ErrorInfo `json:"error"`
}
Based on https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses
func CreateErrorResponse ¶
func CreateErrorResponse(code, message string) ErrorResponse
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) BlobDataResponse ¶
func (*Handler) BlobMetadataResponse ¶
func (*Handler) CreateBlob ¶
func (handler *Handler) CreateBlob(w http.ResponseWriter, r *http.Request)
func (*Handler) GetLatestBlobData ¶
func (handler *Handler) GetLatestBlobData(w http.ResponseWriter, r *http.Request)
func (*Handler) MakeBlobEndpoint ¶
func (*Handler) SearchBlobs ¶
func (handler *Handler) SearchBlobs(w http.ResponseWriter, r *http.Request)
type SearchResponse ¶
type TagValidator ¶
func CombineTagValidators ¶
func CombineTagValidators(validators ...TagValidator) TagValidator
Click to show internal directories.
Click to hide internal directories.