Documentation
¶
Index ¶
- func IsErrEmptyRequestOption(pErr error) bool
- func IsErrReauthFailed(pErr error) bool
- func NewErrEmptyReauthFunction(pInfo string) vconError.IErrorBuilder
- func NewErrReauthFailed(pInfo string) vconError.IErrorBuilder
- type Cloud
- type Clouds
- type ErrEmptyReauthFunction
- type ErrReauthFailed
- type ProviderClient
- func (s *ProviderClient) IsThrowAway() bool
- func (s *ProviderClient) Reauthenticate() error
- func (s *ProviderClient) Request(pMethod, pUrl string, pOpts *RequestOpts) (*req.Response, error)
- func (s *ProviderClient) SetAccessToken(pNewAccessToken string)
- func (s *ProviderClient) SetThrowaway(pIsThrowAway bool)
- func (s *ProviderClient) SetUserAgent(pUserAgent string)
- func (s *ProviderClient) UseHTTPClient()
- func (s *ProviderClient) UseTokenLock()
- type RequestOpts
- type ServiceClient
- func (s *ServiceClient) Delete(pUrl string, pOpts *RequestOpts) (*req.Response, error)
- func (s *ServiceClient) Get(pUrl string, pOpts *RequestOpts) (*req.Response, error)
- func (s *ServiceClient) Post(pUrl string, pOpts *RequestOpts) (*req.Response, error)
- func (s *ServiceClient) Put(pUrl string, pOpts *RequestOpts) (*req.Response, error)
- func (s *ServiceClient) Request(pMethod, pUrl string, pOpts *RequestOpts) (*req.Response, error)
- func (s *ServiceClient) ServiceURL(pParts ...string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrEmptyRequestOption ¶
func IsErrReauthFailed ¶
func NewErrEmptyReauthFunction ¶
func NewErrEmptyReauthFunction(pInfo string) vconError.IErrorBuilder
func NewErrReauthFailed ¶
func NewErrReauthFailed(pInfo string) vconError.IErrorBuilder
Types ¶
type Cloud ¶
type Cloud struct { VServerGatewayURL string `yaml:"vserver_gateway_url,omitempty" json:"vserver_gateway_url,omitempty"` VLoadBalancerGatewayURL string `yaml:"vloadbalancer_gateway_url,omitempty" json:"vloadbalancer_gateway_url,omitempty"` IamGatewayURL string `yaml:"iam_gateway_url,omitempty" json:"iam_gateway_url,omitempty"` ClienID string `yaml:"client_id,omitempty" json:"client_id,omitempty"` ClientSecret string `yaml:"client_secret,omitempty" json:"client_secret,omitempty"` DatabaseDSN string `yaml:"database_dsn,omitempty" json:"database_dsn,omitempty"` CacheExpireIn int `yaml:"cache_expire_in,omitempty" json:"cache_expire_in,omitempty"` }
type ErrEmptyReauthFunction ¶
func (*ErrEmptyReauthFunction) Error ¶
func (s *ErrEmptyReauthFunction) Error() string
type ErrReauthFailed ¶
func (*ErrReauthFailed) Error ¶
func (s *ErrReauthFailed) Error() string
type ProviderClient ¶
type ProviderClient struct { IdentityEndpoint string AccessToken string UserAgent string HTTPClient *req.Client ReauthFunc func() error ThrowAway bool Context context.Context // contains filtered or unexported fields }
func (*ProviderClient) IsThrowAway ¶
func (s *ProviderClient) IsThrowAway() bool
func (*ProviderClient) Reauthenticate ¶
func (s *ProviderClient) Reauthenticate() error
func (*ProviderClient) Request ¶
func (s *ProviderClient) Request(pMethod, pUrl string, pOpts *RequestOpts) (*req.Response, error)
func (*ProviderClient) SetAccessToken ¶
func (s *ProviderClient) SetAccessToken(pNewAccessToken string)
func (*ProviderClient) SetThrowaway ¶
func (s *ProviderClient) SetThrowaway(pIsThrowAway bool)
func (*ProviderClient) SetUserAgent ¶
func (s *ProviderClient) SetUserAgent(pUserAgent string)
func (*ProviderClient) UseHTTPClient ¶
func (s *ProviderClient) UseHTTPClient()
func (*ProviderClient) UseTokenLock ¶
func (s *ProviderClient) UseTokenLock()
type RequestOpts ¶
type ServiceClient ¶
type ServiceClient struct { Endpoint string Type string MoreHeaders map[string]string *ProviderClient }
func (*ServiceClient) Delete ¶
func (s *ServiceClient) Delete(pUrl string, pOpts *RequestOpts) (*req.Response, error)
func (*ServiceClient) Get ¶
func (s *ServiceClient) Get(pUrl string, pOpts *RequestOpts) (*req.Response, error)
func (*ServiceClient) Post ¶
func (s *ServiceClient) Post(pUrl string, pOpts *RequestOpts) (*req.Response, error)
func (*ServiceClient) Put ¶
func (s *ServiceClient) Put(pUrl string, pOpts *RequestOpts) (*req.Response, error)
func (*ServiceClient) Request ¶
func (s *ServiceClient) Request(pMethod, pUrl string, pOpts *RequestOpts) (*req.Response, error)
func (*ServiceClient) ServiceURL ¶
func (s *ServiceClient) ServiceURL(pParts ...string) string
Click to show internal directories.
Click to hide internal directories.