get_policy

package
v7.23.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

查询指定授权策略详情

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

type Actions = []string

授权策略规则的操作集合

type Data

type Data struct {
	Id          string     // 记录 ID
	RootUid     int64      // 根用户 uid
	Alias       string     // 授权策略别名
	Description string     // 授权策略描述
	Enabled     bool       // 授权策略是否启用
	CreatedAt   string     // 授权策略创建时间
	UpdatedAt   string     // 授权策略上次更新时间
	Statement   Statements // 授权策略规则集合
}

授权策略信息

func (*Data) MarshalJSON

func (j *Data) MarshalJSON() ([]byte, error)

func (*Data) UnmarshalJSON

func (j *Data) UnmarshalJSON(data []byte) error

type GetPolicyData

type GetPolicyData = Data

返回的授权策略信息

type GetPolicyResp

type GetPolicyResp = Response

返回的授权策略响应

type Request

type Request struct {
	Alias       string                          // 授权策略别名
	Credentials credentials.CredentialsProvider // 鉴权参数,用于生成鉴权凭证,如果为空,则使用 HTTPClientOptions 中的 CredentialsProvider
}

调用 API 所用的请求

type Resources

type Resources = []string

授权策略规则的资源集合

type Response

type Response struct {
	Data GetPolicyData // 授权策略信息
}

获取 API 所用的响应

func (*Response) MarshalJSON

func (j *Response) MarshalJSON() ([]byte, error)

func (*Response) UnmarshalJSON

func (j *Response) UnmarshalJSON(data []byte) error

type Statement

type Statement struct {
	Actions   Actions   // 授权策略规则的操作集合
	Resources Resources // 授权策略规则的资源集合
	Effect    string    // 授权策略规则的生效类型,允许访问或拒绝访问
}

授权策略规则

func (*Statement) MarshalJSON

func (j *Statement) MarshalJSON() ([]byte, error)

func (*Statement) UnmarshalJSON

func (j *Statement) UnmarshalJSON(data []byte) error

type Statements

type Statements = []Statement

授权策略规则集合

Jump to

Keyboard shortcuts

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