logs

package
v2.0.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlCmbConfigDeleteParams

type ControlCmbConfigDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type ControlCmbConfigDeleteResponse added in v2.1.0

type ControlCmbConfigDeleteResponse interface {
	ImplementsLogsControlCmbConfigDeleteResponse()
}

Union satisfied by logs.ControlCmbConfigDeleteResponseUnknown, logs.ControlCmbConfigDeleteResponseArray or shared.UnionString.

type ControlCmbConfigDeleteResponseArray

type ControlCmbConfigDeleteResponseArray []interface{}

func (ControlCmbConfigDeleteResponseArray) ImplementsLogsControlCmbConfigDeleteResponse

func (r ControlCmbConfigDeleteResponseArray) ImplementsLogsControlCmbConfigDeleteResponse()

type ControlCmbConfigDeleteResponseEnvelope

type ControlCmbConfigDeleteResponseEnvelope struct {
	Errors   []ControlCmbConfigDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ControlCmbConfigDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   ControlCmbConfigDeleteResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ControlCmbConfigDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    controlCmbConfigDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*ControlCmbConfigDeleteResponseEnvelope) UnmarshalJSON

func (r *ControlCmbConfigDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigDeleteResponseEnvelopeErrors

type ControlCmbConfigDeleteResponseEnvelopeErrors struct {
	Code    int64                                            `json:"code,required"`
	Message string                                           `json:"message,required"`
	JSON    controlCmbConfigDeleteResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ControlCmbConfigDeleteResponseEnvelopeErrors) UnmarshalJSON

func (r *ControlCmbConfigDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigDeleteResponseEnvelopeMessages

type ControlCmbConfigDeleteResponseEnvelopeMessages struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    controlCmbConfigDeleteResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ControlCmbConfigDeleteResponseEnvelopeMessages) UnmarshalJSON

func (r *ControlCmbConfigDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigDeleteResponseEnvelopeSuccess

type ControlCmbConfigDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ControlCmbConfigDeleteResponseEnvelopeSuccessTrue ControlCmbConfigDeleteResponseEnvelopeSuccess = true
)

func (ControlCmbConfigDeleteResponseEnvelopeSuccess) IsKnown

type ControlCmbConfigGetParams

type ControlCmbConfigGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type ControlCmbConfigGetResponseEnvelope

type ControlCmbConfigGetResponseEnvelope struct {
	Errors   []ControlCmbConfigGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ControlCmbConfigGetResponseEnvelopeMessages `json:"messages,required"`
	Result   LogcontrolCmbConfig                           `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ControlCmbConfigGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    controlCmbConfigGetResponseEnvelopeJSON    `json:"-"`
}

func (*ControlCmbConfigGetResponseEnvelope) UnmarshalJSON

func (r *ControlCmbConfigGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigGetResponseEnvelopeErrors

type ControlCmbConfigGetResponseEnvelopeErrors struct {
	Code    int64                                         `json:"code,required"`
	Message string                                        `json:"message,required"`
	JSON    controlCmbConfigGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ControlCmbConfigGetResponseEnvelopeErrors) UnmarshalJSON

func (r *ControlCmbConfigGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigGetResponseEnvelopeMessages

type ControlCmbConfigGetResponseEnvelopeMessages struct {
	Code    int64                                           `json:"code,required"`
	Message string                                          `json:"message,required"`
	JSON    controlCmbConfigGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ControlCmbConfigGetResponseEnvelopeMessages) UnmarshalJSON

func (r *ControlCmbConfigGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigGetResponseEnvelopeSuccess

type ControlCmbConfigGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ControlCmbConfigGetResponseEnvelopeSuccessTrue ControlCmbConfigGetResponseEnvelopeSuccess = true
)

func (ControlCmbConfigGetResponseEnvelopeSuccess) IsKnown

type ControlCmbConfigNewParams

type ControlCmbConfigNewParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Comma-separated list of regions.
	Regions param.Field[string] `json:"regions"`
}

func (ControlCmbConfigNewParams) MarshalJSON

func (r ControlCmbConfigNewParams) MarshalJSON() (data []byte, err error)

type ControlCmbConfigNewResponseEnvelope

type ControlCmbConfigNewResponseEnvelope struct {
	Errors   []ControlCmbConfigNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ControlCmbConfigNewResponseEnvelopeMessages `json:"messages,required"`
	Result   LogcontrolCmbConfig                           `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ControlCmbConfigNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    controlCmbConfigNewResponseEnvelopeJSON    `json:"-"`
}

func (*ControlCmbConfigNewResponseEnvelope) UnmarshalJSON

func (r *ControlCmbConfigNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigNewResponseEnvelopeErrors

type ControlCmbConfigNewResponseEnvelopeErrors struct {
	Code    int64                                         `json:"code,required"`
	Message string                                        `json:"message,required"`
	JSON    controlCmbConfigNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ControlCmbConfigNewResponseEnvelopeErrors) UnmarshalJSON

func (r *ControlCmbConfigNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigNewResponseEnvelopeMessages

type ControlCmbConfigNewResponseEnvelopeMessages struct {
	Code    int64                                           `json:"code,required"`
	Message string                                          `json:"message,required"`
	JSON    controlCmbConfigNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ControlCmbConfigNewResponseEnvelopeMessages) UnmarshalJSON

func (r *ControlCmbConfigNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type ControlCmbConfigNewResponseEnvelopeSuccess

type ControlCmbConfigNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ControlCmbConfigNewResponseEnvelopeSuccessTrue ControlCmbConfigNewResponseEnvelopeSuccess = true
)

func (ControlCmbConfigNewResponseEnvelopeSuccess) IsKnown

type ControlCmbConfigService

type ControlCmbConfigService struct {
	Options []option.RequestOption
}

ControlCmbConfigService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewControlCmbConfigService method instead.

func NewControlCmbConfigService

func NewControlCmbConfigService(opts ...option.RequestOption) (r *ControlCmbConfigService)

NewControlCmbConfigService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ControlCmbConfigService) Delete

Deletes CMB config.

func (*ControlCmbConfigService) Get

Gets CMB config.

func (*ControlCmbConfigService) New

Updates CMB config.

type ControlCmbService

type ControlCmbService struct {
	Options []option.RequestOption
	Config  *ControlCmbConfigService
}

ControlCmbService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewControlCmbService method instead.

func NewControlCmbService

func NewControlCmbService(opts ...option.RequestOption) (r *ControlCmbService)

NewControlCmbService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type ControlRetentionFlagGetResponse

type ControlRetentionFlagGetResponse struct {
	Flag bool                                `json:"flag"`
	JSON controlRetentionFlagGetResponseJSON `json:"-"`
}

func (*ControlRetentionFlagGetResponse) UnmarshalJSON

func (r *ControlRetentionFlagGetResponse) UnmarshalJSON(data []byte) (err error)

type ControlRetentionFlagGetResponseEnvelope

type ControlRetentionFlagGetResponseEnvelope struct {
	Errors   []ControlRetentionFlagGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ControlRetentionFlagGetResponseEnvelopeMessages `json:"messages,required"`
	Result   ControlRetentionFlagGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ControlRetentionFlagGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    controlRetentionFlagGetResponseEnvelopeJSON    `json:"-"`
}

func (*ControlRetentionFlagGetResponseEnvelope) UnmarshalJSON

func (r *ControlRetentionFlagGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type ControlRetentionFlagGetResponseEnvelopeErrors

type ControlRetentionFlagGetResponseEnvelopeErrors struct {
	Code    int64                                             `json:"code,required"`
	Message string                                            `json:"message,required"`
	JSON    controlRetentionFlagGetResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ControlRetentionFlagGetResponseEnvelopeErrors) UnmarshalJSON

func (r *ControlRetentionFlagGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type ControlRetentionFlagGetResponseEnvelopeMessages

type ControlRetentionFlagGetResponseEnvelopeMessages struct {
	Code    int64                                               `json:"code,required"`
	Message string                                              `json:"message,required"`
	JSON    controlRetentionFlagGetResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ControlRetentionFlagGetResponseEnvelopeMessages) UnmarshalJSON

func (r *ControlRetentionFlagGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type ControlRetentionFlagGetResponseEnvelopeSuccess

type ControlRetentionFlagGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ControlRetentionFlagGetResponseEnvelopeSuccessTrue ControlRetentionFlagGetResponseEnvelopeSuccess = true
)

func (ControlRetentionFlagGetResponseEnvelopeSuccess) IsKnown

type ControlRetentionFlagNewParams

type ControlRetentionFlagNewParams struct {
	// The log retention flag for Logpull API.
	Flag param.Field[bool] `json:"flag,required"`
}

func (ControlRetentionFlagNewParams) MarshalJSON

func (r ControlRetentionFlagNewParams) MarshalJSON() (data []byte, err error)

type ControlRetentionFlagNewResponse

type ControlRetentionFlagNewResponse struct {
	Flag bool                                `json:"flag"`
	JSON controlRetentionFlagNewResponseJSON `json:"-"`
}

func (*ControlRetentionFlagNewResponse) UnmarshalJSON

func (r *ControlRetentionFlagNewResponse) UnmarshalJSON(data []byte) (err error)

type ControlRetentionFlagNewResponseEnvelope

type ControlRetentionFlagNewResponseEnvelope struct {
	Errors   []ControlRetentionFlagNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ControlRetentionFlagNewResponseEnvelopeMessages `json:"messages,required"`
	Result   ControlRetentionFlagNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ControlRetentionFlagNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    controlRetentionFlagNewResponseEnvelopeJSON    `json:"-"`
}

func (*ControlRetentionFlagNewResponseEnvelope) UnmarshalJSON

func (r *ControlRetentionFlagNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type ControlRetentionFlagNewResponseEnvelopeErrors

type ControlRetentionFlagNewResponseEnvelopeErrors struct {
	Code    int64                                             `json:"code,required"`
	Message string                                            `json:"message,required"`
	JSON    controlRetentionFlagNewResponseEnvelopeErrorsJSON `json:"-"`
}

func (*ControlRetentionFlagNewResponseEnvelopeErrors) UnmarshalJSON

func (r *ControlRetentionFlagNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type ControlRetentionFlagNewResponseEnvelopeMessages

type ControlRetentionFlagNewResponseEnvelopeMessages struct {
	Code    int64                                               `json:"code,required"`
	Message string                                              `json:"message,required"`
	JSON    controlRetentionFlagNewResponseEnvelopeMessagesJSON `json:"-"`
}

func (*ControlRetentionFlagNewResponseEnvelopeMessages) UnmarshalJSON

func (r *ControlRetentionFlagNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type ControlRetentionFlagNewResponseEnvelopeSuccess

type ControlRetentionFlagNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ControlRetentionFlagNewResponseEnvelopeSuccessTrue ControlRetentionFlagNewResponseEnvelopeSuccess = true
)

func (ControlRetentionFlagNewResponseEnvelopeSuccess) IsKnown

type ControlRetentionFlagService

type ControlRetentionFlagService struct {
	Options []option.RequestOption
}

ControlRetentionFlagService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewControlRetentionFlagService method instead.

func NewControlRetentionFlagService

func NewControlRetentionFlagService(opts ...option.RequestOption) (r *ControlRetentionFlagService)

NewControlRetentionFlagService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ControlRetentionFlagService) Get

Gets log retention flag for Logpull API.

func (*ControlRetentionFlagService) New

Updates log retention flag for Logpull API.

type ControlRetentionService

type ControlRetentionService struct {
	Options []option.RequestOption
	Flag    *ControlRetentionFlagService
}

ControlRetentionService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewControlRetentionService method instead.

func NewControlRetentionService

func NewControlRetentionService(opts ...option.RequestOption) (r *ControlRetentionService)

NewControlRetentionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type ControlService

type ControlService struct {
	Options   []option.RequestOption
	Retention *ControlRetentionService
	Cmb       *ControlCmbService
}

ControlService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewControlService method instead.

func NewControlService

func NewControlService(opts ...option.RequestOption) (r *ControlService)

NewControlService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Error

type Error = apierror.Error

type LogService

type LogService struct {
	Options  []option.RequestOption
	Control  *ControlService
	Rayid    *RayidService
	Received *ReceivedService
}

LogService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLogService method instead.

func NewLogService

func NewLogService(opts ...option.RequestOption) (r *LogService)

NewLogService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type LogcontrolCmbConfig

type LogcontrolCmbConfig struct {
	// Comma-separated list of regions.
	Regions string                  `json:"regions"`
	JSON    logcontrolCmbConfigJSON `json:"-"`
}

func (*LogcontrolCmbConfig) UnmarshalJSON

func (r *LogcontrolCmbConfig) UnmarshalJSON(data []byte) (err error)

type RayidGetParams

type RayidGetParams struct {
	// The `/received` route by default returns a limited set of fields, and allows
	// customers to override the default field set by specifying individual fields. The
	// reasons for this are: 1. Most customers require only a small subset of fields,
	// but that subset varies from customer to customer; 2. Flat schema is much easier
	// to work with downstream (importing into BigTable etc); 3. Performance (time to
	// process, file size). If `?fields=` is not specified, default field set is
	// returned. This default field set may change at any time. When `?fields=` is
	// provided, each record is returned with the specified fields. `fields` must be
	// specified as a comma separated list without any whitespaces, and all fields must
	// exist. The order in which fields are specified does not matter, and the order of
	// fields in the response is not specified.
	Fields param.Field[string] `query:"fields"`
	// By default, timestamps in responses are returned as Unix nanosecond integers.
	// The `?timestamps=` argument can be set to change the format in which response
	// timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`.
	// Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns
	// timestamps as strings.
	Timestamps param.Field[RayidGetParamsTimestamps] `query:"timestamps"`
}

func (RayidGetParams) URLQuery

func (r RayidGetParams) URLQuery() (v url.Values)

URLQuery serializes RayidGetParams's query parameters as `url.Values`.

type RayidGetParamsTimestamps

type RayidGetParamsTimestamps string

By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.

const (
	RayidGetParamsTimestampsUnix     RayidGetParamsTimestamps = "unix"
	RayidGetParamsTimestampsUnixnano RayidGetParamsTimestamps = "unixnano"
	RayidGetParamsTimestampsRfc3339  RayidGetParamsTimestamps = "rfc3339"
)

func (RayidGetParamsTimestamps) IsKnown

func (r RayidGetParamsTimestamps) IsKnown() bool

type RayidGetResponse

type RayidGetResponse interface {
	ImplementsLogsRayidGetResponse()
}

Union satisfied by shared.UnionString or logs.RayidGetResponseUnknown.

type RayidService

type RayidService struct {
	Options []option.RequestOption
}

RayidService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRayidService method instead.

func NewRayidService

func NewRayidService(opts ...option.RequestOption) (r *RayidService)

NewRayidService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RayidService) Get

func (r *RayidService) Get(ctx context.Context, zoneIdentifier string, rayIdentifier string, query RayidGetParams, opts ...option.RequestOption) (res *RayidGetResponse, err error)

The `/rayids` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique).

type ReceivedFieldGetResponse

type ReceivedFieldGetResponse struct {
	Key  string                       `json:"key"`
	JSON receivedFieldGetResponseJSON `json:"-"`
}

func (*ReceivedFieldGetResponse) UnmarshalJSON

func (r *ReceivedFieldGetResponse) UnmarshalJSON(data []byte) (err error)

type ReceivedFieldService

type ReceivedFieldService struct {
	Options []option.RequestOption
}

ReceivedFieldService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewReceivedFieldService method instead.

func NewReceivedFieldService

func NewReceivedFieldService(opts ...option.RequestOption) (r *ReceivedFieldService)

NewReceivedFieldService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ReceivedFieldService) Get

func (r *ReceivedFieldService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ReceivedFieldGetResponse, err error)

Lists all fields available. The response is json object with key-value pairs, where keys are field names, and values are descriptions.

type ReceivedGetParams

type ReceivedGetParams struct {
	// Sets the (exclusive) end of the requested time frame. This can be a unix
	// timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to
	// RFC 3339. `end` must be at least five minutes earlier than now and must be later
	// than `start`. Difference between `start` and `end` must be not greater than one
	// hour.
	End param.Field[ReceivedGetParamsEnd] `query:"end,required"`
	// When `?count=` is provided, the response will contain up to `count` results.
	// Since results are not sorted, you are likely to get different data for repeated
	// requests. `count` must be an integer > 0.
	Count param.Field[int64] `query:"count"`
	// The `/received` route by default returns a limited set of fields, and allows
	// customers to override the default field set by specifying individual fields. The
	// reasons for this are: 1. Most customers require only a small subset of fields,
	// but that subset varies from customer to customer; 2. Flat schema is much easier
	// to work with downstream (importing into BigTable etc); 3. Performance (time to
	// process, file size). If `?fields=` is not specified, default field set is
	// returned. This default field set may change at any time. When `?fields=` is
	// provided, each record is returned with the specified fields. `fields` must be
	// specified as a comma separated list without any whitespaces, and all fields must
	// exist. The order in which fields are specified does not matter, and the order of
	// fields in the response is not specified.
	Fields param.Field[string] `query:"fields"`
	// When `?sample=` is provided, a sample of matching records is returned. If
	// `sample=0.1` then 10% of records will be returned. Sampling is random: repeated
	// calls will not only return different records, but likely will also vary slightly
	// in number of returned records. When `?count=` is also specified, `count` is
	// applied to the number of returned records, not the sampled records. So, with
	// `sample=0.05` and `count=7`, when there is a total of 100 records available,
	// approximately five will be returned. When there are 1000 records, seven will be
	// returned. When there are 10,000 records, seven will be returned.
	Sample param.Field[float64] `query:"sample"`
	// Sets the (inclusive) beginning of the requested time frame. This can be a unix
	// timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to
	// RFC 3339. At this point in time, it cannot exceed a time in the past greater
	// than seven days.
	Start param.Field[ReceivedGetParamsStart] `query:"start"`
	// By default, timestamps in responses are returned as Unix nanosecond integers.
	// The `?timestamps=` argument can be set to change the format in which response
	// timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`.
	// Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns
	// timestamps as strings.
	Timestamps param.Field[ReceivedGetParamsTimestamps] `query:"timestamps"`
}

func (ReceivedGetParams) URLQuery

func (r ReceivedGetParams) URLQuery() (v url.Values)

URLQuery serializes ReceivedGetParams's query parameters as `url.Values`.

type ReceivedGetParamsEnd

type ReceivedGetParamsEnd interface {
	ImplementsLogsReceivedGetParamsEnd()
}

Sets the (exclusive) end of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. `end` must be at least five minutes earlier than now and must be later than `start`. Difference between `start` and `end` must be not greater than one hour.

Satisfied by shared.UnionString, shared.UnionInt.

type ReceivedGetParamsStart

type ReceivedGetParamsStart interface {
	ImplementsLogsReceivedGetParamsStart()
}

Sets the (inclusive) beginning of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than seven days.

Satisfied by shared.UnionString, shared.UnionInt.

type ReceivedGetParamsTimestamps

type ReceivedGetParamsTimestamps string

By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.

const (
	ReceivedGetParamsTimestampsUnix     ReceivedGetParamsTimestamps = "unix"
	ReceivedGetParamsTimestampsUnixnano ReceivedGetParamsTimestamps = "unixnano"
	ReceivedGetParamsTimestampsRfc3339  ReceivedGetParamsTimestamps = "rfc3339"
)

func (ReceivedGetParamsTimestamps) IsKnown

func (r ReceivedGetParamsTimestamps) IsKnown() bool

type ReceivedGetResponse

type ReceivedGetResponse interface {
	ImplementsLogsReceivedGetResponse()
}

Union satisfied by shared.UnionString or logs.ReceivedGetResponseUnknown.

type ReceivedService

type ReceivedService struct {
	Options []option.RequestOption
	Fields  *ReceivedFieldService
}

ReceivedService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewReceivedService method instead.

func NewReceivedService

func NewReceivedService(opts ...option.RequestOption) (r *ReceivedService)

NewReceivedService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ReceivedService) Get

func (r *ReceivedService) Get(ctx context.Context, zoneIdentifier string, query ReceivedGetParams, opts ...option.RequestOption) (res *ReceivedGetResponse, err error)

The `/received` api route allows customers to retrieve their edge HTTP logs. The basic access pattern is "give me all the logs for zone Z for minute M", where the minute M refers to the time records were received at Cloudflare's central data center. `start` is inclusive, and `end` is exclusive. Because of that, to get all data, at minutely cadence, starting at 10AM, the proper values are: `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the overlap will be handled properly.

Jump to

Keyboard shortcuts

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