conns

package
v0.0.1-pre Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const RetryAPIDelay = 5 * time.Second

RetryAPIDelay - retry api delay

Variables

View Source
var BluemixRegion string

BluemixRegion ...

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 RefreshToken

func RefreshToken(sess *bxsession.Session) error

Types

type ClientSession

type ClientSession interface {
	BluemixSession() (*bxsession.Session, error)
	BluemixUserDetails() (*UserConfig, error)
	CdToolchainV2() (*cdtoolchainv2.CdToolchainV2, error)
	CdTektonPipelineV2() (*cdtektonpipelinev2.CdTektonPipelineV2, 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 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