docusign

package
v0.0.0-...-61f74ac Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoDefaultAccount = errors.New("no default account found in user info")
	ErrNoAccounts       = errors.New("no accounts found in user info")
	ErrParsingServer    = errors.New("error parsing server from user info")
)

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 NewConnector(opts ...Option) (conn *Connector, outErr error)

func (*Connector) GetPostAuthInfo

func (c *Connector) GetPostAuthInfo(
	ctx context.Context,
) (*common.PostAuthInfo, error)

func (*Connector) HTTPClient

func (c *Connector) HTTPClient() *common.HTTPClient

func (*Connector) HandleError

func (c *Connector) HandleError(err error) error

func (*Connector) JSONHTTPClient

func (c *Connector) JSONHTTPClient() *common.JSONHTTPClient

JSONHTTPClient returns the underlying JSON HTTP client.

func (*Connector) Provider

func (c *Connector) Provider() providers.Provider

Provider returns the connector provider.

func (*Connector) String

func (c *Connector) String() string

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

func WithMetadata(metadata map[string]string) Option

WithMetadata sets authentication metadata expected by connector.

Jump to

Keyboard shortcuts

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