iam

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateGroups added in v0.5.1

func MigrateGroups(db *gorm.DB) error

func MigratePasswordPolicies added in v0.5.1

func MigratePasswordPolicies(db *gorm.DB) error

func MigratePolicies added in v0.5.1

func MigratePolicies(db *gorm.DB) error

func MigrateRoles added in v0.5.1

func MigrateRoles(db *gorm.DB) error

func MigrateUsers added in v0.5.1

func MigrateUsers(db *gorm.DB) error

func NewClient

func NewClient(session *session.Session, awsConfig *aws.Config, db *gorm.DB, log *zap.Logger,
	accountID string, _ string) resource.ClientInterface

Types

type Client

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

func (*Client) CollectResource

func (c *Client) CollectResource(resource string, config interface{}) error

type Group

type Group struct {
	ID         uint `gorm:"primarykey"`
	AccountID  string
	Arn        *string
	CreateDate *time.Time
	GroupId    *string
	GroupName  *string
	Path       *string
}

func (Group) TableName added in v0.3.8

func (Group) TableName() string

type PasswordPolicy added in v0.3.6

type PasswordPolicy struct {
	ID                         uint `gorm:"primarykey"`
	AccountID                  string
	AllowUsersToChangePassword *bool
	ExpirePasswords            *bool
	HardExpiry                 *bool
	MaxPasswordAge             *int64
	MinimumPasswordLength      *int64
	PasswordReusePrevention    *int64
	RequireLowercaseCharacters *bool
	RequireNumbers             *bool
	RequireSymbols             *bool
	RequireUppercaseCharacters *bool
}

func (PasswordPolicy) TableName added in v0.3.8

func (PasswordPolicy) TableName() string

type Policy

type Policy struct {
	ID                            uint `gorm:"primarykey"`
	AccountID                     string
	Arn                           *string
	AttachmentCount               *int64
	CreateDate                    *time.Time
	DefaultVersionId              *string
	Description                   *string
	IsAttachable                  *bool
	Path                          *string
	PermissionsBoundaryUsageCount *int64
	PolicyId                      *string
	PolicyName                    *string
	UpdateDate                    *time.Time
}

func (Policy) TableName added in v0.3.8

func (Policy) TableName() string

type ReportUser added in v0.3.7

type ReportUser struct {
	User                  string    `csv:"user"`
	ARN                   string    `csv:"arn"`
	UserCreationTime      time.Time `csv:"user_creation_time"`
	PasswordEnabled       string    `csv:"password_enabled"`
	PasswordLastUsed      string    `csv:"password_last_used"`
	PasswordLastChanged   string    `csv:"password_last_changed"`
	PasswordNextRotation  string    `csv:"password_next_rotation"`
	MFAActive             bool      `csv:"mfa_active"`
	AccessKey1LastRotated string    `csv:"access_key_1_last_rotated"`
	AccessKey2LastRotated string    `csv:"access_key_2_last_rotated"`
}

type Role

type Role struct {
	ID                       uint `gorm:"primarykey"`
	AccountID                string
	Arn                      *string
	AssumeRolePolicyDocument *string
	CreateDate               *time.Time
	Description              *string
	MaxSessionDuration       *int64
	Path                     *string
	PermissionsBoundary      *iam.AttachedPermissionsBoundary `gorm:"embedded;embeddedPrefix:permissions_boundary_"`
	RoleId                   *string
	RoleLastUsed             *iam.RoleLastUsed `gorm:"embedded;embeddedPrefix:role_last_used_"`
	RoleName                 *string
	Tags                     []*RoleTag `gorm:"constraint:OnDelete:CASCADE;"`
}

func (Role) TableName added in v0.3.8

func (Role) TableName() string

type RoleTag

type RoleTag struct {
	ID     uint `gorm:"primarykey"`
	RoleID uint
	Key    *string
	Value  *string
}

func (RoleTag) TableName added in v0.3.8

func (RoleTag) TableName() string

type User

type User struct {
	ID                   uint `gorm:"primarykey"`
	AccountID            string
	Arn                  *string
	PasswordEnabled      *bool
	PasswordLastUsed     *time.Time
	PasswordLastChanged  *time.Time
	PasswordNextRotation *time.Time
	MFAActive            *bool
	CreateDate           *time.Time
	Path                 *string
	PermissionsBoundary  *iam.AttachedPermissionsBoundary `gorm:"embedded;embeddedPrefix:permissions_boundary_"`
	Tags                 []*UserTag                       `gorm:"constraint:OnDelete:CASCADE;"`
	UserId               *string
	UserName             *string          `csv:"user"`
	AccessKeys           []*UserAccessKey `gorm:"constraint:OnDelete:CASCADE;"`
}

func (User) TableName added in v0.3.8

func (User) TableName() string

type UserAccessKey added in v0.3.7

type UserAccessKey struct {
	ID                  uint `gorm:"primarykey"`
	UserID              uint
	AccessKeyId         *string
	CreateDate          *time.Time
	Status              *string
	LastUsed            *time.Time
	LastRotated         *time.Time
	LastUsedServiceName *string
}

func (UserAccessKey) TableName added in v0.4.1

func (UserAccessKey) TableName() string

type UserTag

type UserTag struct {
	ID     uint `gorm:"primarykey"`
	UserID uint
	Key    *string
	Value  *string
}

func (UserTag) TableName added in v0.3.8

func (UserTag) TableName() string

Jump to

Keyboard shortcuts

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