logpush

package
v2.0.0-beta.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatasetFieldGetParams

type DatasetFieldGetParams 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"`
}

type DatasetFieldGetResponse

type DatasetFieldGetResponse = interface{}

type DatasetFieldGetResponseEnvelope

type DatasetFieldGetResponseEnvelope struct {
	Errors   []DatasetFieldGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DatasetFieldGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DatasetFieldGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DatasetFieldGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    datasetFieldGetResponseEnvelopeJSON    `json:"-"`
}

func (*DatasetFieldGetResponseEnvelope) UnmarshalJSON

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

type DatasetFieldGetResponseEnvelopeErrors

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

func (*DatasetFieldGetResponseEnvelopeErrors) UnmarshalJSON

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

type DatasetFieldGetResponseEnvelopeMessages

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

func (*DatasetFieldGetResponseEnvelopeMessages) UnmarshalJSON

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

type DatasetFieldGetResponseEnvelopeSuccess

type DatasetFieldGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DatasetFieldGetResponseEnvelopeSuccessTrue DatasetFieldGetResponseEnvelopeSuccess = true
)

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

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 DatasetJobGetParams 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"`
}

type DatasetJobGetResponseEnvelope

type DatasetJobGetResponseEnvelope struct {
	Errors   []DatasetJobGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DatasetJobGetResponseEnvelopeMessages `json:"messages,required"`
	Result   []LogpushLogpushJob                     `json:"result,required"`
	// Whether the API call was successful
	Success DatasetJobGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    datasetJobGetResponseEnvelopeJSON    `json:"-"`
}

func (*DatasetJobGetResponseEnvelope) UnmarshalJSON

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

type DatasetJobGetResponseEnvelopeErrors

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

func (*DatasetJobGetResponseEnvelopeErrors) UnmarshalJSON

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

type DatasetJobGetResponseEnvelopeMessages

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

func (*DatasetJobGetResponseEnvelopeMessages) UnmarshalJSON

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

type DatasetJobGetResponseEnvelopeSuccess

type DatasetJobGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DatasetJobGetResponseEnvelopeSuccessTrue DatasetJobGetResponseEnvelopeSuccess = true
)

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 *[]LogpushLogpushJob, 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 EdgeGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type EdgeGetResponseEnvelope

type EdgeGetResponseEnvelope struct {
	Errors   []EdgeGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []EdgeGetResponseEnvelopeMessages `json:"messages,required"`
	Result   []LogpushInstantLogsJob           `json:"result,required"`
	// Whether the API call was successful
	Success EdgeGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    edgeGetResponseEnvelopeJSON    `json:"-"`
}

func (*EdgeGetResponseEnvelope) UnmarshalJSON

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

type EdgeGetResponseEnvelopeErrors

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

func (*EdgeGetResponseEnvelopeErrors) UnmarshalJSON

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

type EdgeGetResponseEnvelopeMessages

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

func (*EdgeGetResponseEnvelopeMessages) UnmarshalJSON

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

type EdgeGetResponseEnvelopeSuccess

type EdgeGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	EdgeGetResponseEnvelopeSuccessTrue EdgeGetResponseEnvelopeSuccess = true
)

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   []EdgeNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []EdgeNewResponseEnvelopeMessages `json:"messages,required"`
	Result   LogpushInstantLogsJob             `json:"result,required,nullable"`
	// Whether the API call was successful
	Success EdgeNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    edgeNewResponseEnvelopeJSON    `json:"-"`
}

func (*EdgeNewResponseEnvelope) UnmarshalJSON

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

type EdgeNewResponseEnvelopeErrors

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

func (*EdgeNewResponseEnvelopeErrors) UnmarshalJSON

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

type EdgeNewResponseEnvelopeMessages

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

func (*EdgeNewResponseEnvelopeMessages) UnmarshalJSON

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

type EdgeNewResponseEnvelopeSuccess

type EdgeNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	EdgeNewResponseEnvelopeSuccessTrue EdgeNewResponseEnvelopeSuccess = true
)

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 *[]LogpushInstantLogsJob, 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 *LogpushInstantLogsJob, err error)

Creates a new Instant Logs job for a zone.

type Error

type Error = apierror.Error

type JobDeleteParams

type JobDeleteParams 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"`
}

type JobDeleteResponse added in v2.1.0

type JobDeleteResponse interface {
	ImplementsLogpushJobDeleteResponse()
}

Union satisfied by logpush.JobDeleteResponseUnknown, logpush.JobDeleteResponseArray or shared.UnionString.

type JobDeleteResponseArray

type JobDeleteResponseArray []interface{}

func (JobDeleteResponseArray) ImplementsLogpushJobDeleteResponse

func (r JobDeleteResponseArray) ImplementsLogpushJobDeleteResponse()

type JobDeleteResponseEnvelope

type JobDeleteResponseEnvelope struct {
	Errors   []JobDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []JobDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   JobDeleteResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success JobDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    jobDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*JobDeleteResponseEnvelope) UnmarshalJSON

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

type JobDeleteResponseEnvelopeErrors

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

func (*JobDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type JobDeleteResponseEnvelopeMessages

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

func (*JobDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type JobDeleteResponseEnvelopeSuccess

type JobDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	JobDeleteResponseEnvelopeSuccessTrue JobDeleteResponseEnvelopeSuccess = true
)

type JobGetParams

type JobGetParams 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"`
}

type JobGetResponseEnvelope

type JobGetResponseEnvelope struct {
	Errors   []JobGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []JobGetResponseEnvelopeMessages `json:"messages,required"`
	Result   LogpushLogpushJob                `json:"result,required,nullable"`
	// Whether the API call was successful
	Success JobGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    jobGetResponseEnvelopeJSON    `json:"-"`
}

func (*JobGetResponseEnvelope) UnmarshalJSON

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

type JobGetResponseEnvelopeErrors

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

func (*JobGetResponseEnvelopeErrors) UnmarshalJSON

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

type JobGetResponseEnvelopeMessages

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

func (*JobGetResponseEnvelopeMessages) UnmarshalJSON

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

type JobGetResponseEnvelopeSuccess

type JobGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	JobGetResponseEnvelopeSuccessTrue JobGetResponseEnvelopeSuccess = true
)

type JobListParams

type JobListParams 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"`
}

type JobListResponseEnvelope

type JobListResponseEnvelope struct {
	Errors   []JobListResponseEnvelopeErrors   `json:"errors,required"`
	Messages []JobListResponseEnvelopeMessages `json:"messages,required"`
	Result   []LogpushLogpushJob               `json:"result,required"`
	// Whether the API call was successful
	Success JobListResponseEnvelopeSuccess `json:"success,required"`
	JSON    jobListResponseEnvelopeJSON    `json:"-"`
}

func (*JobListResponseEnvelope) UnmarshalJSON

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

type JobListResponseEnvelopeErrors

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

func (*JobListResponseEnvelopeErrors) UnmarshalJSON

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

type JobListResponseEnvelopeMessages

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

func (*JobListResponseEnvelopeMessages) UnmarshalJSON

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

type JobListResponseEnvelopeSuccess

type JobListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	JobListResponseEnvelopeSuccessTrue JobListResponseEnvelopeSuccess = true
)

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.
	Dataset param.Field[string] `json:"dataset"`
	// Flag that indicates if the job is enabled.
	Enabled param.Field[bool] `json:"enabled"`
	// 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"`
	// 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"`
	// 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[JobNewParamsOutputOptions] `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

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

type JobNewParamsOutputOptions

type JobNewParamsOutputOptions 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[JobNewParamsOutputOptionsOutputType] `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[JobNewParamsOutputOptionsTimestampFormat] `json:"timestamp_format"`
}

The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored.

func (JobNewParamsOutputOptions) MarshalJSON

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

type JobNewParamsOutputOptionsOutputType

type JobNewParamsOutputOptionsOutputType 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 (
	JobNewParamsOutputOptionsOutputTypeNdjson JobNewParamsOutputOptionsOutputType = "ndjson"
	JobNewParamsOutputOptionsOutputTypeCsv    JobNewParamsOutputOptionsOutputType = "csv"
)

type JobNewParamsOutputOptionsTimestampFormat

type JobNewParamsOutputOptionsTimestampFormat string

String to specify the format for timestamps, such as `unixnano`, `unix`, or `rfc3339`.

const (
	JobNewParamsOutputOptionsTimestampFormatUnixnano JobNewParamsOutputOptionsTimestampFormat = "unixnano"
	JobNewParamsOutputOptionsTimestampFormatUnix     JobNewParamsOutputOptionsTimestampFormat = "unix"
	JobNewParamsOutputOptionsTimestampFormatRfc3339  JobNewParamsOutputOptionsTimestampFormat = "rfc3339"
)

type JobNewResponseEnvelope

type JobNewResponseEnvelope struct {
	Errors   []JobNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []JobNewResponseEnvelopeMessages `json:"messages,required"`
	Result   LogpushLogpushJob                `json:"result,required,nullable"`
	// Whether the API call was successful
	Success JobNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    jobNewResponseEnvelopeJSON    `json:"-"`
}

func (*JobNewResponseEnvelope) UnmarshalJSON

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

type JobNewResponseEnvelopeErrors

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

func (*JobNewResponseEnvelopeErrors) UnmarshalJSON

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

type JobNewResponseEnvelopeMessages

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

func (*JobNewResponseEnvelopeMessages) UnmarshalJSON

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

type JobNewResponseEnvelopeSuccess

type JobNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	JobNewResponseEnvelopeSuccessTrue JobNewResponseEnvelopeSuccess = true
)

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 *LogpushLogpushJob, 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 *[]LogpushLogpushJob, err error)

Lists Logpush jobs for an account or zone.

func (*JobService) New

func (r *JobService) New(ctx context.Context, params JobNewParams, opts ...option.RequestOption) (res *LogpushLogpushJob, 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 *LogpushLogpushJob, 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"`
	// 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"`
	// 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 structured replacement for `logpull_options`. When including this field, the
	// `logpull_option` field will be ignored.
	OutputOptions param.Field[JobUpdateParamsOutputOptions] `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

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

type JobUpdateParamsOutputOptions

type JobUpdateParamsOutputOptions 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[JobUpdateParamsOutputOptionsOutputType] `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[JobUpdateParamsOutputOptionsTimestampFormat] `json:"timestamp_format"`
}

The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored.

func (JobUpdateParamsOutputOptions) MarshalJSON

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

type JobUpdateParamsOutputOptionsOutputType

type JobUpdateParamsOutputOptionsOutputType 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 (
	JobUpdateParamsOutputOptionsOutputTypeNdjson JobUpdateParamsOutputOptionsOutputType = "ndjson"
	JobUpdateParamsOutputOptionsOutputTypeCsv    JobUpdateParamsOutputOptionsOutputType = "csv"
)

type JobUpdateParamsOutputOptionsTimestampFormat

type JobUpdateParamsOutputOptionsTimestampFormat string

String to specify the format for timestamps, such as `unixnano`, `unix`, or `rfc3339`.

const (
	JobUpdateParamsOutputOptionsTimestampFormatUnixnano JobUpdateParamsOutputOptionsTimestampFormat = "unixnano"
	JobUpdateParamsOutputOptionsTimestampFormatUnix     JobUpdateParamsOutputOptionsTimestampFormat = "unix"
	JobUpdateParamsOutputOptionsTimestampFormatRfc3339  JobUpdateParamsOutputOptionsTimestampFormat = "rfc3339"
)

type JobUpdateResponseEnvelope

type JobUpdateResponseEnvelope struct {
	Errors   []JobUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []JobUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   LogpushLogpushJob                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success JobUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    jobUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*JobUpdateResponseEnvelope) UnmarshalJSON

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

type JobUpdateResponseEnvelopeErrors

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

func (*JobUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type JobUpdateResponseEnvelopeMessages

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

func (*JobUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type JobUpdateResponseEnvelopeSuccess

type JobUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	JobUpdateResponseEnvelopeSuccessTrue JobUpdateResponseEnvelopeSuccess = true
)

type LogpushInstantLogsJob

type LogpushInstantLogsJob 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      logpushInstantLogsJobJSON `json:"-"`
}

func (*LogpushInstantLogsJob) UnmarshalJSON

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

type LogpushLogpushJob

type LogpushLogpushJob struct {
	// Unique id of the job.
	ID int64 `json:"id"`
	// Name of the dataset.
	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"`
	// 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 LogpushLogpushJobFrequency `json:"frequency,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"`
	// 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 LogpushLogpushJobOutputOptions `json:"output_options,nullable"`
	JSON          logpushLogpushJobJSON          `json:"-"`
}

func (*LogpushLogpushJob) UnmarshalJSON

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

type LogpushLogpushJobFrequency

type LogpushLogpushJobFrequency string

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 (
	LogpushLogpushJobFrequencyHigh LogpushLogpushJobFrequency = "high"
	LogpushLogpushJobFrequencyLow  LogpushLogpushJobFrequency = "low"
)

type LogpushLogpushJobOutputOptions

type LogpushLogpushJobOutputOptions 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 LogpushLogpushJobOutputOptionsOutputType `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 LogpushLogpushJobOutputOptionsTimestampFormat `json:"timestamp_format"`
	JSON            logpushLogpushJobOutputOptionsJSON            `json:"-"`
}

The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored.

func (*LogpushLogpushJobOutputOptions) UnmarshalJSON

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

type LogpushLogpushJobOutputOptionsOutputType

type LogpushLogpushJobOutputOptionsOutputType 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 (
	LogpushLogpushJobOutputOptionsOutputTypeNdjson LogpushLogpushJobOutputOptionsOutputType = "ndjson"
	LogpushLogpushJobOutputOptionsOutputTypeCsv    LogpushLogpushJobOutputOptionsOutputType = "csv"
)

type LogpushLogpushJobOutputOptionsTimestampFormat

type LogpushLogpushJobOutputOptionsTimestampFormat string

String to specify the format for timestamps, such as `unixnano`, `unix`, or `rfc3339`.

const (
	LogpushLogpushJobOutputOptionsTimestampFormatUnixnano LogpushLogpushJobOutputOptionsTimestampFormat = "unixnano"
	LogpushLogpushJobOutputOptionsTimestampFormatUnix     LogpushLogpushJobOutputOptionsTimestampFormat = "unix"
	LogpushLogpushJobOutputOptionsTimestampFormatRfc3339  LogpushLogpushJobOutputOptionsTimestampFormat = "rfc3339"
)

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 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   []OwnershipNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []OwnershipNewResponseEnvelopeMessages `json:"messages,required"`
	Result   OwnershipNewResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success OwnershipNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    ownershipNewResponseEnvelopeJSON    `json:"-"`
}

func (*OwnershipNewResponseEnvelope) UnmarshalJSON

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

type OwnershipNewResponseEnvelopeErrors

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

func (*OwnershipNewResponseEnvelopeErrors) UnmarshalJSON

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

type OwnershipNewResponseEnvelopeMessages

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

func (*OwnershipNewResponseEnvelopeMessages) UnmarshalJSON

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

type OwnershipNewResponseEnvelopeSuccess

type OwnershipNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	OwnershipNewResponseEnvelopeSuccessTrue OwnershipNewResponseEnvelopeSuccess = true
)

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

Gets a new ownership challenge sent to your destination.

func (*OwnershipService) Validate

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 OwnershipValidateResponse

type OwnershipValidateResponse struct {
	Valid bool                          `json:"valid"`
	JSON  ownershipValidateResponseJSON `json:"-"`
}

func (*OwnershipValidateResponse) UnmarshalJSON

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

type OwnershipValidateResponseEnvelope

type OwnershipValidateResponseEnvelope struct {
	Errors   []OwnershipValidateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []OwnershipValidateResponseEnvelopeMessages `json:"messages,required"`
	Result   OwnershipValidateResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success OwnershipValidateResponseEnvelopeSuccess `json:"success,required"`
	JSON    ownershipValidateResponseEnvelopeJSON    `json:"-"`
}

func (*OwnershipValidateResponseEnvelope) UnmarshalJSON

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

type OwnershipValidateResponseEnvelopeErrors

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

func (*OwnershipValidateResponseEnvelopeErrors) UnmarshalJSON

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

type OwnershipValidateResponseEnvelopeMessages

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

func (*OwnershipValidateResponseEnvelopeMessages) UnmarshalJSON

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

type OwnershipValidateResponseEnvelopeSuccess

type OwnershipValidateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	OwnershipValidateResponseEnvelopeSuccessTrue OwnershipValidateResponseEnvelopeSuccess = true
)

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   []ValidateDestinationResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ValidateDestinationResponseEnvelopeMessages `json:"messages,required"`
	Result   ValidateDestinationResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ValidateDestinationResponseEnvelopeSuccess `json:"success,required"`
	JSON    validateDestinationResponseEnvelopeJSON    `json:"-"`
}

func (*ValidateDestinationResponseEnvelope) UnmarshalJSON

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

type ValidateDestinationResponseEnvelopeErrors

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

func (*ValidateDestinationResponseEnvelopeErrors) UnmarshalJSON

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

type ValidateDestinationResponseEnvelopeMessages

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

func (*ValidateDestinationResponseEnvelopeMessages) UnmarshalJSON

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

type ValidateDestinationResponseEnvelopeSuccess

type ValidateDestinationResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ValidateDestinationResponseEnvelopeSuccessTrue ValidateDestinationResponseEnvelopeSuccess = true
)

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   []ValidateOriginResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ValidateOriginResponseEnvelopeMessages `json:"messages,required"`
	Result   ValidateOriginResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success ValidateOriginResponseEnvelopeSuccess `json:"success,required"`
	JSON    validateOriginResponseEnvelopeJSON    `json:"-"`
}

func (*ValidateOriginResponseEnvelope) UnmarshalJSON

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

type ValidateOriginResponseEnvelopeErrors

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

func (*ValidateOriginResponseEnvelopeErrors) UnmarshalJSON

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

type ValidateOriginResponseEnvelopeMessages

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

func (*ValidateOriginResponseEnvelopeMessages) UnmarshalJSON

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

type ValidateOriginResponseEnvelopeSuccess

type ValidateOriginResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ValidateOriginResponseEnvelopeSuccessTrue ValidateOriginResponseEnvelopeSuccess = true
)

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

Checks if there is an existing job with a destination.

func (*ValidateService) Origin

Validates logpull origin with logpull_options.

Jump to

Keyboard shortcuts

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