View Source
const ServiceID = "endpoint-credentials"

    ServiceID is the client identifer


    This section is empty.


    This section is empty.


    type Client

    type Client struct {
    	// contains filtered or unexported fields

      Client is an client for retrieving AWS credentials from an endpoint

      func New

      func New(options Options, optFns ...func(*Options)) *Client

        New constructs a new Client from the given options

        func (*Client) GetCredentials

        func (c *Client) GetCredentials(ctx context.Context, params *GetCredentialsInput, optFns ...func(*Options)) (*GetCredentialsOutput, error)

          GetCredentials retrieves credentials from credential endpoint

          type EndpointError

          type EndpointError struct {
          	Code    string            `json:"code"`
          	Message string            `json:"message"`
          	Fault   smithy.ErrorFault `json:"-"`

            EndpointError is an error returned from the endpoint service

            func (*EndpointError) Error

            func (e *EndpointError) Error() string

              Error is the error mesage string

              func (*EndpointError) ErrorCode

              func (e *EndpointError) ErrorCode() string

                ErrorCode is the error code returned by the endpoint

                func (*EndpointError) ErrorFault

                func (e *EndpointError) ErrorFault() smithy.ErrorFault

                  ErrorFault indicates error fault classification

                  func (*EndpointError) ErrorMessage

                  func (e *EndpointError) ErrorMessage() string

                    ErrorMessage is the error message returned by the endpoint

                    type GetCredentialsInput

                    type GetCredentialsInput struct {
                    	AuthorizationToken string

                      GetCredentialsInput is the input to send with the endpoint service to receive credentials.

                      type GetCredentialsOutput

                      type GetCredentialsOutput struct {
                      	Expiration      *time.Time
                      	AccessKeyID     string
                      	SecretAccessKey string
                      	Token           string

                        GetCredentialsOutput is the response from the credential endpoint

                        type HTTPClient

                        type HTTPClient interface {
                        	Do(*http.Request) (*http.Response, error)

                          HTTPClient is a client for sending HTTP requests

                          type Options

                          type Options struct {
                          	// The endpoint to retrieve credentials from
                          	Endpoint string
                          	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
                          	// implementation if nil.
                          	HTTPClient HTTPClient
                          	// Retryer guides how HTTP requests should be retried in case of recoverable
                          	// failures. When nil the API client will use a default retryer.
                          	Retryer aws.Retryer
                          	// Set of options to modify how the credentials operation is invoked.
                          	APIOptions []func(*smithymiddleware.Stack) error

                            Options is the endpoint client configurable options

                            func (Options) Copy

                            func (o Options) Copy() Options

                              Copy creates a copy of the API options.