mongodb

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListOptions added in v1.7.0

type ListOptions struct {
	RoleName, RoleNamespace string
}

type PolicyColl added in v1.7.0

type PolicyColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewPolicyColl added in v1.7.0

func NewPolicyColl() *PolicyColl

func (*PolicyColl) EnsureIndex added in v1.7.0

func (c *PolicyColl) EnsureIndex(ctx context.Context) error

func (*PolicyColl) GetCollectionName added in v1.7.0

func (c *PolicyColl) GetCollectionName() string

func (*PolicyColl) List added in v1.7.0

func (c *PolicyColl) List() ([]*models.Policy, error)

func (*PolicyColl) UpdateOrCreate added in v1.7.0

func (c *PolicyColl) UpdateOrCreate(obj *models.Policy) error

type RoleBindingColl

type RoleBindingColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewRoleBindingColl

func NewRoleBindingColl() *RoleBindingColl

func (*RoleBindingColl) BulkCreate added in v1.7.0

func (c *RoleBindingColl) BulkCreate(objs []*models.RoleBinding) error

func (*RoleBindingColl) Create

func (c *RoleBindingColl) Create(obj *models.RoleBinding) error

func (*RoleBindingColl) Delete added in v1.7.0

func (c *RoleBindingColl) Delete(name string, projectName string) error

func (*RoleBindingColl) DeleteByRole added in v1.7.0

func (c *RoleBindingColl) DeleteByRole(roleName string, projectName string) error

func (*RoleBindingColl) DeleteByRoles added in v1.7.0

func (c *RoleBindingColl) DeleteByRoles(roleNames []string, projectName string) error

func (*RoleBindingColl) DeleteMany added in v1.7.0

func (c *RoleBindingColl) DeleteMany(names []string, projectName string) error

func (*RoleBindingColl) EnsureIndex

func (c *RoleBindingColl) EnsureIndex(ctx context.Context) error

func (*RoleBindingColl) GetCollectionName

func (c *RoleBindingColl) GetCollectionName() string

func (*RoleBindingColl) List

func (c *RoleBindingColl) List(opts ...*ListOptions) ([]*models.RoleBinding, error)

func (*RoleBindingColl) ListBy added in v1.7.0

func (c *RoleBindingColl) ListBy(projectName, uid string) ([]*models.RoleBinding, error)

func (*RoleBindingColl) UpdateOrCreate added in v1.7.0

func (c *RoleBindingColl) UpdateOrCreate(obj *models.RoleBinding) error

type RoleColl

type RoleColl struct {
	*mongo.Collection
	// contains filtered or unexported fields
}

func NewRoleColl

func NewRoleColl() *RoleColl

func (*RoleColl) Create

func (c *RoleColl) Create(obj *models.Role) error

func (*RoleColl) Delete added in v1.7.0

func (c *RoleColl) Delete(name string, projectName string) error

func (*RoleColl) DeleteMany added in v1.7.0

func (c *RoleColl) DeleteMany(names []string, projectName string) error

func (*RoleColl) EnsureIndex

func (c *RoleColl) EnsureIndex(ctx context.Context) error

func (*RoleColl) Get

func (c *RoleColl) Get(ns, name string) (*models.Role, bool, error)

func (*RoleColl) GetCollectionName

func (c *RoleColl) GetCollectionName() string

func (*RoleColl) List

func (c *RoleColl) List() ([]*models.Role, error)

func (*RoleColl) ListBy added in v1.7.0

func (c *RoleColl) ListBy(projectName string) ([]*models.Role, error)

func (*RoleColl) UpdateOrCreate added in v1.7.0

func (c *RoleColl) UpdateOrCreate(obj *models.Role) error

func (*RoleColl) UpdateRole added in v1.7.0

func (c *RoleColl) UpdateRole(obj *models.Role) error

Jump to

Keyboard shortcuts

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