Documentation ¶
Overview ¶
Package url abstracts local and remote file URLs.
Index ¶
- func FromBytes(data []byte) extsort.SortType
- type Option
- type URL
- func (u *URL) Absolute() string
- func (u *URL) Base() string
- func (u *URL) Clone() *URL
- func (u *URL) Dir() string
- func (u *URL) EscapedPath() string
- func (u *URL) IsBucket() bool
- func (u *URL) IsPrefix() bool
- func (u *URL) IsRaw() bool
- func (u *URL) IsRemote() bool
- func (u *URL) IsVersioned() bool
- func (u *URL) IsWildcard() bool
- func (u *URL) Join(s string) *URL
- func (u URL) MarshalJSON() ([]byte, error)
- func (u *URL) Match(key string) bool
- func (u *URL) Relative() string
- func (u *URL) SetRelative(base *URL)
- func (u *URL) String() string
- func (u URL) ToBytes() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type URL ¶
type URL struct { Type urlType Scheme string Bucket string Path string Delimiter string Prefix string VersionID string AllVersions bool // contains filtered or unexported fields }
URL is the canonical representation of an object, either on local or remote storage.
func (*URL) EscapedPath ¶
func (*URL) IsPrefix ¶
IsPrefix reports whether the remote object is an S3 prefix, and does not look like an object.
func (*URL) IsVersioned ¶
IsVersioned returns true if the URL has versioning related values
func (*URL) IsWildcard ¶
IsWildcard reports whether if a string contains any wildcard chars.
func (URL) MarshalJSON ¶
MarshalJSON is the json.Marshaler implementation of URL.
func (*URL) SetRelative ¶
SetRelative explicitly sets the relative path of u against given base value. If the base path contains `globCharacters` then, the relative path is determined with respect to the parent directory of the so called wildcarded object.