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
- func (c *CitrixDaasClient) GetBatchRequestItemRelativeUrl(relativeUrl string) string
- func (daasClient *CitrixDaasClient) InitializeCitrixCloudClients(ctx context.Context, ccUrl, hostname string, ...)
- func (daasClient *CitrixDaasClient) InitializeCitrixDaasClient(ctx context.Context, customerId, token string, onPremises bool, ...) (*http.Response, error)
- func (daasClient *CitrixDaasClient) InitializeCwsClient(ctx context.Context, cwsHostname string, middlewareFunc MiddlewareAuthFunction)
- func (daasClient *CitrixDaasClient) InitializeQuickCreateClient(ctx context.Context, quickCreateHostName string, ...)
- func (daasClient *CitrixDaasClient) InitializeStoreFrontClient(ctx context.Context, computerName, adUserName, adUserPass string, ...)
- func (daasClient *CitrixDaasClient) InitializeWemClient(ctx context.Context, wemHostName string, middlewareFunc MiddlewareAuthFunction, ...)
- func (daasClient *CitrixDaasClient) SetupApiClient(hostname string, middlewareFunc MiddlewareAuthFunction, ...)
- func (daasClient *CitrixDaasClient) SetupAuthConfig(authUrl, clientId, clientSecret string, onPremises, apiGateway, isGov bool)
- func (daasClient *CitrixDaasClient) SetupCCAdminClient(ccUrl string, middlewareFunc MiddlewareAuthFunction)
- func (daasClient *CitrixDaasClient) SetupCitrixClientsContext(ctx context.Context, ...) (string, *http.Response, error)
- func (daasClient *CitrixDaasClient) SetupGacClient(hostname string, middlewareFunc MiddlewareAuthFunction)
- func (daasClient *CitrixDaasClient) SetupResourceLocationsClient(ccUrl string, middlewareFunc MiddlewareAuthFunction)
- func (daasClient *CitrixDaasClient) SetupWemOnPremAuthConfig(authUrl, adminUserName, adminPassword string)
- func (daasClient *CitrixDaasClient) SetupWemOnPremClientContext(ctx context.Context, middlewareFunc MiddlewareAuthFunction, ...)
- func (c *CitrixDaasClient) SignIn() (string, *http.Response, error)
- func (c *CitrixDaasClient) SignInWemOnPrem() (string, *http.Response, error)
- func (c *CitrixDaasClient) WaitForJob(ctx context.Context, jobId string, maxWaitTimeInMinutes int) (*citrixorchestration.JobResponseModel, error)
- type ClientConfiguration
- type MiddlewareAuthFunction
- type TrustAuthResponse
- type WemOnPremAuthResponse
- type WemOnPremAuthentication
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 AuthConfig *AuthenticationConfiguration ClientConfig *ClientConfiguration WemOnPremAuthConfig *WemOnPremAuthentication AuthToken *AuthTokenModel StorefrontClient *storefrontapis.APIClient QuickCreateClient *citrixquickcreate.APIClient WemClient *citrixwemservice.APIClient // Citrix Cloud Service Clients CCAdminsClient *ccadmins.APIClient CwsClient *citrixcws.APIClient GacClient *globalappconfiguration.APIClient ResourceLocationsClient *resourcelocations.APIClient }
func (*CitrixDaasClient) GetBatchRequestItemRelativeUrl ¶ added in v0.2.7
func (c *CitrixDaasClient) GetBatchRequestItemRelativeUrl(relativeUrl string) string
func (*CitrixDaasClient) InitializeCitrixCloudClients ¶ added in v1.0.6
func (daasClient *CitrixDaasClient) InitializeCitrixCloudClients(ctx context.Context, ccUrl, hostname string, middlewareFunc MiddlewareAuthFunction, middlewareFuncWithCustomerIdHeader MiddlewareAuthFunction)
func (*CitrixDaasClient) InitializeCitrixDaasClient ¶ added in v1.0.5
func (*CitrixDaasClient) InitializeCwsClient ¶ added in v1.0.5
func (daasClient *CitrixDaasClient) InitializeCwsClient(ctx context.Context, cwsHostname string, middlewareFunc MiddlewareAuthFunction)
func (*CitrixDaasClient) InitializeQuickCreateClient ¶ added in v1.0.5
func (daasClient *CitrixDaasClient) InitializeQuickCreateClient(ctx context.Context, quickCreateHostName string, middlewareFunc MiddlewareAuthFunction)
func (*CitrixDaasClient) InitializeStoreFrontClient ¶ added in v1.0.5
func (daasClient *CitrixDaasClient) InitializeStoreFrontClient(ctx context.Context, computerName, adUserName, adUserPass string, disableSslVerification bool)
func (*CitrixDaasClient) InitializeWemClient ¶ added in v1.0.7
func (daasClient *CitrixDaasClient) InitializeWemClient(ctx context.Context, wemHostName string, middlewareFunc MiddlewareAuthFunction, onPremises, disableSslVerification bool)
------ Setup WEM Client ------
func (*CitrixDaasClient) SetupApiClient ¶ added in v1.0.6
func (daasClient *CitrixDaasClient) SetupApiClient(hostname string, middlewareFunc MiddlewareAuthFunction, onPremises, disableSslVerification, apiGateway bool)
------ Setup API Client ------
func (*CitrixDaasClient) SetupAuthConfig ¶ added in v1.0.6
func (daasClient *CitrixDaasClient) SetupAuthConfig(authUrl, clientId, clientSecret string, onPremises, apiGateway, isGov bool)
------ Setup Authentication Configuration ------
func (*CitrixDaasClient) SetupCCAdminClient ¶ added in v1.0.6
func (daasClient *CitrixDaasClient) SetupCCAdminClient(ccUrl string, middlewareFunc MiddlewareAuthFunction)
------ Setup CC Admin Client ------
func (*CitrixDaasClient) SetupCitrixClientsContext ¶ added in v1.0.6
func (daasClient *CitrixDaasClient) SetupCitrixClientsContext(ctx context.Context, authUrl, ccUrl, hostname, customerId, clientId, clientSecret string, onPremises bool, apiGateway bool, isGov bool, disableSslVerification bool, userAgent *string, middlewareFunc MiddlewareAuthFunction, middlewareFuncWithCustomerIdHeader MiddlewareAuthFunction) (string, *http.Response, error)
func (*CitrixDaasClient) SetupGacClient ¶ added in v1.0.6
func (daasClient *CitrixDaasClient) SetupGacClient(hostname string, middlewareFunc MiddlewareAuthFunction)
------ Setup GAC Client ------
func (*CitrixDaasClient) SetupResourceLocationsClient ¶ added in v1.0.6
func (daasClient *CitrixDaasClient) SetupResourceLocationsClient(ccUrl string, middlewareFunc MiddlewareAuthFunction)
------ Setup Resource Locations Client ------
func (*CitrixDaasClient) SetupWemOnPremAuthConfig ¶ added in v1.0.8
func (daasClient *CitrixDaasClient) SetupWemOnPremAuthConfig(authUrl, adminUserName, adminPassword string)
------ Setup Wem On-Prem Authentication Configuration ------
func (*CitrixDaasClient) SetupWemOnPremClientContext ¶ added in v1.0.8
func (daasClient *CitrixDaasClient) SetupWemOnPremClientContext(ctx context.Context, middlewareFunc MiddlewareAuthFunction, wemAuthUrl, wemHostName, wemAdminUserName, wemAdminPassword string, disableSslVerification bool)
func (*CitrixDaasClient) SignIn ¶
func (c *CitrixDaasClient) SignIn() (string, *http.Response, error)
SignIn - Get a new token for user
func (*CitrixDaasClient) SignInWemOnPrem ¶ added in v1.0.8
func (c *CitrixDaasClient) SignInWemOnPrem() (string, *http.Response, error)
SignIn to Wem OnPrem Host to get Session ID
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 IsCspCustomer bool }
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
type TrustAuthResponse ¶
type TrustAuthResponse struct { Token string `json:"Token"` Principal string `json:"Principal"` UserId string `json:"UserId"` CustomerId string `json:"CustomerId"` ExpiresAt string `json:"ExpiresAt"` }
AuthResponse -
type WemOnPremAuthResponse ¶ added in v1.0.8
type WemOnPremAuthResponse struct { Sid string `json:"sid"` UserName string `json:"userName"` SessionId string `json:"sessionId"` }
Wem On-Prem Auth Response with Session ID
type WemOnPremAuthentication ¶ added in v1.0.8
type WemOnPremAuthentication struct { AuthUrl string `json:"auth_url"` AdminUserName string `json:"admin_username"` AdminPassword string `json:"admin_password"` }
WemOnPremAuthentication provides authentication settings for WEM on-premises service