xtype

package
v0.0.0-...-d6b644b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileURL

type FileURL string

FileURL ================文件链接================

func (FileURL) IsEmpty

func (f FileURL) IsEmpty() bool

IsEmpty 是否为空

func (FileURL) MarshalJSON

func (f FileURL) MarshalJSON() ([]byte, error)

MarshalJSON 转换为json类型 加域名

func (*FileURL) Scan

func (f *FileURL) Scan(src interface{}) error

Scan implements the Scanner interface.

func (FileURL) String

func (f FileURL) String() string

String 转换为string类型

func (*FileURL) UnmarshalJSON

func (f *FileURL) UnmarshalJSON(data []byte) error

UnmarshalJSON 不做处理

func (FileURL) Value

func (f FileURL) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Hashes

type Hashes []uint64

Hashes ===========哈希列表===========

func (Hashes) Contains

func (t Hashes) Contains(s uint64) bool

Contains 是否包含元素

func (Hashes) MarshalJSON

func (t Hashes) MarshalJSON() ([]byte, error)

MarshalJSON 转换为json类型

func (*Hashes) Scan

func (t *Hashes) Scan(src interface{}) error

Scan implements the Scanner interface.

func (Hashes) String

func (t Hashes) String() string

func (*Hashes) UnmarshalJSON

func (t *Hashes) UnmarshalJSON(data []byte) error

UnmarshalJSON 不做处理

func (Hashes) Value

func (t Hashes) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type ImageURL

type ImageURL string

ImageURL ===============图片链接===============

func (ImageURL) IsEmpty

func (f ImageURL) IsEmpty() bool

IsEmpty 是否为空

func (ImageURL) MarshalJSON

func (f ImageURL) MarshalJSON() ([]byte, error)

MarshalJSON 转换为json类型 加域名

func (*ImageURL) Scan

func (f *ImageURL) Scan(src interface{}) error

Scan implements the Scanner interface.

func (ImageURL) String

func (f ImageURL) String() string

String 转换为string类型

func (*ImageURL) UnmarshalJSON

func (f *ImageURL) UnmarshalJSON(data []byte) error

UnmarshalJSON 前端提交的如果是URL,那只保留path

func (ImageURL) Value

func (f ImageURL) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type JNumbers

type JNumbers []int

JNumbers ===========数字列表===========

func (JNumbers) Contains

func (t JNumbers) Contains(s int) bool

Contains 是否包含元素

func (JNumbers) MarshalJSON

func (t JNumbers) MarshalJSON() ([]byte, error)

MarshalJSON 转换为json类型

func (*JNumbers) Scan

func (t *JNumbers) Scan(src interface{}) error

Scan implements the Scanner interface.

func (JNumbers) String

func (t JNumbers) String() string

func (*JNumbers) UnmarshalJSON

func (t *JNumbers) UnmarshalJSON(data []byte) error

UnmarshalJSON 不做处理

func (JNumbers) Value

func (t JNumbers) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type JStrings

type JStrings []string

新版的列表字段,存往 mysql 数据库的时候,将存储成 json 类型,用以支持 json 查询语法 JStrings ===========字符串列表===========

func (JStrings) Contains

func (t JStrings) Contains(s string) bool

Contains 是否包含元素

func (JStrings) Intersectant

func (t JStrings) Intersectant(s JStrings) bool

Intersectant 是否有交集

func (JStrings) MarshalJSON

func (t JStrings) MarshalJSON() ([]byte, error)

MarshalJSON 转换为json类型

func (JStrings) MarshalYAML

func (t JStrings) MarshalYAML() ([]byte, error)

MarshalYAML 转换为json类型

func (JStrings) Remove

func (t JStrings) Remove(s string) JStrings

Remove 移除所有值为 s 的元素

func (JStrings) SAdd

func (t JStrings) SAdd(s string) JStrings

SAdd 添加不重复的元素 注意!t不会改变,新的列表将被返回

func (*JStrings) Scan

func (t *JStrings) Scan(src interface{}) error

Scan implements the Scanner interface.

func (JStrings) String

func (t JStrings) String() string

String 转换为string类型

func (JStrings) Sub

func (t JStrings) Sub(s Strings) JStrings

Sub 返回集合 t 减掉 s 后的集合

func (JStrings) Union

func (t JStrings) Union(s JStrings) JStrings

Union 返回并集,s若有重复不会被去重

func (*JStrings) UnmarshalJSON

func (t *JStrings) UnmarshalJSON(data []byte) error

UnmarshalJSON 不做处理

func (*JStrings) UnmarshalYAML

func (t *JStrings) UnmarshalYAML(data []byte) error

UnmarshalYAML 不做处理

func (JStrings) Value

func (t JStrings) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Numbers

type Numbers []int

Numbers ===========数字列表===========

func (Numbers) Contains

func (t Numbers) Contains(s int) bool

Contains 是否包含元素

func (Numbers) Exists

func (t Numbers) Exists(s int) bool

Exists 元素是否存在 TODO: 待废弃 改为Contains

func (Numbers) MarshalJSON

func (t Numbers) MarshalJSON() ([]byte, error)

MarshalJSON 转换为json类型 加域名

func (*Numbers) Scan

func (t *Numbers) Scan(src interface{}) error

Scan implements the Scanner interface.

func (Numbers) String

func (t Numbers) String() string

String 转换为string类型

func (*Numbers) UnmarshalJSON

func (t *Numbers) UnmarshalJSON(data []byte) error

UnmarshalJSON 不做处理

func (Numbers) Value

func (t Numbers) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Strings

type Strings []string

Strings ===========字符串列表===========

func (Strings) Contains

func (t Strings) Contains(s string) bool

Contains 是否包含元素

func (Strings) Exists

func (t Strings) Exists(s string) bool

Exists 元素是否存在 TODO: 待废弃,改名 Contains

func (Strings) Intersectant

func (t Strings) Intersectant(s Strings) bool

Intersectant 是否有交集

func (Strings) MarshalJSON

func (t Strings) MarshalJSON() ([]byte, error)

MarshalJSON 转换为json类型

func (Strings) MarshalYAML

func (t Strings) MarshalYAML() ([]byte, error)

MarshalYAML 转换为json类型

func (Strings) Remove

func (t Strings) Remove(s string) Strings

Remove 移除所有值为 s 的元素

func (Strings) SAdd

func (t Strings) SAdd(s string) Strings

SAdd 添加不重复的元素

func (*Strings) Scan

func (t *Strings) Scan(src interface{}) error

Scan implements the Scanner interface.

func (Strings) String

func (t Strings) String() string

String 转换为string类型

func (Strings) Sub

func (t Strings) Sub(s Strings) Strings

Sub 返回集合 t 减掉 s 后的集合

func (Strings) Union

func (t Strings) Union(s Strings) Strings

Union 返回并集,t若有重复不会被去重

func (*Strings) UnmarshalJSON

func (t *Strings) UnmarshalJSON(data []byte) error

UnmarshalJSON 不做处理

func (*Strings) UnmarshalYAML

func (t *Strings) UnmarshalYAML(data []byte) error

UnmarshalYAML 不做处理

func (Strings) Value

func (t Strings) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL