openapi

package
v0.30.13 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 24 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderOpenAPISpec

func RenderOpenAPISpec(cfg Config) (string, error)

Types

type CDStorage

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

func NewCDStorage

func NewCDStorage(cfg ResourceInfo) *CDStorage

func (*CDStorage) Create

func (r *CDStorage) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

func (*CDStorage) Delete

func (r *CDStorage) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error)

Deleter

func (*CDStorage) Destroy added in v0.25.0

func (r *CDStorage) Destroy()

func (*CDStorage) GetSingularName added in v0.29.2

func (r *CDStorage) GetSingularName() string

func (*CDStorage) GroupVersionKind

func (r *CDStorage) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind

func (*CDStorage) NamespaceScoped

func (r *CDStorage) NamespaceScoped() bool

func (*CDStorage) New

func (r *CDStorage) New() runtime.Object

Getter

type Config

type Config struct {
	Scheme *runtime.Scheme
	Codecs serializer.CodecFactory

	Info               spec.InfoProps
	OpenAPIDefinitions []common.GetOpenAPIDefinitions
	Resources          []TypeInfo
	GetterResources    []TypeInfo
	ListerResources    []TypeInfo
	CDResources        []TypeInfo
	RDResources        []TypeInfo
}

func (*Config) GetOpenAPIDefinitions

func (c *Config) GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition

type GetterStorage

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

func NewGetterStorage

func NewGetterStorage(cfg ResourceInfo) *GetterStorage

func (*GetterStorage) Destroy added in v0.25.0

func (r *GetterStorage) Destroy()

func (*GetterStorage) Get

func (r *GetterStorage) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

func (*GetterStorage) GetSingularName added in v0.29.2

func (r *GetterStorage) GetSingularName() string

func (*GetterStorage) GroupVersionKind

func (r *GetterStorage) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind

func (*GetterStorage) NamespaceScoped

func (r *GetterStorage) NamespaceScoped() bool

func (*GetterStorage) New

func (r *GetterStorage) New() runtime.Object

Getter

type ListerStorage

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

func NewListerStorage

func NewListerStorage(cfg ResourceInfo) *ListerStorage

func (*ListerStorage) ConvertToTable

func (r *ListerStorage) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)

func (*ListerStorage) Destroy added in v0.25.0

func (r *ListerStorage) Destroy()

func (*ListerStorage) Get

func (r *ListerStorage) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

func (*ListerStorage) GetSingularName added in v0.29.2

func (r *ListerStorage) GetSingularName() string

func (*ListerStorage) GroupVersionKind

func (r *ListerStorage) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind

func (*ListerStorage) List

func (*ListerStorage) NamespaceScoped

func (r *ListerStorage) NamespaceScoped() bool

func (*ListerStorage) New

func (r *ListerStorage) New() runtime.Object

Getter

func (*ListerStorage) NewList

func (r *ListerStorage) NewList() runtime.Object

Lister

type RDStorage

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

func NewRDStorage

func NewRDStorage(cfg ResourceInfo) *RDStorage

func (*RDStorage) ConvertToTable

func (r *RDStorage) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)

func (*RDStorage) Delete

func (r *RDStorage) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error)

Deleter

func (*RDStorage) Destroy added in v0.25.0

func (r *RDStorage) Destroy()

func (*RDStorage) Get

func (r *RDStorage) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

func (*RDStorage) GetSingularName added in v0.29.2

func (r *RDStorage) GetSingularName() string

func (*RDStorage) GroupVersionKind

func (r *RDStorage) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind

func (*RDStorage) List

func (*RDStorage) NamespaceScoped

func (r *RDStorage) NamespaceScoped() bool

func (*RDStorage) New

func (r *RDStorage) New() runtime.Object

Getter

func (*RDStorage) NewList

func (r *RDStorage) NewList() runtime.Object

Lister

type ResourceInfo

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

type StandardStorage

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

func NewStandardStorage

func NewStandardStorage(cfg ResourceInfo) *StandardStorage

func (*StandardStorage) ConvertToTable

func (r *StandardStorage) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)

func (*StandardStorage) Create

func (r *StandardStorage) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

func (*StandardStorage) Delete

func (r *StandardStorage) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error)

GracefulDeleter

func (*StandardStorage) DeleteCollection

func (r *StandardStorage) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error)

CollectionDeleter

func (*StandardStorage) Destroy added in v0.25.0

func (r *StandardStorage) Destroy()

func (*StandardStorage) Get

func (r *StandardStorage) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

func (*StandardStorage) GetSingularName added in v0.29.2

func (r *StandardStorage) GetSingularName() string

func (*StandardStorage) GroupVersionKind

func (r *StandardStorage) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind

func (*StandardStorage) List

func (*StandardStorage) NamespaceScoped

func (r *StandardStorage) NamespaceScoped() bool

func (*StandardStorage) New

func (r *StandardStorage) New() runtime.Object

Getter

func (*StandardStorage) NewList

func (r *StandardStorage) NewList() runtime.Object

Lister

func (*StandardStorage) Update

func (r *StandardStorage) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)

CreaterUpdater

func (*StandardStorage) Watch

Watcher

type TypeInfo

type TypeInfo struct {
	GroupVersion    schema.GroupVersion
	Resource        string
	Kind            string
	NamespaceScoped bool
}

type VersionResource

type VersionResource struct {
	Version  string
	Resource string
}

Jump to

Keyboard shortcuts

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