Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyRoundTripper ¶
type APIKeyRoundTripper struct {
Key string
AdditionalHeaders []config.Header
// Transport is the underlying HTTP transport.
// if nil, http.DefaultTransport is used.
Transport http.RoundTripper
}
APIKeyRoundTripper is an HTTP transport which wraps the underlying transport and sets the Authorization header
type Client ¶
type Client struct {
HTTPClient *http.Client
Config *config.Config
// contains filtered or unexported fields
}
Client represents a HTTP client for making requests to the FullStory API.
func NewClient ¶
NewClient returns a Client initialized with http.DefaultClient and the supplied apiToken.
func (*Client) CreateExport ¶
type DataExportClient ¶
type DataExportClient interface {
// CreateExport starts an asynchronous export of the "Everyone" segment for the specified time range.
// The time bounds for start and stop are inclusive and exclusive, respectively.
// If successful, returns the id for the created export which can be used to check the progress.
CreateExport(start time.Time, end time.Time, fields []string) (string, error)
// GetExportProgress returns the estimated progress of the export for the provided operation and the id
// of the export if ready for download. The progress value is an integer between 1 and 100
// and represents and estimated completion percentage.
GetExportProgress(operationId string) (progress int, exportId string, err error)
// GetExport returns a stream for the provided export ID. If the export is not ready, this
// will fail with ErrExportNotReady.
GetExport(exportId string) (io.ReadCloser, error)
}
DataExportClient represents an interface for interacting with the FullStory Data Export API
type ExportError ¶
type ExportError struct {
Details string
}
func (ExportError) Error ¶
func (e ExportError) Error() string
type Option ¶ added in v1.3.0
type Option func(*Client)
func WithCreateExportRequestModifier ¶ added in v1.3.0
WithCreateExportRequestModifier allows for a modification to the CreateExport API request. This can be used to modify the request body to customize any of the request parameters.
func WithHttpClient ¶ added in v1.3.0
WithHttpClient replaces the default API key-based http client. This option can be used, for example, to customize the underlying transport.