Documentation
¶
Index ¶
- type ClientConfig
- type Provider
- func (p *Provider) BucketACL(ctx context.Context, action, container, level string) (schema.BucketACLResult, error)
- func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) ([]schema.BucketResult, error)
- func (p *Provider) DBManagement(ctx context.Context, action, instanceID string) (schema.DatabaseActionResult, error)
- func (p *Provider) EventDump(ctx context.Context, action, args string) (schema.EventActionResult, error)
- func (p *Provider) ExecuteCloudVMCommand(ctx context.Context, instanceID, cmd string) (schema.CommandResult, error)
- func (p *Provider) IAMCredential(ctx context.Context, action, principal, credentialID string) (schema.IAMCredentialResult, error)
- func (p *Provider) Name() string
- func (p *Provider) Resources(ctx context.Context) (schema.Resources, error)
- func (p *Provider) RoleBinding(ctx context.Context, action, principal, role, scope string) (schema.RoleBindingResult, error)
- func (p *Provider) UserManagement(action, username, password string) (schema.IAMResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶ added in v0.3.1
type ClientConfig struct {
APIOptions []api.Option
OBSOptions []_obs.Option
SkipCredentialCache bool
}
ClientConfig allows callers (e.g. demo replay) to inject custom api.Option and obs.Option values and skip credential cache writes for ephemeral credentials.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is a data provider for huawei API
func NewWithConfig ¶ added in v0.3.1
func NewWithConfig(options schema.Options, cfg ClientConfig) (*Provider, error)
NewWithConfig creates a new provider client for huawei API with injected transport options. Real callers use New; replay/test callers feed in a mock HTTP client through cfg.APIOptions / cfg.OBSOptions.
func (*Provider) BucketACL ¶ added in v0.3.1
func (p *Provider) BucketACL(ctx context.Context, action, container, level string) (schema.BucketACLResult, error)
BucketACL implements schema.BucketACLManager for huawei OBS. `level` accepts canned OBS ACL values (private / public-read / public-read-write + the *-delivered variants) or friendly aliases resolved by obs.NormalizeOBSACL.
func (*Provider) BucketDump ¶ added in v0.0.5
func (*Provider) DBManagement ¶ added in v0.1.1
func (p *Provider) DBManagement(ctx context.Context, action, instanceID string) (schema.DatabaseActionResult, error)
DBManagement implements schema.DBManager for Huawei RDS. `useradd` provisions a database account on the named instance using the `rds-account-check` config; `userdel` removes it.
func (*Provider) EventDump ¶ added in v0.0.9
func (p *Provider) EventDump(ctx context.Context, action, args string) (schema.EventActionResult, error)
EventDump implements schema.EventReader for Huawei CTS. The `dump` action lists recent management traces; `whitelist` returns a clear unsupported error because CTS is a read-only audit service.
func (*Provider) ExecuteCloudVMCommand ¶ added in v0.1.1
func (p *Provider) ExecuteCloudVMCommand(ctx context.Context, instanceID, cmd string) (schema.CommandResult, error)
ExecuteCloudVMCommand implements schema.VMExecutor for Huawei via COC BatchExecuteCommand. PLAN.md decision T3.2 / Task 11. UniAgent must be installed on the target ECS for executions to land.
`cmd` arrives in one of two encodings: the headless `__ctk_headless_sh__:` vmexec spec (which carries an explicit osType), or a bare base64 string from the REPL shell loop. COC's defaultExecuteScript is `SHELL` (Linux); Windows targets are rejected until a PowerShell/BAT scriptType mapping is separately validated.
func (*Provider) IAMCredential ¶ added in v0.3.1
func (p *Provider) IAMCredential(ctx context.Context, action, principal, credentialID string) (schema.IAMCredentialResult, error)
IAMCredential implements schema.IAMCredentialManager for huawei IAM permanent access keys. `principal` is the IAM user name (required for create; optional for list — empty resolves to the calling principal). `credentialID` is the access key string for delete.
func (*Provider) RoleBinding ¶ added in v0.3.1
func (p *Provider) RoleBinding(ctx context.Context, action, principal, role, scope string) (schema.RoleBindingResult, error)
RoleBinding implements schema.RoleBindingManager for huawei IAM. Huawei has no direct user-policy attachment; policies live on keystone groups and users gain permissions by joining groups. The capability therefore models group membership: `principal` is the user name, `role` is the group name, `scope` is reserved (membership is domain-scoped via the X-Domain-Id header).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package coc implements the cloudlist `vm` capability for Huawei Cloud via COC (Cloud Operations Center) BatchExecuteCommand.
|
Package coc implements the cloudlist `vm` capability for Huawei Cloud via COC (Cloud Operations Center) BatchExecuteCommand. |
|
Package endpoint builds Huawei Cloud service endpoint URLs without going through the official SDK's region.ValueOf() lookup.
|
Package endpoint builds Huawei Cloud service endpoint URLs without going through the official SDK's region.ValueOf() lookup. |
|
Package lts wraps the Huawei Cloud LTS (Log Tank Service) ListLogGroups action for the cloudlist `log` asset.
|
Package lts wraps the Huawei Cloud LTS (Log Tank Service) ListLogGroups action for the cloudlist `log` asset. |
|
Package msgsms wraps Huawei Cloud MSGSMS template + sign listing for the cloudlist `sms` asset.
|
Package msgsms wraps Huawei Cloud MSGSMS template + sign listing for the cloudlist `sms` asset. |