models

package
v0.0.0-...-6cdb919 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Copyright The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	DoesNotExist string = "!"
	Equals       string = "="
	In           string = "in"
	NotEquals    string = "!="
	NotIn        string = "notin"
	Exists       string = "exists"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metatag

type Metatag struct {
	TagKey      string    `json:"tagKey"`
	TagValue    string    `json:"tagValue"`
	Description string    `json:"description"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type Tag

type Tag struct {
	ID           uint   `gorm:"primarykey"`
	ResourceID   uint   `gorm:"uniqueIndex:idx_resource_key"`
	ResourceType string `gorm:"uniqueIndex:idx_resource_key"`
	Key          string `gorm:"uniqueIndex:idx_resource_key;column:tag_key"`
	Value        string `gorm:"column:tag_value"`
	CreatedAt    time.Time
	UpdatedAt    time.Time
	CreatedBy    uint
	UpdatedBy    uint
}

type TagBasic

type TagBasic struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type TagSelector

type TagSelector struct {
	Key      string      `json:"key"`
	Values   sets.String `json:"values"`
	Operator string      `json:"operator"`
}

type Tags

type Tags []*Tag

func (Tags) Eq

func (t Tags) Eq(rhs Tags) bool

func (Tags) IntoTagsBasic

func (t Tags) IntoTagsBasic() TagsBasic

type TagsBasic

type TagsBasic []*TagBasic

func (TagsBasic) Eq

func (t TagsBasic) Eq(rhs Tags) bool

func (TagsBasic) IntoTags

func (t TagsBasic) IntoTags(resourceType models.ResourceType, resourceID uint) []*Tag

Jump to

Keyboard shortcuts

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