schema

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2025 License: Apache-2.0 Imports: 17 Imported by: 12 modules, 47 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapServer

func WrapServer(factory Factory, server *apiserver.Server) http.Handler

Types

type Collection

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

func NewCollection

func NewCollection(ctx context.Context, baseSchema *types.APISchemas, access accesscontrol.AccessSetLookup) *Collection

func (*Collection) AddTemplate

func (c *Collection) AddTemplate(templates ...Template)

func (*Collection) ByGVK

func (c *Collection) ByGVK(gvk schema.GroupVersionKind) string

func (*Collection) ByGVR

func (*Collection) IDs

func (c *Collection) IDs() (result []string)

func (*Collection) OnChange

func (c *Collection) OnChange(ctx context.Context, cb func())

func (*Collection) Reset

func (c *Collection) Reset(schemas map[string]*types.APISchema)

func (*Collection) Schema

func (c *Collection) Schema(id string) *types.APISchema

func (*Collection) Schemas

func (c *Collection) Schemas(user user.Info) (*types.APISchemas, error)

type Factory

type Factory interface {
	Schemas(user user.Info) (*types.APISchemas, error)
	ByGVR(gvr schema.GroupVersionResource) string
	ByGVK(gvr schema.GroupVersionKind) string
	OnChange(ctx context.Context, cb func())
	AddTemplate(template ...Template)
}

type Template

type Template struct {
	Group        string
	Kind         string
	ID           string
	Customize    func(*types.APISchema)
	Formatter    types.Formatter
	Store        types.Store
	Start        func(ctx context.Context) error
	StoreFactory func(types.Store) types.Store
}

Directories

Path Synopsis
Package converter is responsible for converting the types registered with a k8s server to schemas which can be used by the UI (and other consumers) to discover the resources available and the current user's permissions.
Package converter is responsible for converting the types registered with a k8s server to schemas which can be used by the UI (and other consumers) to discover the resources available and the current user's permissions.
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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