commandbuilder

package
v1.2.37 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ParamNewLineSeparator = " \\\n"

Variables

This section is empty.

Functions

func JoinCommands

func JoinCommands(commands []string) string

Types

type Command

type Command string
const (
	//IAM
	CreateRole                    Command = "create-role"
	DeleteRole                    Command = "delete-role"
	CreatePolicy                  Command = "create-policy"
	DeletePolicy                  Command = "delete-policy"
	CreatePolicyVersion           Command = "create-policy-version"
	DeleteRolePolicy              Command = "delete-role-policy"
	AttachRolePolicy              Command = "attach-role-policy"
	DetachRolePolicy              Command = "detach-role-policy"
	TagPolicy                     Command = "tag-policy"
	TagRole                       Command = "tag-role"
	CreateOpenIdConnectProvider   Command = "create-open-id-connect-provider"
	DeleteOpenIdConnectProvider   Command = "delete-open-id-connect-provider"
	DeleteRolePermissionsBoundary Command = "delete-role-permissions-boundary"
	//S3Api
	CreateBucket         Command = "create-bucket"
	PutObject            Command = "put-object"
	PutBucketTagging     Command = "put-bucket-tagging"
	PutPublicAccessBlock Command = "put-public-access-block"
	PutBucketPolicy      Command = "put-bucket-policy"
	//S3
	Remove       Command = "rm"
	RemoveBucket Command = "rb"
	//SecretsManager
	CreateSecret Command = "create-secret"
	DeleteSecret Command = "delete-secret"
)

type CommandBuilder

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

func NewIAMCommandBuilder

func NewIAMCommandBuilder() *CommandBuilder

func NewS3ApiCommandBuilder added in v1.2.14

func NewS3ApiCommandBuilder() *CommandBuilder

func NewS3CommandBuilder added in v1.2.12

func NewS3CommandBuilder() *CommandBuilder

func NewSecretsManagerCommandBuilder added in v1.2.13

func NewSecretsManagerCommandBuilder() *CommandBuilder

func (*CommandBuilder) AddParam

func (b *CommandBuilder) AddParam(awsParam Param, value string) *CommandBuilder

func (*CommandBuilder) AddParamNoValue

func (b *CommandBuilder) AddParamNoValue(awsParam Param) *CommandBuilder

func (*CommandBuilder) AddRedirect added in v1.2.13

func (b *CommandBuilder) AddRedirect(awsRedirect Redirect, filename string) *CommandBuilder

func (*CommandBuilder) AddTags

func (b *CommandBuilder) AddTags(value map[string]string) *CommandBuilder

func (*CommandBuilder) AddValueNoParam added in v1.2.14

func (b *CommandBuilder) AddValueNoParam(value string) *CommandBuilder

func (*CommandBuilder) Build

func (b *CommandBuilder) Build() string

func (*CommandBuilder) SetCommand

func (b *CommandBuilder) SetCommand(awsCommand Command) *CommandBuilder

func (*CommandBuilder) SetService

func (b *CommandBuilder) SetService(awsService Service) *CommandBuilder

type Param

type Param string
const (
	//IAM
	Tags                     Param = "tags"
	RoleName                 Param = "role-name"
	AssumeRolePolicyDocument Param = "assume-role-policy-document"
	PermissionsBoundary      Param = "permissions-boundary"
	Path                     Param = "path"
	PolicyName               Param = "policy-name"
	PolicyDocument           Param = "policy-document"
	PolicyArn                Param = "policy-arn"
	Url                      Param = "url"
	ClientIdList             Param = "client-id-list"
	ThumbprintList           Param = "thumbprint-list"
	OpenIdConnectProviderArn Param = "open-id-connect-provider-arn"
	SetAsDefault             Param = "set-as-default"

	//S3
	Bucket                         Param = "bucket"
	Region                         Param = "region"
	Acl                            Param = "acl"
	CreateBucketConfiguration      Param = "create-bucket-configuration"
	Body                           Param = "body"
	Key                            Param = "key"
	Tagging                        Param = "tagging"
	PublicAccessBlockConfiguration Param = "public-access-block-configuration"
	Policy                         Param = "policy"

	//SecretsManager
	Name         Param = "name"
	SecretString Param = "secret-string"
	Description  Param = "description"
	SecretID     Param = "secret-id"
	Recursive    Param = "recursive"
)

type Redirect added in v1.2.13

type Redirect string
const (
	FileRewrite Redirect = ">"
)

type Service

type Service string
const (
	IAM   Service = "iam"
	S3Api Service = "s3api"
	S3    Service = "s3"
	SM    Service = "secretsmanager"
)

Directories

Path Synopsis
helper

Jump to

Keyboard shortcuts

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