v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCObjectMeta

func NewGRPCObjectMeta(in *ObjectMeta) *metav1grpc.ObjectMeta

NewGRPCObjectMeta 基于 *ObjectMeta 创建 *metav1grpc.ObjectMeta

Types

type ListMeta

type ListMeta struct {
}

ListMeta 列表对象元信息

type ObjectMeta

type ObjectMeta struct {
	// 对象名
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	// 对象全局唯一 ID
	UID UID `json:"uid,omitempty" yaml:"uid,omitempty"`
	// 注解
	Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
	// 对象所有者用户名列表
	Owners []string `json:"owners,omitempty" yaml:"owners,omitempty"`
}

ObjectMeta 对象元信息

func NewObjectMetaFromGRPC

func NewObjectMetaFromGRPC(in *metav1grpc.ObjectMeta) *ObjectMeta

NewObjectMetaFromGRPC 基于 *metav1grpc.ObjectMeta 创建 *ObjectMeta

type Status

type Status struct {
	Code    int    `json:"code" yaml:"code"`
	Reason  string `json:"reason,omitempty" yaml:"reason,omitempty"`
	Message string `json:"message,omitempty" yaml:"message,omitempty"`
}

Status 结果状态

func (*Status) Error

func (s *Status) Error() string

Error 返回错误的字符串描述

func (*Status) GRPCStatus

func (s *Status) GRPCStatus() *status.Status

GRPCStatus 转为 gRPC 错误

type UID

type UID string

UID 唯一 ID

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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