MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / DecodeURL

Method DecodeURL

options/parser/url.go:81–94  ·  view source on GitHub ↗
(
	ctx context.Context,
	parts []string,
)

Source from the content-addressed store, hash-verified

79}
80
81func (p *Parser) DecodeURL(
82 ctx context.Context,
83 parts []string,
84) (string, string, error) {
85 if len(parts) == 0 {
86 return "", "", newInvalidURLError(ctx, "Image URL is empty")
87 }
88
89 if parts[0] == urlTokenPlain && len(parts) > 1 {
90 return p.decodePlainURL(ctx, parts[1:])
91 }
92
93 return p.decodeBase64URL(ctx, parts)
94}

Callers 2

parsePathOptionsMethod · 0.95
parsePathPresetsMethod · 0.95

Calls 3

decodePlainURLMethod · 0.95
decodeBase64URLMethod · 0.95
newInvalidURLErrorFunction · 0.85

Tested by

no test coverage detected