Documentation
¶
Index ¶
- func GetRawFile(urlString string) (string, error)
- func GetRawURL(url *url.URL) string
- func GetURLFromYMLBuffer(in []byte) (*url.URL, error)
- func SetupResponse(w *http.ResponseWriter, req *http.Request)
- func Yaml2json(y []byte) []byte
- type App
- type ErrorInvalidKey
- type ErrorInvalidValue
- type ErrorParseMulti
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRawFile ¶
GetRawFile returns a valid raw file for major code hosting platforms
func GetRawURL ¶
GetRawURL returns a valid raw root repository based on major code hosting platforms
func GetURLFromYMLBuffer ¶
GetURLFromYMLBuffer returns a valid URL string based on input object takes valid URL as input
func SetupResponse ¶
func SetupResponse(w *http.ResponseWriter, req *http.Request)
SetupResponse set CORS header
Types ¶
type ErrorInvalidKey ¶
type ErrorInvalidKey struct {
Key string `json:"Key"`
}
ErrorInvalidKey represents an error caused by an invalid key.
func (ErrorInvalidKey) Error ¶
func (e ErrorInvalidKey) Error() string
type ErrorInvalidValue ¶
ErrorInvalidValue represents an error caused by an invalid value.
func ErrorsToValidationErrors ¶ added in v1.0.2
func ErrorsToValidationErrors(err error) (out []ErrorInvalidValue)
ErrorsToValidationErrors converts validation errors
func (ErrorInvalidValue) Error ¶
func (e ErrorInvalidValue) Error() string
type ErrorParseMulti ¶
type ErrorParseMulti []error
ErrorParseMulti represents an error caused by a multivalue key.
func (ErrorParseMulti) Error ¶
func (es ErrorParseMulti) Error() string
type Message ¶
type Message struct {
Status int `json:"status"`
Message string `json:"message"`
Publiccode *publiccode.PublicCode `json:"pc,omitempty"`
Error string `json:"error,omitempty"`
ValidationError []ErrorInvalidValue `json:"validationErrors,omitempty"`
}
Message json type mapping, for test purpose
Click to show internal directories.
Click to hide internal directories.