glacier

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlacierCalls = []types.AWSService{
	{
		Name: "glacier:ListVaults",
		Call: func(ctx context.Context, sess *session.Session) (interface{}, error) {
			svc := glacier.New(sess)
			output, err := svc.ListVaultsWithContext(ctx, &glacier.ListVaultsInput{})
			if err != nil {
				return nil, err
			}
			return output.VaultList, nil
		},
		Process: func(output interface{}, err error, debug bool) []types.ScanResult {
			var results []types.ScanResult

			if err != nil {
				utils.HandleAWSError(debug, "glacier:ListVaults", err)
				return []types.ScanResult{
					{
						ServiceName: "Glacier",
						MethodName:  "glacier:ListVaults",
						Error:       err,
						Timestamp:   time.Now(),
					},
				}
			}

			if vaults, ok := output.([]*glacier.DescribeVaultOutput); ok {
				for _, vault := range vaults {
					results = append(results, types.ScanResult{
						ServiceName:  "Glacier",
						MethodName:   "glacier:ListVaults",
						ResourceType: "vault",
						ResourceName: *vault.VaultName,
						Details:      map[string]interface{}{},
						Timestamp:    time.Now(),
					})

					utils.PrintResult(debug, "", "glacier:ListVaults", fmt.Sprintf("Glacier vault: %s", utils.ColorizeItem(*vault.VaultName)), nil)
				}
			}
			return results
		},
		ModuleName: types.DefaultModuleName,
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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