Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelTunType
- type CmbConfig
- type CmbConfigParam
- type ControlCmbConfigDeleteParams
- type ControlCmbConfigDeleteResponse
- type ControlCmbConfigDeleteResponseEnvelope
- type ControlCmbConfigDeleteResponseEnvelopeSuccess
- type ControlCmbConfigGetParams
- type ControlCmbConfigGetResponseEnvelope
- type ControlCmbConfigGetResponseEnvelopeSuccess
- type ControlCmbConfigNewParams
- type ControlCmbConfigNewResponseEnvelope
- type ControlCmbConfigNewResponseEnvelopeSuccess
- type ControlCmbConfigService
- func (r *ControlCmbConfigService) Delete(ctx context.Context, params ControlCmbConfigDeleteParams, ...) (res *ControlCmbConfigDeleteResponse, err error)
- func (r *ControlCmbConfigService) Get(ctx context.Context, query ControlCmbConfigGetParams, ...) (res *CmbConfig, err error)
- func (r *ControlCmbConfigService) New(ctx context.Context, params ControlCmbConfigNewParams, ...) (res *CmbConfig, err error)
- type ControlCmbService
- type ControlRetentionFlagGetResponse
- type ControlRetentionFlagGetResponseEnvelope
- type ControlRetentionFlagGetResponseEnvelopeSuccess
- type ControlRetentionFlagNewParams
- type ControlRetentionFlagNewResponse
- type ControlRetentionFlagNewResponseEnvelope
- type ControlRetentionFlagNewResponseEnvelopeSuccess
- type ControlRetentionFlagService
- func (r *ControlRetentionFlagService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ControlRetentionFlagGetResponse, err error)
- func (r *ControlRetentionFlagService) New(ctx context.Context, zoneIdentifier string, body ControlRetentionFlagNewParams, ...) (res *ControlRetentionFlagNewResponse, err error)
- type ControlRetentionService
- type ControlService
- type Error
- type ErrorData
- type LogService
- type Member
- type MemberParam
- type MemberRole
- type MemberRoleParam
- type MemberRolesPermissions
- type MemberRolesPermissionsParam
- type MemberUser
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RayIDGetParams
- type RayIDGetParamsTimestamps
- type RayIDGetResponseUnion
- type RayIDService
- type ReceivedFieldGetResponse
- type ReceivedFieldService
- type ReceivedGetParams
- type ReceivedGetParamsEndUnion
- type ReceivedGetParamsStartUnion
- type ReceivedGetParamsTimestamps
- type ReceivedGetResponseUnion
- type ReceivedService
- type ResponseInfo
- type Role
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type CmbConfig ¶
type CmbConfig struct { // Comma-separated list of regions. Regions string `json:"regions"` JSON cmbConfigJSON `json:"-"` }
func (*CmbConfig) UnmarshalJSON ¶
type CmbConfigParam ¶
type CmbConfigParam struct { // Comma-separated list of regions. Regions param.Field[string] `json:"regions"` }
func (CmbConfigParam) MarshalJSON ¶
func (r CmbConfigParam) MarshalJSON() (data []byte, err error)
type ControlCmbConfigDeleteParams ¶
type ControlCmbConfigDeleteParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` Body interface{} `json:"body,required"` }
func (ControlCmbConfigDeleteParams) MarshalJSON ¶
func (r ControlCmbConfigDeleteParams) MarshalJSON() (data []byte, err error)
type ControlCmbConfigDeleteResponse ¶ added in v2.1.0
type ControlCmbConfigDeleteResponse = interface{}
type ControlCmbConfigDeleteResponseEnvelope ¶
type ControlCmbConfigDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success ControlCmbConfigDeleteResponseEnvelopeSuccess `json:"success,required"` Result ControlCmbConfigDeleteResponse `json:"result,nullable"` JSON controlCmbConfigDeleteResponseEnvelopeJSON `json:"-"` }
func (*ControlCmbConfigDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *ControlCmbConfigDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ControlCmbConfigDeleteResponseEnvelopeSuccess ¶
type ControlCmbConfigDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ControlCmbConfigDeleteResponseEnvelopeSuccessTrue ControlCmbConfigDeleteResponseEnvelopeSuccess = true
)
func (ControlCmbConfigDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r ControlCmbConfigDeleteResponseEnvelopeSuccess) IsKnown() bool
type ControlCmbConfigGetResponseEnvelope ¶
type ControlCmbConfigGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success ControlCmbConfigGetResponseEnvelopeSuccess `json:"success,required"` Result CmbConfig `json:"result,nullable"` JSON controlCmbConfigGetResponseEnvelopeJSON `json:"-"` }
func (*ControlCmbConfigGetResponseEnvelope) UnmarshalJSON ¶
func (r *ControlCmbConfigGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ControlCmbConfigGetResponseEnvelopeSuccess ¶
type ControlCmbConfigGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ControlCmbConfigGetResponseEnvelopeSuccessTrue ControlCmbConfigGetResponseEnvelopeSuccess = true
)
func (ControlCmbConfigGetResponseEnvelopeSuccess) IsKnown ¶
func (r ControlCmbConfigGetResponseEnvelopeSuccess) IsKnown() bool
type ControlCmbConfigNewParams ¶
type ControlCmbConfigNewParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` CmbConfig CmbConfigParam `json:"cmb_config,required"` }
func (ControlCmbConfigNewParams) MarshalJSON ¶
func (r ControlCmbConfigNewParams) MarshalJSON() (data []byte, err error)
type ControlCmbConfigNewResponseEnvelope ¶
type ControlCmbConfigNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success ControlCmbConfigNewResponseEnvelopeSuccess `json:"success,required"` Result CmbConfig `json:"result,nullable"` JSON controlCmbConfigNewResponseEnvelopeJSON `json:"-"` }
func (*ControlCmbConfigNewResponseEnvelope) UnmarshalJSON ¶
func (r *ControlCmbConfigNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ControlCmbConfigNewResponseEnvelopeSuccess ¶
type ControlCmbConfigNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ControlCmbConfigNewResponseEnvelopeSuccessTrue ControlCmbConfigNewResponseEnvelopeSuccess = true
)
func (ControlCmbConfigNewResponseEnvelopeSuccess) IsKnown ¶
func (r ControlCmbConfigNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *ControlCmbConfigService) Delete(ctx context.Context, params ControlCmbConfigDeleteParams, opts ...option.RequestOption) (res *ControlCmbConfigDeleteResponse, err error)
Deletes CMB config.
func (*ControlCmbConfigService) Get ¶
func (r *ControlCmbConfigService) Get(ctx context.Context, query ControlCmbConfigGetParams, opts ...option.RequestOption) (res *CmbConfig, err error)
Gets CMB config.
func (*ControlCmbConfigService) New ¶
func (r *ControlCmbConfigService) New(ctx context.Context, params ControlCmbConfigNewParams, opts ...option.RequestOption) (res *CmbConfig, err error)
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 []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `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 ControlRetentionFlagGetResponseEnvelopeSuccess ¶
type ControlRetentionFlagGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ControlRetentionFlagGetResponseEnvelopeSuccessTrue ControlRetentionFlagGetResponseEnvelopeSuccess = true
)
func (ControlRetentionFlagGetResponseEnvelopeSuccess) IsKnown ¶
func (r ControlRetentionFlagGetResponseEnvelopeSuccess) IsKnown() bool
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 []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `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 ControlRetentionFlagNewResponseEnvelopeSuccess ¶
type ControlRetentionFlagNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ControlRetentionFlagNewResponseEnvelopeSuccessTrue ControlRetentionFlagNewResponseEnvelopeSuccess = true
)
func (ControlRetentionFlagNewResponseEnvelopeSuccess) IsKnown ¶
func (r ControlRetentionFlagNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *ControlRetentionFlagService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *ControlRetentionFlagGetResponse, err error)
Gets log retention flag for Logpull API.
func (*ControlRetentionFlagService) New ¶
func (r *ControlRetentionFlagService) New(ctx context.Context, zoneIdentifier string, body ControlRetentionFlagNewParams, opts ...option.RequestOption) (res *ControlRetentionFlagNewResponse, err error)
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 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 MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRole ¶ added in v2.1.0
type MemberRole = shared.MemberRole
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissions ¶ added in v2.1.0
type MemberRolesPermissions = shared.MemberRolesPermissions
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberUser ¶ added in v2.1.0
type MemberUser = shared.MemberUser
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
This is an alias to an internal type.
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
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 RayIDGetResponseUnion ¶
type RayIDGetResponseUnion interface {
ImplementsLogsRayIDGetResponseUnion()
}
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 *RayIDGetResponseUnion, 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[ReceivedGetParamsEndUnion] `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[ReceivedGetParamsStartUnion] `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 ReceivedGetParamsEndUnion ¶
type ReceivedGetParamsEndUnion interface {
ImplementsLogsReceivedGetParamsEndUnion()
}
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 ReceivedGetParamsStartUnion ¶
type ReceivedGetParamsStartUnion interface {
ImplementsLogsReceivedGetParamsStartUnion()
}
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 ReceivedGetResponseUnion ¶
type ReceivedGetResponseUnion interface {
ImplementsLogsReceivedGetResponseUnion()
}
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 *ReceivedGetResponseUnion, 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.