ucloud

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

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
	SkipCredentialCache bool
}

ClientConfig allows callers (e.g. demo replay) to inject custom api.Option values and skip credential cache writes for ephemeral credentials.

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func New

func New(options schema.Options) (*Provider, error)

New creates a new provider client for UCloud APIs.

func NewWithConfig added in v0.3.1

func NewWithConfig(options schema.Options, cfg ClientConfig) (*Provider, error)

NewWithConfig creates a new provider client for UCloud APIs with injected transport options. Real callers use New; replay/test callers feed in a mock HTTP client through cfg.APIOptions.

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 UCloud UFile. `level` accepts the UFile bucket access type (`private` / `public` / `limited`) or a friendly alias resolved by the driver.

func (*Provider) BucketDump added in v0.3.1

func (p *Provider) BucketDump(ctx context.Context, action, bucketName string) ([]schema.BucketResult, error)

BucketDump implements schema.BucketManager for UCloud UFile. The control plane (DescribeBucket) lives on `api.ucloud.cn` while data-plane object listing flows through the per-bucket `*.ufileos.com` host with HMAC-SHA1 signing — the ufile.Driver carries both clients.

func (*Provider) DBManagement added in v0.3.1

func (p *Provider) DBManagement(ctx context.Context, action, instanceID string) (schema.DatabaseActionResult, error)

DBManagement implements schema.DBManager for UCloud UDB. `useradd` / `userdel` use the `CreateUDBUser` / `DeleteUDBUser` actions.

func (*Provider) EventDump added in v0.3.1

func (p *Provider) EventDump(ctx context.Context, action, args string) (schema.EventActionResult, error)

EventDump implements schema.EventReader for UCloud Action Trail (UACT). Action `dump` lists recent operation events; `whitelist` is unsupported.

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 UCloud IAM. The access-key actions follow the pattern-inferred `ListUserApiKeys` / `CreateUserApiKey` / `DeleteUserApiKey` shape consistent with UCloud's other `XForUser` IAM RPCs; verify against the upstream SDK before relying on this in production.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the name of the provider.

func (*Provider) Resources

func (p *Provider) Resources(ctx context.Context) (schema.Resources, error)

Resources returns cloud assets for the asset inventory payload.

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 UCloud IAM. `principal` is a sub user name, `role` is a UCloud policy URN (or short name like `AdministratorAccess`, expanded to `ucs:iam::ucs:policy/...`). `scope` selects between account-wide (`Unspecified`) and project-scoped (`Specified`, requires the provider's projectId); empty defaults to `Unspecified`.

func (*Provider) UserManagement added in v0.3.0

func (p *Provider) UserManagement(action, username, password string) (schema.IAMResult, error)

Directories

Path Synopsis
Package uloghub wraps UCloud ULogHub DescribeULogTopic for the cloudlist `log` asset.
Package uloghub wraps UCloud ULogHub DescribeULogTopic for the cloudlist `log` asset.
Package usms wraps UCloud USMS for the cloudlist `sms` asset.
Package usms wraps UCloud USMS for the cloudlist `sms` asset.

Jump to

Keyboard shortcuts

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