database

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database added in v0.1.0

type Database interface {
	Close(cxt context.Context) error
	CreateUser(ctx context.Context, username, password string) (map[string]string, error)
	DeleteUser(ctx context.Context, username string) error
	ApplyPrivileges(ctx context.Context, username string, privileges []v1alpha1.PrivilegeSpec) error
	RevokePrivileges(ctx context.Context, username string, privileges []v1alpha1.PrivilegeSpec) error
}

func NewDatabase added in v0.1.0

func NewDatabase(ctx context.Context, s v1alpha1.DatabaseSpec, client client.Client, logger logr.Logger) (Database, error)

type FakeDatabase added in v0.1.0

type FakeDatabase struct {
	Conn fakeConnection
}

func NewFakeDatabase added in v0.1.0

func NewFakeDatabase() *FakeDatabase

func (*FakeDatabase) DatabaseCreatorFunc added in v0.1.0

func (f *FakeDatabase) DatabaseCreatorFunc() func(context.Context, v1alpha1.DatabaseSpec, client.Client, logr.Logger) (Database, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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