Documentation ¶
Index ¶
- Constants
- type APIKeyEntity
- type APIKeyMetadata
- type APIKeyRepository
- type APIKeyResource
- type AccountInfo
- type IAMMetadata
- type IAMPaginatedResourcesHandler
- type IAMResponseContext
- type IAMServiceAPI
- type Identity
- type PoliciesQueryResult
- type ServiceIDEntity
- type ServiceIDRepository
- type ServiceIDResource
- type ServiceIDResponse
- type ServiceIDSearchResults
- type ServicePolicyIdentifier
- type ServicePolicyQueryResult
- type ServicePolicyRepository
- type ServiceRoleRepository
- type UserInfo
- type UserPolicyRepository
Constants ¶
View Source
const ErrCodeAPICreation = "APICreationError"
ErrCodeAPICreation ...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyEntity ¶
type APIKeyMetadata ¶
type APIKeyRepository ¶
type APIKeyRepository interface { Get(uuid string) (*models.APIKey, error) List(boundTo string) ([]models.APIKey, error) FindByName(name string, boundTo string) ([]models.APIKey, error) Create(key models.APIKey) (*models.APIKey, error) Delete(uuid string) error Update(uuid string, version string, key models.APIKey) (*models.APIKey, error) }
func NewAPIKeyRepository ¶
func NewAPIKeyRepository(c *client.Client) APIKeyRepository
type APIKeyResource ¶
type APIKeyResource struct { Metadata APIKeyMetadata `json:"metadata"` Entity APIKeyEntity `json:"entity"` }
func (APIKeyResource) ToModel ¶
func (r APIKeyResource) ToModel() models.APIKey
type AccountInfo ¶
type IAMMetadata ¶
type IAMPaginatedResourcesHandler ¶
type IAMPaginatedResourcesHandler struct {
// contains filtered or unexported fields
}
func NewIAMPaginatedResources ¶
func NewIAMPaginatedResources(resource interface{}) IAMPaginatedResourcesHandler
type IAMResponseContext ¶
type IAMResponseContext struct { RequestID string `json:"requestId"` RequestType string `json:"requestType"` UserAgent string `json:"userAgent"` ClientIP string `json:"clientIp"` InstanceID string `json:"instanceId"` ThreadID string `json:"threadId"` Host string `json:"host"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` ElapsedTime string `json:"elapsedTime"` Locale string `json:"locale"` }
type IAMServiceAPI ¶
type IAMServiceAPI interface { ServiceRoles() ServiceRoleRepository ServiceIds() ServiceIDRepository APIKeys() APIKeyRepository ServicePolicies() ServicePolicyRepository UserPolicies() UserPolicyRepository Identity() Identity }
IAMServiceAPI is the resource client ...
type Identity ¶
func NewIdentity ¶
type PoliciesQueryResult ¶
type ServiceIDEntity ¶
type ServiceIDRepository ¶
type ServiceIDRepository interface { Get(uuid string) (models.ServiceID, error) List(boundTo string) ([]models.ServiceID, error) FindByName(boundTo string, name string) ([]models.ServiceID, error) Create(serviceId models.ServiceID) (models.ServiceID, error) Update(uuid string, serviceId models.ServiceID, version string) (models.ServiceID, error) Delete(uuid string) error }
func NewServiceIDRepository ¶
func NewServiceIDRepository(c *client.Client) ServiceIDRepository
type ServiceIDResource ¶
type ServiceIDResource struct { Metadata IAMMetadata `json:"metadata"` Entity ServiceIDEntity `json:"entity"` }
func (*ServiceIDResource) ToModel ¶
func (r *ServiceIDResource) ToModel() models.ServiceID
type ServiceIDResponse ¶
type ServiceIDResponse struct { IAMResponseContext ServiceIDResource }
type ServiceIDSearchResults ¶
type ServiceIDSearchResults struct { Context IAMResponseContext `json:"context"` ServiceIDs []ServiceIDResource `json:"items"` }
type ServicePolicyIdentifier ¶
identifier to specify the exact service policy following hierarchy "scope/service ID/policy ID"
type ServicePolicyRepository ¶
type ServicePolicyRepository interface { List(scope string, serviceID string) ([]models.Policy, error) Get(scope string, serviceID string, policyID string) (models.Policy, error) Create(scope string, serviceID string, policy models.Policy) (models.Policy, error) Update(identifier ServicePolicyIdentifier, policy models.Policy, version string) (models.Policy, error) Delete(identifier ServicePolicyIdentifier) error }
func NewServicePolicyRepository ¶
func NewServicePolicyRepository(c *client.Client) ServicePolicyRepository
type ServiceRoleRepository ¶
type ServiceRoleRepository interface { // List all roles of a given service, including those supported system defined roles ListServiceRoles(serviceName string) ([]models.PolicyRole, error) // List all system defined roles ListSystemDefinedRoles() ([]models.PolicyRole, error) // List servie specific roles ListServiceSpecificRoles(serviceName string) ([]models.PolicyRole, error) // List authorization roles ListAuthorizationRoles(sourceServiceName string, targetServiceName string) ([]models.PolicyRole, error) }
func NewServiceRoleRepository ¶
func NewServiceRoleRepository(c *client.Client) ServiceRoleRepository
type UserInfo ¶
type UserInfo struct { Active bool `json:"active"` RealmID string `json:"realmId"` Identifier string `json:"identifier"` IamID string `json:"iam_id"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Name string `json:"name"` Email string `json:"email"` Sub string `json:"sub"` Account AccountInfo `json:"account"` Iat int `json:"iat"` Exp int `json:"exp"` Iss string `json:"iss"` GrantType string `json:"grant_type"` ClientID string `json:"client_id"` Scope string `json:"scope"` Acr int `json:"acr"` Amr []string `json:"amr"` }
type UserPolicyRepository ¶
type UserPolicyRepository interface { List(scope string, ibmUniqueID string) ([]models.Policy, error) Get(scope string, ibmUniqueID string, policyID string) (models.Policy, error) Create(scope string, ibmUniqueID string, policy models.Policy) (models.Policy, error) Update(scope string, ibmUniqueID string, policyID string, policy models.Policy, version string) (models.Policy, error) Delete(scope string, ibmUniqueID string, policyID string) error }
func NewUserPolicyRepository ¶
func NewUserPolicyRepository(c *client.Client) UserPolicyRepository
Click to show internal directories.
Click to hide internal directories.