Documentation ¶
Index ¶
- Variables
- type AuthMetadataVars
- type Connector
- func (c *Connector) GetPostAuthInfo(ctx context.Context) (*common.PostAuthInfo, error)
- func (c *Connector) HTTPClient() *common.HTTPClient
- func (c *Connector) HandleError(err error) error
- func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
- func (c *Connector) Provider() providers.Provider
- func (c *Connector) String() string
- type Option
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AuthMetadataVars ¶
type AuthMetadataVars struct {
Server string
}
AuthMetadataVars is a complete list of authentication metadata associated with connector. This model serves as a documentation of map[string]string contents.
func NewAuthMetadataVars ¶
func NewAuthMetadataVars(dictionary map[string]string) *AuthMetadataVars
NewAuthMetadataVars parses map into the model.
func (AuthMetadataVars) AsMap ¶
func (v AuthMetadataVars) AsMap() *map[string]string
AsMap converts model back to the map.
func (AuthMetadataVars) GetSubstitutionPlan ¶
func (v AuthMetadataVars) GetSubstitutionPlan() catalogreplacer.SubstitutionPlan
GetSubstitutionPlan allows variable substitution when resolving provider information. Only server URL is supported.
type Connector ¶
type Connector struct { BaseURL string Client *common.JSONHTTPClient }
func NewConnector ¶
func (*Connector) GetPostAuthInfo ¶
func (*Connector) HTTPClient ¶
func (c *Connector) HTTPClient() *common.HTTPClient
func (*Connector) HandleError ¶
func (*Connector) JSONHTTPClient ¶
func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient
JSONHTTPClient returns the underlying JSON HTTP client.
type Option ¶
type Option = func(params *parameters)
func WithAuthenticatedClient ¶
func WithAuthenticatedClient(client common.AuthenticatedHTTPClient) Option
func WithClient ¶
func WithClient(ctx context.Context, client *http.Client, config *oauth2.Config, token *oauth2.Token, opts ...common.OAuthOption, ) Option
WithClient sets the http client to use for the connector. Saves some boilerplate.
func WithMetadata ¶
WithMetadata sets authentication metadata expected by connector.
Click to show internal directories.
Click to hide internal directories.