schema

package
v0.0.0-...-43fc03f Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 30

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