Rewrite identity and access management
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -109,10 +109,10 @@ func (b *BaseURL) Port() string {
|
||||
|
||||
// URLBuilder provides a fluent interface for building URLs.
|
||||
type URLBuilder struct {
|
||||
base *BaseURL
|
||||
path string
|
||||
query url.Values
|
||||
err error
|
||||
base *BaseURL
|
||||
path string
|
||||
query url.Values
|
||||
err error
|
||||
}
|
||||
|
||||
// WithPath returns a URLBuilder with the specified path.
|
||||
@@ -224,3 +224,12 @@ func (b *BaseURL) MarshalText() ([]byte, error) {
|
||||
}
|
||||
return []byte(b.raw), nil
|
||||
}
|
||||
|
||||
func (b *URLBuilder) URL() url.URL {
|
||||
return url.URL{
|
||||
Scheme: b.base.Scheme(),
|
||||
Host: b.base.Host(),
|
||||
Path: b.path,
|
||||
RawQuery: b.query.Encode(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user