mongodb

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollaborationInstanceColl

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

func NewCollaborationInstanceColl

func NewCollaborationInstanceColl() *CollaborationInstanceColl

func (*CollaborationInstanceColl) FindInstance

func (c *CollaborationInstanceColl) FindInstance(uid, projectKey string) (*models.CollaborationInstance, error)

func (*CollaborationInstanceColl) GetCollectionName

func (c *CollaborationInstanceColl) GetCollectionName() string

type CollaborationModeColl

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

func NewCollaborationModeColl

func NewCollaborationModeColl() *CollaborationModeColl

func (*CollaborationModeColl) GetCollectionName

func (c *CollaborationModeColl) GetCollectionName() string

func (*CollaborationModeColl) ListUserCollaborationMode

func (c *CollaborationModeColl) ListUserCollaborationMode(uid string) ([]*models.CollaborationMode, error)

type ListOptions

type ListOptions struct {
	RoleName, RoleNamespace string
}

type ListRoleBindingsOpt

type ListRoleBindingsOpt struct {
	RoleBindings []RoleBinding
}

type ProjectColl

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

func NewProjectColl

func NewProjectColl() *ProjectColl

func (*ProjectColl) GetCollectionName

func (c *ProjectColl) GetCollectionName() string

func (*ProjectColl) List

func (c *ProjectColl) List() ([]*models.Project, error)

type RoleBinding

type RoleBinding struct {
	Uid       string `json:"uid"`
	Namespace string `json:"namespace"`
}

type RoleBindingColl

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

func NewRoleBindingColl

func NewRoleBindingColl() *RoleBindingColl

func (*RoleBindingColl) BulkCreate

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

func (*RoleBindingColl) Create

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

func (*RoleBindingColl) Delete

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

func (*RoleBindingColl) DeleteByRole

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

func (*RoleBindingColl) DeleteByRoles

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

func (*RoleBindingColl) DeleteMany

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

func (*RoleBindingColl) GetCollectionName

func (c *RoleBindingColl) GetCollectionName() string

func (*RoleBindingColl) List

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

func (*RoleBindingColl) ListAllUserRB

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

func (*RoleBindingColl) ListBy

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

func (*RoleBindingColl) ListByRoleBindingOpt

func (c *RoleBindingColl) ListByRoleBindingOpt(opt ListRoleBindingsOpt) ([]*models.RoleBinding, error)

func (*RoleBindingColl) ListRoleBindingsByUIDs

func (c *RoleBindingColl) ListRoleBindingsByUIDs(uids []string) ([]*models.RoleBinding, error)

func (*RoleBindingColl) ListSystemRoleBindingsByUIDs

func (c *RoleBindingColl) ListSystemRoleBindingsByUIDs(uids []string) ([]*models.RoleBinding, error)

func (*RoleBindingColl) ListUserRoleBinding

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

func (*RoleBindingColl) UpdateOrCreate

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

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

func (*RoleColl) DeleteMany

func (c *RoleColl) DeleteMany(names []string, projectName string) 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

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

func (*RoleColl) ListBySpaceAndName

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

func (*RoleColl) ListRoleByVerb

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

func (*RoleColl) UpdateOrCreate

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

func (*RoleColl) UpdateRole

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

type UserSettingColl

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

func NewUserSettingColl

func NewUserSettingColl() *UserSettingColl

func (*UserSettingColl) DeleteUserSettingByUid

func (c *UserSettingColl) DeleteUserSettingByUid(uid string) error

func (*UserSettingColl) EnsureIndex

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

func (*UserSettingColl) GetCollectionName

func (c *UserSettingColl) GetCollectionName() string

func (*UserSettingColl) GetUserSettingByUid

func (c *UserSettingColl) GetUserSettingByUid(uid string) (*models.UserSetting, error)

func (*UserSettingColl) UpsertUserSetting

func (c *UserSettingColl) UpsertUserSetting(args *models.UserSetting) error

Jump to

Keyboard shortcuts

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