代码拉取完成,页面将自动刷新
package config
import (
"time"
)
// Options defines optional parameters for configuring an API client.
type Options struct {
// PageSize used for the client operations, a maximum of 100 is enforced by the Goharbor API.
PageSize int64
// Page to be used for client operations.
Page int64
// The timeout for client operations.
Timeout time.Duration
// Sort string used on 'list' client operations.
Sort string
// Query string used for client operations.
Query string
}
func Defaults() *Options {
return &Options{
PageSize: 10,
Page: 1,
Sort: "",
Query: "",
Timeout: 30 * time.Second,
}
}
func (o *Options) WithPageSize(pageSize int64) *Options {
o.PageSize = pageSize
return o
}
func (o *Options) WithPage(page int64) *Options {
o.Page = page
return o
}
func (o *Options) WithTimeout(timeout time.Duration) *Options {
o.Timeout = timeout
return o
}
func (o *Options) WithSort(sort string) *Options {
o.Sort = sort
return o
}
func (o *Options) WithQuery(query string) *Options {
o.Query = query
return o
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。