report

package
v0.0.0-...-f062a39 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintTable

func PrintTable(r Report)

func SliceOfStringsToString

func SliceOfStringsToString(slice []string) string

func Title

func Title(name string) string

Types

type Ec2Report

type Ec2Report struct {
	VolumeReport      *VolumeReport
	InstanceID        string
	SortableTags      *SortableTags
	SecurityGroupsIDs []string
	AvailabilityZone  string
}

func NewEc2Report

func NewEc2Report(instanceID string) *Ec2Report

type Ec2ReportRequiredResources

type Ec2ReportRequiredResources struct {
	Ec2s             *resource.Ec2s
	KMSKeys          *resource.KMSKeys
	Volumes          *resource.Volumes
	SecurityGroups   *resource.SecurityGroups
	AvailabilityZone string
}

type Ec2Reports

type Ec2Reports []*Ec2Report

func (*Ec2Reports) FormatDataToTable

func (e *Ec2Reports) FormatDataToTable() [][]string

func (*Ec2Reports) GenerateReport

func (e *Ec2Reports) GenerateReport(r *Ec2ReportRequiredResources)

func (*Ec2Reports) GetHeaders

func (e *Ec2Reports) GetHeaders() []string

func (*Ec2Reports) GetResources

func (e *Ec2Reports) GetResources(config *configuration.Config) (*Ec2ReportRequiredResources, error)

GetResources : Initialize and loads required resources to create ec2 report

type EncryptionType

type EncryptionType int
const (
	// NONE : No Encryption
	NONE EncryptionType = 0
	// AES256 : 256-bit Advanced Encryption Standard
	AES256 EncryptionType = 1
	// DKMS : Encrypted with default KMS Key
	DKMS EncryptionType = 2
	// CKMS : Encrypted with Custom KMS Key
	CKMS EncryptionType = 3
)

func (EncryptionType) String

func (et EncryptionType) String() string

type IAMChecklist

type IAMChecklist []*IAMItem

func (*IAMChecklist) FormatDataToTable

func (i *IAMChecklist) FormatDataToTable() [][]string

func (*IAMChecklist) GenerateReport

func (i *IAMChecklist) GenerateReport(r *IAMReportRequiredResources)

func (*IAMChecklist) GetHeaders

func (i *IAMChecklist) GetHeaders() []string

func (*IAMChecklist) GetResources

func (i *IAMChecklist) GetResources(config *configuration.Config) (*IAMReportRequiredResources, error)

type IAMChecklistRequiredResources

type IAMChecklistRequiredResources struct {
	IAMInfo *resource.IAMInfo
}

type IAMItem

type IAMItem struct {
	Name  string
	Value bool
}

func NewIAMItem

func NewIAMItem(name string, value bool) *IAMItem

type IAMReport

type IAMReport struct {
	UserName       string
	Groups         string
	InlinePolicies int
}

func NewIAMReport

func NewIAMReport(u iam.UserDetail) *IAMReport

type IAMReportRequiredResources

type IAMReportRequiredResources struct {
	IAMInfo *resource.IAMInfo
}

type IAMReports

type IAMReports []*IAMReport

func (*IAMReports) FormatDataToTable

func (i *IAMReports) FormatDataToTable() [][]string

func (*IAMReports) GenerateReport

func (i *IAMReports) GenerateReport(r *IAMReportRequiredResources)

func (*IAMReports) GetHeaders

func (i *IAMReports) GetHeaders() []string

func (*IAMReports) GetResources

func (i *IAMReports) GetResources(config *configuration.Config) (*IAMReportRequiredResources, error)

type Report

type Report interface {
	FormatDataToTable() [][]string
	GetHeaders() []string
}

type S3BucketReport

type S3BucketReport struct {
	Name string
	EncryptionType
	LoggingEnabled bool
	ACLIsPublic    string
	PolicyIsPublic string
}

func (*S3BucketReport) CheckEncryptionType

func (s3br *S3BucketReport) CheckEncryptionType(s3EncryptionType s3.ServerSideEncryptionByDefault, kmsKeys *resource.KMSKeys)

CheckEncryptionType : Returns Encryption Type (AES256, CKMS, DKMS, NONE)

type S3BucketReports

type S3BucketReports []*S3BucketReport

func (*S3BucketReports) FormatDataToTable

func (s3brs *S3BucketReports) FormatDataToTable() [][]string

func (*S3BucketReports) GenerateReport

func (s3brs *S3BucketReports) GenerateReport(r *S3ReportRequiredResources)

func (*S3BucketReports) GetHeaders

func (s3brs *S3BucketReports) GetHeaders() []string

func (*S3BucketReports) GetResources

func (s3brs *S3BucketReports) GetResources(config *configuration.Config) (*S3ReportRequiredResources, error)

type S3ReportRequiredResources

type S3ReportRequiredResources struct {
	KMSKeys   *resource.KMSKeys
	S3Buckets *resource.S3Buckets
}

type SortableTags

type SortableTags struct {
	Tags map[string]string
	Keys []string
}

func NewSortableTags

func NewSortableTags() *SortableTags

func (*SortableTags) Add

func (st *SortableTags) Add(tags []*ec2.Tag)

func (*SortableTags) ToTableData

func (st *SortableTags) ToTableData() string

type VolumeReport

type VolumeReport []string

func (*VolumeReport) AddEBS

func (v *VolumeReport) AddEBS(volumeID string, encryptionType EncryptionType)

func (*VolumeReport) ToTableData

func (v *VolumeReport) ToTableData() string

Jump to

Keyboard shortcuts

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