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