Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIKeyAuth ¶
type APIKeyAuth struct { AuthType AuthType `json:"auth_type"` Key string `json:"key"` Value string `json:"value"` AuthLocation AuthLocation `json:"auth_location"` }
ApiKeyAuth is the API key authentication method
func (APIKeyAuth) GenAuthHeader ¶
func (aka APIKeyAuth) GenAuthHeader() (string, string, error)
func (APIKeyAuth) GenAuthQuery ¶
func (aka APIKeyAuth) GenAuthQuery() (string, string, error)
func (APIKeyAuth) GetAuthLocation ¶
func (aka APIKeyAuth) GetAuthLocation() AuthLocation
type AuthLocation ¶
type AuthLocation string
AuthLocation is the enum for AuthLocation field in ApiKeyAuth struct, which represents the location of the authentication string, it can be "header" or "query"
const ( Header AuthLocation = "header" Query AuthLocation = "query" )
type Authentication ¶
type Authentication interface { // GetAuthLocation returns the location of the authentication string, it can be "header" or "query" GetAuthLocation() AuthLocation // GenAuthHeader generates the authentication header key and value GenAuthHeader() (key, value string, err error) // GenAuthQuery generates the authentication key and value for query parameter GenAuthQuery() (key, value string, err error) }
Authentication authentication interface
type BasicAuth ¶
type BasicAuth struct { AuthType AuthType `json:"auth_type"` Username string `json:"username"` Password string `json:"password"` }
BasicAuth is the basic authentication method
func (BasicAuth) GetAuthLocation ¶
func (ba BasicAuth) GetAuthLocation() AuthLocation
type BearerTokenAuth ¶
BearerTokenAuth is the bearer token authentication method
func (BearerTokenAuth) GenAuthHeader ¶
func (bta BearerTokenAuth) GenAuthHeader() (string, string, error)
func (BearerTokenAuth) GenAuthQuery ¶
func (bta BearerTokenAuth) GenAuthQuery() (string, string, error)
func (BearerTokenAuth) GetAuthLocation ¶
func (bta BearerTokenAuth) GetAuthLocation() AuthLocation
type Client ¶
type Client struct { BaseURL string `json:"base_url"` Authentication Authentication `json:"authentication"` HTTPClient util.HTTPClient }
type Connector ¶
func (*Connector) CreateExecution ¶
type NoAuth ¶
type NoAuth struct {
AuthType AuthType `json:"auth_type"`
}
NoAuth is the no authentication method
func (NoAuth) GetAuthLocation ¶
func (na NoAuth) GetAuthLocation() AuthLocation
Click to show internal directories.
Click to hide internal directories.