Documentation ¶
Index ¶
- func AddRequestData[T any](request T, c *CitrixDaasClient) T
- func ExecuteWithRetry[ResponseBodyType any](request any, c *CitrixDaasClient) (ResponseBodyType, *http.Response, error)
- func GetJobIdFromHttpResponse(httpResponse http.Response) string
- func GetTransactionIdFromHttpResponse(httpResponse *http.Response) string
- func PerformBatchOperation(ctx context.Context, client *CitrixDaasClient, ...) (int, string, error)
- func RetryOperationWithExponentialBackOff[T any](operation func() (T, *http.Response, error), baseDelayInSeconds int, ...) (T, *http.Response, error)
- func RetryOperationWithExponentialBackOffDefault[T any](operation func() (T, *http.Response, error)) (T, *http.Response, error)
- type AuthTokenModel
- type AuthenticationConfiguration
- type CCAuthResponse
- type CCTrustAuthResponse
- type CitrixDaasClient
- type ClientConfiguration
- type MiddlewareAuthFunction
- type TrustAuthResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRequestData ¶ added in v0.2.0
func AddRequestData[T any](request T, c *CitrixDaasClient) T
func ExecuteWithRetry ¶ added in v0.2.5
func GetJobIdFromHttpResponse ¶ added in v0.2.6
func GetTransactionIdFromHttpResponse ¶ added in v0.2.6
func PerformBatchOperation ¶ added in v0.2.6
func PerformBatchOperation(ctx context.Context, client *CitrixDaasClient, batchRequestModel citrixorchestration.BatchRequestModel) (int, string, error)
func RetryOperationWithExponentialBackOff ¶ added in v0.2.3
Types ¶
type AuthTokenModel ¶
type AuthenticationConfiguration ¶
type AuthenticationConfiguration struct { AuthUrl string `json:"auth_url"` ClientId string `json:"client_id"` ClientSecret string `json:"client_secret"` OnPremises bool `json:"on_premises"` ApiGateway bool `json:"api_gateway"` IsGov bool `json:"is_gov"` }
AuthenticationConfiguration provides authentication settings for CC Athena / on-premises trust service
type CCAuthResponse ¶
type CCAuthResponse struct { TokenType string `json:"token_type"` Token string `json:"access_token"` Expiration string `json:"expires_in"` Error string `json:"error"` ErrorDescription string `json:"error_description"` }
AuthResponse -
type CCTrustAuthResponse ¶ added in v0.2.7
type CCTrustAuthResponse struct { Token string `json:"Token"` Principal string `json:"Principal"` UserId string `json:"UserId"` CustomerId string `json:"CustomerId"` ExpiresAt int `json:"ExpiresAt"` }
AuthResponse -
type CitrixDaasClient ¶
type CitrixDaasClient struct { ApiClient *citrixorchestration.APIClient GacClient *globalappconfiguration.APIClient ResourceLocationsClient *resourcelocations.APIClient AuthConfig *AuthenticationConfiguration ClientConfig *ClientConfiguration AuthToken *AuthTokenModel StorefrontClient *storefrontapis.APIClient }
func NewCitrixDaasClient ¶
func NewStoreFrontClient ¶ added in v0.4.0
func NewStoreFrontClient(ctx context.Context, computerName, adUserName, adUserPass string, daasClient *CitrixDaasClient) *CitrixDaasClient
func (*CitrixDaasClient) GetBatchRequestItemRelativeUrl ¶ added in v0.2.7
func (c *CitrixDaasClient) GetBatchRequestItemRelativeUrl(relativeUrl string) string
func (*CitrixDaasClient) SignIn ¶
func (c *CitrixDaasClient) SignIn() (string, *http.Response, error)
SignIn - Get a new token for user
func (*CitrixDaasClient) WaitForJob ¶
func (c *CitrixDaasClient) WaitForJob(ctx context.Context, jobId string, maxWaitTimeInMinutes int) (*citrixorchestration.JobResponseModel, error)
type ClientConfiguration ¶
type ClientConfiguration struct { CustomerId string SiteId string UserAgent string Accept string Authorization string OrchestrationApiVersion int32 ProductVersion string }
ClientConfiguration provides Citrix DaaS customer context
type MiddlewareAuthFunction ¶ added in v0.2.0
type MiddlewareAuthFunction func(authClient *CitrixDaasClient, r *http.Request)
MiddlewareAuthFunction provides way to implement custom middleware which can do auth
Click to show internal directories.
Click to hide internal directories.