Documentation
¶
Overview ¶
Package adminsdk provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
Index ¶
- func NewCreateAdminRoleRequest(server string, params *CreateAdminRoleParams, ...) (*http.Request, error)
- func NewCreateAdminRoleRequestWithBody(server string, params *CreateAdminRoleParams, contentType string, ...) (*http.Request, error)
- func NewGetAdminEffectiveRequest(server string, subject string, params *GetAdminEffectiveParams) (*http.Request, error)
- func NewGetAdminRoleRequest(server string, role string) (*http.Request, error)
- func NewGrantAdminRoleRequest(server string, subject string, params *GrantAdminRoleParams, ...) (*http.Request, error)
- func NewGrantAdminRoleRequestWithBody(server string, subject string, params *GrantAdminRoleParams, ...) (*http.Request, error)
- func NewListAdminRoleTemplatesRequest(server string) (*http.Request, error)
- func NewListPlatformOperationsRequest(server string, params *ListPlatformOperationsParams) (*http.Request, error)
- func NewRevokeAdminRoleRequest(server string, subject string, params *RevokeAdminRoleParams, ...) (*http.Request, error)
- func NewRevokeAdminRoleRequestWithBody(server string, subject string, params *RevokeAdminRoleParams, ...) (*http.Request, error)
- type AdminAudit
- type AdminAuditPage
- type AdminAuditPageSource
- type AdminEffective
- type AdminEffectiveAuthorizationMode
- type AdminError
- type AdminErrorCode
- type AdminGrant
- type AdminMutation
- type AdminRevision
- type AdminRole
- type AdminRoleInput
- type AdminScope
- type Client
- func (c *Client) CreateAdminRole(ctx context.Context, params *CreateAdminRoleParams, ...) (*http.Response, error)
- func (c *Client) CreateAdminRoleWithBody(ctx context.Context, params *CreateAdminRoleParams, contentType string, ...) (*http.Response, error)
- func (c *Client) GetAdminEffective(ctx context.Context, subject string, params *GetAdminEffectiveParams, ...) (*http.Response, error)
- func (c *Client) GetAdminRole(ctx context.Context, role string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GrantAdminRole(ctx context.Context, subject string, params *GrantAdminRoleParams, ...) (*http.Response, error)
- func (c *Client) GrantAdminRoleWithBody(ctx context.Context, subject string, params *GrantAdminRoleParams, ...) (*http.Response, error)
- func (c *Client) ListAdminRoleTemplates(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListPlatformOperations(ctx context.Context, params *ListPlatformOperationsParams, ...) (*http.Response, error)
- func (c *Client) RevokeAdminRole(ctx context.Context, subject string, params *RevokeAdminRoleParams, ...) (*http.Response, error)
- func (c *Client) RevokeAdminRoleWithBody(ctx context.Context, subject string, params *RevokeAdminRoleParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateAdminRoleWithBodyWithResponse(ctx context.Context, params *CreateAdminRoleParams, contentType string, ...) (*CreateAdminRoleResponse, error)
- func (c *ClientWithResponses) CreateAdminRoleWithResponse(ctx context.Context, params *CreateAdminRoleParams, ...) (*CreateAdminRoleResponse, error)
- func (c *ClientWithResponses) GetAdminEffectiveWithResponse(ctx context.Context, subject string, params *GetAdminEffectiveParams, ...) (*GetAdminEffectiveResponse, error)
- func (c *ClientWithResponses) GetAdminRoleWithResponse(ctx context.Context, role string, reqEditors ...RequestEditorFn) (*GetAdminRoleResponse, error)
- func (c *ClientWithResponses) GrantAdminRoleWithBodyWithResponse(ctx context.Context, subject string, params *GrantAdminRoleParams, ...) (*GrantAdminRoleResponse, error)
- func (c *ClientWithResponses) GrantAdminRoleWithResponse(ctx context.Context, subject string, params *GrantAdminRoleParams, ...) (*GrantAdminRoleResponse, error)
- func (c *ClientWithResponses) ListAdminRoleTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminRoleTemplatesResponse, error)
- func (c *ClientWithResponses) ListPlatformOperationsWithResponse(ctx context.Context, params *ListPlatformOperationsParams, ...) (*ListPlatformOperationsResponse, error)
- func (c *ClientWithResponses) RevokeAdminRoleWithBodyWithResponse(ctx context.Context, subject string, params *RevokeAdminRoleParams, ...) (*RevokeAdminRoleResponse, error)
- func (c *ClientWithResponses) RevokeAdminRoleWithResponse(ctx context.Context, subject string, params *RevokeAdminRoleParams, ...) (*RevokeAdminRoleResponse, error)
- type ClientWithResponsesInterface
- type CreateAdminRoleJSONRequestBody
- type CreateAdminRoleParams
- type CreateAdminRoleResponse
- func (r CreateAdminRoleResponse) ContentType() string
- func (r CreateAdminRoleResponse) GetBody() []byte
- func (r CreateAdminRoleResponse) GetJSON200() *AdminRole
- func (r CreateAdminRoleResponse) GetJSON400() *AdminError
- func (r CreateAdminRoleResponse) GetJSON401() *AdminError
- func (r CreateAdminRoleResponse) GetJSON403() *AdminError
- func (r CreateAdminRoleResponse) GetJSON404() *AdminError
- func (r CreateAdminRoleResponse) GetJSON409() *AdminError
- func (r CreateAdminRoleResponse) GetJSON503() *AdminError
- func (r CreateAdminRoleResponse) Status() string
- func (r CreateAdminRoleResponse) StatusCode() int
- type GetAdminEffectiveParams
- type GetAdminEffectiveResponse
- func (r GetAdminEffectiveResponse) ContentType() string
- func (r GetAdminEffectiveResponse) GetBody() []byte
- func (r GetAdminEffectiveResponse) GetJSON200() *AdminEffective
- func (r GetAdminEffectiveResponse) GetJSON400() *AdminError
- func (r GetAdminEffectiveResponse) GetJSON401() *AdminError
- func (r GetAdminEffectiveResponse) GetJSON403() *AdminError
- func (r GetAdminEffectiveResponse) GetJSON404() *AdminError
- func (r GetAdminEffectiveResponse) GetJSON409() *AdminError
- func (r GetAdminEffectiveResponse) GetJSON503() *AdminError
- func (r GetAdminEffectiveResponse) Status() string
- func (r GetAdminEffectiveResponse) StatusCode() int
- type GetAdminRoleResponse
- func (r GetAdminRoleResponse) ContentType() string
- func (r GetAdminRoleResponse) GetBody() []byte
- func (r GetAdminRoleResponse) GetJSON200() *AdminRole
- func (r GetAdminRoleResponse) GetJSON400() *AdminError
- func (r GetAdminRoleResponse) GetJSON401() *AdminError
- func (r GetAdminRoleResponse) GetJSON403() *AdminError
- func (r GetAdminRoleResponse) GetJSON404() *AdminError
- func (r GetAdminRoleResponse) GetJSON409() *AdminError
- func (r GetAdminRoleResponse) GetJSON503() *AdminError
- func (r GetAdminRoleResponse) Status() string
- func (r GetAdminRoleResponse) StatusCode() int
- type GrantAdminRoleJSONRequestBody
- type GrantAdminRoleParams
- type GrantAdminRoleResponse
- func (r GrantAdminRoleResponse) ContentType() string
- func (r GrantAdminRoleResponse) GetBody() []byte
- func (r GrantAdminRoleResponse) GetJSON200() *AdminRevision
- func (r GrantAdminRoleResponse) GetJSON400() *AdminError
- func (r GrantAdminRoleResponse) GetJSON401() *AdminError
- func (r GrantAdminRoleResponse) GetJSON403() *AdminError
- func (r GrantAdminRoleResponse) GetJSON404() *AdminError
- func (r GrantAdminRoleResponse) GetJSON409() *AdminError
- func (r GrantAdminRoleResponse) GetJSON503() *AdminError
- func (r GrantAdminRoleResponse) Status() string
- func (r GrantAdminRoleResponse) StatusCode() int
- type HttpRequestDoer
- type ListAdminRoleTemplatesResponse
- func (r ListAdminRoleTemplatesResponse) ContentType() string
- func (r ListAdminRoleTemplatesResponse) GetBody() []byte
- func (r ListAdminRoleTemplatesResponse) GetJSON200() *[]AdminRole
- func (r ListAdminRoleTemplatesResponse) GetJSON400() *AdminError
- func (r ListAdminRoleTemplatesResponse) GetJSON401() *AdminError
- func (r ListAdminRoleTemplatesResponse) GetJSON403() *AdminError
- func (r ListAdminRoleTemplatesResponse) GetJSON404() *AdminError
- func (r ListAdminRoleTemplatesResponse) GetJSON409() *AdminError
- func (r ListAdminRoleTemplatesResponse) GetJSON503() *AdminError
- func (r ListAdminRoleTemplatesResponse) Status() string
- func (r ListAdminRoleTemplatesResponse) StatusCode() int
- type ListPlatformOperationsParams
- type ListPlatformOperationsResponse
- func (r ListPlatformOperationsResponse) ContentType() string
- func (r ListPlatformOperationsResponse) GetBody() []byte
- func (r ListPlatformOperationsResponse) GetJSON200() *AdminAuditPage
- func (r ListPlatformOperationsResponse) GetJSON400() *AdminError
- func (r ListPlatformOperationsResponse) GetJSON401() *AdminError
- func (r ListPlatformOperationsResponse) GetJSON403() *AdminError
- func (r ListPlatformOperationsResponse) GetJSON404() *AdminError
- func (r ListPlatformOperationsResponse) GetJSON409() *AdminError
- func (r ListPlatformOperationsResponse) GetJSON503() *AdminError
- func (r ListPlatformOperationsResponse) Status() string
- func (r ListPlatformOperationsResponse) StatusCode() int
- type RequestEditorFn
- type RevokeAdminRoleJSONRequestBody
- type RevokeAdminRoleParams
- type RevokeAdminRoleResponse
- func (r RevokeAdminRoleResponse) ContentType() string
- func (r RevokeAdminRoleResponse) GetBody() []byte
- func (r RevokeAdminRoleResponse) GetJSON200() *AdminRevision
- func (r RevokeAdminRoleResponse) GetJSON400() *AdminError
- func (r RevokeAdminRoleResponse) GetJSON401() *AdminError
- func (r RevokeAdminRoleResponse) GetJSON403() *AdminError
- func (r RevokeAdminRoleResponse) GetJSON404() *AdminError
- func (r RevokeAdminRoleResponse) GetJSON409() *AdminError
- func (r RevokeAdminRoleResponse) GetJSON503() *AdminError
- func (r RevokeAdminRoleResponse) Status() string
- func (r RevokeAdminRoleResponse) StatusCode() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateAdminRoleRequest ¶
func NewCreateAdminRoleRequest(server string, params *CreateAdminRoleParams, body CreateAdminRoleJSONRequestBody) (*http.Request, error)
NewCreateAdminRoleRequest calls the generic CreateAdminRole builder with application/json body
func NewCreateAdminRoleRequestWithBody ¶
func NewCreateAdminRoleRequestWithBody(server string, params *CreateAdminRoleParams, contentType string, body io.Reader) (*http.Request, error)
NewCreateAdminRoleRequestWithBody constructs an http.Request for the CreateAdminRole method, with any body, and a specified content type
func NewGetAdminEffectiveRequest ¶
func NewGetAdminEffectiveRequest(server string, subject string, params *GetAdminEffectiveParams) (*http.Request, error)
NewGetAdminEffectiveRequest constructs an http.Request for the GetAdminEffective method
func NewGetAdminRoleRequest ¶
NewGetAdminRoleRequest constructs an http.Request for the GetAdminRole method
func NewGrantAdminRoleRequest ¶
func NewGrantAdminRoleRequest(server string, subject string, params *GrantAdminRoleParams, body GrantAdminRoleJSONRequestBody) (*http.Request, error)
NewGrantAdminRoleRequest calls the generic GrantAdminRole builder with application/json body
func NewGrantAdminRoleRequestWithBody ¶
func NewGrantAdminRoleRequestWithBody(server string, subject string, params *GrantAdminRoleParams, contentType string, body io.Reader) (*http.Request, error)
NewGrantAdminRoleRequestWithBody constructs an http.Request for the GrantAdminRole method, with any body, and a specified content type
func NewListAdminRoleTemplatesRequest ¶
NewListAdminRoleTemplatesRequest constructs an http.Request for the ListAdminRoleTemplates method
func NewListPlatformOperationsRequest ¶
func NewListPlatformOperationsRequest(server string, params *ListPlatformOperationsParams) (*http.Request, error)
NewListPlatformOperationsRequest constructs an http.Request for the ListPlatformOperations method
func NewRevokeAdminRoleRequest ¶
func NewRevokeAdminRoleRequest(server string, subject string, params *RevokeAdminRoleParams, body RevokeAdminRoleJSONRequestBody) (*http.Request, error)
NewRevokeAdminRoleRequest calls the generic RevokeAdminRole builder with application/json body
func NewRevokeAdminRoleRequestWithBody ¶
func NewRevokeAdminRoleRequestWithBody(server string, subject string, params *RevokeAdminRoleParams, contentType string, body io.Reader) (*http.Request, error)
NewRevokeAdminRoleRequestWithBody constructs an http.Request for the RevokeAdminRole method, with any body, and a specified content type
Types ¶
type AdminAudit ¶
type AdminAudit struct {
Action string `json:"action"`
Actor string `json:"actor"`
CreatedAt time.Time `json:"created_at"`
Id string `json:"id"`
// Reason 脱敏原因或原因码;原始记录未采集时为空。
Reason string `json:"reason"`
// Result success、denied、failed 或 unknown;不能从缺失字段推测成功。
Result string `json:"result"`
// Revision 授权变更后的修订号。
Revision *string `json:"revision,omitempty"`
// RoleId 角色授予或撤销时的角色 ID。
RoleId *string `json:"role_id,omitempty"`
Scope AdminScope `json:"scope"`
// Source 原始审计所属业务模块标识。
Source string `json:"source"`
Target string `json:"target"`
}
AdminAudit defines model for AdminAudit.
type AdminAuditPage ¶
type AdminAuditPage struct {
Items []AdminAudit `json:"items"`
MissingModules []string `json:"missing_modules"`
NextCursor string `json:"next_cursor"`
// Partial 当前分页过程存在提供方缺失。
Partial bool `json:"partial"`
// QueriedModules 当前有效授权允许查询的已装配模块。
QueriedModules []string `json:"queried_modules"`
// Source 汇总查询由 platform 提供,单条记录 source 标识原始模块。
Source AdminAuditPageSource `json:"source"`
}
AdminAuditPage defines model for AdminAuditPage.
type AdminAuditPageSource ¶
type AdminAuditPageSource string
AdminAuditPageSource 汇总查询由 platform 提供,单条记录 source 标识原始模块。
const (
Platform AdminAuditPageSource = "platform"
)
Defines values for AdminAuditPageSource.
func (AdminAuditPageSource) Valid ¶
func (e AdminAuditPageSource) Valid() bool
Valid indicates whether the value is a known member of the AdminAuditPageSource enum.
type AdminEffective ¶
type AdminEffective struct {
// AuthorizationMode platform_admin_all 表示被查询者是可信平台管理员,自动拥有任意能力及任意范围(含敏感能力);explicit_grants 表示按 grants 显式授权。不得用 grants 是否为空判断平台管理员权限。
AuthorizationMode AdminEffectiveAuthorizationMode `json:"authorization_mode"`
// Grants 查询范围内的显式授权记录;平台管理员的全部能力由 authorization_mode 表示,不创建虚假角色授权。
Grants []AdminGrant `json:"grants"`
Revision string `json:"revision"`
Subject string `json:"subject"`
}
AdminEffective defines model for AdminEffective.
type AdminEffectiveAuthorizationMode ¶
type AdminEffectiveAuthorizationMode string
AdminEffectiveAuthorizationMode platform_admin_all 表示被查询者是可信平台管理员,自动拥有任意能力及任意范围(含敏感能力);explicit_grants 表示按 grants 显式授权。不得用 grants 是否为空判断平台管理员权限。
const ( ExplicitGrants AdminEffectiveAuthorizationMode = "explicit_grants" PlatformAdminAll AdminEffectiveAuthorizationMode = "platform_admin_all" )
Defines values for AdminEffectiveAuthorizationMode.
func (AdminEffectiveAuthorizationMode) Valid ¶
func (e AdminEffectiveAuthorizationMode) Valid() bool
Valid indicates whether the value is a known member of the AdminEffectiveAuthorizationMode enum.
type AdminError ¶
type AdminError struct {
Code AdminErrorCode `json:"code"`
}
AdminError defines model for AdminError.
type AdminErrorCode ¶
type AdminErrorCode string
AdminErrorCode defines model for AdminError.Code.
const ( Conflict AdminErrorCode = "conflict" Forbidden AdminErrorCode = "forbidden" InvalidRequest AdminErrorCode = "invalid_request" NotFound AdminErrorCode = "not_found" Unauthenticated AdminErrorCode = "unauthenticated" )
Defines values for AdminErrorCode.
func (AdminErrorCode) Valid ¶
func (e AdminErrorCode) Valid() bool
Valid indicates whether the value is a known member of the AdminErrorCode enum.
type AdminGrant ¶
type AdminGrant struct {
Role AdminRole `json:"role"`
Scope AdminScope `json:"scope"`
}
AdminGrant defines model for AdminGrant.
type AdminMutation ¶
type AdminMutation struct {
ExpectedRevision string `json:"expected_revision"`
Reason string `json:"reason"`
RoleId string `json:"role_id"`
Scope AdminScope `json:"scope"`
}
AdminMutation defines model for AdminMutation.
type AdminRevision ¶
type AdminRevision struct {
Revision string `json:"revision"`
}
AdminRevision defines model for AdminRevision.
type AdminRole ¶
type AdminRole struct {
Capabilities []string `json:"capabilities"`
Id string `json:"id"`
Name string `json:"name"`
}
AdminRole defines model for AdminRole.
type AdminRoleInput ¶
AdminRoleInput defines model for AdminRoleInput.
type AdminScope ¶
type AdminScope struct {
// Group 精确标识或 *;三个维度同时满足,不根据群推导学校。
Group string `json:"group"`
// Module 精确标识或 *;三个维度同时满足,不根据群推导学校。
Module string `json:"module"`
// School 精确标识或 *;三个维度同时满足,不根据群推导学校。
School string `json:"school"`
}
AdminScope defines model for AdminScope.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateAdminRole ¶
func (c *Client) CreateAdminRole(ctx context.Context, params *CreateAdminRoleParams, body CreateAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAdminRole performs a POST /api/v1/platform/admin/roles (the `CreateAdminRole` operationId) request. Takes a body of the `application/json` content type.
只有可信平台管理员可以创建不可变角色定义。变更能力须使用新的角色 ID;角色数量上限 1000。.
func (*Client) CreateAdminRoleWithBody ¶
func (c *Client) CreateAdminRoleWithBody(ctx context.Context, params *CreateAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateAdminRoleWithBody performs a POST /api/v1/platform/admin/roles (the `CreateAdminRole` operationId) request, with any type of body and a specified content type.
只有可信平台管理员可以创建不可变角色定义。变更能力须使用新的角色 ID;角色数量上限 1000。.
func (*Client) GetAdminEffective ¶
func (c *Client) GetAdminEffective(ctx context.Context, subject string, params *GetAdminEffectiveParams, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAdminEffective performs a GET /api/v1/platform/admin/administrators/{subject}/effective (the `GetAdminEffective` operationId) request.
先检查查询者权限,再从可信身份接口读取被查询者的当前平台管理员身份。平台管理员返回 authorization_mode=platform_admin_all,表示全部能力及全部范围(含敏感能力);其他管理员返回 explicit_grants 及查询范围内显式授权。查询他人需要该范围的 platform.authorization.read。修订号仅表示显式授权集合,不代表身份修订,客户端不能据此缓存平台管理员身份。
func (*Client) GetAdminRole ¶
func (c *Client) GetAdminRole(ctx context.Context, role string, reqEditors ...RequestEditorFn) (*http.Response, error)
GetAdminRole performs a GET /api/v1/platform/admin/roles/{role} (the `GetAdminRole` operationId) request.
读取不可变角色定义,需要全局 platform.authorization.read 能力。
func (*Client) GrantAdminRole ¶
func (c *Client) GrantAdminRole(ctx context.Context, subject string, params *GrantAdminRoleParams, body GrantAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
GrantAdminRole performs a PUT /api/v1/platform/admin/administrators/{subject}/grants (the `GrantAdminRole` operationId) request. Takes a body of the `application/json` content type.
可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
func (*Client) GrantAdminRoleWithBody ¶
func (c *Client) GrantAdminRoleWithBody(ctx context.Context, subject string, params *GrantAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
GrantAdminRoleWithBody performs a PUT /api/v1/platform/admin/administrators/{subject}/grants (the `GrantAdminRole` operationId) request, with any type of body and a specified content type.
可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
func (*Client) ListAdminRoleTemplates ¶
func (c *Client) ListAdminRoleTemplates(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
ListAdminRoleTemplates performs a GET /api/v1/platform/admin/role-templates (the `ListAdminRoleTemplates` operationId) request.
六种初始模板仅提供建议能力;不自动授权,不包含敏感能力。.
func (*Client) ListPlatformOperations ¶
func (c *Client) ListPlatformOperations(ctx context.Context, params *ListPlatformOperationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListPlatformOperations performs a GET /api/v1/platform/admin/operations (the `ListPlatformOperations` operationId) request.
按当前有效授权范围向已装配提供方读取并合并审计,时间、来源模块、记录 ID 均按降序排序。每页重新授权;游标绑定操作者、筛选条件、权限范围和提供方集合,并保留各提供方的快照。提供方失败返回部分结果及 missing_modules;缺失在同一分页过程中持续标记,恢复后须重新查询。默认查询全部已装配且获准的来源。旧版本游标不接受。.
func (*Client) RevokeAdminRole ¶
func (c *Client) RevokeAdminRole(ctx context.Context, subject string, params *RevokeAdminRoleParams, body RevokeAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
RevokeAdminRole performs a DELETE /api/v1/platform/admin/administrators/{subject}/grants (the `RevokeAdminRole` operationId) request. Takes a body of the `application/json` content type.
可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
func (*Client) RevokeAdminRoleWithBody ¶
func (c *Client) RevokeAdminRoleWithBody(ctx context.Context, subject string, params *RevokeAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
RevokeAdminRoleWithBody performs a DELETE /api/v1/platform/admin/administrators/{subject}/grants (the `RevokeAdminRole` operationId) request, with any type of body and a specified content type.
可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
type ClientInterface ¶
type ClientInterface interface {
// GetAdminEffective performs a GET /api/v1/platform/admin/administrators/{subject}/effective (the `GetAdminEffective` operationId) request.
//
// 先检查查询者权限,再从可信身份接口读取被查询者的当前平台管理员身份。平台管理员返回 authorization_mode=platform_admin_all,表示全部能力及全部范围(含敏感能力);其他管理员返回 explicit_grants 及查询范围内显式授权。查询他人需要该范围的 platform.authorization.read。修订号仅表示显式授权集合,不代表身份修订,客户端不能据此缓存平台管理员身份。
GetAdminEffective(ctx context.Context, subject string, params *GetAdminEffectiveParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// RevokeAdminRoleWithBody performs a DELETE /api/v1/platform/admin/administrators/{subject}/grants (the `RevokeAdminRole` operationId) request,
// with any type of body and a specified content type.
//
// 可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
RevokeAdminRoleWithBody(ctx context.Context, subject string, params *RevokeAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// RevokeAdminRole performs a DELETE /api/v1/platform/admin/administrators/{subject}/grants (the `RevokeAdminRole` operationId) request.
// Takes a body of the `application/json` content type.
//
// 可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
RevokeAdminRole(ctx context.Context, subject string, params *RevokeAdminRoleParams, body RevokeAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GrantAdminRoleWithBody performs a PUT /api/v1/platform/admin/administrators/{subject}/grants (the `GrantAdminRole` operationId) request,
// with any type of body and a specified content type.
//
// 可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
GrantAdminRoleWithBody(ctx context.Context, subject string, params *GrantAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// GrantAdminRole performs a PUT /api/v1/platform/admin/administrators/{subject}/grants (the `GrantAdminRole` operationId) request.
// Takes a body of the `application/json` content type.
//
// 可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
GrantAdminRole(ctx context.Context, subject string, params *GrantAdminRoleParams, body GrantAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListPlatformOperations performs a GET /api/v1/platform/admin/operations (the `ListPlatformOperations` operationId) request.
//
// 按当前有效授权范围向已装配提供方读取并合并审计,时间、来源模块、记录 ID 均按降序排序。每页重新授权;游标绑定操作者、筛选条件、权限范围和提供方集合,并保留各提供方的快照。提供方失败返回部分结果及 missing_modules;缺失在同一分页过程中持续标记,恢复后须重新查询。默认查询全部已装配且获准的来源。旧版本游标不接受。.
ListPlatformOperations(ctx context.Context, params *ListPlatformOperationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListAdminRoleTemplates performs a GET /api/v1/platform/admin/role-templates (the `ListAdminRoleTemplates` operationId) request.
//
// 六种初始模板仅提供建议能力;不自动授权,不包含敏感能力。.
ListAdminRoleTemplates(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAdminRoleWithBody performs a POST /api/v1/platform/admin/roles (the `CreateAdminRole` operationId) request,
// with any type of body and a specified content type.
//
// 只有可信平台管理员可以创建不可变角色定义。变更能力须使用新的角色 ID;角色数量上限 1000。.
CreateAdminRoleWithBody(ctx context.Context, params *CreateAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateAdminRole performs a POST /api/v1/platform/admin/roles (the `CreateAdminRole` operationId) request.
// Takes a body of the `application/json` content type.
//
// 只有可信平台管理员可以创建不可变角色定义。变更能力须使用新的角色 ID;角色数量上限 1000。.
CreateAdminRole(ctx context.Context, params *CreateAdminRoleParams, body CreateAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAdminRole performs a GET /api/v1/platform/admin/roles/{role} (the `GetAdminRole` operationId) request.
//
// 读取不可变角色定义,需要全局 platform.authorization.read 能力。
GetAdminRole(ctx context.Context, role string, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateAdminRoleWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateAdminRoleWithBodyWithResponse(ctx context.Context, params *CreateAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminRoleResponse, error)
CreateAdminRoleWithBodyWithResponse performs a POST /api/v1/platform/admin/roles (the `CreateAdminRole` operationId) request, with any type of body and a specified content type.
只有可信平台管理员可以创建不可变角色定义。变更能力须使用新的角色 ID;角色数量上限 1000。.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) CreateAdminRoleWithResponse ¶
func (c *ClientWithResponses) CreateAdminRoleWithResponse(ctx context.Context, params *CreateAdminRoleParams, body CreateAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminRoleResponse, error)
CreateAdminRoleWithResponse performs a POST /api/v1/platform/admin/roles (the `CreateAdminRole` operationId) request. Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
只有可信平台管理员可以创建不可变角色定义。变更能力须使用新的角色 ID;角色数量上限 1000。.
func (*ClientWithResponses) GetAdminEffectiveWithResponse ¶
func (c *ClientWithResponses) GetAdminEffectiveWithResponse(ctx context.Context, subject string, params *GetAdminEffectiveParams, reqEditors ...RequestEditorFn) (*GetAdminEffectiveResponse, error)
GetAdminEffectiveWithResponse performs a GET /api/v1/platform/admin/administrators/{subject}/effective (the `GetAdminEffective` operationId) request.
先检查查询者权限,再从可信身份接口读取被查询者的当前平台管理员身份。平台管理员返回 authorization_mode=platform_admin_all,表示全部能力及全部范围(含敏感能力);其他管理员返回 explicit_grants 及查询范围内显式授权。查询他人需要该范围的 platform.authorization.read。修订号仅表示显式授权集合,不代表身份修订,客户端不能据此缓存平台管理员身份。
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) GetAdminRoleWithResponse ¶
func (c *ClientWithResponses) GetAdminRoleWithResponse(ctx context.Context, role string, reqEditors ...RequestEditorFn) (*GetAdminRoleResponse, error)
GetAdminRoleWithResponse performs a GET /api/v1/platform/admin/roles/{role} (the `GetAdminRole` operationId) request.
读取不可变角色定义,需要全局 platform.authorization.read 能力。
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) GrantAdminRoleWithBodyWithResponse ¶
func (c *ClientWithResponses) GrantAdminRoleWithBodyWithResponse(ctx context.Context, subject string, params *GrantAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GrantAdminRoleResponse, error)
GrantAdminRoleWithBodyWithResponse performs a PUT /api/v1/platform/admin/administrators/{subject}/grants (the `GrantAdminRole` operationId) request, with any type of body and a specified content type.
可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) GrantAdminRoleWithResponse ¶
func (c *ClientWithResponses) GrantAdminRoleWithResponse(ctx context.Context, subject string, params *GrantAdminRoleParams, body GrantAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*GrantAdminRoleResponse, error)
GrantAdminRoleWithResponse performs a PUT /api/v1/platform/admin/administrators/{subject}/grants (the `GrantAdminRole` operationId) request. Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
func (*ClientWithResponses) ListAdminRoleTemplatesWithResponse ¶
func (c *ClientWithResponses) ListAdminRoleTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminRoleTemplatesResponse, error)
ListAdminRoleTemplatesWithResponse performs a GET /api/v1/platform/admin/role-templates (the `ListAdminRoleTemplates` operationId) request.
六种初始模板仅提供建议能力;不自动授权,不包含敏感能力。.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) ListPlatformOperationsWithResponse ¶
func (c *ClientWithResponses) ListPlatformOperationsWithResponse(ctx context.Context, params *ListPlatformOperationsParams, reqEditors ...RequestEditorFn) (*ListPlatformOperationsResponse, error)
ListPlatformOperationsWithResponse performs a GET /api/v1/platform/admin/operations (the `ListPlatformOperations` operationId) request.
按当前有效授权范围向已装配提供方读取并合并审计,时间、来源模块、记录 ID 均按降序排序。每页重新授权;游标绑定操作者、筛选条件、权限范围和提供方集合,并保留各提供方的快照。提供方失败返回部分结果及 missing_modules;缺失在同一分页过程中持续标记,恢复后须重新查询。默认查询全部已装配且获准的来源。旧版本游标不接受。.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) RevokeAdminRoleWithBodyWithResponse ¶
func (c *ClientWithResponses) RevokeAdminRoleWithBodyWithResponse(ctx context.Context, subject string, params *RevokeAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeAdminRoleResponse, error)
RevokeAdminRoleWithBodyWithResponse performs a DELETE /api/v1/platform/admin/administrators/{subject}/grants (the `RevokeAdminRole` operationId) request, with any type of body and a specified content type.
可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) RevokeAdminRoleWithResponse ¶
func (c *ClientWithResponses) RevokeAdminRoleWithResponse(ctx context.Context, subject string, params *RevokeAdminRoleParams, body RevokeAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeAdminRoleResponse, error)
RevokeAdminRoleWithResponse performs a DELETE /api/v1/platform/admin/administrators/{subject}/grants (the `RevokeAdminRole` operationId) request. Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// GetAdminEffectiveWithResponse performs a GET /api/v1/platform/admin/administrators/{subject}/effective (the `GetAdminEffective` operationId) request.
//
// 先检查查询者权限,再从可信身份接口读取被查询者的当前平台管理员身份。平台管理员返回 authorization_mode=platform_admin_all,表示全部能力及全部范围(含敏感能力);其他管理员返回 explicit_grants 及查询范围内显式授权。查询他人需要该范围的 platform.authorization.read。修订号仅表示显式授权集合,不代表身份修订,客户端不能据此缓存平台管理员身份。
//
// Returns a wrapper object for the known response body format(s).
GetAdminEffectiveWithResponse(ctx context.Context, subject string, params *GetAdminEffectiveParams, reqEditors ...RequestEditorFn) (*GetAdminEffectiveResponse, error)
// RevokeAdminRoleWithBodyWithResponse performs a DELETE /api/v1/platform/admin/administrators/{subject}/grants (the `RevokeAdminRole` operationId) request,
// with any type of body and a specified content type.
//
// 可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
//
// Returns a wrapper object for the known response body format(s).
RevokeAdminRoleWithBodyWithResponse(ctx context.Context, subject string, params *RevokeAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RevokeAdminRoleResponse, error)
// RevokeAdminRoleWithResponse performs a DELETE /api/v1/platform/admin/administrators/{subject}/grants (the `RevokeAdminRole` operationId) request.
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// 可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
RevokeAdminRoleWithResponse(ctx context.Context, subject string, params *RevokeAdminRoleParams, body RevokeAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*RevokeAdminRoleResponse, error)
// GrantAdminRoleWithBodyWithResponse performs a PUT /api/v1/platform/admin/administrators/{subject}/grants (the `GrantAdminRole` operationId) request,
// with any type of body and a specified content type.
//
// 可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
//
// Returns a wrapper object for the known response body format(s).
GrantAdminRoleWithBodyWithResponse(ctx context.Context, subject string, params *GrantAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GrantAdminRoleResponse, error)
// GrantAdminRoleWithResponse performs a PUT /api/v1/platform/admin/administrators/{subject}/grants (the `GrantAdminRole` operationId) request.
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// 可信平台管理员可授予任意能力及任意范围,包含敏感能力;普通管理员只能委托自己持有的能力与范围,不能授予 platform.* 能力。禁止任何人给自己增加授权。授权修订号冲突返回 409。每个管理员最多 1000 条有效授权。重复请求重新授权后返回原结果。
GrantAdminRoleWithResponse(ctx context.Context, subject string, params *GrantAdminRoleParams, body GrantAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*GrantAdminRoleResponse, error)
// ListPlatformOperationsWithResponse performs a GET /api/v1/platform/admin/operations (the `ListPlatformOperations` operationId) request.
//
// 按当前有效授权范围向已装配提供方读取并合并审计,时间、来源模块、记录 ID 均按降序排序。每页重新授权;游标绑定操作者、筛选条件、权限范围和提供方集合,并保留各提供方的快照。提供方失败返回部分结果及 missing_modules;缺失在同一分页过程中持续标记,恢复后须重新查询。默认查询全部已装配且获准的来源。旧版本游标不接受。.
//
// Returns a wrapper object for the known response body format(s).
ListPlatformOperationsWithResponse(ctx context.Context, params *ListPlatformOperationsParams, reqEditors ...RequestEditorFn) (*ListPlatformOperationsResponse, error)
// ListAdminRoleTemplatesWithResponse performs a GET /api/v1/platform/admin/role-templates (the `ListAdminRoleTemplates` operationId) request.
//
// 六种初始模板仅提供建议能力;不自动授权,不包含敏感能力。.
//
// Returns a wrapper object for the known response body format(s).
ListAdminRoleTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminRoleTemplatesResponse, error)
// CreateAdminRoleWithBodyWithResponse performs a POST /api/v1/platform/admin/roles (the `CreateAdminRole` operationId) request,
// with any type of body and a specified content type.
//
// 只有可信平台管理员可以创建不可变角色定义。变更能力须使用新的角色 ID;角色数量上限 1000。.
//
// Returns a wrapper object for the known response body format(s).
CreateAdminRoleWithBodyWithResponse(ctx context.Context, params *CreateAdminRoleParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminRoleResponse, error)
// CreateAdminRoleWithResponse performs a POST /api/v1/platform/admin/roles (the `CreateAdminRole` operationId) request.
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// 只有可信平台管理员可以创建不可变角色定义。变更能力须使用新的角色 ID;角色数量上限 1000。.
CreateAdminRoleWithResponse(ctx context.Context, params *CreateAdminRoleParams, body CreateAdminRoleJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminRoleResponse, error)
// GetAdminRoleWithResponse performs a GET /api/v1/platform/admin/roles/{role} (the `GetAdminRole` operationId) request.
//
// 读取不可变角色定义,需要全局 platform.authorization.read 能力。
//
// Returns a wrapper object for the known response body format(s).
GetAdminRoleWithResponse(ctx context.Context, role string, reqEditors ...RequestEditorFn) (*GetAdminRoleResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateAdminRoleJSONRequestBody ¶
type CreateAdminRoleJSONRequestBody = AdminRoleInput
CreateAdminRoleJSONRequestBody defines body for CreateAdminRole for application/json ContentType.
type CreateAdminRoleParams ¶
type CreateAdminRoleParams struct {
IdempotencyKey string `json:"Idempotency-Key"`
}
CreateAdminRoleParams defines parameters for CreateAdminRole.
type CreateAdminRoleResponse ¶
type CreateAdminRoleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminRole
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *AdminError
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *AdminError
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *AdminError
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *AdminError
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AdminError
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseCreateAdminRoleResponse ¶
func ParseCreateAdminRoleResponse(rsp *http.Response) (*CreateAdminRoleResponse, error)
ParseCreateAdminRoleResponse parses an HTTP response from a CreateAdminRoleWithResponse call
func (CreateAdminRoleResponse) ContentType ¶
func (r CreateAdminRoleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (CreateAdminRoleResponse) GetBody ¶
func (r CreateAdminRoleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (CreateAdminRoleResponse) GetJSON200 ¶
func (r CreateAdminRoleResponse) GetJSON200() *AdminRole
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (CreateAdminRoleResponse) GetJSON400 ¶
func (r CreateAdminRoleResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (CreateAdminRoleResponse) GetJSON401 ¶
func (r CreateAdminRoleResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (CreateAdminRoleResponse) GetJSON403 ¶
func (r CreateAdminRoleResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (CreateAdminRoleResponse) GetJSON404 ¶
func (r CreateAdminRoleResponse) GetJSON404() *AdminError
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (CreateAdminRoleResponse) GetJSON409 ¶
func (r CreateAdminRoleResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (CreateAdminRoleResponse) GetJSON503 ¶
func (r CreateAdminRoleResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (CreateAdminRoleResponse) Status ¶
func (r CreateAdminRoleResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAdminRoleResponse) StatusCode ¶
func (r CreateAdminRoleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAdminEffectiveParams ¶
type GetAdminEffectiveParams struct {
School *string `form:"school,omitempty" json:"school,omitempty"`
Group *string `form:"group,omitempty" json:"group,omitempty"`
Module *string `form:"module,omitempty" json:"module,omitempty"`
}
GetAdminEffectiveParams defines parameters for GetAdminEffective.
type GetAdminEffectiveResponse ¶
type GetAdminEffectiveResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminEffective
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *AdminError
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *AdminError
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *AdminError
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *AdminError
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AdminError
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseGetAdminEffectiveResponse ¶
func ParseGetAdminEffectiveResponse(rsp *http.Response) (*GetAdminEffectiveResponse, error)
ParseGetAdminEffectiveResponse parses an HTTP response from a GetAdminEffectiveWithResponse call
func (GetAdminEffectiveResponse) ContentType ¶
func (r GetAdminEffectiveResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAdminEffectiveResponse) GetBody ¶
func (r GetAdminEffectiveResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAdminEffectiveResponse) GetJSON200 ¶
func (r GetAdminEffectiveResponse) GetJSON200() *AdminEffective
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAdminEffectiveResponse) GetJSON400 ¶
func (r GetAdminEffectiveResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetAdminEffectiveResponse) GetJSON401 ¶
func (r GetAdminEffectiveResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetAdminEffectiveResponse) GetJSON403 ¶
func (r GetAdminEffectiveResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetAdminEffectiveResponse) GetJSON404 ¶
func (r GetAdminEffectiveResponse) GetJSON404() *AdminError
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetAdminEffectiveResponse) GetJSON409 ¶
func (r GetAdminEffectiveResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAdminEffectiveResponse) GetJSON503 ¶
func (r GetAdminEffectiveResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (GetAdminEffectiveResponse) Status ¶
func (r GetAdminEffectiveResponse) Status() string
Status returns HTTPResponse.Status
func (GetAdminEffectiveResponse) StatusCode ¶
func (r GetAdminEffectiveResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAdminRoleResponse ¶
type GetAdminRoleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminRole
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *AdminError
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *AdminError
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *AdminError
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *AdminError
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AdminError
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseGetAdminRoleResponse ¶
func ParseGetAdminRoleResponse(rsp *http.Response) (*GetAdminRoleResponse, error)
ParseGetAdminRoleResponse parses an HTTP response from a GetAdminRoleWithResponse call
func (GetAdminRoleResponse) ContentType ¶
func (r GetAdminRoleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GetAdminRoleResponse) GetBody ¶
func (r GetAdminRoleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GetAdminRoleResponse) GetJSON200 ¶
func (r GetAdminRoleResponse) GetJSON200() *AdminRole
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GetAdminRoleResponse) GetJSON400 ¶
func (r GetAdminRoleResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GetAdminRoleResponse) GetJSON401 ¶
func (r GetAdminRoleResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GetAdminRoleResponse) GetJSON403 ¶
func (r GetAdminRoleResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GetAdminRoleResponse) GetJSON404 ¶
func (r GetAdminRoleResponse) GetJSON404() *AdminError
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GetAdminRoleResponse) GetJSON409 ¶
func (r GetAdminRoleResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GetAdminRoleResponse) GetJSON503 ¶
func (r GetAdminRoleResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (GetAdminRoleResponse) Status ¶
func (r GetAdminRoleResponse) Status() string
Status returns HTTPResponse.Status
func (GetAdminRoleResponse) StatusCode ¶
func (r GetAdminRoleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GrantAdminRoleJSONRequestBody ¶
type GrantAdminRoleJSONRequestBody = AdminMutation
GrantAdminRoleJSONRequestBody defines body for GrantAdminRole for application/json ContentType.
type GrantAdminRoleParams ¶
type GrantAdminRoleParams struct {
IdempotencyKey string `json:"Idempotency-Key"`
}
GrantAdminRoleParams defines parameters for GrantAdminRole.
type GrantAdminRoleResponse ¶
type GrantAdminRoleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminRevision
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *AdminError
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *AdminError
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *AdminError
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *AdminError
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AdminError
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseGrantAdminRoleResponse ¶
func ParseGrantAdminRoleResponse(rsp *http.Response) (*GrantAdminRoleResponse, error)
ParseGrantAdminRoleResponse parses an HTTP response from a GrantAdminRoleWithResponse call
func (GrantAdminRoleResponse) ContentType ¶
func (r GrantAdminRoleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (GrantAdminRoleResponse) GetBody ¶
func (r GrantAdminRoleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (GrantAdminRoleResponse) GetJSON200 ¶
func (r GrantAdminRoleResponse) GetJSON200() *AdminRevision
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (GrantAdminRoleResponse) GetJSON400 ¶
func (r GrantAdminRoleResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (GrantAdminRoleResponse) GetJSON401 ¶
func (r GrantAdminRoleResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (GrantAdminRoleResponse) GetJSON403 ¶
func (r GrantAdminRoleResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (GrantAdminRoleResponse) GetJSON404 ¶
func (r GrantAdminRoleResponse) GetJSON404() *AdminError
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (GrantAdminRoleResponse) GetJSON409 ¶
func (r GrantAdminRoleResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (GrantAdminRoleResponse) GetJSON503 ¶
func (r GrantAdminRoleResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (GrantAdminRoleResponse) Status ¶
func (r GrantAdminRoleResponse) Status() string
Status returns HTTPResponse.Status
func (GrantAdminRoleResponse) StatusCode ¶
func (r GrantAdminRoleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ListAdminRoleTemplatesResponse ¶
type ListAdminRoleTemplatesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *[]AdminRole
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *AdminError
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *AdminError
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *AdminError
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *AdminError
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AdminError
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseListAdminRoleTemplatesResponse ¶
func ParseListAdminRoleTemplatesResponse(rsp *http.Response) (*ListAdminRoleTemplatesResponse, error)
ParseListAdminRoleTemplatesResponse parses an HTTP response from a ListAdminRoleTemplatesWithResponse call
func (ListAdminRoleTemplatesResponse) ContentType ¶
func (r ListAdminRoleTemplatesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAdminRoleTemplatesResponse) GetBody ¶
func (r ListAdminRoleTemplatesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListAdminRoleTemplatesResponse) GetJSON200 ¶
func (r ListAdminRoleTemplatesResponse) GetJSON200() *[]AdminRole
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListAdminRoleTemplatesResponse) GetJSON400 ¶
func (r ListAdminRoleTemplatesResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ListAdminRoleTemplatesResponse) GetJSON401 ¶
func (r ListAdminRoleTemplatesResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ListAdminRoleTemplatesResponse) GetJSON403 ¶
func (r ListAdminRoleTemplatesResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListAdminRoleTemplatesResponse) GetJSON404 ¶
func (r ListAdminRoleTemplatesResponse) GetJSON404() *AdminError
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (ListAdminRoleTemplatesResponse) GetJSON409 ¶
func (r ListAdminRoleTemplatesResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (ListAdminRoleTemplatesResponse) GetJSON503 ¶
func (r ListAdminRoleTemplatesResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (ListAdminRoleTemplatesResponse) Status ¶
func (r ListAdminRoleTemplatesResponse) Status() string
Status returns HTTPResponse.Status
func (ListAdminRoleTemplatesResponse) StatusCode ¶
func (r ListAdminRoleTemplatesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListPlatformOperationsParams ¶
type ListPlatformOperationsParams struct {
School *string `form:"school,omitempty" json:"school,omitempty"`
Group *string `form:"group,omitempty" json:"group,omitempty"`
Module *string `form:"module,omitempty" json:"module,omitempty"`
Target *string `form:"target,omitempty" json:"target,omitempty"`
Actor *string `form:"actor,omitempty" json:"actor,omitempty"`
Action *string `form:"action,omitempty" json:"action,omitempty"`
From *time.Time `form:"from,omitempty" json:"from,omitempty"`
Until *time.Time `form:"until,omitempty" json:"until,omitempty"`
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
// Sources 按原始审计所属模块筛选,逗号分隔;与 module(对象授权范围)分别检查。未装配或不在注册清单的模块返回 400。
Sources *[]string `form:"sources,omitempty" json:"sources,omitempty"`
}
ListPlatformOperationsParams defines parameters for ListPlatformOperations.
type ListPlatformOperationsResponse ¶
type ListPlatformOperationsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminAuditPage
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *AdminError
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *AdminError
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *AdminError
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *AdminError
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AdminError
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseListPlatformOperationsResponse ¶
func ParseListPlatformOperationsResponse(rsp *http.Response) (*ListPlatformOperationsResponse, error)
ParseListPlatformOperationsResponse parses an HTTP response from a ListPlatformOperationsWithResponse call
func (ListPlatformOperationsResponse) ContentType ¶
func (r ListPlatformOperationsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListPlatformOperationsResponse) GetBody ¶
func (r ListPlatformOperationsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListPlatformOperationsResponse) GetJSON200 ¶
func (r ListPlatformOperationsResponse) GetJSON200() *AdminAuditPage
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListPlatformOperationsResponse) GetJSON400 ¶
func (r ListPlatformOperationsResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ListPlatformOperationsResponse) GetJSON401 ¶
func (r ListPlatformOperationsResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ListPlatformOperationsResponse) GetJSON403 ¶
func (r ListPlatformOperationsResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListPlatformOperationsResponse) GetJSON404 ¶
func (r ListPlatformOperationsResponse) GetJSON404() *AdminError
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (ListPlatformOperationsResponse) GetJSON409 ¶
func (r ListPlatformOperationsResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (ListPlatformOperationsResponse) GetJSON503 ¶
func (r ListPlatformOperationsResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (ListPlatformOperationsResponse) Status ¶
func (r ListPlatformOperationsResponse) Status() string
Status returns HTTPResponse.Status
func (ListPlatformOperationsResponse) StatusCode ¶
func (r ListPlatformOperationsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type RevokeAdminRoleJSONRequestBody ¶
type RevokeAdminRoleJSONRequestBody = AdminMutation
RevokeAdminRoleJSONRequestBody defines body for RevokeAdminRole for application/json ContentType.
type RevokeAdminRoleParams ¶
type RevokeAdminRoleParams struct {
IdempotencyKey string `json:"Idempotency-Key"`
}
RevokeAdminRoleParams defines parameters for RevokeAdminRole.
type RevokeAdminRoleResponse ¶
type RevokeAdminRoleResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminRevision
// JSON400 the response for an HTTP 400 `application/json` response
JSON400 *AdminError
// JSON401 the response for an HTTP 401 `application/json` response
JSON401 *AdminError
// JSON403 the response for an HTTP 403 `application/json` response
JSON403 *AdminError
// JSON404 the response for an HTTP 404 `application/json` response
JSON404 *AdminError
// JSON409 the response for an HTTP 409 `application/json` response
JSON409 *AdminError
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseRevokeAdminRoleResponse ¶
func ParseRevokeAdminRoleResponse(rsp *http.Response) (*RevokeAdminRoleResponse, error)
ParseRevokeAdminRoleResponse parses an HTTP response from a RevokeAdminRoleWithResponse call
func (RevokeAdminRoleResponse) ContentType ¶
func (r RevokeAdminRoleResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (RevokeAdminRoleResponse) GetBody ¶
func (r RevokeAdminRoleResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (RevokeAdminRoleResponse) GetJSON200 ¶
func (r RevokeAdminRoleResponse) GetJSON200() *AdminRevision
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (RevokeAdminRoleResponse) GetJSON400 ¶
func (r RevokeAdminRoleResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (RevokeAdminRoleResponse) GetJSON401 ¶
func (r RevokeAdminRoleResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (RevokeAdminRoleResponse) GetJSON403 ¶
func (r RevokeAdminRoleResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (RevokeAdminRoleResponse) GetJSON404 ¶
func (r RevokeAdminRoleResponse) GetJSON404() *AdminError
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (RevokeAdminRoleResponse) GetJSON409 ¶
func (r RevokeAdminRoleResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (RevokeAdminRoleResponse) GetJSON503 ¶
func (r RevokeAdminRoleResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (RevokeAdminRoleResponse) Status ¶
func (r RevokeAdminRoleResponse) Status() string
Status returns HTTPResponse.Status
func (RevokeAdminRoleResponse) StatusCode ¶
func (r RevokeAdminRoleResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode