Documentation ¶
Index ¶
- Constants
- Variables
- func ContructEndpoint(subdomain, domain string) string
- func CreateVersionDate() *string
- func DefaultTransport() gohttp.RoundTripper
- func EnvFallBack(envs []string, defaultValue string) string
- func FileFallBack(endpointsFile, visibility, key, region, defaultValue string) string
- func FunctionClient(c *bluemix.Config) (*whisk.Client, error)
- func GetPrivateServiceURLForRegion(region string) (string, error)
- func IsResourceTimeoutError(err error) bool
- func RefreshToken(sess *bxsession.Session) error
- func SetupOpenWhiskClientConfig(namespace string, sess *bxsession.Session, ...) (*whisk.Client, error)
- func String(s string) int
- func Strings(strings []string) string
- type ClientSession
- type Config
- type MutexKV
- func NewMutexKV() *MutexKVdeprecated
- func (m *MutexKV) Lock(key string)deprecated
- func (m *MutexKV) Unlock(key string)deprecated
- type Session
- type UserConfig
Constants ¶
const DefaultServiceURL = "https://us-south.functions.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
const RetryAPIDelay = 5 * time.Second
RetryAPIDelay - retry api delay
Variables ¶
var BluemixRegion string
BluemixRegion ...
var IbmMutexKV = NewMutexKV()
This is a global MutexKV for use within this plugin.
Functions ¶
func ContructEndpoint ¶
func CreateVersionDate ¶
func CreateVersionDate() *string
CreateVersionDate requires mandatory version attribute. Any date from 2019-12-13 up to the currentdate may be provided. Specify the current date to request the latest version.
func EnvFallBack ¶
func FileFallBack ¶ added in v1.68.0
func FunctionClient ¶
FunctionClient ...
func IsResourceTimeoutError ¶
Used for retry logic on resource timeout.
func RefreshToken ¶
func SetupOpenWhiskClientConfig ¶
func SetupOpenWhiskClientConfig(namespace string, sess *bxsession.Session, functionNamespace functions.FunctionServiceAPI) (*whisk.Client, error)
* * Configure a HTTP client using the OpenWhisk properties (i.e. host, auth, iamtoken) * Only cf-based namespaces needs auth key value. * iam-based namespace don't have an auth key and needs only iam token for authorization. *
Types ¶
type ClientSession ¶
type ClientSession interface { AppIDAPI() (*appid.AppIDManagementV4, error) BluemixSession() (*bxsession.Session, error) BluemixAcccountAPI() (accountv2.AccountServiceAPI, error) BluemixAcccountv1API() (accountv1.AccountServiceAPI, error) BluemixUserDetails() (*UserConfig, error) ContainerAPI() (containerv1.ContainerServiceAPI, error) VpcContainerAPI() (containerv2.ContainerServiceAPI, error) ContainerRegistryV1() (*containerregistryv1.ContainerRegistryV1, error) ConfigurationAggregatorV1() (*configurationaggregatorv1.ConfigurationAggregatorV1, error) FunctionClient() (*whisk.Client, error) GlobalSearchAPI() (globalsearchv2.GlobalSearchServiceAPI, error) GlobalTaggingAPI() (globaltaggingv3.GlobalTaggingServiceAPI, error) GlobalTaggingAPIv1() (globaltaggingv1.GlobalTaggingV1, error) GlobalSearchAPIV2() (searchv2.GlobalSearchV2, error) ICDAPI() (icdv4.ICDServiceAPI, error) CloudDatabasesV5() (*clouddatabasesv5.CloudDatabasesV5, error) IAMPolicyManagementV1API() (*iampolicymanagement.IamPolicyManagementV1, error) IAMAccessGroupsV2() (*iamaccessgroups.IamAccessGroupsV2, error) Db2saasV1() (*db2saasv1.Db2saasV1, error) MccpAPI() (mccpv2.MccpServiceAPI, error) ResourceCatalogAPI() (catalog.ResourceCatalogAPI, error) ResourceManagementAPIv2() (managementv2.ResourceManagementAPIv2, error) ResourceControllerAPI() (controller.ResourceControllerAPI, error) ResourceControllerAPIV2() (controllerv2.ResourceControllerAPIV2, error) IBMCloudLogsRoutingV0() (*ibmcloudlogsroutingv0.IBMCloudLogsRoutingV0, error) SoftLayerSession() *slsession.Session IBMPISession() (*ibmpisession.IBMPISession, error) UserManagementAPI() (usermanagementv2.UserManagementAPI, error) PushServiceV1() (*pushservicev1.PushServiceV1, error) EventNotificationsApiV1() (*eventnotificationsv1.EventNotificationsV1, error) AppConfigurationV1() (*appconfigurationv1.AppConfigurationV1, error) KeyProtectAPI() (*kp.Client, error) KeyManagementAPI() (*kp.Client, error) VpcV1API() (*vpc.VpcV1, error) VpcV1BetaAPI() (*vpcbeta.VpcbetaV1, error) APIGateway() (*apigateway.ApiGatewayControllerApiV1, error) PrivateDNSClientSession() (*dns.DnsSvcsV1, error) CosConfigV1API() (*cosconfig.ResourceConfigurationV1, error) DirectlinkV1API() (*dl.DirectLinkV1, error) DirectlinkProviderV2API() (*dlProviderV2.DirectLinkProviderV2, error) TransitGatewayV1API() (*tg.TransitGatewayApisV1, error) HpcsEndpointAPI() (hpcs.HPCSV2, error) UkoV4() (*ukov4.UkoV4, error) FunctionIAMNamespaceAPI() (functions.FunctionServiceAPI, error) CisZonesV1ClientSession() (*ciszonesv1.ZonesV1, error) CisAlertsSession() (*cisalertsv1.AlertsV1, error) CisRulesetsSession() (*cisrulesetsv1.RulesetsV1, error) CisOrigAuthSession() (*cisoriginpull.AuthenticatedOriginPullApiV1, error) CisDNSRecordClientSession() (*cisdnsrecordsv1.DnsRecordsV1, error) CisDNSRecordBulkClientSession() (*cisdnsbulkv1.DnsRecordBulkV1, error) CisGLBClientSession() (*cisglbv1.GlobalLoadBalancerV1, error) CisGLBPoolClientSession() (*cisglbpoolv0.GlobalLoadBalancerPoolsV0, error) CisGLBHealthCheckClientSession() (*cisglbhealthcheckv1.GlobalLoadBalancerMonitorV1, error) CisIPClientSession() (*cisipv1.CisIpApiV1, error) CisPageRuleClientSession() (*cispagerulev1.PageRuleApiV1, error) CisLogpushJobsSession() (*cislogpushjobsapiv1.LogpushJobsApiV1, error) CisRLClientSession() (*cisratelimitv1.ZoneRateLimitsV1, error) CisEdgeFunctionClientSession() (*cisedgefunctionv1.EdgeFunctionsApiV1, error) CisSSLClientSession() (*cissslv1.SslCertificateApiV1, error) CisWAFPackageClientSession() (*ciswafpackagev1.WafRulePackagesApiV1, error) CisDomainSettingsClientSession() (*cisdomainsettingsv1.ZonesSettingsV1, error) CisRoutingClientSession() (*cisroutingv1.RoutingV1, error) CisWAFGroupClientSession() (*ciswafgroupv1.WafRuleGroupsApiV1, error) CisCacheClientSession() (*ciscachev1.CachingApiV1, error) CisMtlsSession() (*cismtlsv1.MtlsV1, error) CisBotManagementSession() (*cisbotmanagementv1.BotManagementV1, error) CisBotAnalyticsSession() (*cisbotanalyticsv1.BotAnalyticsV1, error) CisWebhookSession() (*ciswebhooksv1.WebhooksV1, error) CisCustomPageClientSession() (*ciscustompagev1.CustomPagesV1, error) CisAccessRuleClientSession() (*cisaccessrulev1.ZoneFirewallAccessRulesV1, error) CisUARuleClientSession() (*cisuarulev1.UserAgentBlockingRulesV1, error) CisLockdownClientSession() (*cislockdownv1.ZoneLockdownV1, error) CisRangeAppClientSession() (*cisrangeappv1.RangeApplicationsV1, error) CisWAFRuleClientSession() (*ciswafrulev1.WafRulesApiV1, error) IAMIdentityV1API() (*iamidentity.IamIdentityV1, error) IBMCloudShellV1() (*ibmcloudshellv1.IBMCloudShellV1, error) ResourceManagerV2API() (*resourcemanager.ResourceManagerV2, error) CatalogManagementV1() (*catalogmanagementv1.CatalogManagementV1, error) EnterpriseManagementV1() (*enterprisemanagementv1.EnterpriseManagementV1, error) ResourceControllerV2API() (*resourcecontroller.ResourceControllerV2, error) SecretsManagerV2() (*secretsmanagerv2.SecretsManagerV2, error) SchematicsV1() (*schematicsv1.SchematicsV1, error) SatelliteClientSession() (*kubernetesserviceapiv1.KubernetesServiceApiV1, error) SatellitLinkClientSession() (*satellitelinkv1.SatelliteLinkV1, error) CisFiltersSession() (*cisfiltersv1.FiltersV1, error) CisFirewallRulesSession() (*cisfirewallrulesv1.FirewallRulesV1, error) AtrackerV2() (*atrackerv2.AtrackerV2, error) MetricsRouterV3() (*metricsrouterv3.MetricsRouterV3, error) ESschemaRegistrySession() (*schemaregistryv1.SchemaregistryV1, error) ESadminRestSession() (*adminrestv1.AdminrestV1, error) ContextBasedRestrictionsV1() (*contextbasedrestrictionsv1.ContextBasedRestrictionsV1, error) SecurityAndComplianceCenterV3() (*scc.SecurityAndComplianceCenterApiV3, error) CdToolchainV2() (*cdtoolchainv2.CdToolchainV2, error) CdTektonPipelineV2() (*cdtektonpipelinev2.CdTektonPipelineV2, error) PartnerCenterSellV1() (*partnercentersellv1.PartnerCenterSellV1, error) CodeEngineV2() (*codeengine.CodeEngineV2, error) ProjectV1() (*project.ProjectV1, error) UsageReportsV4() (*usagereportsv4.UsageReportsV4, error) MqcloudV1() (*mqcloudv1.MqcloudV1, error) VmwareV1() (*vmwarev1.VmwareV1, error) LogsV0() (*logsv0.LogsV0, error) }
ClientSession ...
type Config ¶
type Config struct { // BluemixAPIKey is the Bluemix api key BluemixAPIKey string // Bluemix region Region string // Resource group id ResourceGroup string // Bluemix API timeout BluemixTimeout time.Duration // Softlayer end point url SoftLayerEndpointURL string // Softlayer API timeout SoftLayerTimeout time.Duration // Softlayer User Name SoftLayerUserName string // Softlayer API Key SoftLayerAPIKey string // Retry Count for API calls // Unexposed in the schema at this point as they are used only during session creation for a few calls // When sdk implements it we an expose them for expected behaviour // https://github.com/softlayer/softlayer-go/issues/41 RetryCount int // Constant Retry Delay for API calls RetryDelay time.Duration // FunctionNameSpace ... FunctionNameSpace string // Riaas End point RiaasEndPoint string // Generation Generation int // IAM Token IAMToken string // TrustedProfileToken Token IAMTrustedProfileID string // IAM Refresh Token IAMRefreshToken string // Zone Zone string Visibility string EndpointsFile string }
Config stores user provider input
func (*Config) ClientSession ¶
ClientSession configures and returns a fully initialized ClientSession
type MutexKV ¶
type MutexKV struct {
// contains filtered or unexported fields
}
func NewMutexKV
deprecated
func NewMutexKV() *MutexKV
NewMutexKV Returns a properly initalized MutexKV
Deprecated: This will be removed in v2 without replacement. If you need its functionality, you can copy it or reference the v1 package.
type Session ¶
type Session struct { // SoftLayerSesssion is the the SoftLayer session used to connect to the SoftLayer API SoftLayerSession *slsession.Session // BluemixSession is the the Bluemix session used to connect to the Bluemix API BluemixSession *bxsession.Session }
Session stores the information required for communication with the SoftLayer and Bluemix API