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 ¶
- Constants
- func NewBatchChangeAdminGrantsRequest(server string, params *BatchChangeAdminGrantsParams, ...) (*http.Request, error)
- func NewBatchChangeAdminGrantsRequestWithBody(server string, params *BatchChangeAdminGrantsParams, contentType string, ...) (*http.Request, error)
- func NewChangeAdminGrantsRequest(server string, subject string, params *ChangeAdminGrantsParams, ...) (*http.Request, error)
- func NewChangeAdminGrantsRequestWithBody(server string, subject string, params *ChangeAdminGrantsParams, ...) (*http.Request, error)
- 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 NewListAdminRolesRequest(server string, params *ListAdminRolesParams) (*http.Request, error)
- func NewListAdministratorsRequest(server string, params *ListAdministratorsParams) (*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 AdminAdministratorPage
- type AdminAdministratorSummary
- type AdminAudit
- type AdminAuditPage
- type AdminAuditPageSource
- type AdminBatchGrantChangeItem
- type AdminBatchGrantChangeResultItem
- type AdminBatchGrantChangeResultItemStatus
- type AdminBatchGrantChangesInput
- type AdminBatchGrantChangesResult
- type AdminEffective
- type AdminEffectiveAuthorizationMode
- type AdminError
- type AdminErrorCode
- type AdminGrant
- type AdminGrantChangesInput
- type AdminGrantTarget
- type AdminMissingReason
- type AdminMutation
- type AdminRevision
- type AdminRole
- type AdminRoleInput
- type AdminRolePage
- type AdminScope
- type BatchChangeAdminGrantsJSONRequestBody
- type BatchChangeAdminGrantsParams
- type BatchChangeAdminGrantsResponse
- func (r BatchChangeAdminGrantsResponse) ContentType() string
- func (r BatchChangeAdminGrantsResponse) GetBody() []byte
- func (r BatchChangeAdminGrantsResponse) GetJSON200() *AdminBatchGrantChangesResult
- func (r BatchChangeAdminGrantsResponse) GetJSON400() *AdminError
- func (r BatchChangeAdminGrantsResponse) GetJSON401() *AdminError
- func (r BatchChangeAdminGrantsResponse) GetJSON403() *AdminError
- func (r BatchChangeAdminGrantsResponse) GetJSON409() *AdminError
- func (r BatchChangeAdminGrantsResponse) GetJSON503() *AdminError
- func (r BatchChangeAdminGrantsResponse) Status() string
- func (r BatchChangeAdminGrantsResponse) StatusCode() int
- type ChangeAdminGrantsJSONRequestBody
- type ChangeAdminGrantsParams
- type ChangeAdminGrantsResponse
- func (r ChangeAdminGrantsResponse) ContentType() string
- func (r ChangeAdminGrantsResponse) GetBody() []byte
- func (r ChangeAdminGrantsResponse) GetJSON200() *AdminRevision
- func (r ChangeAdminGrantsResponse) GetJSON400() *AdminError
- func (r ChangeAdminGrantsResponse) GetJSON401() *AdminError
- func (r ChangeAdminGrantsResponse) GetJSON403() *AdminError
- func (r ChangeAdminGrantsResponse) GetJSON404() *AdminError
- func (r ChangeAdminGrantsResponse) GetJSON409() *AdminError
- func (r ChangeAdminGrantsResponse) GetJSON503() *AdminError
- func (r ChangeAdminGrantsResponse) Status() string
- func (r ChangeAdminGrantsResponse) StatusCode() int
- type Client
- func (c *Client) BatchChangeAdminGrants(ctx context.Context, params *BatchChangeAdminGrantsParams, ...) (*http.Response, error)
- func (c *Client) BatchChangeAdminGrantsWithBody(ctx context.Context, params *BatchChangeAdminGrantsParams, contentType string, ...) (*http.Response, error)
- func (c *Client) ChangeAdminGrants(ctx context.Context, subject string, params *ChangeAdminGrantsParams, ...) (*http.Response, error)
- func (c *Client) ChangeAdminGrantsWithBody(ctx context.Context, subject string, params *ChangeAdminGrantsParams, ...) (*http.Response, error)
- 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) ListAdminRoles(ctx context.Context, params *ListAdminRolesParams, ...) (*http.Response, error)
- func (c *Client) ListAdministrators(ctx context.Context, params *ListAdministratorsParams, ...) (*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) BatchChangeAdminGrantsWithBodyWithResponse(ctx context.Context, params *BatchChangeAdminGrantsParams, contentType string, ...) (*BatchChangeAdminGrantsResponse, error)
- func (c *ClientWithResponses) BatchChangeAdminGrantsWithResponse(ctx context.Context, params *BatchChangeAdminGrantsParams, ...) (*BatchChangeAdminGrantsResponse, error)
- func (c *ClientWithResponses) ChangeAdminGrantsWithBodyWithResponse(ctx context.Context, subject string, params *ChangeAdminGrantsParams, ...) (*ChangeAdminGrantsResponse, error)
- func (c *ClientWithResponses) ChangeAdminGrantsWithResponse(ctx context.Context, subject string, params *ChangeAdminGrantsParams, ...) (*ChangeAdminGrantsResponse, error)
- 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) ListAdminRolesWithResponse(ctx context.Context, params *ListAdminRolesParams, ...) (*ListAdminRolesResponse, error)
- func (c *ClientWithResponses) ListAdministratorsWithResponse(ctx context.Context, params *ListAdministratorsParams, ...) (*ListAdministratorsResponse, 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 ListAdminRolesParams
- type ListAdminRolesResponse
- func (r ListAdminRolesResponse) ContentType() string
- func (r ListAdminRolesResponse) GetBody() []byte
- func (r ListAdminRolesResponse) GetJSON200() *AdminRolePage
- func (r ListAdminRolesResponse) GetJSON400() *AdminError
- func (r ListAdminRolesResponse) GetJSON401() *AdminError
- func (r ListAdminRolesResponse) GetJSON403() *AdminError
- func (r ListAdminRolesResponse) GetJSON503() *AdminError
- func (r ListAdminRolesResponse) Status() string
- func (r ListAdminRolesResponse) StatusCode() int
- type ListAdministratorsParams
- type ListAdministratorsResponse
- func (r ListAdministratorsResponse) ContentType() string
- func (r ListAdministratorsResponse) GetBody() []byte
- func (r ListAdministratorsResponse) GetJSON200() *AdminAdministratorPage
- func (r ListAdministratorsResponse) GetJSON400() *AdminError
- func (r ListAdministratorsResponse) GetJSON401() *AdminError
- func (r ListAdministratorsResponse) GetJSON403() *AdminError
- func (r ListAdministratorsResponse) GetJSON503() *AdminError
- func (r ListAdministratorsResponse) Status() string
- func (r ListAdministratorsResponse) 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 ¶
const ( Conflict = AdminErrorCodeConflict Forbidden = AdminErrorCodeForbidden InvalidRequest = AdminErrorCodeInvalidRequest NotFound = AdminErrorCodeNotFound Unauthenticated = AdminErrorCodeUnauthenticated )
The batch status enum shares names with the error enum. Keep the original exported error constants available alongside the generator's qualified names.
Variables ¶
This section is empty.
Functions ¶
func NewBatchChangeAdminGrantsRequest ¶ added in v0.2.1
func NewBatchChangeAdminGrantsRequest(server string, params *BatchChangeAdminGrantsParams, body BatchChangeAdminGrantsJSONRequestBody) (*http.Request, error)
NewBatchChangeAdminGrantsRequest calls the generic BatchChangeAdminGrants builder with application/json body
func NewBatchChangeAdminGrantsRequestWithBody ¶ added in v0.2.1
func NewBatchChangeAdminGrantsRequestWithBody(server string, params *BatchChangeAdminGrantsParams, contentType string, body io.Reader) (*http.Request, error)
NewBatchChangeAdminGrantsRequestWithBody constructs an http.Request for the BatchChangeAdminGrants method, with any body, and a specified content type
func NewChangeAdminGrantsRequest ¶ added in v0.2.1
func NewChangeAdminGrantsRequest(server string, subject string, params *ChangeAdminGrantsParams, body ChangeAdminGrantsJSONRequestBody) (*http.Request, error)
NewChangeAdminGrantsRequest calls the generic ChangeAdminGrants builder with application/json body
func NewChangeAdminGrantsRequestWithBody ¶ added in v0.2.1
func NewChangeAdminGrantsRequestWithBody(server string, subject string, params *ChangeAdminGrantsParams, contentType string, body io.Reader) (*http.Request, error)
NewChangeAdminGrantsRequestWithBody constructs an http.Request for the ChangeAdminGrants method, with any body, and a specified content type
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 NewListAdminRolesRequest ¶ added in v0.2.1
func NewListAdminRolesRequest(server string, params *ListAdminRolesParams) (*http.Request, error)
NewListAdminRolesRequest constructs an http.Request for the ListAdminRoles method
func NewListAdministratorsRequest ¶ added in v0.2.1
func NewListAdministratorsRequest(server string, params *ListAdministratorsParams) (*http.Request, error)
NewListAdministratorsRequest constructs an http.Request for the ListAdministrators 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 AdminAdministratorPage ¶ added in v0.2.1
type AdminAdministratorPage struct {
Items []AdminAdministratorSummary `json:"items"`
NextCursor string `json:"next_cursor"`
}
AdminAdministratorPage defines model for AdminAdministratorPage.
type AdminAdministratorSummary ¶ added in v0.2.1
type AdminAdministratorSummary struct {
// Grants 符合筛选条件且收窄至调用方可见范围的显式授权。
Grants []AdminGrant `json:"grants"`
Revision string `json:"revision"`
Subject string `json:"subject"`
}
AdminAdministratorSummary defines model for AdminAdministratorSummary.
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"`
// MissingReasons 缺失模块到原因码的映射;snapshot_expired 表示回到第一页重新查询即可恢复。
MissingReasons *map[string]AdminMissingReason `json:"missing_reasons,omitempty"`
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 AdminBatchGrantChangeItem ¶ added in v0.2.1
type AdminBatchGrantChangeItem struct {
Add []AdminGrantTarget `json:"add"`
ExpectedRevision string `json:"expected_revision"`
Revoke []AdminGrantTarget `json:"revoke"`
// Subject account.Principal.Key() 编码的 issuer 与 subject。
Subject string `json:"subject"`
}
AdminBatchGrantChangeItem defines model for AdminBatchGrantChangeItem.
type AdminBatchGrantChangeResultItem ¶ added in v0.2.1
type AdminBatchGrantChangeResultItem struct {
Adding []AdminGrant `json:"adding"`
// CurrentRevision 变更前观测到的当前修订号;无权限时为空字符串。
CurrentRevision *string `json:"current_revision,omitempty"`
// Revision 执行成功或预览就绪时为新修订号;冲突时为当前实际修订号;无权限或角色不存在时为空字符串。
Revision string `json:"revision"`
Revoking []AdminGrant `json:"revoking"`
Status AdminBatchGrantChangeResultItemStatus `json:"status"`
Subject string `json:"subject"`
}
AdminBatchGrantChangeResultItem defines model for AdminBatchGrantChangeResultItem.
type AdminBatchGrantChangeResultItemStatus ¶ added in v0.2.1
type AdminBatchGrantChangeResultItemStatus string
AdminBatchGrantChangeResultItemStatus defines model for AdminBatchGrantChangeResultItem.Status.
const ( AdminBatchGrantChangeResultItemStatusConflict AdminBatchGrantChangeResultItemStatus = "conflict" AdminBatchGrantChangeResultItemStatusForbidden AdminBatchGrantChangeResultItemStatus = "forbidden" AdminBatchGrantChangeResultItemStatusNotFound AdminBatchGrantChangeResultItemStatus = "not_found" AdminBatchGrantChangeResultItemStatusReady AdminBatchGrantChangeResultItemStatus = "ready" AdminBatchGrantChangeResultItemStatusSucceeded AdminBatchGrantChangeResultItemStatus = "succeeded" )
Defines values for AdminBatchGrantChangeResultItemStatus.
func (AdminBatchGrantChangeResultItemStatus) Valid ¶ added in v0.2.1
func (e AdminBatchGrantChangeResultItemStatus) Valid() bool
Valid indicates whether the value is a known member of the AdminBatchGrantChangeResultItemStatus enum.
type AdminBatchGrantChangesInput ¶ added in v0.2.1
type AdminBatchGrantChangesInput struct {
DryRun bool `json:"dry_run"`
Items []AdminBatchGrantChangeItem `json:"items"`
Reason string `json:"reason"`
}
AdminBatchGrantChangesInput defines model for AdminBatchGrantChangesInput.
type AdminBatchGrantChangesResult ¶ added in v0.2.1
type AdminBatchGrantChangesResult struct {
DryRun bool `json:"dry_run"`
Items []AdminBatchGrantChangeResultItem `json:"items"`
}
AdminBatchGrantChangesResult defines model for AdminBatchGrantChangesResult.
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"`
// RequestId 请求追踪标识,与响应头 X-Request-ID 一致。
RequestId *string `json:"request_id,omitempty"`
}
AdminError defines model for AdminError.
type AdminErrorCode ¶
type AdminErrorCode string
AdminErrorCode defines model for AdminError.Code.
const ( AdminErrorCodeConflict AdminErrorCode = "conflict" AdminErrorCodeForbidden AdminErrorCode = "forbidden" AdminErrorCodeInvalidRequest AdminErrorCode = "invalid_request" AdminErrorCodeNotFound AdminErrorCode = "not_found" AdminErrorCodeUnauthenticated 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 AdminGrantChangesInput ¶ added in v0.2.1
type AdminGrantChangesInput struct {
Add []AdminGrantTarget `json:"add"`
ExpectedRevision string `json:"expected_revision"`
Reason string `json:"reason"`
Revoke []AdminGrantTarget `json:"revoke"`
}
AdminGrantChangesInput defines model for AdminGrantChangesInput.
type AdminGrantTarget ¶ added in v0.2.1
type AdminGrantTarget struct {
RoleId string `json:"role_id"`
Scope AdminScope `json:"scope"`
}
AdminGrantTarget defines model for AdminGrantTarget.
type AdminMissingReason ¶ added in v0.2.1
type AdminMissingReason string
AdminMissingReason 审计提供方缺失原因分类。
const ( AdminMissingReasonSnapshotExpired AdminMissingReason = "snapshot_expired" AdminMissingReasonTimeout AdminMissingReason = "timeout" AdminMissingReasonUnconfigured AdminMissingReason = "unconfigured" )
Defines values for AdminMissingReason.
func (AdminMissingReason) Valid ¶ added in v0.2.1
func (e AdminMissingReason) Valid() bool
Valid indicates whether the value is a known member of the AdminMissingReason enum.
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"`
// CreatedAt 角色创建时间;内置建议模板省略该字段。
CreatedAt *time.Time `json:"created_at,omitempty"`
Id string `json:"id"`
// LabelKey 内置角色模板的国际化翻译键(如 platform.admin.role_template.platform);自定义角色省略此字段。
LabelKey *string `json:"label_key,omitempty"`
Name string `json:"name"`
}
AdminRole defines model for AdminRole.
type AdminRoleInput ¶
AdminRoleInput defines model for AdminRoleInput.
type AdminRolePage ¶ added in v0.2.1
type AdminRolePage struct {
Items []AdminRole `json:"items"`
NextCursor string `json:"next_cursor"`
}
AdminRolePage defines model for AdminRolePage.
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 BatchChangeAdminGrantsJSONRequestBody ¶ added in v0.2.1
type BatchChangeAdminGrantsJSONRequestBody = AdminBatchGrantChangesInput
BatchChangeAdminGrantsJSONRequestBody defines body for BatchChangeAdminGrants for application/json ContentType.
type BatchChangeAdminGrantsParams ¶ added in v0.2.1
type BatchChangeAdminGrantsParams struct {
// IdempotencyKey dry_run=false 时必填;相同幂等键重试返回原批量结果。
IdempotencyKey *string `json:"Idempotency-Key,omitempty"`
}
BatchChangeAdminGrantsParams defines parameters for BatchChangeAdminGrants.
type BatchChangeAdminGrantsResponse ¶ added in v0.2.1
type BatchChangeAdminGrantsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminBatchGrantChangesResult
// 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
// 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 ParseBatchChangeAdminGrantsResponse ¶ added in v0.2.1
func ParseBatchChangeAdminGrantsResponse(rsp *http.Response) (*BatchChangeAdminGrantsResponse, error)
ParseBatchChangeAdminGrantsResponse parses an HTTP response from a BatchChangeAdminGrantsWithResponse call
func (BatchChangeAdminGrantsResponse) ContentType ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (BatchChangeAdminGrantsResponse) GetBody ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (BatchChangeAdminGrantsResponse) GetJSON200 ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) GetJSON200() *AdminBatchGrantChangesResult
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (BatchChangeAdminGrantsResponse) GetJSON400 ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (BatchChangeAdminGrantsResponse) GetJSON401 ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (BatchChangeAdminGrantsResponse) GetJSON403 ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (BatchChangeAdminGrantsResponse) GetJSON409 ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (BatchChangeAdminGrantsResponse) GetJSON503 ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (BatchChangeAdminGrantsResponse) Status ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) Status() string
Status returns HTTPResponse.Status
func (BatchChangeAdminGrantsResponse) StatusCode ¶ added in v0.2.1
func (r BatchChangeAdminGrantsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ChangeAdminGrantsJSONRequestBody ¶ added in v0.2.1
type ChangeAdminGrantsJSONRequestBody = AdminGrantChangesInput
ChangeAdminGrantsJSONRequestBody defines body for ChangeAdminGrants for application/json ContentType.
type ChangeAdminGrantsParams ¶ added in v0.2.1
type ChangeAdminGrantsParams struct {
IdempotencyKey string `json:"Idempotency-Key"`
}
ChangeAdminGrantsParams defines parameters for ChangeAdminGrants.
type ChangeAdminGrantsResponse ¶ added in v0.2.1
type ChangeAdminGrantsResponse 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 ParseChangeAdminGrantsResponse ¶ added in v0.2.1
func ParseChangeAdminGrantsResponse(rsp *http.Response) (*ChangeAdminGrantsResponse, error)
ParseChangeAdminGrantsResponse parses an HTTP response from a ChangeAdminGrantsWithResponse call
func (ChangeAdminGrantsResponse) ContentType ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ChangeAdminGrantsResponse) GetBody ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ChangeAdminGrantsResponse) GetJSON200 ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) GetJSON200() *AdminRevision
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ChangeAdminGrantsResponse) GetJSON400 ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ChangeAdminGrantsResponse) GetJSON401 ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ChangeAdminGrantsResponse) GetJSON403 ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ChangeAdminGrantsResponse) GetJSON404 ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) GetJSON404() *AdminError
GetJSON404 returns the response for an HTTP 404 `application/json` response
func (ChangeAdminGrantsResponse) GetJSON409 ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) GetJSON409() *AdminError
GetJSON409 returns the response for an HTTP 409 `application/json` response
func (ChangeAdminGrantsResponse) GetJSON503 ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (ChangeAdminGrantsResponse) Status ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) Status() string
Status returns HTTPResponse.Status
func (ChangeAdminGrantsResponse) StatusCode ¶ added in v0.2.1
func (r ChangeAdminGrantsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
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) BatchChangeAdminGrants ¶ added in v0.2.1
func (c *Client) BatchChangeAdminGrants(ctx context.Context, params *BatchChangeAdminGrantsParams, body BatchChangeAdminGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
BatchChangeAdminGrants performs a POST /api/v1/platform/admin/batch-grant-changes (the `BatchChangeAdminGrants` operationId) request. Takes a body of the `application/json` content type.
多管理员授权变更预览(dry_run=true)与逐项执行(dry_run=false)。单批最多 50 名管理员且批内 subject 不重复。dry_run=false 时必须提供 Idempotency-Key,逐项返回 succeeded、conflict、forbidden 或 not_found 状态及最新修订号。.
func (*Client) BatchChangeAdminGrantsWithBody ¶ added in v0.2.1
func (c *Client) BatchChangeAdminGrantsWithBody(ctx context.Context, params *BatchChangeAdminGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
BatchChangeAdminGrantsWithBody performs a POST /api/v1/platform/admin/batch-grant-changes (the `BatchChangeAdminGrants` operationId) request, with any type of body and a specified content type.
多管理员授权变更预览(dry_run=true)与逐项执行(dry_run=false)。单批最多 50 名管理员且批内 subject 不重复。dry_run=false 时必须提供 Idempotency-Key,逐项返回 succeeded、conflict、forbidden 或 not_found 状态及最新修订号。.
func (*Client) ChangeAdminGrants ¶ added in v0.2.1
func (c *Client) ChangeAdminGrants(ctx context.Context, subject string, params *ChangeAdminGrantsParams, body ChangeAdminGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
ChangeAdminGrants performs a POST /api/v1/platform/admin/administrators/{subject}/grant-changes (the `ChangeAdminGrants` operationId) request. Takes a body of the `application/json` content type.
在单一预期修订号与事务内原子执行同一管理员的多项角色授予与撤销,仅递增一次修订号,实现新旧角色无空窗切换。禁止给自己增加授权;委托权限规则与单次授予一致。.
func (*Client) ChangeAdminGrantsWithBody ¶ added in v0.2.1
func (c *Client) ChangeAdminGrantsWithBody(ctx context.Context, subject string, params *ChangeAdminGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
ChangeAdminGrantsWithBody performs a POST /api/v1/platform/admin/administrators/{subject}/grant-changes (the `ChangeAdminGrants` operationId) request, with any type of body and a specified content type.
在单一预期修订号与事务内原子执行同一管理员的多项角色授予与撤销,仅递增一次修订号,实现新旧角色无空窗切换。禁止给自己增加授权;委托权限规则与单次授予一致。.
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.
六种初始模板仅提供建议能力,包含稳定国际化翻译键 label_key;不自动授权,不包含敏感能力。.
func (*Client) ListAdminRoles ¶ added in v0.2.1
func (c *Client) ListAdminRoles(ctx context.Context, params *ListAdminRolesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListAdminRoles performs a GET /api/v1/platform/admin/roles (the `ListAdminRoles` operationId) request.
分页读取不可变角色定义。需要全局或任意范围的 platform.authorization.read 能力;可信平台管理员自动满足。按创建时间与角色 ID 降序排列,游标绑定操作者与筛选条件。
func (*Client) ListAdministrators ¶ added in v0.2.1
func (c *Client) ListAdministrators(ctx context.Context, params *ListAdministratorsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
ListAdministrators performs a GET /api/v1/platform/admin/administrators (the `ListAdministrators` operationId) request.
按学校、群、业务模块、角色或能力反查当前持有显式授权的管理员列表。请求范围先与调用方的 platform.authorization.read 有效范围求交集,无交集返回 403;返回的授权范围均收窄至调用方可见范围。单页最多返回 1,000 项收窄后的授权。超过上限返回 400 invalid_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 {
// ListAdministrators performs a GET /api/v1/platform/admin/administrators (the `ListAdministrators` operationId) request.
//
// 按学校、群、业务模块、角色或能力反查当前持有显式授权的管理员列表。请求范围先与调用方的 platform.authorization.read 有效范围求交集,无交集返回 403;返回的授权范围均收窄至调用方可见范围。单页最多返回 1,000 项收窄后的授权。超过上限返回 400 invalid_request,调用方可缩小查询范围或降低每页人数。游标绑定操作者、筛选条件与授权范围。
ListAdministrators(ctx context.Context, params *ListAdministratorsParams, 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。修订号仅表示显式授权集合,不代表身份修订,客户端不能据此缓存平台管理员身份。
GetAdminEffective(ctx context.Context, subject string, params *GetAdminEffectiveParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChangeAdminGrantsWithBody performs a POST /api/v1/platform/admin/administrators/{subject}/grant-changes (the `ChangeAdminGrants` operationId) request,
// with any type of body and a specified content type.
//
// 在单一预期修订号与事务内原子执行同一管理员的多项角色授予与撤销,仅递增一次修订号,实现新旧角色无空窗切换。禁止给自己增加授权;委托权限规则与单次授予一致。.
ChangeAdminGrantsWithBody(ctx context.Context, subject string, params *ChangeAdminGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChangeAdminGrants performs a POST /api/v1/platform/admin/administrators/{subject}/grant-changes (the `ChangeAdminGrants` operationId) request.
// Takes a body of the `application/json` content type.
//
// 在单一预期修订号与事务内原子执行同一管理员的多项角色授予与撤销,仅递增一次修订号,实现新旧角色无空窗切换。禁止给自己增加授权;委托权限规则与单次授予一致。.
ChangeAdminGrants(ctx context.Context, subject string, params *ChangeAdminGrantsParams, body ChangeAdminGrantsJSONRequestBody, 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)
// BatchChangeAdminGrantsWithBody performs a POST /api/v1/platform/admin/batch-grant-changes (the `BatchChangeAdminGrants` operationId) request,
// with any type of body and a specified content type.
//
// 多管理员授权变更预览(dry_run=true)与逐项执行(dry_run=false)。单批最多 50 名管理员且批内 subject 不重复。dry_run=false 时必须提供 Idempotency-Key,逐项返回 succeeded、conflict、forbidden 或 not_found 状态及最新修订号。.
BatchChangeAdminGrantsWithBody(ctx context.Context, params *BatchChangeAdminGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// BatchChangeAdminGrants performs a POST /api/v1/platform/admin/batch-grant-changes (the `BatchChangeAdminGrants` operationId) request.
// Takes a body of the `application/json` content type.
//
// 多管理员授权变更预览(dry_run=true)与逐项执行(dry_run=false)。单批最多 50 名管理员且批内 subject 不重复。dry_run=false 时必须提供 Idempotency-Key,逐项返回 succeeded、conflict、forbidden 或 not_found 状态及最新修订号。.
BatchChangeAdminGrants(ctx context.Context, params *BatchChangeAdminGrantsParams, body BatchChangeAdminGrantsJSONRequestBody, 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.
//
// 六种初始模板仅提供建议能力,包含稳定国际化翻译键 label_key;不自动授权,不包含敏感能力。.
ListAdminRoleTemplates(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListAdminRoles performs a GET /api/v1/platform/admin/roles (the `ListAdminRoles` operationId) request.
//
// 分页读取不可变角色定义。需要全局或任意范围的 platform.authorization.read 能力;可信平台管理员自动满足。按创建时间与角色 ID 降序排列,游标绑定操作者与筛选条件。
ListAdminRoles(ctx context.Context, params *ListAdminRolesParams, 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) BatchChangeAdminGrantsWithBodyWithResponse ¶ added in v0.2.1
func (c *ClientWithResponses) BatchChangeAdminGrantsWithBodyWithResponse(ctx context.Context, params *BatchChangeAdminGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BatchChangeAdminGrantsResponse, error)
BatchChangeAdminGrantsWithBodyWithResponse performs a POST /api/v1/platform/admin/batch-grant-changes (the `BatchChangeAdminGrants` operationId) request, with any type of body and a specified content type.
多管理员授权变更预览(dry_run=true)与逐项执行(dry_run=false)。单批最多 50 名管理员且批内 subject 不重复。dry_run=false 时必须提供 Idempotency-Key,逐项返回 succeeded、conflict、forbidden 或 not_found 状态及最新修订号。.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) BatchChangeAdminGrantsWithResponse ¶ added in v0.2.1
func (c *ClientWithResponses) BatchChangeAdminGrantsWithResponse(ctx context.Context, params *BatchChangeAdminGrantsParams, body BatchChangeAdminGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*BatchChangeAdminGrantsResponse, error)
BatchChangeAdminGrantsWithResponse performs a POST /api/v1/platform/admin/batch-grant-changes (the `BatchChangeAdminGrants` operationId) request. Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
多管理员授权变更预览(dry_run=true)与逐项执行(dry_run=false)。单批最多 50 名管理员且批内 subject 不重复。dry_run=false 时必须提供 Idempotency-Key,逐项返回 succeeded、conflict、forbidden 或 not_found 状态及最新修订号。.
func (*ClientWithResponses) ChangeAdminGrantsWithBodyWithResponse ¶ added in v0.2.1
func (c *ClientWithResponses) ChangeAdminGrantsWithBodyWithResponse(ctx context.Context, subject string, params *ChangeAdminGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangeAdminGrantsResponse, error)
ChangeAdminGrantsWithBodyWithResponse performs a POST /api/v1/platform/admin/administrators/{subject}/grant-changes (the `ChangeAdminGrants` operationId) request, with any type of body and a specified content type.
在单一预期修订号与事务内原子执行同一管理员的多项角色授予与撤销,仅递增一次修订号,实现新旧角色无空窗切换。禁止给自己增加授权;委托权限规则与单次授予一致。.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) ChangeAdminGrantsWithResponse ¶ added in v0.2.1
func (c *ClientWithResponses) ChangeAdminGrantsWithResponse(ctx context.Context, subject string, params *ChangeAdminGrantsParams, body ChangeAdminGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangeAdminGrantsResponse, error)
ChangeAdminGrantsWithResponse performs a POST /api/v1/platform/admin/administrators/{subject}/grant-changes (the `ChangeAdminGrants` operationId) request. Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
在单一预期修订号与事务内原子执行同一管理员的多项角色授予与撤销,仅递增一次修订号,实现新旧角色无空窗切换。禁止给自己增加授权;委托权限规则与单次授予一致。.
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.
六种初始模板仅提供建议能力,包含稳定国际化翻译键 label_key;不自动授权,不包含敏感能力。.
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) ListAdminRolesWithResponse ¶ added in v0.2.1
func (c *ClientWithResponses) ListAdminRolesWithResponse(ctx context.Context, params *ListAdminRolesParams, reqEditors ...RequestEditorFn) (*ListAdminRolesResponse, error)
ListAdminRolesWithResponse performs a GET /api/v1/platform/admin/roles (the `ListAdminRoles` operationId) request.
分页读取不可变角色定义。需要全局或任意范围的 platform.authorization.read 能力;可信平台管理员自动满足。按创建时间与角色 ID 降序排列,游标绑定操作者与筛选条件。
Returns a wrapper object for the known response body format(s).
func (*ClientWithResponses) ListAdministratorsWithResponse ¶ added in v0.2.1
func (c *ClientWithResponses) ListAdministratorsWithResponse(ctx context.Context, params *ListAdministratorsParams, reqEditors ...RequestEditorFn) (*ListAdministratorsResponse, error)
ListAdministratorsWithResponse performs a GET /api/v1/platform/admin/administrators (the `ListAdministrators` operationId) request.
按学校、群、业务模块、角色或能力反查当前持有显式授权的管理员列表。请求范围先与调用方的 platform.authorization.read 有效范围求交集,无交集返回 403;返回的授权范围均收窄至调用方可见范围。单页最多返回 1,000 项收窄后的授权。超过上限返回 400 invalid_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 {
// ListAdministratorsWithResponse performs a GET /api/v1/platform/admin/administrators (the `ListAdministrators` operationId) request.
//
// 按学校、群、业务模块、角色或能力反查当前持有显式授权的管理员列表。请求范围先与调用方的 platform.authorization.read 有效范围求交集,无交集返回 403;返回的授权范围均收窄至调用方可见范围。单页最多返回 1,000 项收窄后的授权。超过上限返回 400 invalid_request,调用方可缩小查询范围或降低每页人数。游标绑定操作者、筛选条件与授权范围。
//
// Returns a wrapper object for the known response body format(s).
ListAdministratorsWithResponse(ctx context.Context, params *ListAdministratorsParams, reqEditors ...RequestEditorFn) (*ListAdministratorsResponse, 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).
GetAdminEffectiveWithResponse(ctx context.Context, subject string, params *GetAdminEffectiveParams, reqEditors ...RequestEditorFn) (*GetAdminEffectiveResponse, error)
// ChangeAdminGrantsWithBodyWithResponse performs a POST /api/v1/platform/admin/administrators/{subject}/grant-changes (the `ChangeAdminGrants` operationId) request,
// with any type of body and a specified content type.
//
// 在单一预期修订号与事务内原子执行同一管理员的多项角色授予与撤销,仅递增一次修订号,实现新旧角色无空窗切换。禁止给自己增加授权;委托权限规则与单次授予一致。.
//
// Returns a wrapper object for the known response body format(s).
ChangeAdminGrantsWithBodyWithResponse(ctx context.Context, subject string, params *ChangeAdminGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangeAdminGrantsResponse, error)
// ChangeAdminGrantsWithResponse performs a POST /api/v1/platform/admin/administrators/{subject}/grant-changes (the `ChangeAdminGrants` operationId) request.
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// 在单一预期修订号与事务内原子执行同一管理员的多项角色授予与撤销,仅递增一次修订号,实现新旧角色无空窗切换。禁止给自己增加授权;委托权限规则与单次授予一致。.
ChangeAdminGrantsWithResponse(ctx context.Context, subject string, params *ChangeAdminGrantsParams, body ChangeAdminGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*ChangeAdminGrantsResponse, 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)
// BatchChangeAdminGrantsWithBodyWithResponse performs a POST /api/v1/platform/admin/batch-grant-changes (the `BatchChangeAdminGrants` operationId) request,
// with any type of body and a specified content type.
//
// 多管理员授权变更预览(dry_run=true)与逐项执行(dry_run=false)。单批最多 50 名管理员且批内 subject 不重复。dry_run=false 时必须提供 Idempotency-Key,逐项返回 succeeded、conflict、forbidden 或 not_found 状态及最新修订号。.
//
// Returns a wrapper object for the known response body format(s).
BatchChangeAdminGrantsWithBodyWithResponse(ctx context.Context, params *BatchChangeAdminGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BatchChangeAdminGrantsResponse, error)
// BatchChangeAdminGrantsWithResponse performs a POST /api/v1/platform/admin/batch-grant-changes (the `BatchChangeAdminGrants` operationId) request.
// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
//
// 多管理员授权变更预览(dry_run=true)与逐项执行(dry_run=false)。单批最多 50 名管理员且批内 subject 不重复。dry_run=false 时必须提供 Idempotency-Key,逐项返回 succeeded、conflict、forbidden 或 not_found 状态及最新修订号。.
BatchChangeAdminGrantsWithResponse(ctx context.Context, params *BatchChangeAdminGrantsParams, body BatchChangeAdminGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*BatchChangeAdminGrantsResponse, 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.
//
// 六种初始模板仅提供建议能力,包含稳定国际化翻译键 label_key;不自动授权,不包含敏感能力。.
//
// Returns a wrapper object for the known response body format(s).
ListAdminRoleTemplatesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminRoleTemplatesResponse, error)
// ListAdminRolesWithResponse performs a GET /api/v1/platform/admin/roles (the `ListAdminRoles` operationId) request.
//
// 分页读取不可变角色定义。需要全局或任意范围的 platform.authorization.read 能力;可信平台管理员自动满足。按创建时间与角色 ID 降序排列,游标绑定操作者与筛选条件。
//
// Returns a wrapper object for the known response body format(s).
ListAdminRolesWithResponse(ctx context.Context, params *ListAdminRolesParams, reqEditors ...RequestEditorFn) (*ListAdminRolesResponse, 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 ListAdminRolesParams ¶ added in v0.2.1
type ListAdminRolesParams struct {
Keyword *string `form:"keyword,omitempty" json:"keyword,omitempty"`
Capability *string `form:"capability,omitempty" json:"capability,omitempty"`
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListAdminRolesParams defines parameters for ListAdminRoles.
type ListAdminRolesResponse ¶ added in v0.2.1
type ListAdminRolesResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminRolePage
// 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
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseListAdminRolesResponse ¶ added in v0.2.1
func ParseListAdminRolesResponse(rsp *http.Response) (*ListAdminRolesResponse, error)
ParseListAdminRolesResponse parses an HTTP response from a ListAdminRolesWithResponse call
func (ListAdminRolesResponse) ContentType ¶ added in v0.2.1
func (r ListAdminRolesResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAdminRolesResponse) GetBody ¶ added in v0.2.1
func (r ListAdminRolesResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListAdminRolesResponse) GetJSON200 ¶ added in v0.2.1
func (r ListAdminRolesResponse) GetJSON200() *AdminRolePage
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListAdminRolesResponse) GetJSON400 ¶ added in v0.2.1
func (r ListAdminRolesResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ListAdminRolesResponse) GetJSON401 ¶ added in v0.2.1
func (r ListAdminRolesResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ListAdminRolesResponse) GetJSON403 ¶ added in v0.2.1
func (r ListAdminRolesResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListAdminRolesResponse) GetJSON503 ¶ added in v0.2.1
func (r ListAdminRolesResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (ListAdminRolesResponse) Status ¶ added in v0.2.1
func (r ListAdminRolesResponse) Status() string
Status returns HTTPResponse.Status
func (ListAdminRolesResponse) StatusCode ¶ added in v0.2.1
func (r ListAdminRolesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListAdministratorsParams ¶ added in v0.2.1
type ListAdministratorsParams 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"`
RoleId *string `form:"role_id,omitempty" json:"role_id,omitempty"`
Capability *string `form:"capability,omitempty" json:"capability,omitempty"`
Cursor *string `form:"cursor,omitempty" json:"cursor,omitempty"`
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListAdministratorsParams defines parameters for ListAdministrators.
type ListAdministratorsResponse ¶ added in v0.2.1
type ListAdministratorsResponse struct {
Body []byte
HTTPResponse *http.Response
// JSON200 the response for an HTTP 200 `application/json` response
JSON200 *AdminAdministratorPage
// 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
// JSON503 the response for an HTTP 503 `application/json` response
JSON503 *AdminError
}
func ParseListAdministratorsResponse ¶ added in v0.2.1
func ParseListAdministratorsResponse(rsp *http.Response) (*ListAdministratorsResponse, error)
ParseListAdministratorsResponse parses an HTTP response from a ListAdministratorsWithResponse call
func (ListAdministratorsResponse) ContentType ¶ added in v0.2.1
func (r ListAdministratorsResponse) ContentType() string
ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers
func (ListAdministratorsResponse) GetBody ¶ added in v0.2.1
func (r ListAdministratorsResponse) GetBody() []byte
GetBody returns the raw response body bytes
func (ListAdministratorsResponse) GetJSON200 ¶ added in v0.2.1
func (r ListAdministratorsResponse) GetJSON200() *AdminAdministratorPage
GetJSON200 returns the response for an HTTP 200 `application/json` response
func (ListAdministratorsResponse) GetJSON400 ¶ added in v0.2.1
func (r ListAdministratorsResponse) GetJSON400() *AdminError
GetJSON400 returns the response for an HTTP 400 `application/json` response
func (ListAdministratorsResponse) GetJSON401 ¶ added in v0.2.1
func (r ListAdministratorsResponse) GetJSON401() *AdminError
GetJSON401 returns the response for an HTTP 401 `application/json` response
func (ListAdministratorsResponse) GetJSON403 ¶ added in v0.2.1
func (r ListAdministratorsResponse) GetJSON403() *AdminError
GetJSON403 returns the response for an HTTP 403 `application/json` response
func (ListAdministratorsResponse) GetJSON503 ¶ added in v0.2.1
func (r ListAdministratorsResponse) GetJSON503() *AdminError
GetJSON503 returns the response for an HTTP 503 `application/json` response
func (ListAdministratorsResponse) Status ¶ added in v0.2.1
func (r ListAdministratorsResponse) Status() string
Status returns HTTPResponse.Status
func (ListAdministratorsResponse) StatusCode ¶ added in v0.2.1
func (r ListAdministratorsResponse) 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