Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type DatasetFieldGetParams
- type DatasetFieldGetResponse
- type DatasetFieldGetResponseEnvelope
- type DatasetFieldGetResponseEnvelopeSuccess
- type DatasetFieldService
- type DatasetJobGetParams
- type DatasetJobGetResponseEnvelope
- type DatasetJobGetResponseEnvelopeSuccess
- type DatasetJobService
- type DatasetService
- type EdgeGetParams
- type EdgeGetResponseEnvelope
- type EdgeGetResponseEnvelopeSuccess
- type EdgeNewParams
- type EdgeNewResponseEnvelope
- type EdgeNewResponseEnvelopeSuccess
- type EdgeService
- type Error
- type ErrorData
- type InstantLogpushJob
- type JobDeleteParams
- type JobDeleteResponse
- type JobDeleteResponseEnvelope
- type JobDeleteResponseEnvelopeSuccess
- type JobGetParams
- type JobGetResponseEnvelope
- type JobGetResponseEnvelopeSuccess
- type JobListParams
- type JobNewParams
- type JobNewParamsFrequency
- type JobNewParamsKind
- type JobNewResponseEnvelope
- type JobNewResponseEnvelopeSuccess
- type JobService
- func (r *JobService) Delete(ctx context.Context, jobID int64, body JobDeleteParams, ...) (res *JobDeleteResponse, err error)
- func (r *JobService) Get(ctx context.Context, jobID int64, query JobGetParams, ...) (res *LogpushJob, err error)
- func (r *JobService) List(ctx context.Context, query JobListParams, opts ...option.RequestOption) (res *pagination.SinglePage[LogpushJob], err error)
- func (r *JobService) ListAutoPaging(ctx context.Context, query JobListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LogpushJob]
- func (r *JobService) New(ctx context.Context, params JobNewParams, opts ...option.RequestOption) (res *LogpushJob, err error)
- func (r *JobService) Update(ctx context.Context, jobID int64, params JobUpdateParams, ...) (res *LogpushJob, err error)
- type JobUpdateParams
- type JobUpdateParamsFrequency
- type JobUpdateParamsKind
- type JobUpdateResponseEnvelope
- type JobUpdateResponseEnvelopeSuccess
- type LogpushJob
- type LogpushJobFrequency
- type LogpushJobKind
- type LogpushService
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type OutputOptions
- type OutputOptionsOutputType
- type OutputOptionsParam
- type OutputOptionsTimestampFormat
- type OwnershipNewParams
- type OwnershipNewResponse
- type OwnershipNewResponseEnvelope
- type OwnershipNewResponseEnvelopeSuccess
- type OwnershipService
- type OwnershipValidateParams
- type OwnershipValidateResponseEnvelope
- type OwnershipValidateResponseEnvelopeSuccess
- type OwnershipValidation
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ResponseInfo
- type Role
- type SortDirection
- type ValidateDestinationParams
- type ValidateDestinationResponse
- type ValidateDestinationResponseEnvelope
- type ValidateDestinationResponseEnvelopeSuccess
- type ValidateOriginParams
- type ValidateOriginResponse
- type ValidateOriginResponseEnvelope
- type ValidateOriginResponseEnvelopeSuccess
- type ValidateService
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 CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
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.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
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 CertificateCA ¶ added in v2.2.0
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶ added in v2.2.0
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
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 CloudflareTunnelStatus ¶ added in v2.3.0
type CloudflareTunnelStatus = shared.CloudflareTunnelStatus
The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).
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 DatasetFieldGetParams ¶
type DatasetFieldGetResponse ¶
type DatasetFieldGetResponse = interface{}
type DatasetFieldGetResponseEnvelope ¶
type DatasetFieldGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DatasetFieldGetResponseEnvelopeSuccess `json:"success,required"` Result DatasetFieldGetResponse `json:"result"` JSON datasetFieldGetResponseEnvelopeJSON `json:"-"` }
func (*DatasetFieldGetResponseEnvelope) UnmarshalJSON ¶
func (r *DatasetFieldGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DatasetFieldGetResponseEnvelopeSuccess ¶
type DatasetFieldGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DatasetFieldGetResponseEnvelopeSuccessTrue DatasetFieldGetResponseEnvelopeSuccess = true
)
func (DatasetFieldGetResponseEnvelopeSuccess) IsKnown ¶
func (r DatasetFieldGetResponseEnvelopeSuccess) IsKnown() bool
type DatasetFieldService ¶
type DatasetFieldService struct {
Options []option.RequestOption
}
DatasetFieldService 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 NewDatasetFieldService method instead.
func NewDatasetFieldService ¶
func NewDatasetFieldService(opts ...option.RequestOption) (r *DatasetFieldService)
NewDatasetFieldService 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 (*DatasetFieldService) Get ¶
func (r *DatasetFieldService) Get(ctx context.Context, datasetID string, query DatasetFieldGetParams, opts ...option.RequestOption) (res *DatasetFieldGetResponse, err error)
Lists all fields available for a dataset. The response result is an object with key-value pairs, where keys are field names, and values are descriptions.
type DatasetJobGetParams ¶
type DatasetJobGetResponseEnvelope ¶
type DatasetJobGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success DatasetJobGetResponseEnvelopeSuccess `json:"success,required"` Result []LogpushJob `json:"result"` JSON datasetJobGetResponseEnvelopeJSON `json:"-"` }
func (*DatasetJobGetResponseEnvelope) UnmarshalJSON ¶
func (r *DatasetJobGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DatasetJobGetResponseEnvelopeSuccess ¶
type DatasetJobGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DatasetJobGetResponseEnvelopeSuccessTrue DatasetJobGetResponseEnvelopeSuccess = true
)
func (DatasetJobGetResponseEnvelopeSuccess) IsKnown ¶
func (r DatasetJobGetResponseEnvelopeSuccess) IsKnown() bool
type DatasetJobService ¶
type DatasetJobService struct {
Options []option.RequestOption
}
DatasetJobService 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 NewDatasetJobService method instead.
func NewDatasetJobService ¶
func NewDatasetJobService(opts ...option.RequestOption) (r *DatasetJobService)
NewDatasetJobService 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 (*DatasetJobService) Get ¶
func (r *DatasetJobService) Get(ctx context.Context, datasetID string, query DatasetJobGetParams, opts ...option.RequestOption) (res *[]LogpushJob, err error)
Lists Logpush jobs for an account or zone for a dataset.
type DatasetService ¶
type DatasetService struct { Options []option.RequestOption Fields *DatasetFieldService Jobs *DatasetJobService }
DatasetService 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 NewDatasetService method instead.
func NewDatasetService ¶
func NewDatasetService(opts ...option.RequestOption) (r *DatasetService)
NewDatasetService 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 EdgeGetParams ¶
type EdgeGetResponseEnvelope ¶
type EdgeGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success EdgeGetResponseEnvelopeSuccess `json:"success,required"` Result []InstantLogpushJob `json:"result"` JSON edgeGetResponseEnvelopeJSON `json:"-"` }
func (*EdgeGetResponseEnvelope) UnmarshalJSON ¶
func (r *EdgeGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type EdgeGetResponseEnvelopeSuccess ¶
type EdgeGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
EdgeGetResponseEnvelopeSuccessTrue EdgeGetResponseEnvelopeSuccess = true
)
func (EdgeGetResponseEnvelopeSuccess) IsKnown ¶
func (r EdgeGetResponseEnvelopeSuccess) IsKnown() bool
type EdgeNewParams ¶
type EdgeNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` // Comma-separated list of fields. Fields param.Field[string] `json:"fields"` // Filters to drill down into specific events. Filter param.Field[string] `json:"filter"` // The sample parameter is the sample rate of the records set by the client: // "sample": 1 is 100% of records "sample": 10 is 10% and so on. Sample param.Field[int64] `json:"sample"` }
func (EdgeNewParams) MarshalJSON ¶
func (r EdgeNewParams) MarshalJSON() (data []byte, err error)
type EdgeNewResponseEnvelope ¶
type EdgeNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success EdgeNewResponseEnvelopeSuccess `json:"success,required"` Result InstantLogpushJob `json:"result,nullable"` JSON edgeNewResponseEnvelopeJSON `json:"-"` }
func (*EdgeNewResponseEnvelope) UnmarshalJSON ¶
func (r *EdgeNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type EdgeNewResponseEnvelopeSuccess ¶
type EdgeNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
EdgeNewResponseEnvelopeSuccessTrue EdgeNewResponseEnvelopeSuccess = true
)
func (EdgeNewResponseEnvelopeSuccess) IsKnown ¶
func (r EdgeNewResponseEnvelopeSuccess) IsKnown() bool
type EdgeService ¶
type EdgeService struct {
Options []option.RequestOption
}
EdgeService 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 NewEdgeService method instead.
func NewEdgeService ¶
func NewEdgeService(opts ...option.RequestOption) (r *EdgeService)
NewEdgeService 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 (*EdgeService) Get ¶
func (r *EdgeService) Get(ctx context.Context, query EdgeGetParams, opts ...option.RequestOption) (res *[]InstantLogpushJob, err error)
Lists Instant Logs jobs for a zone.
func (*EdgeService) New ¶
func (r *EdgeService) New(ctx context.Context, params EdgeNewParams, opts ...option.RequestOption) (res *InstantLogpushJob, err error)
Creates a new Instant Logs job for a zone.
type InstantLogpushJob ¶
type InstantLogpushJob struct { // Unique WebSocket address that will receive messages from Cloudflare’s edge. DestinationConf string `json:"destination_conf" format:"uri"` // Comma-separated list of fields. Fields string `json:"fields"` // Filters to drill down into specific events. Filter string `json:"filter"` // The sample parameter is the sample rate of the records set by the client: // "sample": 1 is 100% of records "sample": 10 is 10% and so on. Sample int64 `json:"sample"` // Unique session id of the job. SessionID string `json:"session_id"` JSON instantLogpushJobJSON `json:"-"` }
func (*InstantLogpushJob) UnmarshalJSON ¶
func (r *InstantLogpushJob) UnmarshalJSON(data []byte) (err error)
type JobDeleteParams ¶
type JobDeleteResponse ¶ added in v2.1.0
type JobDeleteResponse = interface{}
type JobDeleteResponseEnvelope ¶
type JobDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success JobDeleteResponseEnvelopeSuccess `json:"success,required"` Result JobDeleteResponse `json:"result,nullable"` JSON jobDeleteResponseEnvelopeJSON `json:"-"` }
func (*JobDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *JobDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type JobDeleteResponseEnvelopeSuccess ¶
type JobDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
JobDeleteResponseEnvelopeSuccessTrue JobDeleteResponseEnvelopeSuccess = true
)
func (JobDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r JobDeleteResponseEnvelopeSuccess) IsKnown() bool
type JobGetParams ¶
type JobGetResponseEnvelope ¶
type JobGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success JobGetResponseEnvelopeSuccess `json:"success,required"` Result LogpushJob `json:"result,nullable"` JSON jobGetResponseEnvelopeJSON `json:"-"` }
func (*JobGetResponseEnvelope) UnmarshalJSON ¶
func (r *JobGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type JobGetResponseEnvelopeSuccess ¶
type JobGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
JobGetResponseEnvelopeSuccessTrue JobGetResponseEnvelopeSuccess = true
)
func (JobGetResponseEnvelopeSuccess) IsKnown ¶
func (r JobGetResponseEnvelopeSuccess) IsKnown() bool
type JobListParams ¶
type JobNewParams ¶
type JobNewParams struct { // Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. // Additional configuration parameters supported by the destination may be // included. DestinationConf param.Field[string] `json:"destination_conf,required" format:"uri"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` // Name of the dataset. A list of supported datasets can be found on the // [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). Dataset param.Field[string] `json:"dataset"` // Flag that indicates if the job is enabled. Enabled param.Field[bool] `json:"enabled"` // This field is deprecated. Please use `max_upload_*` parameters instead. The // frequency at which Cloudflare sends batches of logs to your destination. Setting // frequency to high sends your logs in larger quantities of smaller files. Setting // frequency to low sends logs in smaller quantities of larger files. Frequency param.Field[JobNewParamsFrequency] `json:"frequency"` // The kind parameter (optional) is used to differentiate between Logpush and Edge // Log Delivery jobs. Currently, Edge Log Delivery is only supported for the // `http_requests` dataset. Kind param.Field[JobNewParamsKind] `json:"kind"` // This field is deprecated. Use `output_options` instead. Configuration string. It // specifies things like requested fields and timestamp formats. If migrating from // the logpull api, copy the url (full url or just the query string) of your call // here, and logpush will keep on making this call for you, setting start and end // times appropriately. LogpullOptions param.Field[string] `json:"logpull_options" format:"uri-reference"` // The maximum uncompressed file size of a batch of logs. This setting value must // be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a // minimum file size; this means that log files may be much smaller than this batch // size. This parameter is not available for jobs with `edge` as its kind. MaxUploadBytes param.Field[int64] `json:"max_upload_bytes"` // The maximum interval in seconds for log batches. This setting must be between 30 // and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify // a minimum interval for log batches; this means that log files may be sent in // shorter intervals than this. This parameter is only used for jobs with `edge` as // its kind. MaxUploadIntervalSeconds param.Field[int64] `json:"max_upload_interval_seconds"` // The maximum number of log lines per batch. This setting must be between 1000 and // 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum // number of log lines per batch; this means that log files may contain many fewer // lines than this. This parameter is not available for jobs with `edge` as its // kind. MaxUploadRecords param.Field[int64] `json:"max_upload_records"` // Optional human readable job name. Not unique. Cloudflare suggests that you set // this to a meaningful string, like the domain name, to make it easier to identify // your job. Name param.Field[string] `json:"name"` // The structured replacement for `logpull_options`. When including this field, the // `logpull_option` field will be ignored. OutputOptions param.Field[OutputOptionsParam] `json:"output_options"` // Ownership challenge token to prove destination ownership. OwnershipChallenge param.Field[string] `json:"ownership_challenge"` }
func (JobNewParams) MarshalJSON ¶
func (r JobNewParams) MarshalJSON() (data []byte, err error)
type JobNewParamsFrequency ¶
type JobNewParamsFrequency string
This field is deprecated. Please use `max_upload_*` parameters instead. The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.
const ( JobNewParamsFrequencyHigh JobNewParamsFrequency = "high" JobNewParamsFrequencyLow JobNewParamsFrequency = "low" )
func (JobNewParamsFrequency) IsKnown ¶
func (r JobNewParamsFrequency) IsKnown() bool
type JobNewParamsKind ¶ added in v2.2.0
type JobNewParamsKind string
The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs. Currently, Edge Log Delivery is only supported for the `http_requests` dataset.
const (
JobNewParamsKindEdge JobNewParamsKind = "edge"
)
func (JobNewParamsKind) IsKnown ¶ added in v2.2.0
func (r JobNewParamsKind) IsKnown() bool
type JobNewResponseEnvelope ¶
type JobNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success JobNewResponseEnvelopeSuccess `json:"success,required"` Result LogpushJob `json:"result,nullable"` JSON jobNewResponseEnvelopeJSON `json:"-"` }
func (*JobNewResponseEnvelope) UnmarshalJSON ¶
func (r *JobNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type JobNewResponseEnvelopeSuccess ¶
type JobNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
JobNewResponseEnvelopeSuccessTrue JobNewResponseEnvelopeSuccess = true
)
func (JobNewResponseEnvelopeSuccess) IsKnown ¶
func (r JobNewResponseEnvelopeSuccess) IsKnown() bool
type JobService ¶
type JobService struct {
Options []option.RequestOption
}
JobService 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 NewJobService method instead.
func NewJobService ¶
func NewJobService(opts ...option.RequestOption) (r *JobService)
NewJobService 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 (*JobService) Delete ¶
func (r *JobService) Delete(ctx context.Context, jobID int64, body JobDeleteParams, opts ...option.RequestOption) (res *JobDeleteResponse, err error)
Deletes a Logpush job.
func (*JobService) Get ¶
func (r *JobService) Get(ctx context.Context, jobID int64, query JobGetParams, opts ...option.RequestOption) (res *LogpushJob, err error)
Gets the details of a Logpush job.
func (*JobService) List ¶
func (r *JobService) List(ctx context.Context, query JobListParams, opts ...option.RequestOption) (res *pagination.SinglePage[LogpushJob], err error)
Lists Logpush jobs for an account or zone.
func (*JobService) ListAutoPaging ¶
func (r *JobService) ListAutoPaging(ctx context.Context, query JobListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LogpushJob]
Lists Logpush jobs for an account or zone.
func (*JobService) New ¶
func (r *JobService) New(ctx context.Context, params JobNewParams, opts ...option.RequestOption) (res *LogpushJob, err error)
Creates a new Logpush job for an account or zone.
func (*JobService) Update ¶
func (r *JobService) Update(ctx context.Context, jobID int64, params JobUpdateParams, opts ...option.RequestOption) (res *LogpushJob, err error)
Updates a Logpush job.
type JobUpdateParams ¶
type JobUpdateParams struct { // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` // Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. // Additional configuration parameters supported by the destination may be // included. DestinationConf param.Field[string] `json:"destination_conf" format:"uri"` // Flag that indicates if the job is enabled. Enabled param.Field[bool] `json:"enabled"` // This field is deprecated. Please use `max_upload_*` parameters instead. The // frequency at which Cloudflare sends batches of logs to your destination. Setting // frequency to high sends your logs in larger quantities of smaller files. Setting // frequency to low sends logs in smaller quantities of larger files. Frequency param.Field[JobUpdateParamsFrequency] `json:"frequency"` // The kind parameter (optional) is used to differentiate between Logpush and Edge // Log Delivery jobs. Currently, Edge Log Delivery is only supported for the // `http_requests` dataset. Kind param.Field[JobUpdateParamsKind] `json:"kind"` // This field is deprecated. Use `output_options` instead. Configuration string. It // specifies things like requested fields and timestamp formats. If migrating from // the logpull api, copy the url (full url or just the query string) of your call // here, and logpush will keep on making this call for you, setting start and end // times appropriately. LogpullOptions param.Field[string] `json:"logpull_options" format:"uri-reference"` // The maximum uncompressed file size of a batch of logs. This setting value must // be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a // minimum file size; this means that log files may be much smaller than this batch // size. This parameter is not available for jobs with `edge` as its kind. MaxUploadBytes param.Field[int64] `json:"max_upload_bytes"` // The maximum interval in seconds for log batches. This setting must be between 30 // and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify // a minimum interval for log batches; this means that log files may be sent in // shorter intervals than this. This parameter is only used for jobs with `edge` as // its kind. MaxUploadIntervalSeconds param.Field[int64] `json:"max_upload_interval_seconds"` // The maximum number of log lines per batch. This setting must be between 1000 and // 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum // number of log lines per batch; this means that log files may contain many fewer // lines than this. This parameter is not available for jobs with `edge` as its // kind. MaxUploadRecords param.Field[int64] `json:"max_upload_records"` // The structured replacement for `logpull_options`. When including this field, the // `logpull_option` field will be ignored. OutputOptions param.Field[OutputOptionsParam] `json:"output_options"` // Ownership challenge token to prove destination ownership. OwnershipChallenge param.Field[string] `json:"ownership_challenge"` }
func (JobUpdateParams) MarshalJSON ¶
func (r JobUpdateParams) MarshalJSON() (data []byte, err error)
type JobUpdateParamsFrequency ¶
type JobUpdateParamsFrequency string
This field is deprecated. Please use `max_upload_*` parameters instead. The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.
const ( JobUpdateParamsFrequencyHigh JobUpdateParamsFrequency = "high" JobUpdateParamsFrequencyLow JobUpdateParamsFrequency = "low" )
func (JobUpdateParamsFrequency) IsKnown ¶
func (r JobUpdateParamsFrequency) IsKnown() bool
type JobUpdateParamsKind ¶ added in v2.2.0
type JobUpdateParamsKind string
The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs. Currently, Edge Log Delivery is only supported for the `http_requests` dataset.
const (
JobUpdateParamsKindEdge JobUpdateParamsKind = "edge"
)
func (JobUpdateParamsKind) IsKnown ¶ added in v2.2.0
func (r JobUpdateParamsKind) IsKnown() bool
type JobUpdateResponseEnvelope ¶
type JobUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success JobUpdateResponseEnvelopeSuccess `json:"success,required"` Result LogpushJob `json:"result,nullable"` JSON jobUpdateResponseEnvelopeJSON `json:"-"` }
func (*JobUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *JobUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type JobUpdateResponseEnvelopeSuccess ¶
type JobUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
JobUpdateResponseEnvelopeSuccessTrue JobUpdateResponseEnvelopeSuccess = true
)
func (JobUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r JobUpdateResponseEnvelopeSuccess) IsKnown() bool
type LogpushJob ¶
type LogpushJob struct { // Unique id of the job. ID int64 `json:"id"` // Name of the dataset. A list of supported datasets can be found on the // [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). Dataset string `json:"dataset,nullable"` // Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. // Additional configuration parameters supported by the destination may be // included. DestinationConf string `json:"destination_conf" format:"uri"` // Flag that indicates if the job is enabled. Enabled bool `json:"enabled"` // If not null, the job is currently failing. Failures are usually repetitive // (example: no permissions to write to destination bucket). Only the last failure // is recorded. On successful execution of a job the error_message and last_error // are set to null. ErrorMessage time.Time `json:"error_message,nullable" format:"date-time"` // This field is deprecated. Please use `max_upload_*` parameters instead. The // frequency at which Cloudflare sends batches of logs to your destination. Setting // frequency to high sends your logs in larger quantities of smaller files. Setting // frequency to low sends logs in smaller quantities of larger files. Frequency LogpushJobFrequency `json:"frequency,nullable"` // The kind parameter (optional) is used to differentiate between Logpush and Edge // Log Delivery jobs. Currently, Edge Log Delivery is only supported for the // `http_requests` dataset. Kind LogpushJobKind `json:"kind,nullable"` // Records the last time for which logs have been successfully pushed. If the last // successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z // then the value of this field will be 2018-07-23T10:01:00Z. If the job has never // run or has just been enabled and hasn't run yet then the field will be empty. LastComplete time.Time `json:"last_complete,nullable" format:"date-time"` // Records the last time the job failed. If not null, the job is currently failing. // If null, the job has either never failed or has run successfully at least once // since last failure. See also the error_message field. LastError time.Time `json:"last_error,nullable" format:"date-time"` // This field is deprecated. Use `output_options` instead. Configuration string. It // specifies things like requested fields and timestamp formats. If migrating from // the logpull api, copy the url (full url or just the query string) of your call // here, and logpush will keep on making this call for you, setting start and end // times appropriately. LogpullOptions string `json:"logpull_options,nullable" format:"uri-reference"` // The maximum uncompressed file size of a batch of logs. This setting value must // be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a // minimum file size; this means that log files may be much smaller than this batch // size. This parameter is not available for jobs with `edge` as its kind. MaxUploadBytes int64 `json:"max_upload_bytes,nullable"` // The maximum interval in seconds for log batches. This setting must be between 30 // and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify // a minimum interval for log batches; this means that log files may be sent in // shorter intervals than this. This parameter is only used for jobs with `edge` as // its kind. MaxUploadIntervalSeconds int64 `json:"max_upload_interval_seconds,nullable"` // The maximum number of log lines per batch. This setting must be between 1000 and // 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum // number of log lines per batch; this means that log files may contain many fewer // lines than this. This parameter is not available for jobs with `edge` as its // kind. MaxUploadRecords int64 `json:"max_upload_records,nullable"` // Optional human readable job name. Not unique. Cloudflare suggests that you set // this to a meaningful string, like the domain name, to make it easier to identify // your job. Name string `json:"name,nullable"` // The structured replacement for `logpull_options`. When including this field, the // `logpull_option` field will be ignored. OutputOptions OutputOptions `json:"output_options,nullable"` JSON logpushJobJSON `json:"-"` }
func (*LogpushJob) UnmarshalJSON ¶
func (r *LogpushJob) UnmarshalJSON(data []byte) (err error)
type LogpushJobFrequency ¶
type LogpushJobFrequency string
This field is deprecated. Please use `max_upload_*` parameters instead. The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.
const ( LogpushJobFrequencyHigh LogpushJobFrequency = "high" LogpushJobFrequencyLow LogpushJobFrequency = "low" )
func (LogpushJobFrequency) IsKnown ¶
func (r LogpushJobFrequency) IsKnown() bool
type LogpushJobKind ¶ added in v2.2.0
type LogpushJobKind string
The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs. Currently, Edge Log Delivery is only supported for the `http_requests` dataset.
const (
LogpushJobKindEdge LogpushJobKind = "edge"
)
func (LogpushJobKind) IsKnown ¶ added in v2.2.0
func (r LogpushJobKind) IsKnown() bool
type LogpushService ¶
type LogpushService struct { Options []option.RequestOption Datasets *DatasetService Edge *EdgeService Jobs *JobService Ownership *OwnershipService Validate *ValidateService }
LogpushService 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 NewLogpushService method instead.
func NewLogpushService ¶
func NewLogpushService(opts ...option.RequestOption) (r *LogpushService)
NewLogpushService 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 MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
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 MemberStatus ¶ added in v2.3.0
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
This is an alias to an internal type.
type OutputOptions ¶
type OutputOptions struct { // String to be prepended before each batch. BatchPrefix string `json:"batch_prefix,nullable"` // String to be appended after each batch. BatchSuffix string `json:"batch_suffix,nullable"` // If set to true, will cause all occurrences of `${` in the generated files to be // replaced with `x{`. Cve2021_4428 bool `json:"CVE-2021-4428,nullable"` // String to join fields. This field be ignored when `record_template` is set. FieldDelimiter string `json:"field_delimiter,nullable"` // List of field names to be included in the Logpush output. For the moment, there // is no option to add all fields at once, so you must specify all the fields names // you are interested in. FieldNames []string `json:"field_names"` // Specifies the output type, such as `ndjson` or `csv`. This sets default values // for the rest of the settings, depending on the chosen output type. Some // formatting rules, like string quoting, are different between output types. OutputType OutputOptionsOutputType `json:"output_type"` // String to be inserted in-between the records as separator. RecordDelimiter string `json:"record_delimiter,nullable"` // String to be prepended before each record. RecordPrefix string `json:"record_prefix,nullable"` // String to be appended after each record. RecordSuffix string `json:"record_suffix,nullable"` // String to use as template for each record instead of the default comma-separated // list. All fields used in the template must be present in `field_names` as well, // otherwise they will end up as null. Format as a Go `text/template` without any // standard functions, like conditionals, loops, sub-templates, etc. RecordTemplate string `json:"record_template,nullable"` // Floating number to specify sampling rate. Sampling is applied on top of // filtering, and regardless of the current `sample_interval` of the data. SampleRate float64 `json:"sample_rate,nullable"` // String to specify the format for timestamps, such as `unixnano`, `unix`, or // `rfc3339`. TimestampFormat OutputOptionsTimestampFormat `json:"timestamp_format"` JSON outputOptionsJSON `json:"-"` }
The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored.
func (*OutputOptions) UnmarshalJSON ¶
func (r *OutputOptions) UnmarshalJSON(data []byte) (err error)
type OutputOptionsOutputType ¶
type OutputOptionsOutputType string
Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.
const ( OutputOptionsOutputTypeNdjson OutputOptionsOutputType = "ndjson" OutputOptionsOutputTypeCsv OutputOptionsOutputType = "csv" )
func (OutputOptionsOutputType) IsKnown ¶
func (r OutputOptionsOutputType) IsKnown() bool
type OutputOptionsParam ¶
type OutputOptionsParam struct { // String to be prepended before each batch. BatchPrefix param.Field[string] `json:"batch_prefix"` // String to be appended after each batch. BatchSuffix param.Field[string] `json:"batch_suffix"` // If set to true, will cause all occurrences of `${` in the generated files to be // replaced with `x{`. Cve2021_4428 param.Field[bool] `json:"CVE-2021-4428"` // String to join fields. This field be ignored when `record_template` is set. FieldDelimiter param.Field[string] `json:"field_delimiter"` // List of field names to be included in the Logpush output. For the moment, there // is no option to add all fields at once, so you must specify all the fields names // you are interested in. FieldNames param.Field[[]string] `json:"field_names"` // Specifies the output type, such as `ndjson` or `csv`. This sets default values // for the rest of the settings, depending on the chosen output type. Some // formatting rules, like string quoting, are different between output types. OutputType param.Field[OutputOptionsOutputType] `json:"output_type"` // String to be inserted in-between the records as separator. RecordDelimiter param.Field[string] `json:"record_delimiter"` // String to be prepended before each record. RecordPrefix param.Field[string] `json:"record_prefix"` // String to be appended after each record. RecordSuffix param.Field[string] `json:"record_suffix"` // String to use as template for each record instead of the default comma-separated // list. All fields used in the template must be present in `field_names` as well, // otherwise they will end up as null. Format as a Go `text/template` without any // standard functions, like conditionals, loops, sub-templates, etc. RecordTemplate param.Field[string] `json:"record_template"` // Floating number to specify sampling rate. Sampling is applied on top of // filtering, and regardless of the current `sample_interval` of the data. SampleRate param.Field[float64] `json:"sample_rate"` // String to specify the format for timestamps, such as `unixnano`, `unix`, or // `rfc3339`. TimestampFormat param.Field[OutputOptionsTimestampFormat] `json:"timestamp_format"` }
The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored.
func (OutputOptionsParam) MarshalJSON ¶
func (r OutputOptionsParam) MarshalJSON() (data []byte, err error)
type OutputOptionsTimestampFormat ¶
type OutputOptionsTimestampFormat string
String to specify the format for timestamps, such as `unixnano`, `unix`, or `rfc3339`.
const ( OutputOptionsTimestampFormatUnixnano OutputOptionsTimestampFormat = "unixnano" OutputOptionsTimestampFormatUnix OutputOptionsTimestampFormat = "unix" OutputOptionsTimestampFormatRfc3339 OutputOptionsTimestampFormat = "rfc3339" )
func (OutputOptionsTimestampFormat) IsKnown ¶
func (r OutputOptionsTimestampFormat) IsKnown() bool
type OwnershipNewParams ¶
type OwnershipNewParams struct { // Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. // Additional configuration parameters supported by the destination may be // included. DestinationConf param.Field[string] `json:"destination_conf,required" format:"uri"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` }
func (OwnershipNewParams) MarshalJSON ¶
func (r OwnershipNewParams) MarshalJSON() (data []byte, err error)
type OwnershipNewResponse ¶
type OwnershipNewResponse struct { Filename string `json:"filename"` Message string `json:"message"` Valid bool `json:"valid"` JSON ownershipNewResponseJSON `json:"-"` }
func (*OwnershipNewResponse) UnmarshalJSON ¶
func (r *OwnershipNewResponse) UnmarshalJSON(data []byte) (err error)
type OwnershipNewResponseEnvelope ¶
type OwnershipNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success OwnershipNewResponseEnvelopeSuccess `json:"success,required"` Result OwnershipNewResponse `json:"result,nullable"` JSON ownershipNewResponseEnvelopeJSON `json:"-"` }
func (*OwnershipNewResponseEnvelope) UnmarshalJSON ¶
func (r *OwnershipNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OwnershipNewResponseEnvelopeSuccess ¶
type OwnershipNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
OwnershipNewResponseEnvelopeSuccessTrue OwnershipNewResponseEnvelopeSuccess = true
)
func (OwnershipNewResponseEnvelopeSuccess) IsKnown ¶
func (r OwnershipNewResponseEnvelopeSuccess) IsKnown() bool
type OwnershipService ¶
type OwnershipService struct {
Options []option.RequestOption
}
OwnershipService 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 NewOwnershipService method instead.
func NewOwnershipService ¶
func NewOwnershipService(opts ...option.RequestOption) (r *OwnershipService)
NewOwnershipService 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 (*OwnershipService) New ¶
func (r *OwnershipService) New(ctx context.Context, params OwnershipNewParams, opts ...option.RequestOption) (res *OwnershipNewResponse, err error)
Gets a new ownership challenge sent to your destination.
func (*OwnershipService) Validate ¶
func (r *OwnershipService) Validate(ctx context.Context, params OwnershipValidateParams, opts ...option.RequestOption) (res *OwnershipValidation, err error)
Validates ownership challenge of the destination.
type OwnershipValidateParams ¶
type OwnershipValidateParams struct { // Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. // Additional configuration parameters supported by the destination may be // included. DestinationConf param.Field[string] `json:"destination_conf,required" format:"uri"` // Ownership challenge token to prove destination ownership. OwnershipChallenge param.Field[string] `json:"ownership_challenge,required"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` }
func (OwnershipValidateParams) MarshalJSON ¶
func (r OwnershipValidateParams) MarshalJSON() (data []byte, err error)
type OwnershipValidateResponseEnvelope ¶
type OwnershipValidateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success OwnershipValidateResponseEnvelopeSuccess `json:"success,required"` Result OwnershipValidation `json:"result,nullable"` JSON ownershipValidateResponseEnvelopeJSON `json:"-"` }
func (*OwnershipValidateResponseEnvelope) UnmarshalJSON ¶
func (r *OwnershipValidateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OwnershipValidateResponseEnvelopeSuccess ¶
type OwnershipValidateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
OwnershipValidateResponseEnvelopeSuccessTrue OwnershipValidateResponseEnvelopeSuccess = true
)
func (OwnershipValidateResponseEnvelopeSuccess) IsKnown ¶
func (r OwnershipValidateResponseEnvelopeSuccess) IsKnown() bool
type OwnershipValidation ¶
type OwnershipValidation struct { Valid bool `json:"valid"` JSON ownershipValidationJSON `json:"-"` }
func (*OwnershipValidation) UnmarshalJSON ¶
func (r *OwnershipValidation) UnmarshalJSON(data []byte) (err error)
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 SortDirection ¶ added in v2.2.0
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type ValidateDestinationParams ¶
type ValidateDestinationParams struct { // Uniquely identifies a resource (such as an s3 bucket) where data will be pushed. // Additional configuration parameters supported by the destination may be // included. DestinationConf param.Field[string] `json:"destination_conf,required" format:"uri"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` }
func (ValidateDestinationParams) MarshalJSON ¶
func (r ValidateDestinationParams) MarshalJSON() (data []byte, err error)
type ValidateDestinationResponse ¶
type ValidateDestinationResponse struct { Exists bool `json:"exists"` JSON validateDestinationResponseJSON `json:"-"` }
func (*ValidateDestinationResponse) UnmarshalJSON ¶
func (r *ValidateDestinationResponse) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationResponseEnvelope ¶
type ValidateDestinationResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success ValidateDestinationResponseEnvelopeSuccess `json:"success,required"` Result ValidateDestinationResponse `json:"result,nullable"` JSON validateDestinationResponseEnvelopeJSON `json:"-"` }
func (*ValidateDestinationResponseEnvelope) UnmarshalJSON ¶
func (r *ValidateDestinationResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ValidateDestinationResponseEnvelopeSuccess ¶
type ValidateDestinationResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ValidateDestinationResponseEnvelopeSuccessTrue ValidateDestinationResponseEnvelopeSuccess = true
)
func (ValidateDestinationResponseEnvelopeSuccess) IsKnown ¶
func (r ValidateDestinationResponseEnvelopeSuccess) IsKnown() bool
type ValidateOriginParams ¶
type ValidateOriginParams struct { // This field is deprecated. Use `output_options` instead. Configuration string. It // specifies things like requested fields and timestamp formats. If migrating from // the logpull api, copy the url (full url or just the query string) of your call // here, and logpush will keep on making this call for you, setting start and end // times appropriately. LogpullOptions param.Field[string] `json:"logpull_options,required" format:"uri-reference"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` }
func (ValidateOriginParams) MarshalJSON ¶
func (r ValidateOriginParams) MarshalJSON() (data []byte, err error)
type ValidateOriginResponse ¶
type ValidateOriginResponse struct { Message string `json:"message"` Valid bool `json:"valid"` JSON validateOriginResponseJSON `json:"-"` }
func (*ValidateOriginResponse) UnmarshalJSON ¶
func (r *ValidateOriginResponse) UnmarshalJSON(data []byte) (err error)
type ValidateOriginResponseEnvelope ¶
type ValidateOriginResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success ValidateOriginResponseEnvelopeSuccess `json:"success,required"` Result ValidateOriginResponse `json:"result,nullable"` JSON validateOriginResponseEnvelopeJSON `json:"-"` }
func (*ValidateOriginResponseEnvelope) UnmarshalJSON ¶
func (r *ValidateOriginResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ValidateOriginResponseEnvelopeSuccess ¶
type ValidateOriginResponseEnvelopeSuccess bool
Whether the API call was successful
const (
ValidateOriginResponseEnvelopeSuccessTrue ValidateOriginResponseEnvelopeSuccess = true
)
func (ValidateOriginResponseEnvelopeSuccess) IsKnown ¶
func (r ValidateOriginResponseEnvelopeSuccess) IsKnown() bool
type ValidateService ¶
type ValidateService struct {
Options []option.RequestOption
}
ValidateService 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 NewValidateService method instead.
func NewValidateService ¶
func NewValidateService(opts ...option.RequestOption) (r *ValidateService)
NewValidateService 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 (*ValidateService) Destination ¶
func (r *ValidateService) Destination(ctx context.Context, params ValidateDestinationParams, opts ...option.RequestOption) (res *ValidateDestinationResponse, err error)
Checks if there is an existing job with a destination.
func (*ValidateService) Origin ¶
func (r *ValidateService) Origin(ctx context.Context, params ValidateOriginParams, opts ...option.RequestOption) (res *ValidateOriginResponse, err error)
Validates logpull origin with logpull_options.