Documentation ¶
Index ¶
- type Label
- type LabelBinding
- type LabelBindingColl
- func (c *LabelBindingColl) BulkDelete(labelBindings []*LabelBinding) error
- func (c *LabelBindingColl) BulkDeleteByIds(ids []string) error
- func (c *LabelBindingColl) BulkDeleteByLabelIds(labelIds []string) error
- func (c *LabelBindingColl) BulkDeleteByProject(projectName string) error
- func (c *LabelBindingColl) CreateMany(labelBindings []*LabelBinding) error
- func (c *LabelBindingColl) EnsureIndex(ctx context.Context) error
- func (c *LabelBindingColl) FindByOpt(opt *LabelBindingCollFindOpt) (*models.LabelBinding, error)
- func (c *LabelBindingColl) GetCollectionName() string
- func (c *LabelBindingColl) ListByOpt(opt *LabelBindingCollFindOpt) ([]*models.LabelBinding, error)
- func (c *LabelBindingColl) ListByResources(opt ListLabelBindingsByResources) ([]*models.LabelBinding, error)
- type LabelBindingCollFindOpt
- type LabelColl
- func (c *LabelColl) BulkCreate(labels []*models.Label) error
- func (c *LabelColl) BulkDelete(ids []string) error
- func (c *LabelColl) BulkDeleteByProject(projectName string) error
- func (c *LabelColl) Delete(id string) error
- func (c *LabelColl) EnsureIndex(ctx context.Context) error
- func (c *LabelColl) Find(id string) (*models.Label, error)
- func (c *LabelColl) GetCollectionName() string
- func (c *LabelColl) List(opt ListLabelOpt) ([]*models.Label, error)
- func (c *LabelColl) ListByIDs(ids []string) ([]*models.Label, error)
- func (c *LabelColl) ListByProjectName(projectName string) ([]*models.Label, error)
- type ListLabelBindingsByResources
- type ListLabelOpt
- type Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Label ¶
type Label struct { Key string `json:"key"` Value string `json:"value"` Type setting.ResourceType `json:"type"` ProjectName string `json:"project_name"` }
type LabelBinding ¶
type LabelBindingColl ¶
type LabelBindingColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewLabelBindingColl ¶
func NewLabelBindingColl() *LabelBindingColl
func (*LabelBindingColl) BulkDelete ¶
func (c *LabelBindingColl) BulkDelete(labelBindings []*LabelBinding) error
func (*LabelBindingColl) BulkDeleteByIds ¶
func (c *LabelBindingColl) BulkDeleteByIds(ids []string) error
func (*LabelBindingColl) BulkDeleteByLabelIds ¶
func (c *LabelBindingColl) BulkDeleteByLabelIds(labelIds []string) error
func (*LabelBindingColl) BulkDeleteByProject ¶
func (c *LabelBindingColl) BulkDeleteByProject(projectName string) error
func (*LabelBindingColl) CreateMany ¶
func (c *LabelBindingColl) CreateMany(labelBindings []*LabelBinding) error
func (*LabelBindingColl) EnsureIndex ¶
func (c *LabelBindingColl) EnsureIndex(ctx context.Context) error
func (*LabelBindingColl) FindByOpt ¶
func (c *LabelBindingColl) FindByOpt(opt *LabelBindingCollFindOpt) (*models.LabelBinding, error)
func (*LabelBindingColl) GetCollectionName ¶
func (c *LabelBindingColl) GetCollectionName() string
func (*LabelBindingColl) ListByOpt ¶
func (c *LabelBindingColl) ListByOpt(opt *LabelBindingCollFindOpt) ([]*models.LabelBinding, error)
func (*LabelBindingColl) ListByResources ¶
func (c *LabelBindingColl) ListByResources(opt ListLabelBindingsByResources) ([]*models.LabelBinding, error)
type LabelBindingCollFindOpt ¶
type LabelColl ¶
type LabelColl struct { *mongo.Collection // contains filtered or unexported fields }
func NewLabelColl ¶
func NewLabelColl() *LabelColl
func (*LabelColl) BulkDelete ¶
func (*LabelColl) BulkDeleteByProject ¶
func (*LabelColl) GetCollectionName ¶
type ListLabelBindingsByResources ¶
type ListLabelBindingsByResources struct {
Resources []Resource
}
type ListLabelOpt ¶
type ListLabelOpt struct {
Labels []Label
}
Click to show internal directories.
Click to hide internal directories.