kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go

const requestTimeoutUpperBound

const DuplicateOwnerReferencesWarningFormat

const DuplicateOwnerReferencesAfterMutatingAdmissionWarningFormat

const shortPrefix

const longPrefix

type RequestScope

func (scope *RequestScope) err(err error, w http.ResponseWriter, req *http.Request) {}

// AcceptsGroupVersion returns true if the specified GroupVersion is allowed
// in create and update requests.
func (scope *RequestScope) AcceptsGroupVersion(gv schema.GroupVersion) bool {}

func (scope *RequestScope) AllowsMediaTypeTransform(mimeType, mimeSubType string, gvk *schema.GroupVersionKind) bool {}

func (scope *RequestScope) AllowsServerVersion(version string) bool {}

func (scope *RequestScope) AllowsStreamSchema(s string) bool {}

var _

func (r *RequestScope) GetObjectCreater() runtime.ObjectCreater     {}

func (r *RequestScope) GetObjectTyper() runtime.ObjectTyper         {}

func (r *RequestScope) GetObjectDefaulter() runtime.ObjectDefaulter {}

func (r *RequestScope) GetObjectConvertor() runtime.ObjectConvertor {}

func (r *RequestScope) GetEquivalentResourceMapper() runtime.EquivalentResourceMapper {}

// ConnectResource returns a function that handles a connect request on a rest.Storage object.
func ConnectResource(connecter rest.Connecter, scope *RequestScope, admit admission.Interface, restPath string, isSubresource bool) http.HandlerFunc {}

type responder

func (r *responder) Object(statusCode int, obj runtime.Object) {}

func (r *responder) Error(err error) {}

// transformDecodeError adds additional information into a bad-request api error when a decode fails.
func transformDecodeError(typer runtime.ObjectTyper, baseErr error, into runtime.Object, gvk *schema.GroupVersionKind, body []byte) error {}

func hasUID(obj runtime.Object) (bool, error) {}

// checkName checks the provided name against the request
func checkName(obj runtime.Object, name, namespace string, namer ScopeNamer) error {}

// dedupOwnerReferences dedups owner references over the entire entry.
// NOTE: We don't know enough about the existing cases of owner references
// sharing the same UID but different fields. Nor do we know what might break.
// In the future we may just dedup/reject owner references with the same UID.
func dedupOwnerReferences(refs []metav1.OwnerReference) ([]metav1.OwnerReference, []string) {}

// hasOwnerReference returns true if refs has an item equal to ref. The function
// focuses on semantic equality instead of memory equality, to catch duplicates
// with different pointer addresses. The function uses apiequality.Semantic
// instead of implementing its own comparison, to tolerate API changes to
// metav1.OwnerReference.
// NOTE: This is expensive, but we accept it because we've made sure it only
// happens to owner references containing duplicate UIDs, plus typically the
// number of items in the list should be small.
func hasOwnerReference(refs []metav1.OwnerReference, ref metav1.OwnerReference) bool {}

// dedupOwnerReferencesAndAddWarning dedups owner references in the object metadata.
// If duplicates are found, the function records a warning to the provided context.
func dedupOwnerReferencesAndAddWarning(obj runtime.Object, requestContext context.Context, afterMutatingAdmission bool) {}

func summarizeData(data []byte, maxLength int) string {}

func limitedReadBody(req *http.Request, limit int64) ([]byte, error) {}

func limitedReadBodyWithRecordMetric(ctx context.Context, req *http.Request, limit int64, resourceGroup string, verb requestmetrics.RequestBodyVerb) ([]byte, error) {}

func isDryRun(url *url.URL) bool {}

// fieldValidation checks that the field validation feature is enabled
// and returns a valid directive of either
// - Ignore
// - Warn (default)
// - Strict
func fieldValidation(directive string) string {}

// parseYAMLWarnings takes the strict decoding errors from the yaml decoder's output
// and parses each individual warnings, or leaves the warning as is if
// it does not look like a yaml strict decoding error.
func parseYAMLWarnings(errString string) []string {}

// addStrictDecodingWarnings confirms that the error is a strict decoding error
// and if so adds a warning for each strict decoding violation.
func addStrictDecodingWarnings(requestContext context.Context, errs []error) {}

type etcdError

type grpcError

func isTooLargeError(err error) bool {}