metricsapi

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package metricsapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetMetricsFileRequest

func NewGetMetricsFileRequest(server string, objectId string, params *GetMetricsFileParams) (*http.Request, error)

NewGetMetricsFileRequest generates requests for GetMetricsFile

func NewGetMetricsSummaryRequest

func NewGetMetricsSummaryRequest(server string, params *GetMetricsSummaryParams) (*http.Request, error)

NewGetMetricsSummaryRequest generates requests for GetMetricsSummary

func NewGetTransferBreakdownRequest added in v0.2.5

func NewGetTransferBreakdownRequest(server string, params *GetTransferBreakdownParams) (*http.Request, error)

NewGetTransferBreakdownRequest generates requests for GetTransferBreakdown

func NewGetTransferSummaryRequest added in v0.2.5

func NewGetTransferSummaryRequest(server string, params *GetTransferSummaryParams) (*http.Request, error)

NewGetTransferSummaryRequest generates requests for GetTransferSummary

func NewListMetricsFilesRequest

func NewListMetricsFilesRequest(server string, params *ListMetricsFilesParams) (*http.Request, error)

NewListMetricsFilesRequest generates requests for ListMetricsFiles

func NewListProviderTransferSyncRequest added in v0.2.5

func NewListProviderTransferSyncRequest(server string, params *ListProviderTransferSyncParams) (*http.Request, error)

NewListProviderTransferSyncRequest generates requests for ListProviderTransferSync

func NewRecordProviderTransferEventsRequest added in v0.2.5

func NewRecordProviderTransferEventsRequest(server string, params *RecordProviderTransferEventsParams, body RecordProviderTransferEventsJSONRequestBody) (*http.Request, error)

NewRecordProviderTransferEventsRequest calls the generic RecordProviderTransferEvents builder with application/json body

func NewRecordProviderTransferEventsRequestWithBody added in v0.2.5

func NewRecordProviderTransferEventsRequestWithBody(server string, params *RecordProviderTransferEventsParams, contentType string, body io.Reader) (*http.Request, error)

NewRecordProviderTransferEventsRequestWithBody generates requests for RecordProviderTransferEvents with any type of body

func NewRecordProviderTransferSyncRequest added in v0.2.5

func NewRecordProviderTransferSyncRequest(server string, body RecordProviderTransferSyncJSONRequestBody) (*http.Request, error)

NewRecordProviderTransferSyncRequest calls the generic RecordProviderTransferSync builder with application/json body

func NewRecordProviderTransferSyncRequestWithBody added in v0.2.5

func NewRecordProviderTransferSyncRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewRecordProviderTransferSyncRequestWithBody generates requests for RecordProviderTransferSync with any type of body

Types

type AllowStale added in v0.2.5

type AllowStale = bool

AllowStale defines model for AllowStale.

type Bucket added in v0.2.5

type Bucket = string

Bucket defines model for Bucket.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) GetMetricsFile

func (c *Client) GetMetricsFile(ctx context.Context, objectId string, params *GetMetricsFileParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetMetricsSummary

func (c *Client) GetMetricsSummary(ctx context.Context, params *GetMetricsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransferBreakdown added in v0.2.5

func (c *Client) GetTransferBreakdown(ctx context.Context, params *GetTransferBreakdownParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetTransferSummary added in v0.2.5

func (c *Client) GetTransferSummary(ctx context.Context, params *GetTransferSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListMetricsFiles

func (c *Client) ListMetricsFiles(ctx context.Context, params *ListMetricsFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListProviderTransferSync added in v0.2.5

func (c *Client) ListProviderTransferSync(ctx context.Context, params *ListProviderTransferSyncParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RecordProviderTransferEvents added in v0.2.5

func (c *Client) RecordProviderTransferEvents(ctx context.Context, params *RecordProviderTransferEventsParams, body RecordProviderTransferEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RecordProviderTransferEventsWithBody added in v0.2.5

func (c *Client) RecordProviderTransferEventsWithBody(ctx context.Context, params *RecordProviderTransferEventsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RecordProviderTransferSync added in v0.2.5

func (c *Client) RecordProviderTransferSync(ctx context.Context, body RecordProviderTransferSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RecordProviderTransferSyncWithBody added in v0.2.5

func (c *Client) RecordProviderTransferSyncWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ListMetricsFiles request
	ListMetricsFiles(ctx context.Context, params *ListMetricsFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMetricsFile request
	GetMetricsFile(ctx context.Context, objectId string, params *GetMetricsFileParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RecordProviderTransferEventsWithBody request with any body
	RecordProviderTransferEventsWithBody(ctx context.Context, params *RecordProviderTransferEventsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RecordProviderTransferEvents(ctx context.Context, params *RecordProviderTransferEventsParams, body RecordProviderTransferEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListProviderTransferSync request
	ListProviderTransferSync(ctx context.Context, params *ListProviderTransferSyncParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RecordProviderTransferSyncWithBody request with any body
	RecordProviderTransferSyncWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RecordProviderTransferSync(ctx context.Context, body RecordProviderTransferSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetMetricsSummary request
	GetMetricsSummary(ctx context.Context, params *GetMetricsSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferBreakdown request
	GetTransferBreakdown(ctx context.Context, params *GetTransferBreakdownParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetTransferSummary request
	GetTransferSummary(ctx context.Context, params *GetTransferSummaryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) GetMetricsFileWithResponse

func (c *ClientWithResponses) GetMetricsFileWithResponse(ctx context.Context, objectId string, params *GetMetricsFileParams, reqEditors ...RequestEditorFn) (*GetMetricsFileResponse, error)

GetMetricsFileWithResponse request returning *GetMetricsFileResponse

func (*ClientWithResponses) GetMetricsSummaryWithResponse

func (c *ClientWithResponses) GetMetricsSummaryWithResponse(ctx context.Context, params *GetMetricsSummaryParams, reqEditors ...RequestEditorFn) (*GetMetricsSummaryResponse, error)

GetMetricsSummaryWithResponse request returning *GetMetricsSummaryResponse

func (*ClientWithResponses) GetTransferBreakdownWithResponse added in v0.2.5

func (c *ClientWithResponses) GetTransferBreakdownWithResponse(ctx context.Context, params *GetTransferBreakdownParams, reqEditors ...RequestEditorFn) (*GetTransferBreakdownResponse, error)

GetTransferBreakdownWithResponse request returning *GetTransferBreakdownResponse

func (*ClientWithResponses) GetTransferSummaryWithResponse added in v0.2.5

func (c *ClientWithResponses) GetTransferSummaryWithResponse(ctx context.Context, params *GetTransferSummaryParams, reqEditors ...RequestEditorFn) (*GetTransferSummaryResponse, error)

GetTransferSummaryWithResponse request returning *GetTransferSummaryResponse

func (*ClientWithResponses) ListMetricsFilesWithResponse

func (c *ClientWithResponses) ListMetricsFilesWithResponse(ctx context.Context, params *ListMetricsFilesParams, reqEditors ...RequestEditorFn) (*ListMetricsFilesResponse, error)

ListMetricsFilesWithResponse request returning *ListMetricsFilesResponse

func (*ClientWithResponses) ListProviderTransferSyncWithResponse added in v0.2.5

func (c *ClientWithResponses) ListProviderTransferSyncWithResponse(ctx context.Context, params *ListProviderTransferSyncParams, reqEditors ...RequestEditorFn) (*ListProviderTransferSyncResponse, error)

ListProviderTransferSyncWithResponse request returning *ListProviderTransferSyncResponse

func (*ClientWithResponses) RecordProviderTransferEventsWithBodyWithResponse added in v0.2.5

func (c *ClientWithResponses) RecordProviderTransferEventsWithBodyWithResponse(ctx context.Context, params *RecordProviderTransferEventsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordProviderTransferEventsResponse, error)

RecordProviderTransferEventsWithBodyWithResponse request with arbitrary body returning *RecordProviderTransferEventsResponse

func (*ClientWithResponses) RecordProviderTransferEventsWithResponse added in v0.2.5

func (*ClientWithResponses) RecordProviderTransferSyncWithBodyWithResponse added in v0.2.5

func (c *ClientWithResponses) RecordProviderTransferSyncWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordProviderTransferSyncResponse, error)

RecordProviderTransferSyncWithBodyWithResponse request with arbitrary body returning *RecordProviderTransferSyncResponse

func (*ClientWithResponses) RecordProviderTransferSyncWithResponse added in v0.2.5

func (c *ClientWithResponses) RecordProviderTransferSyncWithResponse(ctx context.Context, body RecordProviderTransferSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*RecordProviderTransferSyncResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListMetricsFilesWithResponse request
	ListMetricsFilesWithResponse(ctx context.Context, params *ListMetricsFilesParams, reqEditors ...RequestEditorFn) (*ListMetricsFilesResponse, error)

	// GetMetricsFileWithResponse request
	GetMetricsFileWithResponse(ctx context.Context, objectId string, params *GetMetricsFileParams, reqEditors ...RequestEditorFn) (*GetMetricsFileResponse, error)

	// RecordProviderTransferEventsWithBodyWithResponse request with any body
	RecordProviderTransferEventsWithBodyWithResponse(ctx context.Context, params *RecordProviderTransferEventsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordProviderTransferEventsResponse, error)

	RecordProviderTransferEventsWithResponse(ctx context.Context, params *RecordProviderTransferEventsParams, body RecordProviderTransferEventsJSONRequestBody, reqEditors ...RequestEditorFn) (*RecordProviderTransferEventsResponse, error)

	// ListProviderTransferSyncWithResponse request
	ListProviderTransferSyncWithResponse(ctx context.Context, params *ListProviderTransferSyncParams, reqEditors ...RequestEditorFn) (*ListProviderTransferSyncResponse, error)

	// RecordProviderTransferSyncWithBodyWithResponse request with any body
	RecordProviderTransferSyncWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordProviderTransferSyncResponse, error)

	RecordProviderTransferSyncWithResponse(ctx context.Context, body RecordProviderTransferSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*RecordProviderTransferSyncResponse, error)

	// GetMetricsSummaryWithResponse request
	GetMetricsSummaryWithResponse(ctx context.Context, params *GetMetricsSummaryParams, reqEditors ...RequestEditorFn) (*GetMetricsSummaryResponse, error)

	// GetTransferBreakdownWithResponse request
	GetTransferBreakdownWithResponse(ctx context.Context, params *GetTransferBreakdownParams, reqEditors ...RequestEditorFn) (*GetTransferBreakdownResponse, error)

	// GetTransferSummaryWithResponse request
	GetTransferSummaryWithResponse(ctx context.Context, params *GetTransferSummaryParams, reqEditors ...RequestEditorFn) (*GetTransferSummaryResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Direction added in v0.2.5

type Direction = ProviderTransferDirection

Direction defines model for Direction.

type FileUsage

type FileUsage struct {
	DownloadCount    *int64     `json:"download_count,omitempty"`
	LastAccessTime   *time.Time `json:"last_access_time"`
	LastDownloadTime *time.Time `json:"last_download_time"`
	LastUploadTime   *time.Time `json:"last_upload_time"`
	Name             *string    `json:"name,omitempty"`
	ObjectId         *string    `json:"object_id,omitempty"`
	Size             *int64     `json:"size,omitempty"`
	UploadCount      *int64     `json:"upload_count,omitempty"`
}

FileUsage defines model for FileUsage.

type FileUsageSummary

type FileUsageSummary struct {
	InactiveFileCount *int64 `json:"inactive_file_count,omitempty"`
	TotalDownloads    *int64 `json:"total_downloads,omitempty"`
	TotalFiles        *int64 `json:"total_files,omitempty"`
	TotalUploads      *int64 `json:"total_uploads,omitempty"`
}

FileUsageSummary defines model for FileUsageSummary.

type From added in v0.2.5

type From = time.Time

From defines model for From.

type GetMetricsFileParams added in v0.2.5

type GetMetricsFileParams struct {
	// Organization Organization/program scope filter.
	Organization *Organization `form:"organization,omitempty" json:"organization,omitempty"`

	// Project Project scope filter. Requires organization when set.
	Project *Project `form:"project,omitempty" json:"project,omitempty"`
}

GetMetricsFileParams defines parameters for GetMetricsFile.

type GetMetricsFileResponse

type GetMetricsFileResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *FileUsage
}

func ParseGetMetricsFileResponse

func ParseGetMetricsFileResponse(rsp *http.Response) (*GetMetricsFileResponse, error)

ParseGetMetricsFileResponse parses an HTTP response from a GetMetricsFileWithResponse call

func (GetMetricsFileResponse) Status

func (r GetMetricsFileResponse) Status() string

Status returns HTTPResponse.Status

func (GetMetricsFileResponse) StatusCode

func (r GetMetricsFileResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetMetricsSummaryParams

type GetMetricsSummaryParams struct {
	InactiveDays *int `form:"inactive_days,omitempty" json:"inactive_days,omitempty"`

	// Organization Organization/program scope filter.
	Organization *Organization `form:"organization,omitempty" json:"organization,omitempty"`

	// Project Project scope filter. Requires organization when set.
	Project *Project `form:"project,omitempty" json:"project,omitempty"`
}

GetMetricsSummaryParams defines parameters for GetMetricsSummary.

type GetMetricsSummaryResponse

type GetMetricsSummaryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *FileUsageSummary
}

func ParseGetMetricsSummaryResponse

func ParseGetMetricsSummaryResponse(rsp *http.Response) (*GetMetricsSummaryResponse, error)

ParseGetMetricsSummaryResponse parses an HTTP response from a GetMetricsSummaryWithResponse call

func (GetMetricsSummaryResponse) Status

func (r GetMetricsSummaryResponse) Status() string

Status returns HTTPResponse.Status

func (GetMetricsSummaryResponse) StatusCode

func (r GetMetricsSummaryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransferBreakdownParams added in v0.2.5

type GetTransferBreakdownParams struct {
	// Organization Organization/program scope filter.
	Organization *Organization `form:"organization,omitempty" json:"organization,omitempty"`

	// Project Project scope filter. Requires organization when set.
	Project              *Project              `form:"project,omitempty" json:"project,omitempty"`
	Direction            *Direction            `form:"direction,omitempty" json:"direction,omitempty"`
	ReconciliationStatus *ReconciliationStatus `form:"reconciliation_status,omitempty" json:"reconciliation_status,omitempty"`
	From                 *From                 `form:"from,omitempty" json:"from,omitempty"`
	To                   *To                   `form:"to,omitempty" json:"to,omitempty"`
	Provider             *Provider             `form:"provider,omitempty" json:"provider,omitempty"`
	Bucket               *Bucket               `form:"bucket,omitempty" json:"bucket,omitempty"`
	Sha256               *SHA256               `form:"sha256,omitempty" json:"sha256,omitempty"`

	// User Actor email or subject filter.
	User *User `form:"user,omitempty" json:"user,omitempty"`

	// AllowStale Deprecated. Transfer metrics always return persisted provider events with freshness metadata, including missing sync windows and latest completed sync time.
	AllowStale *AllowStale                        `form:"allow_stale,omitempty" json:"allow_stale,omitempty"`
	GroupBy    *GetTransferBreakdownParamsGroupBy `form:"group_by,omitempty" json:"group_by,omitempty"`
}

GetTransferBreakdownParams defines parameters for GetTransferBreakdown.

type GetTransferBreakdownParamsGroupBy added in v0.2.5

type GetTransferBreakdownParamsGroupBy string

GetTransferBreakdownParamsGroupBy defines parameters for GetTransferBreakdown.

const (
	GetTransferBreakdownParamsGroupByObject   GetTransferBreakdownParamsGroupBy = "object"
	GetTransferBreakdownParamsGroupByProvider GetTransferBreakdownParamsGroupBy = "provider"
	GetTransferBreakdownParamsGroupByScope    GetTransferBreakdownParamsGroupBy = "scope"
	GetTransferBreakdownParamsGroupByUser     GetTransferBreakdownParamsGroupBy = "user"
)

Defines values for GetTransferBreakdownParamsGroupBy.

type GetTransferBreakdownResponse added in v0.2.5

type GetTransferBreakdownResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransferBreakdownResponse
}

func ParseGetTransferBreakdownResponse added in v0.2.5

func ParseGetTransferBreakdownResponse(rsp *http.Response) (*GetTransferBreakdownResponse, error)

ParseGetTransferBreakdownResponse parses an HTTP response from a GetTransferBreakdownWithResponse call

func (GetTransferBreakdownResponse) Status added in v0.2.5

Status returns HTTPResponse.Status

func (GetTransferBreakdownResponse) StatusCode added in v0.2.5

func (r GetTransferBreakdownResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTransferSummaryParams added in v0.2.5

type GetTransferSummaryParams struct {
	// Organization Organization/program scope filter.
	Organization *Organization `form:"organization,omitempty" json:"organization,omitempty"`

	// Project Project scope filter. Requires organization when set.
	Project              *Project              `form:"project,omitempty" json:"project,omitempty"`
	Direction            *Direction            `form:"direction,omitempty" json:"direction,omitempty"`
	ReconciliationStatus *ReconciliationStatus `form:"reconciliation_status,omitempty" json:"reconciliation_status,omitempty"`
	From                 *From                 `form:"from,omitempty" json:"from,omitempty"`
	To                   *To                   `form:"to,omitempty" json:"to,omitempty"`
	Provider             *Provider             `form:"provider,omitempty" json:"provider,omitempty"`
	Bucket               *Bucket               `form:"bucket,omitempty" json:"bucket,omitempty"`
	Sha256               *SHA256               `form:"sha256,omitempty" json:"sha256,omitempty"`

	// User Actor email or subject filter.
	User *User `form:"user,omitempty" json:"user,omitempty"`

	// AllowStale Deprecated. Transfer metrics always return persisted provider events with freshness metadata, including missing sync windows and latest completed sync time.
	AllowStale *AllowStale `form:"allow_stale,omitempty" json:"allow_stale,omitempty"`
}

GetTransferSummaryParams defines parameters for GetTransferSummary.

type GetTransferSummaryResponse added in v0.2.5

type GetTransferSummaryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TransferAttributionSummary
}

func ParseGetTransferSummaryResponse added in v0.2.5

func ParseGetTransferSummaryResponse(rsp *http.Response) (*GetTransferSummaryResponse, error)

ParseGetTransferSummaryResponse parses an HTTP response from a GetTransferSummaryWithResponse call

func (GetTransferSummaryResponse) Status added in v0.2.5

Status returns HTTPResponse.Status

func (GetTransferSummaryResponse) StatusCode added in v0.2.5

func (r GetTransferSummaryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListMetricsFilesParams

type ListMetricsFilesParams struct {
	Limit        *int `form:"limit,omitempty" json:"limit,omitempty"`
	Offset       *int `form:"offset,omitempty" json:"offset,omitempty"`
	InactiveDays *int `form:"inactive_days,omitempty" json:"inactive_days,omitempty"`

	// Organization Organization/program scope filter.
	Organization *Organization `form:"organization,omitempty" json:"organization,omitempty"`

	// Project Project scope filter. Requires organization when set.
	Project *Project `form:"project,omitempty" json:"project,omitempty"`
}

ListMetricsFilesParams defines parameters for ListMetricsFiles.

type ListMetricsFilesResponse

type ListMetricsFilesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *MetricsListResponse
}

func ParseListMetricsFilesResponse

func ParseListMetricsFilesResponse(rsp *http.Response) (*ListMetricsFilesResponse, error)

ParseListMetricsFilesResponse parses an HTTP response from a ListMetricsFilesWithResponse call

func (ListMetricsFilesResponse) Status

func (r ListMetricsFilesResponse) Status() string

Status returns HTTPResponse.Status

func (ListMetricsFilesResponse) StatusCode

func (r ListMetricsFilesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListProviderTransferSyncParams added in v0.2.5

type ListProviderTransferSyncParams struct {
	// Organization Organization/program scope filter.
	Organization *Organization `form:"organization,omitempty" json:"organization,omitempty"`

	// Project Project scope filter. Requires organization when set.
	Project  *Project  `form:"project,omitempty" json:"project,omitempty"`
	From     *From     `form:"from,omitempty" json:"from,omitempty"`
	To       *To       `form:"to,omitempty" json:"to,omitempty"`
	Provider *Provider `form:"provider,omitempty" json:"provider,omitempty"`
	Bucket   *Bucket   `form:"bucket,omitempty" json:"bucket,omitempty"`
	Limit    *int      `form:"limit,omitempty" json:"limit,omitempty"`
}

ListProviderTransferSyncParams defines parameters for ListProviderTransferSync.

type ListProviderTransferSyncResponse added in v0.2.5

type ListProviderTransferSyncResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ProviderTransferSyncResponse
}

func ParseListProviderTransferSyncResponse added in v0.2.5

func ParseListProviderTransferSyncResponse(rsp *http.Response) (*ListProviderTransferSyncResponse, error)

ParseListProviderTransferSyncResponse parses an HTTP response from a ListProviderTransferSyncWithResponse call

func (ListProviderTransferSyncResponse) Status added in v0.2.5

Status returns HTTPResponse.Status

func (ListProviderTransferSyncResponse) StatusCode added in v0.2.5

func (r ListProviderTransferSyncResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type MetricsListResponse

type MetricsListResponse struct {
	Data   *[]FileUsage `json:"data,omitempty"`
	Limit  *int         `json:"limit,omitempty"`
	Offset *int         `json:"offset,omitempty"`
}

MetricsListResponse defines model for MetricsListResponse.

type Organization added in v0.2.5

type Organization = string

Organization defines model for Organization.

type Project added in v0.2.5

type Project = string

Project defines model for Project.

type Provider added in v0.2.5

type Provider = string

Provider defines model for Provider.

type ProviderTransferDirection added in v0.2.5

type ProviderTransferDirection string

ProviderTransferDirection defines model for ProviderTransferDirection.

const (
	Download ProviderTransferDirection = "download"
	Upload   ProviderTransferDirection = "upload"
)

Defines values for ProviderTransferDirection.

type ProviderTransferEvent added in v0.2.5

type ProviderTransferEvent struct {
	AccessGrantId    *string                   `json:"access_grant_id,omitempty"`
	AccessId         *string                   `json:"access_id,omitempty"`
	ActorEmail       *string                   `json:"actor_email,omitempty"`
	ActorSubject     *string                   `json:"actor_subject,omitempty"`
	AuthMode         *string                   `json:"auth_mode,omitempty"`
	Bucket           string                    `json:"bucket"`
	BytesTransferred int64                     `json:"bytes_transferred"`
	Direction        ProviderTransferDirection `json:"direction"`
	EventTime        *time.Time                `json:"event_time,omitempty"`
	HttpMethod       *string                   `json:"http_method,omitempty"`
	HttpStatus       *int                      `json:"http_status,omitempty"`

	// ObjectId DRS object DID when known.
	ObjectId     *string `json:"object_id,omitempty"`
	ObjectKey    *string `json:"object_key,omitempty"`
	ObjectSize   *int64  `json:"object_size,omitempty"`
	Organization *string `json:"organization,omitempty"`
	Project      *string `json:"project,omitempty"`
	Provider     string  `json:"provider"`

	// ProviderEventId Provider/importer idempotency key.
	ProviderEventId      string                                `json:"provider_event_id"`
	ProviderRequestId    *string                               `json:"provider_request_id,omitempty"`
	RangeEnd             *int64                                `json:"range_end"`
	RangeStart           *int64                                `json:"range_start"`
	RawEventRef          *string                               `json:"raw_event_ref,omitempty"`
	ReconciliationStatus *ProviderTransferReconciliationStatus `json:"reconciliation_status,omitempty"`
	RequestId            *string                               `json:"request_id,omitempty"`
	RequesterPrincipal   *string                               `json:"requester_principal,omitempty"`
	Sha256               *string                               `json:"sha256,omitempty"`
	SourceIp             *string                               `json:"source_ip,omitempty"`
	StorageUrl           *string                               `json:"storage_url,omitempty"`
	UserAgent            *string                               `json:"user_agent,omitempty"`
}

ProviderTransferEvent defines model for ProviderTransferEvent.

type ProviderTransferEventsRequest added in v0.2.5

type ProviderTransferEventsRequest struct {
	Events []ProviderTransferEvent `json:"events"`
}

ProviderTransferEventsRequest defines model for ProviderTransferEventsRequest.

type ProviderTransferReconciliationStatus added in v0.2.5

type ProviderTransferReconciliationStatus string

ProviderTransferReconciliationStatus defines model for ProviderTransferReconciliationStatus.

Defines values for ProviderTransferReconciliationStatus.

type ProviderTransferSyncRequest added in v0.2.5

type ProviderTransferSyncRequest struct {
	AmbiguousEvents *int64 `json:"ambiguous_events,omitempty"`

	// Bucket Bucket filter. When omitted, all configured buckets are recorded.
	Bucket         *string   `json:"bucket,omitempty"`
	ErrorMessage   *string   `json:"error_message,omitempty"`
	From           time.Time `json:"from"`
	ImportedEvents *int64    `json:"imported_events,omitempty"`
	MatchedEvents  *int64    `json:"matched_events,omitempty"`
	Organization   *string   `json:"organization,omitempty"`
	Project        *string   `json:"project,omitempty"`

	// Provider Provider filter. When omitted, all configured buckets are recorded.
	Provider        *string                     `json:"provider,omitempty"`
	Status          *ProviderTransferSyncStatus `json:"status,omitempty"`
	To              time.Time                   `json:"to"`
	UnmatchedEvents *int64                      `json:"unmatched_events,omitempty"`
}

ProviderTransferSyncRequest defines model for ProviderTransferSyncRequest.

type ProviderTransferSyncResponse added in v0.2.5

type ProviderTransferSyncResponse struct {
	Recorded *int                       `json:"recorded,omitempty"`
	SyncRuns *[]ProviderTransferSyncRun `json:"sync_runs,omitempty"`
}

ProviderTransferSyncResponse defines model for ProviderTransferSyncResponse.

type ProviderTransferSyncRun added in v0.2.5

type ProviderTransferSyncRun struct {
	AmbiguousEvents *int64                      `json:"ambiguous_events,omitempty"`
	Bucket          *string                     `json:"bucket,omitempty"`
	CompletedAt     *time.Time                  `json:"completed_at"`
	ErrorMessage    *string                     `json:"error_message,omitempty"`
	From            *time.Time                  `json:"from,omitempty"`
	ImportedEvents  *int64                      `json:"imported_events,omitempty"`
	MatchedEvents   *int64                      `json:"matched_events,omitempty"`
	Organization    *string                     `json:"organization,omitempty"`
	Project         *string                     `json:"project,omitempty"`
	Provider        *string                     `json:"provider,omitempty"`
	RequestedAt     *time.Time                  `json:"requested_at,omitempty"`
	StartedAt       *time.Time                  `json:"started_at"`
	Status          *ProviderTransferSyncStatus `json:"status,omitempty"`
	SyncId          *string                     `json:"sync_id,omitempty"`
	To              *time.Time                  `json:"to,omitempty"`
	UnmatchedEvents *int64                      `json:"unmatched_events,omitempty"`
}

ProviderTransferSyncRun defines model for ProviderTransferSyncRun.

type ProviderTransferSyncStatus added in v0.2.5

type ProviderTransferSyncStatus string

ProviderTransferSyncStatus defines model for ProviderTransferSyncStatus.

const (
	Completed ProviderTransferSyncStatus = "completed"
	Failed    ProviderTransferSyncStatus = "failed"
	Pending   ProviderTransferSyncStatus = "pending"
)

Defines values for ProviderTransferSyncStatus.

type ReconciliationStatus added in v0.2.5

type ReconciliationStatus = ProviderTransferReconciliationStatus

ReconciliationStatus defines model for ReconciliationStatus.

type RecordProviderTransferEventsJSONRequestBody added in v0.2.5

type RecordProviderTransferEventsJSONRequestBody = ProviderTransferEventsRequest

RecordProviderTransferEventsJSONRequestBody defines body for RecordProviderTransferEvents for application/json ContentType.

type RecordProviderTransferEventsParams added in v0.2.5

type RecordProviderTransferEventsParams struct {
	// Organization Organization/program scope filter.
	Organization *Organization `form:"organization,omitempty" json:"organization,omitempty"`

	// Project Project scope filter. Requires organization when set.
	Project *Project `form:"project,omitempty" json:"project,omitempty"`
}

RecordProviderTransferEventsParams defines parameters for RecordProviderTransferEvents.

type RecordProviderTransferEventsResponse added in v0.2.5

type RecordProviderTransferEventsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *TransferEventsRecordedResponse
}

func ParseRecordProviderTransferEventsResponse added in v0.2.5

func ParseRecordProviderTransferEventsResponse(rsp *http.Response) (*RecordProviderTransferEventsResponse, error)

ParseRecordProviderTransferEventsResponse parses an HTTP response from a RecordProviderTransferEventsWithResponse call

func (RecordProviderTransferEventsResponse) Status added in v0.2.5

Status returns HTTPResponse.Status

func (RecordProviderTransferEventsResponse) StatusCode added in v0.2.5

StatusCode returns HTTPResponse.StatusCode

type RecordProviderTransferSyncJSONRequestBody added in v0.2.5

type RecordProviderTransferSyncJSONRequestBody = ProviderTransferSyncRequest

RecordProviderTransferSyncJSONRequestBody defines body for RecordProviderTransferSync for application/json ContentType.

type RecordProviderTransferSyncResponse added in v0.2.5

type RecordProviderTransferSyncResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *ProviderTransferSyncResponse
}

func ParseRecordProviderTransferSyncResponse added in v0.2.5

func ParseRecordProviderTransferSyncResponse(rsp *http.Response) (*RecordProviderTransferSyncResponse, error)

ParseRecordProviderTransferSyncResponse parses an HTTP response from a RecordProviderTransferSyncWithResponse call

func (RecordProviderTransferSyncResponse) Status added in v0.2.5

Status returns HTTPResponse.Status

func (RecordProviderTransferSyncResponse) StatusCode added in v0.2.5

func (r RecordProviderTransferSyncResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type SHA256 added in v0.2.5

type SHA256 = string

SHA256 defines model for SHA256.

type To added in v0.2.5

type To = time.Time

To defines model for To.

type TransferAttributionBreakdown added in v0.2.5

type TransferAttributionBreakdown struct {
	ActorEmail       *string    `json:"actor_email,omitempty"`
	ActorSubject     *string    `json:"actor_subject,omitempty"`
	Bucket           *string    `json:"bucket,omitempty"`
	BytesDownloaded  *int64     `json:"bytes_downloaded,omitempty"`
	BytesRequested   *int64     `json:"bytes_requested,omitempty"`
	BytesUploaded    *int64     `json:"bytes_uploaded,omitempty"`
	EventCount       *int64     `json:"event_count,omitempty"`
	Key              *string    `json:"key,omitempty"`
	LastTransferTime *time.Time `json:"last_transfer_time"`
	Organization     *string    `json:"organization,omitempty"`
	Project          *string    `json:"project,omitempty"`
	Provider         *string    `json:"provider,omitempty"`
	Sha256           *string    `json:"sha256,omitempty"`
}

TransferAttributionBreakdown defines model for TransferAttributionBreakdown.

type TransferAttributionSummary added in v0.2.5

type TransferAttributionSummary struct {
	AccessIssuedCount  *int64                    `json:"access_issued_count,omitempty"`
	BytesDownloaded    *int64                    `json:"bytes_downloaded,omitempty"`
	BytesRequested     *int64                    `json:"bytes_requested,omitempty"`
	BytesUploaded      *int64                    `json:"bytes_uploaded,omitempty"`
	DownloadEventCount *int64                    `json:"download_event_count,omitempty"`
	EventCount         *int64                    `json:"event_count,omitempty"`
	Freshness          *TransferMetricsFreshness `json:"freshness,omitempty"`
	UploadEventCount   *int64                    `json:"upload_event_count,omitempty"`
}

TransferAttributionSummary defines model for TransferAttributionSummary.

type TransferBreakdownResponse added in v0.2.5

type TransferBreakdownResponse struct {
	Data      *[]TransferAttributionBreakdown   `json:"data,omitempty"`
	Freshness *TransferMetricsFreshness         `json:"freshness,omitempty"`
	GroupBy   *TransferBreakdownResponseGroupBy `json:"group_by,omitempty"`
}

TransferBreakdownResponse defines model for TransferBreakdownResponse.

type TransferBreakdownResponseGroupBy added in v0.2.5

type TransferBreakdownResponseGroupBy string

TransferBreakdownResponseGroupBy defines model for TransferBreakdownResponse.GroupBy.

const (
	TransferBreakdownResponseGroupByObject   TransferBreakdownResponseGroupBy = "object"
	TransferBreakdownResponseGroupByProvider TransferBreakdownResponseGroupBy = "provider"
	TransferBreakdownResponseGroupByScope    TransferBreakdownResponseGroupBy = "scope"
	TransferBreakdownResponseGroupByUser     TransferBreakdownResponseGroupBy = "user"
)

Defines values for TransferBreakdownResponseGroupBy.

type TransferEventsRecordedResponse added in v0.2.5

type TransferEventsRecordedResponse struct {
	Recorded *int `json:"recorded,omitempty"`
}

TransferEventsRecordedResponse defines model for TransferEventsRecordedResponse.

type TransferMetricsFreshness added in v0.2.5

type TransferMetricsFreshness struct {
	IsStale             *bool      `json:"is_stale,omitempty"`
	LatestCompletedSync *time.Time `json:"latest_completed_sync"`
	MissingBuckets      *[]string  `json:"missing_buckets,omitempty"`
	RequiredFrom        *time.Time `json:"required_from"`
	RequiredTo          *time.Time `json:"required_to"`
}

TransferMetricsFreshness defines model for TransferMetricsFreshness.

type User added in v0.2.5

type User = string

User defines model for User.

Jump to

Keyboard shortcuts

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