Documentation
¶
Index ¶
- func NewTestServer(t *testing.T, s *Server) *httptest.Server
- type Fixture
- type GetCallerIdentityResponse
- type GetCallerIdentityResult
- type GetRoleResponse
- type GetRoleResult
- type GetUserResponse
- type GetUserResult
- type IAMEntity
- type ParsedArn
- type ResponseMetadata
- type Role
- type Server
- type TagMember
- type Tags
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fixture ¶
type Fixture struct {
AssumedRoleARN string
CanonicalRoleARN string
RoleARN string
RoleARNWildcard string
RoleName string
RolePath string
RoleTags map[string]string
EntityID string
EntityIDWithSession string
AccountID string
UserARN string
UserARNWildcard string
UserName string
UserPath string
UserTags map[string]string
ServerForRole *Server
ServerForUser *Server
}
func MakeFixture ¶
func MakeFixture() Fixture
func (*Fixture) RoleTagKeys ¶
func (*Fixture) RoleTagValues ¶
func (*Fixture) UserTagKeys ¶
func (*Fixture) UserTagValues ¶
type GetCallerIdentityResponse ¶
type GetCallerIdentityResponse struct {
XMLName xml.Name `xml:"GetCallerIdentityResponse"`
GetCallerIdentityResult []GetCallerIdentityResult `xml:"GetCallerIdentityResult"`
ResponseMetadata []ResponseMetadata `xml:"ResponseMetadata"`
}
func MakeGetCallerIdentityResponse ¶
func MakeGetCallerIdentityResponse(arn, userId, accountId string) GetCallerIdentityResponse
type GetCallerIdentityResult ¶
type GetRoleResponse ¶
type GetRoleResponse struct {
XMLName xml.Name `xml:"GetRoleResponse"`
GetRoleResult []GetRoleResult `xml:"GetRoleResult"`
ResponseMetadata []ResponseMetadata `xml:"ResponseMetadata"`
}
func MakeGetRoleResponse ¶
func MakeGetRoleResponse(arn, id string, tags Tags) GetRoleResponse
type GetRoleResult ¶
type GetRoleResult struct {
Role Role `xml:"Role"`
}
type GetUserResponse ¶
type GetUserResponse struct {
XMLName xml.Name `xml:"GetUserResponse"`
GetUserResult []GetUserResult `xml:"GetUserResult"`
ResponseMetadata []ResponseMetadata `xml:"ResponseMetadata"`
}
func MakeGetUserResponse ¶
func MakeGetUserResponse(arn, id string, tags Tags) GetUserResponse
type GetUserResult ¶
type GetUserResult struct {
User User `xml:"User"`
}
type IAMEntity ¶
type IAMEntity interface {
EntityPath() string
EntityArn() string
EntityName() string
EntityId() string
EntityTags() map[string]string
}
IAMEntity is an interface for getting details from an IAM Role or User.
type ParsedArn ¶
type ParsedArn struct {
Partition string
AccountNumber string
Type string
Path string
FriendlyName string
SessionInfo string
}
func ParseArn ¶
https://github.com/hashicorp/vault/blob/ba533d006f2244103648785ebfe8a9a9763d2b6e/builtin/credential/aws/path_login.go#L1482-L1530 However, instance profiles are not support in Consul.
func (*ParsedArn) CanonicalArn ¶
CanonicalArn returns the canonical ARN for referring to an IAM entity
type ResponseMetadata ¶
type ResponseMetadata struct {
RequestId string `xml:"RequestId"`
}
type Role ¶
type Role struct {
Arn string `xml:"Arn"`
Path string `xml:"Path"`
RoleId string `xml:"RoleId"`
RoleName string `xml:"RoleName"`
Tags Tags `xml:"Tags"`
}
func (*Role) EntityName ¶
func (*Role) EntityPath ¶
func (*Role) EntityTags ¶
type Server ¶
type Server struct {
GetCallerIdentityResponse GetCallerIdentityResponse
GetRoleResponse GetRoleResponse
GetUserResponse GetUserResponse
}
Server contains configuration for the fake AWS API server.
type User ¶
type User struct {
Arn string `xml:"Arn"`
Path string `xml:"Path"`
UserId string `xml:"UserId"`
UserName string `xml:"UserName"`
Tags Tags `xml:"Tags"`
}
func (*User) EntityName ¶
func (*User) EntityPath ¶
func (*User) EntityTags ¶
Click to show internal directories.
Click to hide internal directories.