jdcloud

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: 24 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
	ObjectAPIOptions    []awsapi.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 JDCloud API.

func NewWithConfig added in v0.3.1

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

NewWithConfig creates a new provider client for JDCloud API 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 JDCloud OSS (S3-compatible data plane). `level` accepts the canned S3-style ACL values (private, public-read, public-read-write, authenticated-read) or friendly aliases resolved by oss.NormalizeOSSACL.

func (*Provider) BucketDump

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

func (*Provider) DBManagement

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

DBManagement implements schema.DBManager for JDCloud RDS. `useradd` / `userdel` follow the pattern-inferred `/v1/regions/<region>/instances/<id>/accounts` path. Verify against the upstream SDK before relying on this in production.

func (*Provider) EventDump

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

EventDump implements schema.EventReader for JDCloud ActionTrail. The endpoint paths are pattern-inferred from JDCloud's regional REST family; `whitelist` is unsupported because ActionTrail is read-only.

func (*Provider) ExecuteCloudVMCommand

func (p *Provider) ExecuteCloudVMCommand(ctx context.Context, instanceID, cmd string) (schema.CommandResult, error)

ExecuteCloudVMCommand routes through JDCloud Cloud Assistant (assistant.jdcloud-api.com). Region must be a real VM region (cn-north-1 / cn-east-2 / ...); we resolve it from the host cache populated by `cloudlist` so `shell <instance-id>` works regardless of the session's current region setting.

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 JDCloud IAM. The path family follows the same pattern-inferred convention as `:describeAttachedPolicies` and `:attachSubUserPolicy`. 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 the provider for a resource deployment source.

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 JDCloud IAM. `principal` is the sub user name, `role` is the policy name (e.g. `JDCloudAdmin-New`). `scope` is reserved (JDCloud sub-user policies are not scoped per resource).

func (*Provider) UserManagement

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

UserManagement powers the iam-user-check payload. JDCloud's CreateSubUser is atomic (name + password + consoleLogin in one call), so we only need an AttachSubUserPolicy follow-up to grant administrator privilege.

Directories

Path Synopsis
Package dns wraps JDCloud domainservice DescribeDomains + DescribeResourceRecord for the cloudlist `domain` asset.
Package dns wraps JDCloud domainservice DescribeDomains + DescribeResourceRecord for the cloudlist `domain` asset.
Package logs wraps the JDCloud log service describeLogTopics action for the cloudlist `log` asset.
Package logs wraps the JDCloud log service describeLogTopics action for the cloudlist `log` asset.
Package rds wraps JDCloud RDS account lifecycle.
Package rds wraps JDCloud RDS account lifecycle.
Package sms wraps JDCloud SMS for the cloudlist `sms` asset.
Package sms wraps JDCloud SMS for the cloudlist `sms` asset.

Jump to

Keyboard shortcuts

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