Documentation ¶
Index ¶
- Constants
- func BackendURL(subdomain string, channel string) string
- func Get(ctx context.Context, channel string, service string, basepath string, ...) (*http.Response, error)
- func NewHTTPAPIClient(config *httpclient.Config) (httpclient.Client, error)
- func NewHTTPAPIClientDefault() (httpclient.Client, error)
- func Post(ctx context.Context, channel string, service string, basepath string, ...) (*http.Response, error)
- func SetAuthorization(req *http.Request, apikey string)
- func SetUserAgent(req *http.Request)
Constants ¶
const ( // AgentService is the agent service endpoint AgentService = "agent.api" // AuthService is the auth service endpoint AuthService = "auth.api" // EventService is the event service endpoint EventService = "event.api" )
const AuthorizationHeader = "Authorization"
AuthorizationHeader is the name of the authorization header to use
Variables ¶
This section is empty.
Functions ¶
func BackendURL ¶
BackendURL return the base url to the API server
func Get ¶
func Get(ctx context.Context, channel string, service string, basepath string, apiKey string) (*http.Response, error)
Get will invoke api for channel and basepath
func NewHTTPAPIClient ¶
func NewHTTPAPIClient(config *httpclient.Config) (httpclient.Client, error)
NewHTTPAPIClient will return a new HTTP client for talking with the Pinpoint API it will only allow a trusted TLS connection with a valid TLS certificate signed by a trusted Certificate Authority and for a DNS name that is owned by Pinpoint
func NewHTTPAPIClientDefault ¶
func NewHTTPAPIClientDefault() (httpclient.Client, error)
NewHTTPAPIClientDefault will return a new HTTP client for talking with the Pinpoint API it will only allow a trusted TLS connection with a valid TLS certificate signed by a trusted Certificate Authority and for a DNS name that is owned by Pinpoint the client will retry requests by default with a expotential backoff
func Post ¶
func Post(ctx context.Context, channel string, service string, basepath string, apiKey string, obj interface{}) (*http.Response, error)
Post will invoke api for channel and basepath as JSON post
func SetAuthorization ¶
SetAuthorization will set the authorization header
Types ¶
This section is empty.