services

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateIAMRoleForPolicy

func CreateIAMRoleForPolicy(ctx context.Context,
	accountID string,
	iamClient *iam.Client,
	name string,
	policyDocument,
	assumePolicyDocument PolicyDocument,
)

CreateIAMRoleForPolicy creates an IAM role with the given IAM policy. It also links an IAM trust policy for the IAM role, so it can be assumed by the nodes of the provisioned Kubernetes cluster.

func CreateS3Bucket

func CreateS3Bucket(ctx context.Context, s3Client *s3.Client, name string)

Creates S3 Bucket.

func DownloadS3BucketContents

func DownloadS3BucketContents(ctx context.Context,
	s3Client *s3.Client,
	bucketName string,
	gzipDecode bool,
)

Downloads the contents of the given S3 bucket locally. If the contents are gZip encoded, then you can choose to gZip decode them after download. NOTE : The download path is decided by utils.GetDownloadedStorageBucketContentsDir( ).

Types

type PolicyDocument

type PolicyDocument struct {
	Version   string            `json:"Version"`
	Statement []PolicyStatement `json:"Statement"`
}

PolicyDocument defines a policy document as a Go struct that can be serialized to JSON.

type PolicyStatement

type PolicyStatement struct {
	Effect    string            `json:"Effect"`
	Action    []string          `json:"Action"`
	Principal map[string]string `json:"Principal,omitempty"`
	Resource  string            `json:"Resource,omitempty"`
}

PolicyStatement defines a statement in a policy document.

Jump to

Keyboard shortcuts

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