translation

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSimpleTranslationStrategy

func NewSimpleTranslationStrategy(translator SimpleTranslator, strategy strategy.CompleteStrategy) strategy.CompleteStrategy

Types

type SimpleTranslator

type SimpleTranslator interface {
	FromPublic(obj mtypes.Object) mtypes.Object
	ToPublic(obj mtypes.Object) mtypes.Object
}

type Strategy

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

func NewTranslationStrategy

func NewTranslationStrategy(translator Translator, strategy strategy.CompleteStrategy) *Strategy

func (*Strategy) Create

func (t *Strategy) Create(ctx context.Context, object types.Object) (types.Object, error)

func (*Strategy) Delete

func (t *Strategy) Delete(ctx context.Context, obj types.Object) (types.Object, error)

func (*Strategy) Destroy

func (t *Strategy) Destroy()

func (*Strategy) Get

func (t *Strategy) Get(ctx context.Context, namespace, name string) (types.Object, error)

func (*Strategy) List

func (t *Strategy) List(ctx context.Context, namespace string, opts storage.ListOptions) (types.ObjectList, error)

func (*Strategy) New

func (t *Strategy) New() types.Object

func (*Strategy) NewList

func (t *Strategy) NewList() types.ObjectList

func (*Strategy) Scheme

func (t *Strategy) Scheme() *runtime.Scheme

func (*Strategy) Update

func (t *Strategy) Update(ctx context.Context, obj types.Object) (types.Object, error)

func (*Strategy) UpdateStatus

func (t *Strategy) UpdateStatus(ctx context.Context, obj types.Object) (types.Object, error)

func (*Strategy) Watch

func (t *Strategy) Watch(ctx context.Context, namespace string, opts storage.ListOptions) (<-chan watch.Event, error)

type Translator

type Translator interface {
	FromPublicName(ctx context.Context, namespace, name string) (string, string, error)
	ListOpts(ctx context.Context, namespace string, opts storage.ListOptions) (string, storage.ListOptions, error)
	ToPublic(ctx context.Context, obj ...runtime.Object) ([]types.Object, error)
	FromPublic(ctx context.Context, obj runtime.Object) (types.Object, error)
	NewPublic() types.Object
	NewPublicList() types.ObjectList
}

func NewSimpleTranslator

func NewSimpleTranslator(translator SimpleTranslator, pubType mtypes.Object, scheme *runtime.Scheme) Translator

Jump to

Keyboard shortcuts

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