ListOptions 类
WithLimit
Go
func WithLimit(limit int) ListOption
设置每页返回的条目数量。
信息
自 v0.7.0 版本新增。
参数
参数 | 数据类型 | 描述 |
---|---|---|
limit | int | 每页返回的条目数量,默认值为 20。 |
返回值
方法调用成功,返回 ListOption
函数。
WithState
Go
func WithState(state int) ListOption
设置智能体的状态。
信息
自 v0.7.0 版本新增。
参数
参数 | 数据类型 | 描述 |
---|---|---|
state | int | 要查询的智能体状态,支持以下状态:
|
返回值
方法调用成功,返回 ListOption
函数。
WithFromTime
Go
func WithFromTime(fromTime int) ListOption
设置起始时间戳。
信息
自 v0.7.0 版本新增。
参数
参数 | 数据类型 | 描述 |
---|---|---|
fromTime | int | 起始时间戳,单位为秒。默认值为 1 天前。 |
返回值
方法调用成功,返回 ListOption
函数。
WithToTime
Go
func WithToTime(toTime int) ListOption
设置结束时间戳。
信息
自 v0.7.0 版本新增。
参数
参数 | 数据类型 | 描述 |
---|---|---|
toTime | int | 结束时间戳,单位为秒。默认值为当前时间。 |
返回值
方法调用成功,返回 ListOption
函数。
WithCursor
Go
func WithCursor(cursor string) ListOption
设置分页起始位置的游标。
信息
自 v0.7.0 版本新增。
参数
参数 | 数据类型 | 描述 |
---|---|---|
cursor | string | 分页游标,即分页起始位置的智能体 ID。 |
返回值
返回 ListOption
函数。
WithChannel
Go
func WithChannel(channel string) ListOption
设置频道名。
信息
自 v0.7.0 版本新增。
参数
参数 | 数据类型 | 描述 |
---|---|---|
channel | string | 频道名。 |
返回值
方法调用成功,返回 ListOption
函数。