schema

package
v0.0.0-...-52cadad Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

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

func NewCollection

func NewCollection(ctx context.Context, baseSchema *types2.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]*types2.APISchema)

func (*Collection) Schema

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

func (*Collection) Schemas

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

type Factory

type Factory interface {
	Schemas(user user.Info) (*types2.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(*types2.APISchema)
	Formatter    types2.Formatter
	Store        types2.Store
	Start        func(ctx context.Context) error
	StoreFactory func(types2.Store) types2.Store
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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