openapi

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssumeRoleWithOIDCToken

func AssumeRoleWithOIDCToken(ctx context.Context, providerArn, roleArn string,
	sessionDuration time.Duration, token []byte, stsEndpoint string) (*oidctoken.Credential, error)

func GetStsEndpoint

func GetStsEndpoint(region string, vpc bool) string

func IsRamPolicyAttachedToRoleErr added in v0.6.0

func IsRamPolicyAttachedToRoleErr(err error) bool

func IsRamPolicyNotExistErr added in v0.6.0

func IsRamPolicyNotExistErr(err error) bool

func IsRamRoleNotExistErr added in v0.6.0

func IsRamRoleNotExistErr(err error) bool

Types

type CSClientInterface

type CSClientInterface interface {
	GetCluster(ctx context.Context, clusterId string) (*types.Cluster, error)
	GetRecentClusterLogs(ctx context.Context, clusterId string) ([]types.ClusterLog, error)
	UpdateCluster(ctx context.Context, clusterId string, opt UpdateClusterOption) (*types.ClusterTask, error)
	GetTask(ctx context.Context, taskId string) (*types.ClusterTask, error)
	GetUserKubeConfig(ctx context.Context, clusterId string, privateIpAddress bool, temporaryDuration time.Duration) (*types.KubeConfig, error)
	ListClusters(ctx context.Context) ([]types.Cluster, error)
	GetAddonMetaData(ctx context.Context, clusterId string, name string) (*types.ClusterAddon, error)
	GetAddonStatus(ctx context.Context, clusterId string, name string) (*types.ClusterAddon, error)
	InstallAddon(ctx context.Context, clusterId string, addon types.ClusterAddon) error
	ListAddons(ctx context.Context, clusterId string) ([]types.ClusterAddon, error)
}

type Client

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

func NewClient

func NewClient(config *openapi.Config) (*Client, error)

func (*Client) AttachPolicyToRole added in v0.6.0

func (c *Client) AttachPolicyToRole(ctx context.Context, policyName, policyType, roleName string) error

func (*Client) CreatePolicy added in v0.6.0

func (c *Client) CreatePolicy(ctx context.Context, policy types.RamPolicy) (*types.RamPolicy, error)

func (*Client) CreateRole added in v0.4.0

func (c *Client) CreateRole(ctx context.Context, role types.RamRole) (*types.RamRole, error)

func (*Client) Credential added in v0.11.0

func (c *Client) Credential() credentials.Credential

func (*Client) GetAddonMetaData added in v0.9.1

func (c *Client) GetAddonMetaData(ctx context.Context, clusterId string, name string) (*types.ClusterAddon, error)

func (*Client) GetAddonStatus added in v0.9.1

func (c *Client) GetAddonStatus(ctx context.Context, clusterId string, name string) (*types.ClusterAddon, error)

func (*Client) GetCluster

func (c *Client) GetCluster(ctx context.Context, clusterId string) (*types.Cluster, error)

func (*Client) GetPolicy added in v0.6.0

func (c *Client) GetPolicy(ctx context.Context, name, policyType string) (*types.RamPolicy, error)

func (*Client) GetRecentClusterLogs

func (c *Client) GetRecentClusterLogs(ctx context.Context, clusterId string) ([]types.ClusterLog, error)

func (*Client) GetRole

func (c *Client) GetRole(ctx context.Context, name string) (*types.RamRole, error)

func (*Client) GetTask

func (c *Client) GetTask(ctx context.Context, taskId string) (*types.ClusterTask, error)

func (*Client) GetUserKubeConfig added in v0.7.0

func (c *Client) GetUserKubeConfig(ctx context.Context, clusterId string,
	privateIpAddress bool, temporaryDuration time.Duration) (*types.KubeConfig, error)

func (*Client) InstallAddon added in v0.9.1

func (c *Client) InstallAddon(ctx context.Context, clusterId string, addon types.ClusterAddon) error

func (*Client) ListAddons added in v0.9.1

func (c *Client) ListAddons(ctx context.Context, clusterId string) ([]types.ClusterAddon, error)

func (*Client) ListClusters added in v0.9.0

func (c *Client) ListClusters(ctx context.Context) ([]types.Cluster, error)

func (*Client) ListPoliciesForRole added in v0.6.0

func (c *Client) ListPoliciesForRole(ctx context.Context, name string) ([]types.RamRolePolicy, error)

func (*Client) UpdateCluster

func (c *Client) UpdateCluster(ctx context.Context, clusterId string, opt UpdateClusterOption) (*types.ClusterTask, error)

func (*Client) UpdateRole

func (c *Client) UpdateRole(ctx context.Context, name string, opt UpdateRamRoleOption) (*types.RamRole, error)

type RamClientInterface

type RamClientInterface interface {
	GetRole(ctx context.Context, name string) (*types.RamRole, error)
	CreateRole(ctx context.Context, role types.RamRole) (*types.RamRole, error)
	UpdateRole(ctx context.Context, name string, opt UpdateRamRoleOption) (*types.RamRole, error)
	ListPoliciesForRole(ctx context.Context, name string) ([]types.RamRolePolicy, error)
	GetPolicy(ctx context.Context, name, policyType string) (*types.RamPolicy, error)
	CreatePolicy(ctx context.Context, policy types.RamPolicy) (*types.RamPolicy, error)
	AttachPolicyToRole(ctx context.Context, policyName, policyType, roleName string) error
}

type UpdateClusterOption

type UpdateClusterOption struct {
	EnableRRSA *bool
}

type UpdateRamRoleOption

type UpdateRamRoleOption struct {
	AssumeRolePolicyDocument *types.RamPolicyDocument
}

Jump to

Keyboard shortcuts

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