iam

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const LambdaPolicy = "lambda"

Variables

This section is empty.

Functions

This section is empty.

Types

type AssumeRolePolicyDocument

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

type IAM

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

func (*IAM) CreateAccessKey

func (service *IAM) CreateAccessKey(name string) (*iam.AccessKey, error)

func (*IAM) CreateRole

func (service *IAM) CreateRole(name, policy string) (*iam.Role, error)

func (*IAM) CreateUser

func (service *IAM) CreateUser(name string) (*iam.User, error)

func (*IAM) DeleteAccessKey

func (service *IAM) DeleteAccessKey(keyID string) error

func (*IAM) DeleteRole

func (service *IAM) DeleteRole(name string) error

func (*IAM) DeleteUser

func (service *IAM) DeleteUser(name string) error

func (*IAM) GetAccessKey

func (service *IAM) GetAccessKey(keyID string) (string, error)

func (*IAM) GetRole

func (service *IAM) GetRole(name string) (*iam.Role, error)

func (*IAM) ListUsers

func (service *IAM) ListUsers() (string, error)

type IClient

type IClient interface {
	CreateAccessKey(name string) (*iam.AccessKey, error)
	CreateRole(name, policy string) (*iam.Role, error)
	CreateUser(name string) (*iam.User, error)
	DeleteAccessKey(keyID string) error
	DeleteRole(name string) error
	DeleteUser(name string) error
	GetAccessKey(keyID string) (string, error)
	GetRole(name string) (*iam.Role, error)
	ListUsers() (string, error)
}

func New

func New(config *config.AWS) (IClient, error)

type Principal

type Principal struct {
	Service string `json:"Service"`
}

type Statement

type Statement struct {
	Effect    string `json:"Effect"`
	Principal Principal
	Action    string `json:"Action"`
}

Jump to

Keyboard shortcuts

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