Documentation ¶
Index ¶
- Constants
- func Bool(v bool) *bool
- func CheckResponse(r *http.Response) error
- func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error)
- func DoRequestWithClient(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)
- func Int(v int) *int
- func StreamToString(stream io.Reader) string
- func String(v string) *string
- type AdminDomain
- type AdminDomainRoot
- type AdminDomainsRoot
- type AdminDomainsService
- type AdminDomainsServiceOp
- type Attributes
- type ChangesList
- type Children
- type Client
- type ClientOpt
- type Container
- type CreateList
- type Embedded
- type Entity
- type EntityList
- type Erparent
- type ErrorResponse
- type GetIspimCredentialResponse
- type GetIspimProviderResponse
- type GetIspimProviderResponseRoot
- type GetIspimProvidersResponse
- type GetIspimResourceAttributes
- type GetIspimResourceLinks
- type GetIspimResourceResponse
- type GetIspimResourceResponseRoot
- type GetIspimResourcesResponse
- type IDProvider
- type IdpLinks
- type IdpProviderLinks
- type IdpProviderSelf
- type IspimCredDisconnectCredentialRequest
- type IspimCredDisconnectResponse
- type IspimCredDisconnectResponseList
- type IspimCredential
- type IspimCredentialAttributes
- type IspimCredentialContainer
- type IspimCredentialCreateList
- type IspimCredentialDisconnectResponse
- type IspimCredentialEntity
- type IspimCredentialLinks
- type IspimCredentialObjects
- type IspimCredentialRequest
- type IspimCredentialResource
- type IspimCredentialResponse
- type IspimCredentialResponseList
- type IspimCredentialSettings
- type IspimCredentialsService
- type IspimCredentialsServiceOp
- func (ispim *IspimCredentialsServiceOp) Create(ctx context.Context, ismpimr *IspimCredentialRequest) (*IspimCredential, *Response, error)
- func (ispims *IspimCredentialsServiceOp) Delete(ctx context.Context, ispim_credential_id string) (*Response, error)
- func (ispims *IspimCredentialsServiceOp) Get(ctx context.Context, ispimId string) ([]GetIspimCredentialResponse, *Response, error)
- type IspimDeleteResourceRequest
- type IspimDeleteResourceResponse
- type IspimIdpProvider
- type IspimIdpProviderRequest
- type IspimIdpProvidersService
- type IspimIdpProvidersServiceOp
- type IspimIdpResponse
- type IspimRequestAttributes
- type IspimRequestResponse
- type IspimRequestsService
- type IspimRequestsServiceOp
- type IspimResource
- type IspimResourceAttributes
- type IspimResourceContainer
- type IspimResourceLinks
- type IspimResourceRequest
- type IspimResourceResponse
- type IspimResourceResponseContainer
- type IspimResourceRoot
- type IspimResourceSelfLink
- type IspimResourcesRoot
- type IspimResourcesService
- type IspimResourcesServiceOp
- func (ispim *IspimResourcesServiceOp) Create(ctx context.Context, ismpimr *IspimResourceRequest) (*IspimResource, *Response, error)
- func (ispims *IspimResourcesServiceOp) Delete(ctx context.Context, ispim_resource_id string) (*Response, error)
- func (ispims *IspimResourcesServiceOp) Get(ctx context.Context, ispimId string) ([]GetIspimResourceResponse, *Response, error)
- type IspimSyncCredential
- type IspimSyncCredentialEntity
- type IspimSyncCredentialRequest
- type IspimSyncCredentialResponse
- type IspimSyncCredentialResponseList
- type IspimSyncCredentials
- type IspimSyncCredentialsService
- type IspimSyncCredentialsServiceOp
- func (ispim *IspimSyncCredentialsServiceOp) Create(ctx context.Context, ismpimr *IspimSyncCredentialRequest, idpurl string) (*IspimSyncResponse, *Response, error)
- func (ispims *IspimSyncCredentialsServiceOp) Delete(ctx context.Context, ismpimr *IspimCredDisconnectCredentialRequest) (*IspimCredDisconnectResponse, *Response, error)
- func (ispims *IspimSyncCredentialsServiceOp) Get(ctx context.Context, ispimId int) (*IspimSyncCredential, *Response, error)
- type IspimSyncResponse
- type IspimSyncResponseLinks
- type IspimSyncResponseRequest
- type Links
- type Metadata
- type Objects
- type Owner
- type Request
- type Resource
- type Response
- type ResponseList
- type Self
- type SelfLink
- type Settings
- type Status
- type SyncCredentialRequest
Constants ¶
const ( //ErrCodeEmptyResponse ... ErrCodeEmptyResponse = "EmptyResponseBody" ErrCodeFailedtoConnect = "FailedtoConnect" ErrCodeVolumeNotFound = "VolumeNotFoundError" )
const IspimIdpCredentialGetPath = "/ispim/rest/credentials/?attributes=*&embedded=resource.name&filter="
const IspimIdpCredentialPath = "/ispim/rest/credentials"
const IspimIdpProviderGetPath = "ispim/rest/services/idp?"
const IspimIdpProviderPath = "/ispim/rest/services"
const IspimRequestPath = "/ispim/rest/requests/"
const IspimSyncCredentialPath = "/ispim/rest/credentials"
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
func CheckResponse ¶
func DoRequestWithClient ¶
func DoRequestWithClient( ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)
DoRequestWithClient submits an HTTP request using the specified client.
func Int ¶
Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.
func StreamToString ¶
StreamToString converts a reader to a string
Types ¶
type AdminDomain ¶
type AdminDomain struct {
Links Links `json:"_links"`
}
type AdminDomainRoot ¶
type AdminDomainRoot struct {
AdminDomain *AdminDomain `json:"AdminDomain"`
}
type AdminDomainsRoot ¶
type AdminDomainsRoot struct {
AdminDomains []AdminDomain `json:"AdminDomains"`
}
type AdminDomainsService ¶
type AdminDomainsServiceOp ¶
type AdminDomainsServiceOp struct {
// contains filtered or unexported fields
}
func (*AdminDomainsServiceOp) Get ¶
func (s *AdminDomainsServiceOp) Get(ctx context.Context, servername string) ([]AdminDomain, *Response, error)
type Attributes ¶
type Attributes struct { Profile []string `json:"profile"` Erservicename []string `json:"erservicename,omitempty"` Description []string `json:"description,omitempty"` Erauthenticatemode []string `json:"erauthenticatemode,omitempty"` Erurl []string `json:"erurl,omitempty"` Erposixauthmethod []string `json:"erposixauthmethod,omitempty"` Erserviceuid []string `json:"erserviceuid,omitempty"` Erpassword []string `json:"erpassword,omitempty"` Erposixuseshadow []string `json:"erposixuseshadow,omitempty"` Erposixhomedirremove []string `json:"erposixhomedirremove,omitempty"` Erposixfailedlogincmd []string `json:"erposixfailedlogincmd,omitempty"` Erposixsudoerspath []string `json:"erposixsudoerspath,omitempty"` Eritdiurl []string `json:"eritdiurl,omitempty"` Erposixpassphrase []string `json:"erposixpassphrase,omitempty"` Erposixpkfile []string `json:"erposixpkfile,omitempty"` Erposixusesudo []string `json:"erposixusesudo,omitempty"` Eruid []string `json:"eruid,omitempty"` }
type ChangesList ¶ added in v1.0.7
type ChangesList struct {
Links Links `json:"_links"`
}
type Client ¶
type Client struct { // HTTP client used to communicate with the ISIM API. //Credentials *Credentials URL string //Username string //Password string Token string Endpoint string Insecure bool BaseURL *url.URL IspimIdpProviders IspimIdpProvidersService AdminDomains AdminDomainsService IspimResources IspimResourcesService IspimCredentials IspimCredentialsService IspimSyncCredentials IspimSyncCredentialsService IspimRequests IspimRequestsService // contains filtered or unexported fields }
Client manages communication with ISIM API.
func NewClient ¶
func NewClient(username, password , token, endpoint string, insecure bool) (*Client, error) {
func (*Client) NewRequest ¶
func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body interface{}) (*http.Request, error)
NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included in as the request body.
type ClientOpt ¶
ClientOpt are options for New.
func SetBaseURL ¶
SetBaseURL is a client option for setting the base URL.
type CreateList ¶
type CreateList struct { IspimResourceLinks IspimResourceLinks `json:"_links"` IspimResourceAttributes IspimResourceAttributes `json:"_attributes"` }
type Entity ¶
type Entity struct { Links Links `json:"_links"` Attributes Attributes `json:"_attributes"` }
type EntityList ¶
type EntityList struct { IdpLinks IdpLinks `json:"_links"` Attributes Attributes `json:"_attributes"` }
type ErrorResponse ¶
type ErrorResponse struct { // HTTP response that caused this error Response *http.Response // Error message Message string `json:"STATUS"` // RequestID returned from the API, useful to contact support. RequestID string `json:"REQUEST_ID"` }
An ErrorResponse reports the error caused by an API request
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
type GetIspimCredentialResponse ¶
type GetIspimCredentialResponse struct { Links Links `json:"_links"` Embedded Embedded `json:"_embedded"` Attributes Attributes `json:"_attributes"` Objects Objects `json:"_objects"` }
type GetIspimProviderResponse ¶
type GetIspimProviderResponse struct {
Links Links `json:"_links"`
}
type GetIspimProviderResponseRoot ¶
type GetIspimProviderResponseRoot struct {
GetIspimResourceResponse *GetIspimResourceResponse `json:"GetIspimProviderResponse"`
}
type GetIspimProvidersResponse ¶
type GetIspimProvidersResponse struct {
GetIspimProvidersResponse []GetIspimProviderResponse `json:"GetIspimProviderResponses"`
}
type GetIspimResourceLinks ¶
type GetIspimResourceLinks struct { IspimResourceResponseContainer IspimResourceResponseContainer `json:"container"` Self Self `json:"self"` }
type GetIspimResourceResponse ¶
type GetIspimResourceResponse struct { Links Links `json:"_links"` GetIspimResourceAttributes GetIspimResourceAttributes `json:"_attributes"` }
Start of response from the get call
type GetIspimResourceResponseRoot ¶
type GetIspimResourceResponseRoot struct {
GetIspimResourceResponse *GetIspimResourceResponse `json:"GetIspimResourceResponse"`
}
type GetIspimResourcesResponse ¶
type GetIspimResourcesResponse struct {
GetIspimResourcesResponse []GetIspimResourcesResponse `json:"GetIspimResourceResponses"`
}
type IDProvider ¶
type IdpProviderLinks ¶
type IdpProviderSelf ¶
type IspimCredDisconnectCredentialRequest ¶ added in v1.0.7
type IspimCredDisconnectCredentialRequest struct { BatchAction string `json:"batchAction"` ChangesList []ChangesList `json:"changesList"` }
type IspimCredDisconnectResponse ¶ added in v1.0.7
type IspimCredDisconnectResponse struct { IspimCredDisconnectResponseList []IspimCredDisconnectResponseList `json:"responseList"` OverAllStatus string `json:"overAllStatus"` }
type IspimCredDisconnectResponseList ¶ added in v1.0.7
type IspimCredDisconnectResponseList struct { RequestAction string `json:"requestAction"` IspimCredentialDisconnectResponse IspimCredentialDisconnectResponse `json:"response"` SelfLink SelfLink `json:"selfLink"` }
type IspimCredential ¶
type IspimCredential struct { IspimCredentialResponseList []IspimCredentialResponseList `json:"responseList"` OverAllStatus string `json:"overAllStatus"` }
type IspimCredentialAttributes ¶
type IspimCredentialAttributes struct { ErCredentialName []string `json:"erCredentialName"` Password []string `json:"password"` Description []string `json:"description"` ErTag []string `json:"erTag"` ErpPwdRotationInterval []string `json:"erpPwdRotationInterval"` UseDefaultSetting []string `json:"useDefaultSetting"` }
type IspimCredentialContainer ¶
type IspimCredentialContainer struct {
Href string `json:"href"`
}
type IspimCredentialCreateList ¶
type IspimCredentialCreateList struct { IspimCredentialLinks IspimCredentialLinks `json:"_links"` IspimCredentialAttributes IspimCredentialAttributes `json:"_attributes"` IspimCredentialObjects IspimCredentialObjects `json:"_objects,omitempty"` }
type IspimCredentialDisconnectResponse ¶ added in v1.0.7
type IspimCredentialEntity ¶
type IspimCredentialLinks ¶
type IspimCredentialLinks struct { IspimCredentialContainer IspimCredentialContainer `json:"container"` IspimCredentialResource IspimCredentialResource `json:"resource"` }
type IspimCredentialObjects ¶
type IspimCredentialObjects struct {
IspimCredentialSettings []IspimCredentialSettings `json:"settings"`
}
type IspimCredentialRequest ¶
type IspimCredentialRequest struct {
IspimCredentialCreateList []IspimCredentialCreateList `json:"createList"`
}
type IspimCredentialResource ¶
type IspimCredentialResource struct {
Href string `json:"href"`
}
type IspimCredentialResponse ¶
type IspimCredentialResponse struct { IspimCredentialEntity IspimCredentialEntity `json:"entity"` Metadata Metadata `json:"metadata"` Status int `json:"status"` }
type IspimCredentialResponseList ¶
type IspimCredentialResponseList struct { RequestAction string `json:"requestAction"` IspimCredentialResponse IspimCredentialResponse `json:"response"` }
type IspimCredentialSettings ¶
type IspimCredentialsService ¶
type IspimCredentialsService interface { Get(context.Context, string) ([]GetIspimCredentialResponse, *Response, error) Create(context.Context, *IspimCredentialRequest) (*IspimCredential, *Response, error) //Update(context.Context, int, *IspimIdpCredentialUpdateRequest) (*IspimIdpCredential, *Response, error) Delete(context.Context, string) (*Response, error) }
type IspimCredentialsServiceOp ¶
type IspimCredentialsServiceOp struct {
// contains filtered or unexported fields
}
func (*IspimCredentialsServiceOp) Create ¶
func (ispim *IspimCredentialsServiceOp) Create(ctx context.Context, ismpimr *IspimCredentialRequest) (*IspimCredential, *Response, error)
Create a new Provider with a given configuration.
func (*IspimCredentialsServiceOp) Delete ¶
func (ispims *IspimCredentialsServiceOp) Delete(ctx context.Context, ispim_credential_id string) (*Response, error)
Delete
func (*IspimCredentialsServiceOp) Get ¶
func (ispims *IspimCredentialsServiceOp) Get(ctx context.Context, ispimId string) ([]GetIspimCredentialResponse, *Response, error)
type IspimDeleteResourceRequest ¶
type IspimDeleteResourceRequest struct { }
type IspimDeleteResourceResponse ¶
type IspimDeleteResourceResponse struct { }
type IspimIdpProvider ¶
type IspimIdpProvider struct { ResponseList []ResponseList `json:"responseList"` OverAllStatus string `json:"overAllStatus"` }
type IspimIdpProviderRequest ¶
type IspimIdpProviderRequest struct { BatchAction string `json:"batchAction"` EntityList []EntityList `json:"entityList"` }
type IspimIdpProvidersService ¶
type IspimIdpProvidersService interface { Get(context.Context, string) ([]GetIspimProviderResponse, *Response, error) Create(context.Context, *IspimIdpProviderRequest) (*IspimIdpProvider, *Response, error) }
type IspimIdpProvidersServiceOp ¶
type IspimIdpProvidersServiceOp struct {
// contains filtered or unexported fields
}
func (*IspimIdpProvidersServiceOp) Create ¶
func (ispim *IspimIdpProvidersServiceOp) Create(ctx context.Context, ismpimr *IspimIdpProviderRequest) (*IspimIdpProvider, *Response, error)
Create a new Provider with a given configuration.
func (*IspimIdpProvidersServiceOp) Get ¶
func (ispims *IspimIdpProvidersServiceOp) Get(ctx context.Context, providerFilter string) ([]GetIspimProviderResponse, *Response, error)
type IspimIdpResponse ¶
type IspimRequestAttributes ¶ added in v1.0.4
type IspimRequestAttributes struct { Result []string `json:"result"` Completedate []string `json:"completedate"` Status []Status `json:"status"` Subject []string `json:"subject"` Requestername []string `json:"requestername"` Scheduleddate []string `json:"scheduleddate"` Lastmodified []string `json:"lastmodified"` Resultdetail []string `json:"resultdetail"` Type []string `json:"type"` Justification []string `json:"justification"` Starteddate []string `json:"starteddate"` Submitteddate []string `json:"submitteddate"` }
type IspimRequestResponse ¶ added in v1.0.4
type IspimRequestResponse struct { Links Links `json:"_links"` IspimRequestAttributes IspimRequestAttributes `json:"_attributes"` }
/Start of the response
type IspimRequestsService ¶ added in v1.0.4
type IspimRequestsServiceOp ¶ added in v1.0.4
type IspimRequestsServiceOp struct {
// contains filtered or unexported fields
}
func (*IspimRequestsServiceOp) Get ¶ added in v1.0.4
func (ispims *IspimRequestsServiceOp) Get(ctx context.Context, ispimId string) (*IspimRequestResponse, *Response, error)
type IspimResource ¶
type IspimResource struct { ResponseList []ResponseList `json:"responseList"` OverAllStatus string `json:"overAllStatus"` }
type IspimResourceAttributes ¶
type IspimResourceContainer ¶
type IspimResourceContainer struct {
Href string `json:"href"`
}
type IspimResourceLinks ¶
type IspimResourceLinks struct {
IspimResourceContainer IspimResourceContainer `json:"container"`
}
type IspimResourceRequest ¶
type IspimResourceRequest struct {
CreateList []CreateList `json:"createList"`
}
type IspimResourceResponse ¶
type IspimResourceRoot ¶
type IspimResourceRoot struct {
IspimResource *IspimResource `json:"IspimResource"`
}
End of the common structure
type IspimResourceSelfLink ¶
type IspimResourcesRoot ¶
type IspimResourcesRoot struct {
IspimResources []IspimResource `json:"IspimResources"`
}
type IspimResourcesService ¶
type IspimResourcesService interface { Get(context.Context, string) ([]GetIspimResourceResponse, *Response, error) Create(context.Context, *IspimResourceRequest) (*IspimResource, *Response, error) //Update(context.Context, int, *IspimResourceUpdateRequest) (*IspimResource, *Response, error) Delete(context.Context, string) (*Response, error) }
type IspimResourcesServiceOp ¶
type IspimResourcesServiceOp struct {
// contains filtered or unexported fields
}
func (*IspimResourcesServiceOp) Create ¶
func (ispim *IspimResourcesServiceOp) Create(ctx context.Context, ismpimr *IspimResourceRequest) (*IspimResource, *Response, error)
Create a new Resource with a given configuration.
func (*IspimResourcesServiceOp) Delete ¶
func (ispims *IspimResourcesServiceOp) Delete(ctx context.Context, ispim_resource_id string) (*Response, error)
Delete
func (*IspimResourcesServiceOp) Get ¶
func (ispims *IspimResourcesServiceOp) Get(ctx context.Context, ispimId string) ([]GetIspimResourceResponse, *Response, error)
type IspimSyncCredential ¶
type IspimSyncCredential struct { IspimSyncCredentialResponseList []IspimSyncCredentialResponseList `json:"responseList"` OverAllStatus string `json:"overAllStatus"` }
type IspimSyncCredentialRequest ¶
type IspimSyncCredentialRequest struct { //IdpUrl string `json:"idpurl"` Justification string `json:"justification"` ResetPassword string `json:"resetPassword"` ResetPasswordOnCheckin string `json:"resetPasswordOnCheckin"` IspimSyncCredentials []IspimSyncCredentials `json:"credentials"` }
type IspimSyncCredentialResponse ¶
type IspimSyncCredentialResponse struct { IspimSyncCredentialEntity IspimSyncCredentialEntity `json:"entity"` Metadata Metadata `json:"metadata"` Status int `json:"status"` }
type IspimSyncCredentialResponseList ¶
type IspimSyncCredentialResponseList struct { RequestAction string `json:"requestAction"` IspimSyncCredentialResponse IspimSyncCredentialResponse `json:"response"` }
type IspimSyncCredentials ¶
type IspimSyncCredentials struct {
Href string `json:"href"`
}
type IspimSyncCredentialsService ¶
type IspimSyncCredentialsService interface { Get(context.Context, int) (*IspimSyncCredential, *Response, error) Create(context.Context, *IspimSyncCredentialRequest, string) (*IspimSyncResponse, *Response, error) //Update(context.Context, int, *IspimIdpCredentialUpdateRequest) (*IspimIdpCredential, *Response, error) Delete(context.Context, *IspimCredDisconnectCredentialRequest) (*IspimCredDisconnectResponse, *Response, error) }
type IspimSyncCredentialsServiceOp ¶
type IspimSyncCredentialsServiceOp struct {
// contains filtered or unexported fields
}
func (*IspimSyncCredentialsServiceOp) Create ¶
func (ispim *IspimSyncCredentialsServiceOp) Create(ctx context.Context, ismpimr *IspimSyncCredentialRequest, idpurl string) (*IspimSyncResponse, *Response, error)
Create a new Provider with a given configuration.
func (*IspimSyncCredentialsServiceOp) Delete ¶ added in v1.0.7
func (ispims *IspimSyncCredentialsServiceOp) Delete(ctx context.Context, ismpimr *IspimCredDisconnectCredentialRequest) (*IspimCredDisconnectResponse, *Response, error)
func (*IspimSyncCredentialsServiceOp) Get ¶
func (ispims *IspimSyncCredentialsServiceOp) Get(ctx context.Context, ispimId int) (*IspimSyncCredential, *Response, error)
type IspimSyncResponse ¶
type IspimSyncResponse []struct { IspimSyncResponseLinks IspimSyncResponseLinks `json:"_links"` RequestID string `json:"requestId"` }
/Start of the response
type IspimSyncResponseLinks ¶
type IspimSyncResponseLinks struct {
Request Request `json:"request"`
}
type IspimSyncResponseRequest ¶
type IspimSyncResponseRequest struct {
Href string `json:"href"`
}
type Resource ¶
type Resource struct { Links Links `json:"_links"` Attributes Attributes `json:"_attributes"` }
type ResponseList ¶
type ResponseList struct { RequestAction string `json:"requestAction"` IspimIdpResponse IspimIdpResponse `json:"response"` SelfLink SelfLink `json:"selfLink"` }
type Settings ¶
type Settings struct { IsCheckoutSearch string `json:"isCheckoutSearch"` IsShortTermPassword string `json:"isShortTermPassword"` CheckoutDuration string `json:"checkoutDuration"` AccessMode string `json:"accessMode"` IsExclusive string `json:"isExclusive"` IsPasswordViewable string `json:"isPasswordViewable"` }
type SyncCredentialRequest ¶
type SyncCredentialRequest struct { CredentialLink string `json:"credentialLink"` IspimSyncCredentialRequest IspimSyncCredentialRequest `json:"ispimcredentialrequest"` }