pkg

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 44 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NegotiateInputSerializer

func NegotiateInputSerializer(req *http.Request, streaming bool, ns runtime.NegotiatedSerializer) (runtime.SerializerInfo, error)

NegotiateInputSerializer returns the input serializer for the provided request.

func ObjectToFieldLabels

func ObjectToFieldLabels(obj metav1.Object) fields.Fields

Types

type APIStorage

type APIStorage struct {
	GVR        schema.GroupVersionResource
	GVK        schema.GroupVersionKind
	Namespaced bool
	Current    map[types.NamespacedName]*unstructured.Unstructured
	Deleted    map[types.NamespacedName]*unstructured.Unstructured
	// contains filtered or unexported fields
}

func (*APIStorage) Get

func (*APIStorage) Insert

func (s *APIStorage) Insert(obj *unstructured.Unstructured)

func (*APIStorage) Items

func (s *APIStorage) Items() []unstructured.Unstructured

func (*APIStorage) Remove

func (*APIStorage) RemoveForNamespace

func (s *APIStorage) RemoveForNamespace(ns string)

func (*APIStorage) RemoveObj

type Options

type Options struct {
	// Scheme includes all of the types used by this group and how to convert between them (or
	// to convert objects from outside of this group that are accepted in this API).
	Scheme *runtime.Scheme
	// NegotiatedSerializer controls how this group encodes and decodes data
	NegotiatedSerializer runtime.NegotiatedSerializer
	// ParameterCodec performs conversions for query parameters passed to API calls
	ParameterCodec   runtime.ParameterCodec
	IncludeAPIGroups sets.String
}

func NewOptions

func NewOptions(apigroups ...string) *Options

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts *Options) *Server

func (*Server) APIGroup

func (s *Server) APIGroup(w http.ResponseWriter, r *http.Request)

func (*Server) APIGroupList

func (s *Server) APIGroupList(w http.ResponseWriter, r *http.Request)

func (*Server) APIResourceList

func (s *Server) APIResourceList(w http.ResponseWriter, r *http.Request)

func (*Server) APIRoot

func (s *Server) APIRoot(w http.ResponseWriter, r *http.Request)

func (*Server) APIVersions

func (s *Server) APIVersions(w http.ResponseWriter, r *http.Request)

func (*Server) Checkpoint

func (s *Server) Checkpoint()

func (*Server) Create

func (s *Server) Create(w http.ResponseWriter, r *http.Request)

func (*Server) CreateImpl

func (s *Server) CreateImpl(store *APIStorage, codec runtime.Codec, r *http.Request) (runtime.Object, error)

func (*Server) Delete

func (s *Server) Delete(w http.ResponseWriter, r *http.Request)

func (*Server) DeleteCollection

func (s *Server) DeleteCollection(w http.ResponseWriter, r *http.Request)

func (*Server) DeleteCollectionImpl

func (s *Server) DeleteCollectionImpl(store *APIStorage, r *http.Request) (runtime.Object, error)

func (*Server) DeleteImpl

func (s *Server) DeleteImpl(store *APIStorage, r *http.Request) (*unstructured.Unstructured, error)

func (*Server) Export

func (*Server) Get

func (s *Server) Get(w http.ResponseWriter, r *http.Request)

func (*Server) GetImpl

func (s *Server) GetImpl(store *APIStorage, r *http.Request) (runtime.Object, error)

func (*Server) Healthz

func (s *Server) Healthz(w http.ResponseWriter, r *http.Request)

func (*Server) List

func (s *Server) List(w http.ResponseWriter, r *http.Request)

func (*Server) ListImpl

func (s *Server) ListImpl(store *APIStorage, r *http.Request) (runtime.Object, error)

func (*Server) NextResourceVersion

func (s *Server) NextResourceVersion() int64

func (*Server) Patch

func (s *Server) Patch(w http.ResponseWriter, r *http.Request)

func (*Server) PatchStatus

func (s *Server) PatchStatus(w http.ResponseWriter, r *http.Request)

func (*Server) Register

func (s *Server) Register(m chi.Router)

func (*Server) RemoveNamespace

func (s *Server) RemoveNamespace(ns string)

func (*Server) Store

func (s *Server) Store(r *http.Request) *APIStorage

func (*Server) StoreForGVR

func (s *Server) StoreForGVR(gvr schema.GroupVersionResource) *APIStorage

func (*Server) Update

func (s *Server) Update(w http.ResponseWriter, r *http.Request)

func (*Server) UpdateImpl

func (s *Server) UpdateImpl(store *APIStorage, codec runtime.Codec, r *http.Request) (runtime.Object, error)

func (*Server) UpdateStatus

func (s *Server) UpdateStatus(w http.ResponseWriter, r *http.Request)

func (*Server) Version

func (s *Server) Version(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL