ibmispim

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2020 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ErrCodeEmptyResponse ...
	ErrCodeEmptyResponse   = "EmptyResponseBody"
	ErrCodeFailedtoConnect = "FailedtoConnect"
	ErrCodeVolumeNotFound  = "VolumeNotFoundError"
)
View Source
const IspimIdpCredentialGetPath = "/ispim/rest/credentials/?attributes=*&embedded=resource.name&filter="
View Source
const IspimIdpCredentialPath = "/ispim/rest/credentials"
View Source
const IspimIdpProviderGetPath = "ispim/rest/services/idp?"
View Source
const IspimIdpProviderPath = "/ispim/rest/services"
View Source
const IspimRequestPath = "/ispim/rest/requests/"
View Source
const IspimSyncCredentialPath = "/ispim/rest/credentials"

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func CheckResponse

func CheckResponse(r *http.Response) error

func DoRequest

func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error)

DoRequest submits an HTTP request.

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

func Int(v int) *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

func StreamToString(stream io.Reader) string

StreamToString converts a reader to a string

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

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 AdminDomainsService interface {
	Get(context.Context, string) ([]AdminDomain, *Response, error)
}

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 Children added in v1.0.4

type Children struct {
	Href string `json:"href"`
}

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(token, endpoint string, insecure bool) (*Client, error)

func NewClient(username, password , token, endpoint string, insecure bool) (*Client, error) {

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error)

API request that is called from the client

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

type ClientOpt func(*Client) error

ClientOpt are options for New.

func SetBaseURL

func SetBaseURL(bu string) ClientOpt

SetBaseURL is a client option for setting the base URL.

type Container

type Container struct {
	Href string `json:"href"`
}

type CreateList

type CreateList struct {
	IspimResourceLinks      IspimResourceLinks      `json:"_links"`
	IspimResourceAttributes IspimResourceAttributes `json:"_attributes"`
}

type Embedded

type Embedded struct {
	Resource Resource `json:"resource"`
}

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 Erparent

type Erparent struct {
	Href string `json:"href"`
}

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 GetIspimResourceAttributes

type GetIspimResourceAttributes struct {
	UID   []string `json:"uid"`
	Alias []string `json:"alias"`
	Tag   []string `json:"tag"`
	Name  []string `json:"name"`
	Type  []string `json:"type"`
}
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 IDProvider struct {
	Href  string `json:"href"`
	Title string `json:"title"`
}
type IdpLinks struct {
	Container Container `json:"container"`
}
type IdpProviderLinks struct {
	Owner    []Owner    `json:"owner"`
	Erparent []Erparent `json:"erparent"`
	Self     Self       `json:"self"`
}

type IdpProviderSelf

type IdpProviderSelf struct {
	Href  string `json:"href"`
	Title string `json:"title"`
}

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 IspimCredentialDisconnectResponse struct {
	Metadata Metadata `json:"metadata"`
	Status   int      `json:"status"`
}

type IspimCredentialEntity

type IspimCredentialEntity struct {
	Links     Links  `json:"_links"`
	RequestID string `json:"requestId"`
}
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 IspimCredentialSettings struct {
	AccessMode          string `json:"accessMode"`
	IsShortTermPassword string `json:"isShortTermPassword"`
	CheckoutDuration    string `json:"checkoutDuration"`
	IsCheckoutSearch    string `json:"isCheckoutSearch"`
	IsPasswordViewable  string `json:"isPasswordViewable"`
}

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

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

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 IspimIdpProvidersServiceOp

type IspimIdpProvidersServiceOp struct {
	// contains filtered or unexported fields
}

func (*IspimIdpProvidersServiceOp) Create

Create a new Provider with a given configuration.

func (*IspimIdpProvidersServiceOp) Get

type IspimIdpResponse

type IspimIdpResponse struct {
	Entity   Entity   `json:"entity"`
	Metadata Metadata `json:"metadata"`
	Status   int      `json:"status"`
}

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 IspimRequestsService interface {
	Get(context.Context, string) (*IspimRequestResponse, *Response, error)
}

type IspimRequestsServiceOp added in v1.0.4

type IspimRequestsServiceOp struct {
	// contains filtered or unexported fields
}

func (*IspimRequestsServiceOp) Get added in v1.0.4

type IspimResource

type IspimResource struct {
	ResponseList  []ResponseList `json:"responseList"`
	OverAllStatus string         `json:"overAllStatus"`
}

type IspimResourceAttributes

type IspimResourceAttributes struct {
	UID        []string `json:"uid"`
	Name       []string `json:"name"`
	Alias      []string `json:"alias"`
	Tag        []string `json:"tag"`
	Type       []string `json:"type,omitempty"`
	Properties []string `json:"properties,omitempty"`
}

type IspimResourceContainer

type IspimResourceContainer struct {
	Href string `json:"href"`
}
type IspimResourceLinks struct {
	IspimResourceContainer IspimResourceContainer `json:"container"`
}

type IspimResourceRequest

type IspimResourceRequest struct {
	CreateList []CreateList `json:"createList"`
}

type IspimResourceResponse

type IspimResourceResponse struct {
	Entity   Entity   `json:"entity"`
	Metadata Metadata `json:"metadata"`
	Status   int      `json:"status"`
}

type IspimResourceResponseContainer

type IspimResourceResponseContainer struct {
	Href  string `json:"href"`
	Title string `json:"title"`
}

type IspimResourceRoot

type IspimResourceRoot struct {
	IspimResource *IspimResource `json:"IspimResource"`
}

End of the common structure

type IspimResourceSelfLink struct {
	Href  string `json:"href"`
	Title string `json:"title"`
}

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

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

type IspimSyncCredential

type IspimSyncCredential struct {
	IspimSyncCredentialResponseList []IspimSyncCredentialResponseList `json:"responseList"`
	OverAllStatus                   string                            `json:"overAllStatus"`
}

type IspimSyncCredentialEntity

type IspimSyncCredentialEntity struct {
	Links     Links  `json:"_links"`
	RequestID string `json:"requestId"`
}

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

Create a new Provider with a given configuration.

func (*IspimSyncCredentialsServiceOp) Delete added in v1.0.7

func (*IspimSyncCredentialsServiceOp) Get

type IspimSyncResponse

type IspimSyncResponse []struct {
	IspimSyncResponseLinks IspimSyncResponseLinks `json:"_links"`
	RequestID              string                 `json:"requestId"`
}

/Start of the response

type IspimSyncResponseLinks struct {
	Request Request `json:"request"`
}

type IspimSyncResponseRequest

type IspimSyncResponseRequest struct {
	Href string `json:"href"`
}
type Links struct {
	Self Self `json:"self"`
}

type Metadata

type Metadata struct {
}

type Objects

type Objects struct {
	Settings []Settings `json:"settings"`
}

type Owner

type Owner struct {
	Href string `json:"href"`
}

type Request

type Request struct {
	Href string `json:"href"`
}

type Resource

type Resource struct {
	Links      Links      `json:"_links"`
	Attributes Attributes `json:"_attributes"`
}

type Response

type Response struct {
	*http.Response
}

type ResponseList

type ResponseList struct {
	RequestAction    string           `json:"requestAction"`
	IspimIdpResponse IspimIdpResponse `json:"response"`
	SelfLink         SelfLink         `json:"selfLink"`
}

type Self

type Self struct {
	Href  string `json:"href"`
	Title string `json:"title"`
}
type SelfLink struct {
	Href  string `json:"href"`
	Title string `json:"title"`
}

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 Status added in v1.0.4

type Status struct {
	Key  string `json:"key"`
	Text string `json:"text"`
}

type SyncCredentialRequest

type SyncCredentialRequest struct {
	CredentialLink             string                     `json:"credentialLink"`
	IspimSyncCredentialRequest IspimSyncCredentialRequest `json:"ispimcredentialrequest"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL