auditlogs

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewListAuditLogsRequest

func NewListAuditLogsRequest(server string, params *ListAuditLogsParams) (*http.Request, error)

NewListAuditLogsRequest constructs an http.Request for the ListAuditLogs method

Types

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) ListAuditLogs

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

ListAuditLogs List audit logs

Returns the account's audit trail, newest first, cursor-paginated; an omitted `limit` defaults to 200. Each entry records who acted (`actorId`, `email`), what they did (`action`), to which resource (`resourceType`, `resourceId`), and the details of the change (`value`). When the caller belongs to an organization the trail is the organization's, and `actorIds` narrows it to specific members; otherwise it is the trail of the account the request acts for. Filters combine with AND. Entries older than the account's audit log retention window are not returned, and an account whose plan does not include audit logs is answered 403. Follow `pagination.nextCursor` until `hasNextPage` is false.

Corresponds with GET /v2/audit-logs (the `ListAuditLogs` operationId).

type ClientInterface

type ClientInterface interface {

	// ListAuditLogs List audit logs
	//
	// Returns the account's audit trail, newest first, cursor-paginated; an omitted `limit` defaults to 200. Each entry records who acted (`actorId`, `email`), what they did (`action`), to which resource (`resourceType`, `resourceId`), and the details of the change (`value`). When the caller belongs to an organization the trail is the organization's, and `actorIds` narrows it to specific members; otherwise it is the trail of the account the request acts for. Filters combine with AND. Entries older than the account's audit log retention window are not returned, and an account whose plan does not include audit logs is answered 403. Follow `pagination.nextCursor` until `hasNextPage` is false.
	//
	// Corresponds with GET /v2/audit-logs (the `ListAuditLogs` operationId).
	ListAuditLogs(ctx context.Context, params *ListAuditLogsParams, 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) ListAuditLogsWithResponse

func (c *ClientWithResponses) ListAuditLogsWithResponse(ctx context.Context, params *ListAuditLogsParams, reqEditors ...RequestEditorFn) (*ListAuditLogsResult, error)

ListAuditLogsWithResponse List audit logs

Returns the account's audit trail, newest first, cursor-paginated; an omitted `limit` defaults to 200. Each entry records who acted (`actorId`, `email`), what they did (`action`), to which resource (`resourceType`, `resourceId`), and the details of the change (`value`). When the caller belongs to an organization the trail is the organization's, and `actorIds` narrows it to specific members; otherwise it is the trail of the account the request acts for. Filters combine with AND. Entries older than the account's audit log retention window are not returned, and an account whose plan does not include audit logs is answered 403. Follow `pagination.nextCursor` until `hasNextPage` is false.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /v2/audit-logs (the `ListAuditLogs` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// ListAuditLogsWithResponse List audit logs
	//
	// Returns the account's audit trail, newest first, cursor-paginated; an omitted `limit` defaults to 200. Each entry records who acted (`actorId`, `email`), what they did (`action`), to which resource (`resourceType`, `resourceId`), and the details of the change (`value`). When the caller belongs to an organization the trail is the organization's, and `actorIds` narrows it to specific members; otherwise it is the trail of the account the request acts for. Filters combine with AND. Entries older than the account's audit log retention window are not returned, and an account whose plan does not include audit logs is answered 403. Follow `pagination.nextCursor` until `hasNextPage` is false.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /v2/audit-logs (the `ListAuditLogs` operationId).
	ListAuditLogsWithResponse(ctx context.Context, params *ListAuditLogsParams, reqEditors ...RequestEditorFn) (*ListAuditLogsResult, error)
}

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

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListAuditLogsParams

type ListAuditLogsParams struct {
	// ActorIds Only return entries performed by these users. Comma-separated user IDs. Available to organization accounts only; a personal or team account is answered 400.
	ActorIds *externalRef0.AuditLogActorIdsFilter `form:"actorIds,omitempty" json:"actorIds,omitempty"`

	// Actions Only return entries whose `action` is one of these names, matched exactly as recorded. Comma-separated.
	Actions *externalRef0.AuditLogActionsFilter `form:"actions,omitempty" json:"actions,omitempty"`

	// StartTime Earliest instant to include, inclusive (RFC 3339). The account's audit log retention window still applies: entries that have aged out are not returned even when this reaches further back.
	StartTime *externalRef0.AuditLogStartTime `form:"startTime,omitempty" json:"startTime,omitempty"`

	// EndTime Latest instant to include, inclusive (RFC 3339). Must be after `startTime` when both are given; 400 otherwise.
	EndTime *externalRef0.AuditLogEndTime `form:"endTime,omitempty" json:"endTime,omitempty"`

	// Search Case-insensitive substring match against `email`, `resourceType`, `resourceId`, `action` and `value`; `actorId` is not searched. Surrounding whitespace is ignored.
	Search *externalRef0.AuditLogSearch `form:"search,omitempty" json:"search,omitempty"`

	// Cursor Opaque resume cursor — pass the previous response's `pagination.nextCursor` through verbatim; omit for the first page. A cursor is only valid for the operation and parameters that issued it; a malformed or foreign cursor is rejected with 422.
	Cursor *externalRef0.PaginationCursor `form:"cursor,omitempty" json:"cursor,omitempty"`

	// Limit Page size, 1–200. Defaults to 200 when omitted.
	Limit *externalRef0.PaginationLimitAuditLogs `form:"limit,omitempty" json:"limit,omitempty"`
}

ListAuditLogsParams defines parameters for ListAuditLogs.

type ListAuditLogsResult

type ListAuditLogsResult struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *externalRef0.ListAuditLogsResponse
	// ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response
	ApplicationproblemJSON400 *externalRef0.ErrorResponse
	// ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response
	ApplicationproblemJSON401 *externalRef0.ErrorResponse
	// ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response
	ApplicationproblemJSON403 *externalRef0.ErrorResponse
	// ApplicationproblemJSON413 the response for an HTTP 413 `application/problem+json` response
	ApplicationproblemJSON413 *externalRef0.ErrorResponse
	// ApplicationproblemJSON422 the response for an HTTP 422 `application/problem+json` response
	ApplicationproblemJSON422 *externalRef0.ErrorResponse
	// ApplicationproblemJSON429 the response for an HTTP 429 `application/problem+json` response
	ApplicationproblemJSON429 *externalRef0.ErrorResponse
	// ApplicationproblemJSONDefault the response for an HTTP default `application/problem+json` response
	ApplicationproblemJSONDefault *externalRef0.ErrorResponse
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *ListAuditLogsResult200Headers
	// Headers400 the parsed response headers for an HTTP 400 response
	Headers400 *ListAuditLogsResult400Headers
	// Headers403 the parsed response headers for an HTTP 403 response
	Headers403 *ListAuditLogsResult403Headers
	// Headers413 the parsed response headers for an HTTP 413 response
	Headers413 *ListAuditLogsResult413Headers
	// Headers422 the parsed response headers for an HTTP 422 response
	Headers422 *ListAuditLogsResult422Headers
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *ListAuditLogsResult429Headers
	// HeadersDefault the parsed response headers for an HTTP default response
	HeadersDefault *ListAuditLogsResultDefaultHeaders
}

func ParseListAuditLogsResult

func ParseListAuditLogsResult(rsp *http.Response) (*ListAuditLogsResult, error)

ParseListAuditLogsResult parses an HTTP response from a ListAuditLogsWithResponse call

func (ListAuditLogsResult) ContentType

func (r ListAuditLogsResult) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListAuditLogsResult) GetApplicationproblemJSON400

func (r ListAuditLogsResult) GetApplicationproblemJSON400() *externalRef0.ErrorResponse

GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response

func (ListAuditLogsResult) GetApplicationproblemJSON401

func (r ListAuditLogsResult) GetApplicationproblemJSON401() *externalRef0.ErrorResponse

GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response

func (ListAuditLogsResult) GetApplicationproblemJSON403

func (r ListAuditLogsResult) GetApplicationproblemJSON403() *externalRef0.ErrorResponse

GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response

func (ListAuditLogsResult) GetApplicationproblemJSON413

func (r ListAuditLogsResult) GetApplicationproblemJSON413() *externalRef0.ErrorResponse

GetApplicationproblemJSON413 returns the response for an HTTP 413 `application/problem+json` response

func (ListAuditLogsResult) GetApplicationproblemJSON422

func (r ListAuditLogsResult) GetApplicationproblemJSON422() *externalRef0.ErrorResponse

GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response

func (ListAuditLogsResult) GetApplicationproblemJSON429

func (r ListAuditLogsResult) GetApplicationproblemJSON429() *externalRef0.ErrorResponse

GetApplicationproblemJSON429 returns the response for an HTTP 429 `application/problem+json` response

func (ListAuditLogsResult) GetApplicationproblemJSONDefault

func (r ListAuditLogsResult) GetApplicationproblemJSONDefault() *externalRef0.ErrorResponse

GetApplicationproblemJSONDefault returns the response for an HTTP default `application/problem+json` response

func (ListAuditLogsResult) GetBody

func (r ListAuditLogsResult) GetBody() []byte

GetBody returns the raw response body bytes

func (ListAuditLogsResult) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListAuditLogsResult) Status

func (r ListAuditLogsResult) Status() string

Status returns HTTPResponse.Status

func (ListAuditLogsResult) StatusCode

func (r ListAuditLogsResult) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListAuditLogsResult200Headers

type ListAuditLogsResult200Headers struct {
	RateLimit       *externalRef0.RateLimitHeader
	RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}

ListAuditLogsResult200Headers the declared response headers of an HTTP 200 response for ListAuditLogs

type ListAuditLogsResult400Headers

type ListAuditLogsResult400Headers struct {
	RateLimit       *externalRef0.RateLimitHeader
	RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}

ListAuditLogsResult400Headers the declared response headers of an HTTP 400 response for ListAuditLogs

type ListAuditLogsResult403Headers

type ListAuditLogsResult403Headers struct {
	RateLimit       *externalRef0.RateLimitHeader
	RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}

ListAuditLogsResult403Headers the declared response headers of an HTTP 403 response for ListAuditLogs

type ListAuditLogsResult413Headers

type ListAuditLogsResult413Headers struct {
	RateLimit       *externalRef0.RateLimitHeader
	RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}

ListAuditLogsResult413Headers the declared response headers of an HTTP 413 response for ListAuditLogs

type ListAuditLogsResult422Headers

type ListAuditLogsResult422Headers struct {
	RateLimit       *externalRef0.RateLimitHeader
	RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}

ListAuditLogsResult422Headers the declared response headers of an HTTP 422 response for ListAuditLogs

type ListAuditLogsResult429Headers

type ListAuditLogsResult429Headers struct {
	RateLimit       *externalRef0.RateLimitHeader
	RateLimitPolicy *externalRef0.RateLimitPolicyHeader
	RetryAfter      *int
}

ListAuditLogsResult429Headers the declared response headers of an HTTP 429 response for ListAuditLogs

type ListAuditLogsResultDefaultHeaders

type ListAuditLogsResultDefaultHeaders struct {
	RateLimit       *externalRef0.RateLimitHeader
	RateLimitPolicy *externalRef0.RateLimitPolicyHeader
}

ListAuditLogsResultDefaultHeaders the declared response headers of an HTTP default response for ListAuditLogs

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

Jump to

Keyboard shortcuts

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