Documentation
¶
Index ¶
- type FileMode
- type ID
- type Item
- type Location
- func (inst *Location) HasSameMask(other *Location) bool
- func (inst *Location) IsAbs() bool
- func (inst *Location) IsEmpty() bool
- func (inst *Location) Normalize() (*Location, error)
- func (inst *Location) SetQueryParam(name, value string)
- func (inst *Location) String() string
- func (inst *Location) URI() afs.URI
- type MIMEType
- type Query
- type Service
- type TypeInfo
- type VO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { URI string `json:"uri"` // 这个字段是可选的 Name string `json:"name"` Size int64 `json:"size"` Mode FileMode `json:"mode"` ContentType MIMEType `json:"type"` Dir bool `json:"dir"` File bool `json:"file"` Link bool `json:"link"` CreatedAt lang.Time `json:"created_at"` UpdatedAt lang.Time `json:"updated_at"` }
Item ...
type Location ¶
type Location struct { MaskLength int `json:"mask"` // 基础 URI (aka.mask) 包含的 elements 数量 HostIndex int `json:"host"` // 主机信息 (user@hostname:port)在 elements 中的 index Elements []string `json:"elements"` // 解析后的各个部分 Query map[string]string `json:"query"` // 查询参数 }
Location 表示要查询的位置; (URI)& (BaseAt+PathElements) 应该至少有一组参数; 如果都为空,则返回默认位置; 如果都有赋值,则按照 (BaseAt+PathElements) 的位置查询;
func ParseLocation ¶
ParseLocation 把字符串解析为 Location
func (*Location) HasSameMask ¶
HasSameMask 判断是否具有相同的 mask
func (*Location) SetQueryParam ¶
SetQueryParam ...
type Query ¶
type Query struct { URI afs.URI `json:"uri"` // 完整的 URI Ref afs.URI `json:"ref"` // Ref-URI, 如果 URI 的值是一个相对位置,则以 Ref 为参照基础 Location Location `json:"location"` // 解析后的 URI Self *Item `json:"self"` Items []*Item `json:"items"` Types map[MIMEType]*TypeInfo `json:"types"` }
Query ...
Click to show internal directories.
Click to hide internal directories.