logpush

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type 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   []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

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   []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

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

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

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

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 Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

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 JobDeleteParams struct {
	Body interface{} `json:"body,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 (JobDeleteParams) MarshalJSON

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

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

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   []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 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 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[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

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 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, params 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

Lists Logpush jobs for an account or zone.

func (*JobService) ListAutoPaging

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"`
	// 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[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

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

type LogpushJob

type LogpushJob 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 LogpushJobFrequency `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 OutputOptions  `json:"output_options,nullable"`
	JSON          logpushJobJSON `json:"-"`
}

func (*LogpushJob) UnmarshalJSON

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

type LogpushJobFrequency

type LogpushJobFrequency 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 (
	LogpushJobFrequencyHigh LogpushJobFrequency = "high"
	LogpushJobFrequencyLow  LogpushJobFrequency = "low"
)

func (LogpushJobFrequency) IsKnown

func (r LogpushJobFrequency) 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 Member added in v2.1.0

type Member = shared.Member

This is an alias to an internal type.

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRole added in v2.1.0

type MemberRole = shared.MemberRole

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissions added in v2.1.0

type MemberRolesPermissions = shared.MemberRolesPermissions

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberUser added in v2.1.0

type MemberUser = shared.MemberUser

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

This is an alias to an internal type.

type 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

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

type OwnershipValidation

type OwnershipValidation struct {
	Valid bool                    `json:"valid"`
	JSON  ownershipValidationJSON `json:"-"`
}

func (*OwnershipValidation) UnmarshalJSON

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

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

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

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

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