Documentation ¶
Index ¶
Constants ¶
View Source
const ( RestBadRequest string = "bad.request" RestServerInternalError string = "server.internal.error" )
View Source
const (
Prefix string = "url://"
)
Variables ¶
View Source
var ( ErrInvalidUrlFormat = errors.New("invalid url format") ErrEmptyLeafNode = errors.New("empty leaf node") )
Functions ¶
func GetUrlLeafNode ¶
GetUrlNode 获取末尾节点 url:// -> 空 url://01HMQE6KCPQ0PNKFDNP5MEMZSP -> 01HMQE6KCPQ0PNKFDNP5MEMZSP url://01HMQE6KCPQ0PNKFDNP5MEMZSP/01HMQFJFKTM8513YSQXZYVF8S7 -> 01HMQFJFKTM8513YSQXZYVF8S7
func GetUrlNodes ¶
GetUrlNodes 获取节点集 url:// -> [] url://01HMQDV23J3HMV4CBH2MHSRN45 -> ["01HMQDV23J3HMV4CBH2MHSRN45"]
func IsValidUrl ¶
IsValidUrl 判断元数据 url 格式是否合法 example: - url:// - url://01HMQDV23J3HMV4CBH2MHSRN45 - url://01HMQDV23J3HMV4CBH2MHSRN45/01HMQE6KCPQ0PNKFDNP5MEMZSP
Types ¶
type BizError ¶
type ObjectType ¶
type ObjectType int
BasicAttr 对象类型
const ( ObjectTypeDir ObjectType = 1 // 文件 ObjectTypeFile ObjectType = 2 // 目录 )
Click to show internal directories.
Click to hide internal directories.