Documentation ¶
Index ¶
- Constants
- func GetActions(policy *PolicyDocument) (actions []string)
- func Hash(s *string) string
- func MapToIdentitiesAction(action string) string
- func MapToStatementAction(action string) string
- func StringWithCharset(length int, charset string) string
- type CommonResponse
- type CreateAccessKeyResponse
- type CreatePolicyResponse
- type CreateUserResponse
- type DeleteAccessKeyResponse
- type DeleteUserResponse
- type ErrorResponse
- type GetUserPolicyResponse
- type GetUserResponse
- type IamApiServer
- func (iama *IamApiServer) CreateAccessKey(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp CreateAccessKeyResponse)
- func (iama *IamApiServer) CreatePolicy(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp CreatePolicyResponse, err error)
- func (iama *IamApiServer) CreateUser(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp CreateUserResponse)
- func (iama *IamApiServer) DeleteAccessKey(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp DeleteAccessKeyResponse)
- func (iama *IamApiServer) DeleteUser(s3cfg *iam_pb.S3ApiConfiguration, userName string) (resp DeleteUserResponse, err error)
- func (iama *IamApiServer) DeleteUserPolicy(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp PutUserPolicyResponse, err error)
- func (iama *IamApiServer) DoActions(w http.ResponseWriter, r *http.Request)
- func (iama *IamApiServer) GetUser(s3cfg *iam_pb.S3ApiConfiguration, userName string) (resp GetUserResponse, err error)
- func (iama *IamApiServer) GetUserPolicy(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp GetUserPolicyResponse, err error)
- func (iama *IamApiServer) ListAccessKeys(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp ListAccessKeysResponse)
- func (iama *IamApiServer) ListUsers(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp ListUsersResponse)
- func (iama *IamApiServer) PutUserPolicy(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp PutUserPolicyResponse, err error)
- func (iama *IamApiServer) UpdateUser(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp UpdateUserResponse, err error)
- type IamS3ApiConfig
- type IamS3ApiConfigure
- func (iam IamS3ApiConfigure) GetPolicies(policies *Policies) (err error)
- func (iam IamS3ApiConfigure) GetS3ApiConfiguration(s3cfg *iam_pb.S3ApiConfiguration) (err error)
- func (iam IamS3ApiConfigure) PutPolicies(policies *Policies) (err error)
- func (iam IamS3ApiConfigure) PutS3ApiConfiguration(s3cfg *iam_pb.S3ApiConfiguration) (err error)
- type IamServerOption
- type ListAccessKeysResponse
- type ListUsersResponse
- type Policies
- type PolicyDocument
- type PutUserPolicyResponse
- type Statement
- type UpdateUserResponse
Constants ¶
View Source
const ( StatementActionAdmin = "*" StatementActionWrite = "Put*" StatementActionRead = "Get*" StatementActionList = "List*" StatementActionTagging = "Tagging*" )
Variables ¶
This section is empty.
Functions ¶
func GetActions ¶
func GetActions(policy *PolicyDocument) (actions []string)
func MapToIdentitiesAction ¶
func MapToStatementAction ¶
func StringWithCharset ¶
Types ¶
type CommonResponse ¶
type CommonResponse struct { ResponseMetadata struct { RequestId string `xml:"RequestId"` } `xml:"ResponseMetadata"` }
func (*CommonResponse) SetRequestId ¶
func (r *CommonResponse) SetRequestId()
type CreateAccessKeyResponse ¶
type CreateAccessKeyResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ CreateAccessKeyResponse"` CreateAccessKeyResult struct { AccessKey iam.AccessKey `xml:"AccessKey"` } `xml:"CreateAccessKeyResult"` }
type CreatePolicyResponse ¶
type CreatePolicyResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ CreatePolicyResponse"` CreatePolicyResult struct { Policy iam.Policy `xml:"Policy"` } `xml:"CreatePolicyResult"` }
type CreateUserResponse ¶
type CreateUserResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ CreateUserResponse"` CreateUserResult struct { User iam.User `xml:"User"` } `xml:"CreateUserResult"` }
type DeleteAccessKeyResponse ¶
type DeleteAccessKeyResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ DeleteAccessKeyResponse"` }
type DeleteUserResponse ¶
type DeleteUserResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ DeleteUserResponse"` }
type ErrorResponse ¶
type ErrorResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ ErrorResponse"` Error struct { iam.ErrorDetails Type string `xml:"Type"` } `xml:"Error"` }
type GetUserPolicyResponse ¶
type GetUserPolicyResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ GetUserPolicyResponse"` GetUserPolicyResult struct { UserName string `xml:"UserName"` PolicyName string `xml:"PolicyName"` PolicyDocument string `xml:"PolicyDocument"` } `xml:"GetUserPolicyResult"` }
type GetUserResponse ¶
type GetUserResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ GetUserResponse"` GetUserResult struct { User iam.User `xml:"User"` } `xml:"GetUserResult"` }
type IamApiServer ¶
type IamApiServer struct {
// contains filtered or unexported fields
}
func NewIamApiServer ¶
func NewIamApiServer(router *mux.Router, option *IamServerOption) (iamApiServer *IamApiServer, err error)
func (*IamApiServer) CreateAccessKey ¶
func (iama *IamApiServer) CreateAccessKey(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp CreateAccessKeyResponse)
func (*IamApiServer) CreatePolicy ¶
func (iama *IamApiServer) CreatePolicy(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp CreatePolicyResponse, err error)
func (*IamApiServer) CreateUser ¶
func (iama *IamApiServer) CreateUser(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp CreateUserResponse)
func (*IamApiServer) DeleteAccessKey ¶
func (iama *IamApiServer) DeleteAccessKey(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp DeleteAccessKeyResponse)
func (*IamApiServer) DeleteUser ¶
func (iama *IamApiServer) DeleteUser(s3cfg *iam_pb.S3ApiConfiguration, userName string) (resp DeleteUserResponse, err error)
func (*IamApiServer) DeleteUserPolicy ¶
func (iama *IamApiServer) DeleteUserPolicy(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp PutUserPolicyResponse, err error)
func (*IamApiServer) DoActions ¶
func (iama *IamApiServer) DoActions(w http.ResponseWriter, r *http.Request)
func (*IamApiServer) GetUser ¶
func (iama *IamApiServer) GetUser(s3cfg *iam_pb.S3ApiConfiguration, userName string) (resp GetUserResponse, err error)
func (*IamApiServer) GetUserPolicy ¶
func (iama *IamApiServer) GetUserPolicy(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp GetUserPolicyResponse, err error)
func (*IamApiServer) ListAccessKeys ¶
func (iama *IamApiServer) ListAccessKeys(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp ListAccessKeysResponse)
func (*IamApiServer) ListUsers ¶
func (iama *IamApiServer) ListUsers(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp ListUsersResponse)
func (*IamApiServer) PutUserPolicy ¶
func (iama *IamApiServer) PutUserPolicy(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp PutUserPolicyResponse, err error)
https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPolicy.html
func (*IamApiServer) UpdateUser ¶
func (iama *IamApiServer) UpdateUser(s3cfg *iam_pb.S3ApiConfiguration, values url.Values) (resp UpdateUserResponse, err error)
type IamS3ApiConfig ¶
type IamS3ApiConfig interface { GetS3ApiConfiguration(s3cfg *iam_pb.S3ApiConfiguration) (err error) PutS3ApiConfiguration(s3cfg *iam_pb.S3ApiConfiguration) (err error) GetPolicies(policies *Policies) (err error) PutPolicies(policies *Policies) (err error) }
type IamS3ApiConfigure ¶
type IamS3ApiConfigure struct {
// contains filtered or unexported fields
}
func (IamS3ApiConfigure) GetPolicies ¶
func (iam IamS3ApiConfigure) GetPolicies(policies *Policies) (err error)
func (IamS3ApiConfigure) GetS3ApiConfiguration ¶
func (iam IamS3ApiConfigure) GetS3ApiConfiguration(s3cfg *iam_pb.S3ApiConfiguration) (err error)
func (IamS3ApiConfigure) PutPolicies ¶
func (iam IamS3ApiConfigure) PutPolicies(policies *Policies) (err error)
func (IamS3ApiConfigure) PutS3ApiConfiguration ¶
func (iam IamS3ApiConfigure) PutS3ApiConfiguration(s3cfg *iam_pb.S3ApiConfiguration) (err error)
type IamServerOption ¶
type IamServerOption struct { Masters map[string]pb.ServerAddress Filer pb.ServerAddress Port int GrpcDialOption grpc.DialOption }
type ListAccessKeysResponse ¶
type ListAccessKeysResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ ListAccessKeysResponse"` ListAccessKeysResult struct { AccessKeyMetadata []*iam.AccessKeyMetadata `xml:"AccessKeyMetadata>member"` IsTruncated bool `xml:"IsTruncated"` } `xml:"ListAccessKeysResult"` }
type ListUsersResponse ¶
type Policies ¶
type Policies struct {
Policies map[string]PolicyDocument `json:"policies"`
}
type PolicyDocument ¶
type PolicyDocument struct { Version string `json:"Version"` Statement []*Statement `json:"Statement"` }
func GetPolicyDocument ¶
func GetPolicyDocument(policy *string) (policyDocument PolicyDocument, err error)
func (PolicyDocument) String ¶
func (p PolicyDocument) String() string
type PutUserPolicyResponse ¶
type PutUserPolicyResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ PutUserPolicyResponse"` }
type UpdateUserResponse ¶
type UpdateUserResponse struct { CommonResponse XMLName xml.Name `xml:"https://iam.amazonaws.com/doc/2010-05-08/ UpdateUserResponse"` }
Click to show internal directories.
Click to hide internal directories.