Fetch the repository succeeded.
package v2
import (
"errors"
"fmt"
"net/url"
)
// FixtureAdhocRequest returns a testing fixture for an AdhocRequest struct.
func FixtureAdhocRequest(name string, subscriptions []string) *AdhocRequest {
return &AdhocRequest{
ObjectMeta: NewObjectMeta(name, "default"),
Subscriptions: subscriptions,
}
}
// SetNamespace sets the namespace of the resource.
func (a *AdhocRequest) SetNamespace(namespace string) {
return
}
// StorePrefix returns the path prefix to this resource in the store
func (a *AdhocRequest) StorePrefix() string {
return ""
}
// Validate returns an error if the name is not provided.
func (a *AdhocRequest) Validate() error {
if a.Name == "" {
return errors.New("must provide check name")
}
return nil
}
// URIPath is the URI path component to the adhoc request.
func (a *AdhocRequest) URIPath() string {
return fmt.Sprintf("/api/core/v2/namespaces/%s/checks/%s/execute", url.PathEscape(a.Namespace), url.PathEscape(a.Name))
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。