type ErrMatchFunc … type Result … // withError allows a fluent style for internal result code. func (r *Result) withError(err error) *Result { … } // TargetsSingleItems returns true if any of the builder arguments pointed // to non-list calls (if the user explicitly asked for any object by name). // This includes directories, streams, URLs, and resource name tuples. func (r *Result) TargetsSingleItems() bool { … } // IgnoreErrors will filter errors that occur when by visiting the result // (but not errors that occur by creating the result in the first place), // eliminating any that match fns. This is best used in combination with // Builder.ContinueOnError(), where the visitors accumulate errors and return // them after visiting as a slice of errors. If no errors remain after // filtering, the various visitor methods on Result will return nil for // err. func (r *Result) IgnoreErrors(fns ...ErrMatchFunc) *Result { … } // Mapper returns a copy of the builder's mapper. func (r *Result) Mapper() *mapper { … } // Err returns one or more errors (via a util.ErrorList) that occurred prior // to visiting the elements in the visitor. To see all errors including those // that occur during visitation, invoke Infos(). func (r *Result) Err() error { … } // Visit implements the Visitor interface on the items described in the Builder. // Note that some visitor sources are not traversable more than once, or may // return different results. If you wish to operate on the same set of resources // multiple times, use the Infos() method. func (r *Result) Visit(fn VisitorFunc) error { … } // IntoSingleItemImplied sets the provided boolean pointer to true if the Builder input // implies a single item, or multiple. func (r *Result) IntoSingleItemImplied(b *bool) *Result { … } // Infos returns an array of all of the resource infos retrieved via traversal. // Will attempt to traverse the entire set of visitors only once, and will return // a cached list on subsequent calls. func (r *Result) Infos() ([]*Info, error) { … } // Object returns a single object representing the output of a single visit to all // found resources. If the Builder was a singular context (expected to return a // single resource by user input) and only a single resource was found, the resource // will be returned as is. Otherwise, the returned resources will be part of an // v1.List. The ResourceVersion of the v1.List will be set only if it is identical // across all infos returned. func (r *Result) Object() (runtime.Object, error) { … } var _ … var _ … // toV1List takes a slice of Objects + their version, and returns // a v1.List Object containing the objects in the Items field func toV1List(objects []runtime.Object, version string) runtime.Object { … } // ResourceMapping returns a single meta.RESTMapping representing the // resources located by the builder, or an error if more than one // mapping was found. func (r *Result) ResourceMapping() (*meta.RESTMapping, error) { … } // Watch retrieves changes that occur on the server to the specified resource. // It currently supports watching a single source - if the resource source // (selectors or pure types) can be watched, they will be, otherwise the list // will be visited (equivalent to the Infos() call) and if there is a single // resource present, it will be watched, otherwise an error will be returned. func (r *Result) Watch(resourceVersion string) (watch.Interface, error) { … }