postgres

package
v1.0.2-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespaceFilter

type NamespaceFilter database.NamespaceFilter

func (*NamespaceFilter) Filter

func (f *NamespaceFilter) Filter(q *orm.Query) (*orm.Query, error)

type PgDB

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

func Connect

func Connect(dbURL string) (*PgDB, error)

func (*PgDB) AllNamespaces

func (pgdb *PgDB) AllNamespaces(ctx context.Context, filter database.NamespaceFilter) (ret []model.Namespace, err error)

func (*PgDB) Close

func (pgdb *PgDB) Close() error

func (*PgDB) CreateNamespace

func (pgdb *PgDB) CreateNamespace(ctx context.Context, namespace *model.Namespace) error

func (*PgDB) CreateProject added in v1.0.2

func (pgdb *PgDB) CreateProject(ctx context.Context, project *model.Project) error

func (*PgDB) DeleteAllUserNamespaces

func (pgdb *PgDB) DeleteAllUserNamespaces(ctx context.Context, userID string) (deleted []model.Namespace, err error)

func (*PgDB) DeleteGroupFromNamespace added in v1.0.2

func (pgdb *PgDB) DeleteGroupFromNamespace(ctx context.Context, namespace, groupID string) (deletedPerms []model.Permission, err error)

func (*PgDB) DeleteGroupFromProject added in v1.0.2

func (pgdb *PgDB) DeleteGroupFromProject(ctx context.Context, projectID, groupID string) (deletedPerms []model.Permission, err error)

func (*PgDB) DeleteNamespace

func (pgdb *PgDB) DeleteNamespace(ctx context.Context, namespace *model.Namespace) error

func (*PgDB) DeleteNamespaceAccess

func (pgdb *PgDB) DeleteNamespaceAccess(ctx context.Context, ns model.Namespace, userID string) error

func (*PgDB) GroupNamespaces added in v1.0.2

func (pgdb *PgDB) GroupNamespaces(ctx context.Context, groupID string) (ret []model.NamespaceWithPermissions, err error)

func (*PgDB) NamespaceByID

func (pgdb *PgDB) NamespaceByID(ctx context.Context, userID, id string) (ret model.NamespaceWithPermissions, err error)

func (*PgDB) NamespaceByIDForEveryone added in v1.0.2

func (pgdb *PgDB) NamespaceByIDForEveryone(ctx context.Context, id string) (ret model.NamespaceWithPermissions, err error)

func (*PgDB) NamespaceByLabel

func (pgdb *PgDB) NamespaceByLabel(ctx context.Context, userID, label string) (ret model.NamespaceWithPermissions, err error)

func (*PgDB) NamespacePermissions

func (pgdb *PgDB) NamespacePermissions(ctx context.Context, ns *model.NamespaceWithPermissions) error

func (*PgDB) ProjectByID added in v1.0.2

func (pgdb *PgDB) ProjectByID(ctx context.Context, project string) (p model.Project, err error)

func (*PgDB) RenameNamespace

func (pgdb *PgDB) RenameNamespace(ctx context.Context, namespace *model.Namespace, newLabel string) error

func (*PgDB) ResizeNamespace

func (pgdb *PgDB) ResizeNamespace(ctx context.Context, namespace model.Namespace) error

func (*PgDB) SetNamespaceAccess

func (pgdb *PgDB) SetNamespaceAccess(ctx context.Context, ns model.Namespace, accessLevel kubeClientModel.AccessLevel, toUserID string) error

func (*PgDB) SetNamespaceAccesses added in v1.0.2

func (pgdb *PgDB) SetNamespaceAccesses(ctx context.Context, ns model.Namespace, accessList []database.AccessListElement) error

func (*PgDB) SetNamespacesAccesses added in v1.0.2

func (pgdb *PgDB) SetNamespacesAccesses(ctx context.Context, namespaces []model.Namespace, accessList []database.AccessListElement) error

func (*PgDB) SetUserAccesses

func (pgdb *PgDB) SetUserAccesses(ctx context.Context, userID string, level kubeClientModel.AccessLevel) error

func (*PgDB) Transactional

func (pgdb *PgDB) Transactional(fn func(tx database.DB) error) error

func (*PgDB) UserAccesses

func (pgdb *PgDB) UserAccesses(ctx context.Context, userID string) ([]database.AccessWithLabel, error)

func (*PgDB) UserNamespaces

func (pgdb *PgDB) UserNamespaces(ctx context.Context, userID string, filter database.NamespaceFilter) (ret []model.NamespaceWithPermissions, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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