model

package
v0.9.209 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AllCluster   = "all"
	AllNamespace = "all"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRBACMessage

type CreateRBACMessage struct {
	Success   bool   `json:"success,omitempty"` // 是否创建成功
	ClusterID string `json:"clusterID"`
	Message   string `json:"message,omitempty"` // 创建结果的信息
}

CreateRBACMessage - 创建RBAC权限接口的主要信息

type CreateRBACResponse

type CreateRBACResponse struct {
	RBACResponse
	Data []*CreateRBACMessage `json:"data"`
}

CreateRBACResponse - 创建 RBAC 权限接口的返回

type GetRBACMessage

type GetRBACMessage struct {
	Role        RBACRole `json:"role,omitempty"`
	ClusterID   string   `json:"clusterID,omitempty"`
	Namespace   string   `json:"namespace,omitempty"`
	ClusterName string   `json:"clusterName,omitempty"`
}

type GetRBACResponse

type GetRBACResponse struct {
	RequestID string            `json:"requestID,omitempty"` // request id
	Data      []*GetRBACMessage `json:"data"`
}

GetRBACResponse - 获取RBAC权限列表的返回

type RBACRequest

type RBACRequest struct {
	ClusterID string   `json:"clusterID"`
	UserID    string   `json:"userID"`
	Namespace string   `json:"namespace"`
	Role      RBACRole `json:"role"`
}

RBACRequest - 创建 RBAC 请求内容

type RBACResponse

type RBACResponse struct {
	RequestID string `json:"requestID,omitempty"` // request id
}

RBACResponse - 应答,仅包含 requestID

type RBACRole

type RBACRole string

RBACRole - RBAC 角色

const (
	// RoleAdmin - 管理员权限
	RoleAdmin RBACRole = "cce:admin" // 管理员

	// RoleDevOps - 运维开发权限
	RoleDevOps RBACRole = "cce:devops" // 运维开发

	// RoleReadonly - 只读权限
	RoleReadonly RBACRole = "cce:readonly" // 只读
)

Jump to

Keyboard shortcuts

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