label

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*httpclient.Client
	// contains filtered or unexported fields
}

func New

func New() *Client

func (*Client) CreateLabelBindings

func (c *Client) CreateLabelBindings(request CreateLabelBindingsArgs) error

func (*Client) CreateLabels

func (c *Client) CreateLabels(request CreateLabelsArgs) (*CreateLabelsResp, error)

func (*Client) DeleteLabelBindings

func (c *Client) DeleteLabelBindings(request DeleteLabelBindingsArgs) error

func (*Client) DeleteLabels

func (c *Client) DeleteLabels(ids []string) error

func (*Client) ListLabels

func (c *Client) ListLabels(request ListLabelsArgs) (*ListLabelsResp, error)

func (*Client) ListLabelsByResources

func (c *Client) ListLabelsByResources(request ListLabelsByResourcesReq) (*ListLabelsByResourcesResp, error)

func (*Client) ListResourcesByLabels

func (c *Client) ListResourcesByLabels(request ListResourcesByLabelsReq) (*ListResourcesByLabelsResp, error)

type CreateLabelBindingsArgs

type CreateLabelBindingsArgs struct {
	LabelBindings []LabelBinding `json:"label_bindings"`
}

type CreateLabelsArgs

type CreateLabelsArgs struct {
	Labels []Label `json:"labels"`
}

type CreateLabelsResp

type CreateLabelsResp struct {
	LabelMap map[string]string `json:"label_map"`
}

type DeleteLabelBindingsArgs

type DeleteLabelBindingsArgs struct {
	LabelBindings []LabelBinding `json:"label_bindings"`
}

type Label

type Label struct {
	ID         primitive.ObjectID `bson:"_id,omitempty"               json:"id,omitempty"`
	Type       string             `bson:"type"                        json:"type"`
	Key        string             `bson:"key"                         json:"key"`
	Value      string             `bson:"value"                       json:"value"`
	CreateBy   string             `bson:"create_by"                   json:"create_by"`
	CreateTime int64              `bson:"create_time"                 json:"create_time"`
}

type LabelBinding

type LabelBinding struct {
	Resource   Resource `json:"resource"`
	LabelID    string   `json:"label_id"`
	CreateBy   string   `json:"create_by"`
	CreateTime int64    `json:"create_time"`
}

type LabelModel

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

type ListLabelsArgs

type ListLabelsArgs struct {
	Labels []LabelModel `json:"labels"`
}

type ListLabelsByResourcesReq

type ListLabelsByResourcesReq struct {
	Resources []Resource `json:"resources"`
}

type ListLabelsByResourcesResp

type ListLabelsByResourcesResp struct {
	Labels map[string][]*Label `json:"labels"`
}

type ListLabelsResp

type ListLabelsResp struct {
	Labels []Label `json:"labels"`
}

type ListResourcesByLabelsReq

type ListResourcesByLabelsReq struct {
	LabelFilters []Label `json:"label_filters"`
}

type ListResourcesByLabelsResp

type ListResourcesByLabelsResp struct {
	Resources map[string][]Resource `json:"resources"`
}

type Resource

type Resource struct {
	Name        string `json:"name"`
	ProjectName string `json:"project_name"`
	Type        string `json:"type"`
}

Jump to

Keyboard shortcuts

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