db

package
v0.0.0-...-2a34e5d Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 32 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	DB    *gorm.DB
	SQLDB *sql.DB
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(schema *runtime.Scheme, dsn string) (*Factory, error)

func (*Factory) Check

func (f *Factory) Check(req *http.Request) error

func (*Factory) Name

func (f *Factory) Name() string

func (*Factory) NewDBStrategy

func (f *Factory) NewDBStrategy(obj types.Object) (strategy.CompleteStrategy, error)

func (*Factory) Scheme

func (f *Factory) Scheme() *runtime.Scheme

type Strategy

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

func New

func New(ctx context.Context, sqlDB *sql.DB, gvk schema.GroupVersionKind, scheme *runtime.Scheme, tableName string) (*Strategy, error)

func (*Strategy) Create

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

func (*Strategy) Delete

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

func (*Strategy) Destroy

func (s *Strategy) Destroy()

func (*Strategy) Get

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

func (*Strategy) List

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

func (*Strategy) New

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

func (*Strategy) NewList

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

func (*Strategy) Scheme

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

func (*Strategy) Update

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

func (*Strategy) UpdateStatus

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

func (*Strategy) Watch

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

type TableNamer

type TableNamer interface {
	TableName() string
}

Directories

Path Synopsis
Package glogrus provides a gorm logger that wraps a logrus.Logger.
Package glogrus provides a gorm logger that wraps a logrus.Logger.

Jump to

Keyboard shortcuts

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