예제 #1
0
func buildCrypt(c *cli.Context) (*crypt.Crypt, error) {
	if role := c.GlobalString("role"); role != "" {
		return crypt.NewIam(role)
	} else {
		region := c.GlobalString("region")
		access := c.GlobalString("access")
		secret := c.GlobalString("secret")

		return crypt.New(region, access, secret), nil
	}
}