conns

package
v1.62.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MPL-2.0 Imports: 118 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultServiceURL = "https://us-south.functions.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

View Source
const RetryAPIDelay = 5 * time.Second

RetryAPIDelay - retry api delay

Variables

View Source
var BluemixRegion string

BluemixRegion ...

View Source
var IbmMutexKV = NewMutexKV()

This is a global MutexKV for use within this plugin.

Functions

func ContructEndpoint

func ContructEndpoint(subdomain, domain string) string

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 DefaultTransport

func DefaultTransport() gohttp.RoundTripper

DefaultTransport ...

func EnvFallBack

func EnvFallBack(envs []string, defaultValue string) string

func FunctionClient

func FunctionClient(c *bluemix.Config) (*whisk.Client, error)

FunctionClient ...

func GetPrivateServiceURLForRegion

func GetPrivateServiceURLForRegion(region string) (string, error)

func IsResourceTimeoutError

func IsResourceTimeoutError(err error) bool

Used for retry logic on resource timeout.

func RefreshToken

func RefreshToken(sess *bxsession.Session) error

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. *

func String

func String(s string) int

String hashes a string to a unique hashcode.

func Strings

func Strings(strings []string) string

Strings hashes a list of strings to a unique hashcode.

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)
	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)
	MccpAPI() (mccpv2.MccpServiceAPI, error)
	ResourceCatalogAPI() (catalog.ResourceCatalogAPI, error)
	ResourceManagementAPIv2() (managementv2.ResourceManagementAPIv2, error)
	ResourceControllerAPI() (controller.ResourceControllerAPI, error)
	ResourceControllerAPIV2() (controllerv2.ResourceControllerAPIV2, 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)
	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)
	SecretsManagerV1() (*secretsmanagerv1.SecretsManagerV1, 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)
	ContextBasedRestrictionsV1() (*contextbasedrestrictionsv1.ContextBasedRestrictionsV1, error)
	SecurityAndComplianceCenterV3() (*scc.SecurityAndComplianceCenterApiV3, error)
	CdToolchainV2() (*cdtoolchainv2.CdToolchainV2, error)
	CdTektonPipelineV2() (*cdtektonpipelinev2.CdTektonPipelineV2, error)
	CodeEngineV2() (*codeengine.CodeEngineV2, error)
	ProjectV1() (*project.ProjectV1, error)
	UsageReportsV4() (*usagereportsv4.UsageReportsV4, error)
	MqcloudV1() (*mqcloudv1.MqcloudV1, 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

func (c *Config) ClientSession() (interface{}, error)

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.

func (*MutexKV) Lock deprecated

func (m *MutexKV) Lock(key string)

Lock the mutex for the given key. Caller is responsible for calling Unlock for the same key

Deprecated: This will be removed in v2 without replacement. If you need its functionality, you can copy it or reference the v1 package.

func (*MutexKV) Unlock deprecated

func (m *MutexKV) Unlock(key string)

Unlock the mutex for the given key. Caller must have called Lock for the same key first

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

type UserConfig

type UserConfig struct {
	UserID      string
	UserEmail   string
	UserAccount string
	CloudName   string `default:"bluemix"`
	// contains filtered or unexported fields
}

UserConfig ...

Jump to

Keyboard shortcuts

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