workers

package
v2.0.0-beta.17 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIRunParamsImageClassification

type AIRunParamsImageClassification struct {
	AccountID param.Field[string]    `path:"account_id,required"`
	Image     param.Field[[]float64] `json:"image"`
}

func (AIRunParamsImageClassification) ImplementsAIRunParams

func (AIRunParamsImageClassification) ImplementsAIRunParams()

func (AIRunParamsImageClassification) MarshalJSON

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

type AIRunParamsImageToText

type AIRunParamsImageToText struct {
	AccountID param.Field[string]    `path:"account_id,required"`
	Image     param.Field[[]float64] `json:"image"`
	MaxTokens param.Field[int64]     `json:"max_tokens"`
	Prompt    param.Field[string]    `json:"prompt"`
}

func (AIRunParamsImageToText) ImplementsAIRunParams

func (AIRunParamsImageToText) ImplementsAIRunParams()

func (AIRunParamsImageToText) MarshalJSON

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

type AIRunParamsObjectDetection

type AIRunParamsObjectDetection struct {
	AccountID param.Field[string]    `path:"account_id,required"`
	Image     param.Field[[]float64] `json:"image"`
}

func (AIRunParamsObjectDetection) ImplementsAIRunParams

func (AIRunParamsObjectDetection) ImplementsAIRunParams()

func (AIRunParamsObjectDetection) MarshalJSON

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

type AIRunParamsSentenceSimilarity

type AIRunParamsSentenceSimilarity struct {
	AccountID param.Field[string]   `path:"account_id,required"`
	Sentences param.Field[[]string] `json:"sentences,required"`
	Source    param.Field[string]   `json:"source,required"`
}

func (AIRunParamsSentenceSimilarity) ImplementsAIRunParams

func (AIRunParamsSentenceSimilarity) ImplementsAIRunParams()

func (AIRunParamsSentenceSimilarity) MarshalJSON

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

type AIRunParamsSpeechRecognition

type AIRunParamsSpeechRecognition struct {
	AccountID param.Field[string]    `path:"account_id,required"`
	Audio     param.Field[[]float64] `json:"audio"`
}

func (AIRunParamsSpeechRecognition) ImplementsAIRunParams

func (AIRunParamsSpeechRecognition) ImplementsAIRunParams()

func (AIRunParamsSpeechRecognition) MarshalJSON

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

type AIRunParamsSummarization

type AIRunParamsSummarization struct {
	AccountID param.Field[string] `path:"account_id,required"`
	InputText param.Field[string] `json:"input_text,required"`
	MaxLength param.Field[int64]  `json:"max_length"`
}

func (AIRunParamsSummarization) ImplementsAIRunParams

func (AIRunParamsSummarization) ImplementsAIRunParams()

func (AIRunParamsSummarization) MarshalJSON

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

type AIRunParamsTextClassification

type AIRunParamsTextClassification struct {
	AccountID param.Field[string] `path:"account_id,required"`
	Text      param.Field[string] `json:"text,required"`
}

func (AIRunParamsTextClassification) ImplementsAIRunParams

func (AIRunParamsTextClassification) ImplementsAIRunParams()

func (AIRunParamsTextClassification) MarshalJSON

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

type AIRunParamsTextEmbeddings

type AIRunParamsTextEmbeddings struct {
	AccountID param.Field[string]                        `path:"account_id,required"`
	Text      param.Field[AIRunParamsTextEmbeddingsText] `json:"text,required"`
}

func (AIRunParamsTextEmbeddings) ImplementsAIRunParams

func (AIRunParamsTextEmbeddings) ImplementsAIRunParams()

func (AIRunParamsTextEmbeddings) MarshalJSON

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

type AIRunParamsTextEmbeddingsText

type AIRunParamsTextEmbeddingsText interface {
	ImplementsWorkersAIRunParamsTextEmbeddingsText()
}

Satisfied by shared.UnionString, workers.AIRunParamsTextEmbeddingsTextArray.

type AIRunParamsTextEmbeddingsTextArray

type AIRunParamsTextEmbeddingsTextArray []string

func (AIRunParamsTextEmbeddingsTextArray) ImplementsWorkersAIRunParamsTextEmbeddingsText

func (r AIRunParamsTextEmbeddingsTextArray) ImplementsWorkersAIRunParamsTextEmbeddingsText()

type AIRunParamsTextGeneration

type AIRunParamsTextGeneration struct {
	AccountID param.Field[string]                             `path:"account_id,required"`
	Lora      param.Field[string]                             `json:"lora"`
	MaxTokens param.Field[int64]                              `json:"max_tokens"`
	Messages  param.Field[[]AIRunParamsTextGenerationMessage] `json:"messages"`
	Prompt    param.Field[string]                             `json:"prompt"`
	Raw       param.Field[bool]                               `json:"raw"`
	Stream    param.Field[bool]                               `json:"stream"`
}

func (AIRunParamsTextGeneration) ImplementsAIRunParams

func (AIRunParamsTextGeneration) ImplementsAIRunParams()

func (AIRunParamsTextGeneration) MarshalJSON

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

type AIRunParamsTextGenerationMessage

type AIRunParamsTextGenerationMessage struct {
	Content param.Field[string] `json:"content,required"`
	Role    param.Field[string] `json:"role,required"`
}

func (AIRunParamsTextGenerationMessage) MarshalJSON

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

type AIRunParamsTextToImage

type AIRunParamsTextToImage struct {
	AccountID param.Field[string]    `path:"account_id,required"`
	Prompt    param.Field[string]    `json:"prompt,required"`
	Guidance  param.Field[float64]   `json:"guidance"`
	Image     param.Field[[]float64] `json:"image"`
	Mask      param.Field[[]float64] `json:"mask"`
	NumSteps  param.Field[int64]     `json:"num_steps"`
	Strength  param.Field[float64]   `json:"strength"`
}

func (AIRunParamsTextToImage) ImplementsAIRunParams

func (AIRunParamsTextToImage) ImplementsAIRunParams()

func (AIRunParamsTextToImage) MarshalJSON

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

type AIRunParamsTranslation

type AIRunParamsTranslation struct {
	AccountID  param.Field[string] `path:"account_id,required"`
	TargetLang param.Field[string] `json:"target_lang,required"`
	Text       param.Field[string] `json:"text,required"`
	SourceLang param.Field[string] `json:"source_lang"`
}

func (AIRunParamsTranslation) ImplementsAIRunParams

func (AIRunParamsTranslation) ImplementsAIRunParams()

func (AIRunParamsTranslation) MarshalJSON

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

type AIRunResponseEnvelope

type AIRunResponseEnvelope struct {
	Result AIRunResponse             `json:"result" format:"binary"`
	JSON   aiRunResponseEnvelopeJSON `json:"-"`
}

func (*AIRunResponseEnvelope) UnmarshalJSON

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

type AIRunResponseImageClassification

type AIRunResponseImageClassification []AIRunResponseImageClassification

func (AIRunResponseImageClassification) ImplementsWorkersAIRunResponse

func (r AIRunResponseImageClassification) ImplementsWorkersAIRunResponse()

type AIRunResponseImageToText

type AIRunResponseImageToText struct {
	Description string                       `json:"description"`
	JSON        aiRunResponseImageToTextJSON `json:"-"`
}

func (AIRunResponseImageToText) ImplementsWorkersAIRunResponse

func (r AIRunResponseImageToText) ImplementsWorkersAIRunResponse()

func (*AIRunResponseImageToText) UnmarshalJSON

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

type AIRunResponseObject

type AIRunResponseObject struct {
	Response string                  `json:"response"`
	JSON     aiRunResponseObjectJSON `json:"-"`
}

func (AIRunResponseObject) ImplementsWorkersAIRunResponse

func (r AIRunResponseObject) ImplementsWorkersAIRunResponse()

func (*AIRunResponseObject) UnmarshalJSON

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

type AIRunResponseObjectDetection

type AIRunResponseObjectDetection []AIRunResponseObjectDetection

func (AIRunResponseObjectDetection) ImplementsWorkersAIRunResponse

func (r AIRunResponseObjectDetection) ImplementsWorkersAIRunResponse()

type AIRunResponseSentenceSimilarity

type AIRunResponseSentenceSimilarity []float64

func (AIRunResponseSentenceSimilarity) ImplementsWorkersAIRunResponse

func (r AIRunResponseSentenceSimilarity) ImplementsWorkersAIRunResponse()

type AIRunResponseSpeechRecognition

type AIRunResponseSpeechRecognition struct {
	Text      string                               `json:"text,required"`
	Vtt       string                               `json:"vtt"`
	WordCount float64                              `json:"word_count"`
	Words     []AIRunResponseSpeechRecognitionWord `json:"words"`
	JSON      aiRunResponseSpeechRecognitionJSON   `json:"-"`
}

func (AIRunResponseSpeechRecognition) ImplementsWorkersAIRunResponse

func (r AIRunResponseSpeechRecognition) ImplementsWorkersAIRunResponse()

func (*AIRunResponseSpeechRecognition) UnmarshalJSON

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

type AIRunResponseSpeechRecognitionWord

type AIRunResponseSpeechRecognitionWord struct {
	End   float64                                `json:"end"`
	Start float64                                `json:"start"`
	Word  string                                 `json:"word"`
	JSON  aiRunResponseSpeechRecognitionWordJSON `json:"-"`
}

func (*AIRunResponseSpeechRecognitionWord) UnmarshalJSON

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

type AIRunResponseSummarization

type AIRunResponseSummarization struct {
	Summary string                         `json:"summary"`
	JSON    aiRunResponseSummarizationJSON `json:"-"`
}

func (AIRunResponseSummarization) ImplementsWorkersAIRunResponse

func (r AIRunResponseSummarization) ImplementsWorkersAIRunResponse()

func (*AIRunResponseSummarization) UnmarshalJSON

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

type AIRunResponseTextClassification

type AIRunResponseTextClassification []AIRunResponseTextClassification

func (AIRunResponseTextClassification) ImplementsWorkersAIRunResponse

func (r AIRunResponseTextClassification) ImplementsWorkersAIRunResponse()

type AIRunResponseTextEmbeddings

type AIRunResponseTextEmbeddings struct {
	Data  [][]float64                     `json:"data"`
	Shape []float64                       `json:"shape"`
	JSON  aiRunResponseTextEmbeddingsJSON `json:"-"`
}

func (AIRunResponseTextEmbeddings) ImplementsWorkersAIRunResponse

func (r AIRunResponseTextEmbeddings) ImplementsWorkersAIRunResponse()

func (*AIRunResponseTextEmbeddings) UnmarshalJSON

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

type AIRunResponseTranslation

type AIRunResponseTranslation struct {
	TranslatedText string                       `json:"translated_text"`
	JSON           aiRunResponseTranslationJSON `json:"-"`
}

func (AIRunResponseTranslation) ImplementsWorkersAIRunResponse

func (r AIRunResponseTranslation) ImplementsWorkersAIRunResponse()

func (*AIRunResponseTranslation) UnmarshalJSON

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

type AIService

type AIService struct {
	Options []option.RequestOption
}

AIService 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 NewAIService method instead.

func NewAIService

func NewAIService(opts ...option.RequestOption) (r *AIService)

NewAIService 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 (*AIService) Run

func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParams, opts ...option.RequestOption) (res *AIRunResponse, err error)

This endpoint provides users with the capability to run specific AI models on-demand.

By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases.

Model specific inputs available in [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/).

type AccountSettingGetParams

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

type AccountSettingGetResponse

type AccountSettingGetResponse struct {
	DefaultUsageModel interface{}                   `json:"default_usage_model"`
	GreenCompute      interface{}                   `json:"green_compute"`
	JSON              accountSettingGetResponseJSON `json:"-"`
}

func (*AccountSettingGetResponse) UnmarshalJSON

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

type AccountSettingGetResponseEnvelope

type AccountSettingGetResponseEnvelope struct {
	Errors   []AccountSettingGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AccountSettingGetResponseEnvelopeMessages `json:"messages,required"`
	Result   AccountSettingGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success AccountSettingGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    accountSettingGetResponseEnvelopeJSON    `json:"-"`
}

func (*AccountSettingGetResponseEnvelope) UnmarshalJSON

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

type AccountSettingGetResponseEnvelopeErrors

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

func (*AccountSettingGetResponseEnvelopeErrors) UnmarshalJSON

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

type AccountSettingGetResponseEnvelopeMessages

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

func (*AccountSettingGetResponseEnvelopeMessages) UnmarshalJSON

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

type AccountSettingGetResponseEnvelopeSuccess

type AccountSettingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AccountSettingGetResponseEnvelopeSuccessTrue AccountSettingGetResponseEnvelopeSuccess = true
)

func (AccountSettingGetResponseEnvelopeSuccess) IsKnown

type AccountSettingService

type AccountSettingService struct {
	Options []option.RequestOption
}

AccountSettingService 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 NewAccountSettingService method instead.

func NewAccountSettingService

func NewAccountSettingService(opts ...option.RequestOption) (r *AccountSettingService)

NewAccountSettingService 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 (*AccountSettingService) Get

Fetches Worker account settings for an account.

func (*AccountSettingService) Update

Creates Worker account settings for an account.

type AccountSettingUpdateParams

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

func (AccountSettingUpdateParams) MarshalJSON

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

type AccountSettingUpdateResponse

type AccountSettingUpdateResponse struct {
	DefaultUsageModel interface{}                      `json:"default_usage_model"`
	GreenCompute      interface{}                      `json:"green_compute"`
	JSON              accountSettingUpdateResponseJSON `json:"-"`
}

func (*AccountSettingUpdateResponse) UnmarshalJSON

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

type AccountSettingUpdateResponseEnvelope

type AccountSettingUpdateResponseEnvelope struct {
	Errors   []AccountSettingUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AccountSettingUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   AccountSettingUpdateResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success AccountSettingUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    accountSettingUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*AccountSettingUpdateResponseEnvelope) UnmarshalJSON

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

type AccountSettingUpdateResponseEnvelopeErrors

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

func (*AccountSettingUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type AccountSettingUpdateResponseEnvelopeMessages

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

func (*AccountSettingUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type AccountSettingUpdateResponseEnvelopeSuccess

type AccountSettingUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AccountSettingUpdateResponseEnvelopeSuccessTrue AccountSettingUpdateResponseEnvelopeSuccess = true
)

func (AccountSettingUpdateResponseEnvelopeSuccess) IsKnown

type DeploymentByScriptDetailGetParams

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

type DeploymentByScriptDetailGetResponse

type DeploymentByScriptDetailGetResponse struct {
	ID        string                                  `json:"id"`
	Metadata  interface{}                             `json:"metadata"`
	Number    float64                                 `json:"number"`
	Resources interface{}                             `json:"resources"`
	JSON      deploymentByScriptDetailGetResponseJSON `json:"-"`
}

func (*DeploymentByScriptDetailGetResponse) UnmarshalJSON

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

type DeploymentByScriptDetailGetResponseEnvelope

type DeploymentByScriptDetailGetResponseEnvelope struct {
	Errors   []DeploymentByScriptDetailGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DeploymentByScriptDetailGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DeploymentByScriptDetailGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DeploymentByScriptDetailGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    deploymentByScriptDetailGetResponseEnvelopeJSON    `json:"-"`
}

func (*DeploymentByScriptDetailGetResponseEnvelope) UnmarshalJSON

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

type DeploymentByScriptDetailGetResponseEnvelopeErrors

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

func (*DeploymentByScriptDetailGetResponseEnvelopeErrors) UnmarshalJSON

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

type DeploymentByScriptDetailGetResponseEnvelopeMessages

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

func (*DeploymentByScriptDetailGetResponseEnvelopeMessages) UnmarshalJSON

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

type DeploymentByScriptDetailGetResponseEnvelopeSuccess

type DeploymentByScriptDetailGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DeploymentByScriptDetailGetResponseEnvelopeSuccessTrue DeploymentByScriptDetailGetResponseEnvelopeSuccess = true
)

func (DeploymentByScriptDetailGetResponseEnvelopeSuccess) IsKnown

type DeploymentByScriptDetailService

type DeploymentByScriptDetailService struct {
	Options []option.RequestOption
}

DeploymentByScriptDetailService 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 NewDeploymentByScriptDetailService method instead.

func NewDeploymentByScriptDetailService

func NewDeploymentByScriptDetailService(opts ...option.RequestOption) (r *DeploymentByScriptDetailService)

NewDeploymentByScriptDetailService 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 (*DeploymentByScriptDetailService) Get

Get Deployment Detail

type DeploymentByScriptGetParams

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

type DeploymentByScriptGetResponse

type DeploymentByScriptGetResponse struct {
	Items  []interface{}                     `json:"items"`
	Latest interface{}                       `json:"latest"`
	JSON   deploymentByScriptGetResponseJSON `json:"-"`
}

func (*DeploymentByScriptGetResponse) UnmarshalJSON

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

type DeploymentByScriptGetResponseEnvelope

type DeploymentByScriptGetResponseEnvelope struct {
	Errors   []DeploymentByScriptGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DeploymentByScriptGetResponseEnvelopeMessages `json:"messages,required"`
	Result   DeploymentByScriptGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success DeploymentByScriptGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    deploymentByScriptGetResponseEnvelopeJSON    `json:"-"`
}

func (*DeploymentByScriptGetResponseEnvelope) UnmarshalJSON

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

type DeploymentByScriptGetResponseEnvelopeErrors

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

func (*DeploymentByScriptGetResponseEnvelopeErrors) UnmarshalJSON

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

type DeploymentByScriptGetResponseEnvelopeMessages

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

func (*DeploymentByScriptGetResponseEnvelopeMessages) UnmarshalJSON

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

type DeploymentByScriptGetResponseEnvelopeSuccess

type DeploymentByScriptGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DeploymentByScriptGetResponseEnvelopeSuccessTrue DeploymentByScriptGetResponseEnvelopeSuccess = true
)

func (DeploymentByScriptGetResponseEnvelopeSuccess) IsKnown

type DeploymentByScriptService

type DeploymentByScriptService struct {
	Options []option.RequestOption
	Details *DeploymentByScriptDetailService
}

DeploymentByScriptService 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 NewDeploymentByScriptService method instead.

func NewDeploymentByScriptService

func NewDeploymentByScriptService(opts ...option.RequestOption) (r *DeploymentByScriptService)

NewDeploymentByScriptService 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 (*DeploymentByScriptService) Get

List Deployments

type DeploymentService

type DeploymentService struct {
	Options   []option.RequestOption
	ByScripts *DeploymentByScriptService
}

DeploymentService 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 NewDeploymentService method instead.

func NewDeploymentService

func NewDeploymentService(opts ...option.RequestOption) (r *DeploymentService)

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

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

type DomainGetParams

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

type DomainGetResponseEnvelope

type DomainGetResponseEnvelope struct {
	Errors   []DomainGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DomainGetResponseEnvelopeMessages `json:"messages,required"`
	Result   WorkersDomain                       `json:"result,required"`
	// Whether the API call was successful
	Success DomainGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    domainGetResponseEnvelopeJSON    `json:"-"`
}

func (*DomainGetResponseEnvelope) UnmarshalJSON

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

type DomainGetResponseEnvelopeErrors

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

func (*DomainGetResponseEnvelopeErrors) UnmarshalJSON

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

type DomainGetResponseEnvelopeMessages

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

func (*DomainGetResponseEnvelopeMessages) UnmarshalJSON

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

type DomainGetResponseEnvelopeSuccess

type DomainGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DomainGetResponseEnvelopeSuccessTrue DomainGetResponseEnvelopeSuccess = true
)

func (DomainGetResponseEnvelopeSuccess) IsKnown

type DomainListParams

type DomainListParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	// Worker environment associated with the zone and hostname.
	Environment param.Field[string] `query:"environment"`
	// Hostname of the Worker Domain.
	Hostname param.Field[string] `query:"hostname"`
	// Worker service associated with the zone and hostname.
	Service param.Field[string] `query:"service"`
	// Identifier of the zone.
	ZoneID param.Field[string] `query:"zone_id"`
	// Name of the zone.
	ZoneName param.Field[string] `query:"zone_name"`
}

func (DomainListParams) URLQuery

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

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

type DomainService

type DomainService struct {
	Options []option.RequestOption
}

DomainService 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 NewDomainService method instead.

func NewDomainService

func NewDomainService(opts ...option.RequestOption) (r *DomainService)

NewDomainService 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 (*DomainService) Delete

func (r *DomainService) Delete(ctx context.Context, domainID string, body DomainDeleteParams, opts ...option.RequestOption) (err error)

Detaches a Worker from a zone and hostname.

func (*DomainService) Get

func (r *DomainService) Get(ctx context.Context, domainID string, query DomainGetParams, opts ...option.RequestOption) (res *WorkersDomain, err error)

Gets a Worker domain.

func (*DomainService) List

Lists all Worker Domains for an account.

func (*DomainService) ListAutoPaging

Lists all Worker Domains for an account.

func (*DomainService) Update

func (r *DomainService) Update(ctx context.Context, params DomainUpdateParams, opts ...option.RequestOption) (res *WorkersDomain, err error)

Attaches a Worker to a zone and hostname.

type DomainUpdateParams

type DomainUpdateParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
	// Worker environment associated with the zone and hostname.
	Environment param.Field[string] `json:"environment,required"`
	// Hostname of the Worker Domain.
	Hostname param.Field[string] `json:"hostname,required"`
	// Worker service associated with the zone and hostname.
	Service param.Field[string] `json:"service,required"`
	// Identifier of the zone.
	ZoneID param.Field[string] `json:"zone_id,required"`
}

func (DomainUpdateParams) MarshalJSON

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

type DomainUpdateResponseEnvelope

type DomainUpdateResponseEnvelope struct {
	Errors   []DomainUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []DomainUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   WorkersDomain                          `json:"result,required"`
	// Whether the API call was successful
	Success DomainUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    domainUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*DomainUpdateResponseEnvelope) UnmarshalJSON

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

type DomainUpdateResponseEnvelopeErrors

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

func (*DomainUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type DomainUpdateResponseEnvelopeMessages

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

func (*DomainUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type DomainUpdateResponseEnvelopeSuccess

type DomainUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DomainUpdateResponseEnvelopeSuccessTrue DomainUpdateResponseEnvelopeSuccess = true
)

func (DomainUpdateResponseEnvelopeSuccess) IsKnown

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type FilterDeleteParams

type FilterDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type FilterDeleteResponse

type FilterDeleteResponse struct {
	// Identifier
	ID   string                   `json:"id,required"`
	JSON filterDeleteResponseJSON `json:"-"`
}

func (*FilterDeleteResponse) UnmarshalJSON

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

type FilterDeleteResponseEnvelope

type FilterDeleteResponseEnvelope struct {
	Errors   []FilterDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FilterDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   FilterDeleteResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success FilterDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    filterDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*FilterDeleteResponseEnvelope) UnmarshalJSON

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

type FilterDeleteResponseEnvelopeErrors

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

func (*FilterDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type FilterDeleteResponseEnvelopeMessages

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

func (*FilterDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type FilterDeleteResponseEnvelopeSuccess

type FilterDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FilterDeleteResponseEnvelopeSuccessTrue FilterDeleteResponseEnvelopeSuccess = true
)

func (FilterDeleteResponseEnvelopeSuccess) IsKnown

type FilterListParams

type FilterListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type FilterNewParams

type FilterNewParams struct {
	// Identifier
	ZoneID  param.Field[string] `path:"zone_id,required"`
	Enabled param.Field[bool]   `json:"enabled,required"`
	Pattern param.Field[string] `json:"pattern,required"`
}

func (FilterNewParams) MarshalJSON

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

type FilterNewResponse

type FilterNewResponse struct {
	// Identifier
	ID   string                `json:"id,required"`
	JSON filterNewResponseJSON `json:"-"`
}

func (*FilterNewResponse) UnmarshalJSON

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

type FilterNewResponseEnvelope

type FilterNewResponseEnvelope struct {
	Errors   []FilterNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FilterNewResponseEnvelopeMessages `json:"messages,required"`
	Result   FilterNewResponse                   `json:"result,required,nullable"`
	// Whether the API call was successful
	Success FilterNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    filterNewResponseEnvelopeJSON    `json:"-"`
}

func (*FilterNewResponseEnvelope) UnmarshalJSON

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

type FilterNewResponseEnvelopeErrors

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

func (*FilterNewResponseEnvelopeErrors) UnmarshalJSON

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

type FilterNewResponseEnvelopeMessages

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

func (*FilterNewResponseEnvelopeMessages) UnmarshalJSON

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

type FilterNewResponseEnvelopeSuccess

type FilterNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FilterNewResponseEnvelopeSuccessTrue FilterNewResponseEnvelopeSuccess = true
)

func (FilterNewResponseEnvelopeSuccess) IsKnown

type FilterService

type FilterService struct {
	Options []option.RequestOption
}

FilterService 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 NewFilterService method instead.

func NewFilterService

func NewFilterService(opts ...option.RequestOption) (r *FilterService)

NewFilterService 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 (*FilterService) Delete

func (r *FilterService) Delete(ctx context.Context, filterID string, body FilterDeleteParams, opts ...option.RequestOption) (res *FilterDeleteResponse, err error)

Delete Filter

func (*FilterService) List

List Filters

func (*FilterService) ListAutoPaging

List Filters

func (*FilterService) New

func (r *FilterService) New(ctx context.Context, params FilterNewParams, opts ...option.RequestOption) (res *FilterNewResponse, err error)

Create Filter

func (*FilterService) Update

func (r *FilterService) Update(ctx context.Context, filterID string, params FilterUpdateParams, opts ...option.RequestOption) (res *WorkersFilter, err error)

Update Filter

type FilterUpdateParams

type FilterUpdateParams struct {
	// Identifier
	ZoneID  param.Field[string] `path:"zone_id,required"`
	Enabled param.Field[bool]   `json:"enabled,required"`
	Pattern param.Field[string] `json:"pattern,required"`
}

func (FilterUpdateParams) MarshalJSON

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

type FilterUpdateResponseEnvelope

type FilterUpdateResponseEnvelope struct {
	Errors   []FilterUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []FilterUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   WorkersFilter                          `json:"result,required"`
	// Whether the API call was successful
	Success FilterUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    filterUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*FilterUpdateResponseEnvelope) UnmarshalJSON

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

type FilterUpdateResponseEnvelopeErrors

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

func (*FilterUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type FilterUpdateResponseEnvelopeMessages

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

func (*FilterUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type FilterUpdateResponseEnvelopeSuccess

type FilterUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	FilterUpdateResponseEnvelopeSuccessTrue FilterUpdateResponseEnvelopeSuccess = true
)

func (FilterUpdateResponseEnvelopeSuccess) IsKnown

type RouteDeleteParams

type RouteDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RouteDeleteResponse

type RouteDeleteResponse interface {
	ImplementsWorkersRouteDeleteResponse()
}

Union satisfied by workers.RouteDeleteResponseUnknown or shared.UnionString.

type RouteDeleteResponseEnvelope

type RouteDeleteResponseEnvelope struct {
	Errors   []RouteDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   RouteDeleteResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success RouteDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    routeDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*RouteDeleteResponseEnvelope) UnmarshalJSON

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

type RouteDeleteResponseEnvelopeErrors

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

func (*RouteDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type RouteDeleteResponseEnvelopeMessages

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

func (*RouteDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type RouteDeleteResponseEnvelopeSuccess

type RouteDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteDeleteResponseEnvelopeSuccessTrue RouteDeleteResponseEnvelopeSuccess = true
)

func (RouteDeleteResponseEnvelopeSuccess) IsKnown

type RouteGetParams

type RouteGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RouteGetResponseEnvelope

type RouteGetResponseEnvelope struct {
	Errors   []RouteGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteGetResponseEnvelopeMessages `json:"messages,required"`
	Result   WorkersRoute                       `json:"result,required"`
	// Whether the API call was successful
	Success RouteGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    routeGetResponseEnvelopeJSON    `json:"-"`
}

func (*RouteGetResponseEnvelope) UnmarshalJSON

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

type RouteGetResponseEnvelopeErrors

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

func (*RouteGetResponseEnvelopeErrors) UnmarshalJSON

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

type RouteGetResponseEnvelopeMessages

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

func (*RouteGetResponseEnvelopeMessages) UnmarshalJSON

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

type RouteGetResponseEnvelopeSuccess

type RouteGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteGetResponseEnvelopeSuccessTrue RouteGetResponseEnvelopeSuccess = true
)

func (RouteGetResponseEnvelopeSuccess) IsKnown

type RouteListParams

type RouteListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type RouteNewParams

type RouteNewParams struct {
	// Identifier
	ZoneID  param.Field[string] `path:"zone_id,required"`
	Pattern param.Field[string] `json:"pattern,required"`
	// Name of the script, used in URLs and route configuration.
	Script param.Field[string] `json:"script"`
}

func (RouteNewParams) MarshalJSON

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

type RouteNewResponse

type RouteNewResponse interface {
	ImplementsWorkersRouteNewResponse()
}

Union satisfied by workers.RouteNewResponseUnknown or shared.UnionString.

type RouteNewResponseEnvelope

type RouteNewResponseEnvelope struct {
	Errors   []RouteNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteNewResponseEnvelopeMessages `json:"messages,required"`
	Result   RouteNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success RouteNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    routeNewResponseEnvelopeJSON    `json:"-"`
}

func (*RouteNewResponseEnvelope) UnmarshalJSON

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

type RouteNewResponseEnvelopeErrors

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

func (*RouteNewResponseEnvelopeErrors) UnmarshalJSON

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

type RouteNewResponseEnvelopeMessages

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

func (*RouteNewResponseEnvelopeMessages) UnmarshalJSON

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

type RouteNewResponseEnvelopeSuccess

type RouteNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteNewResponseEnvelopeSuccessTrue RouteNewResponseEnvelopeSuccess = true
)

func (RouteNewResponseEnvelopeSuccess) IsKnown

type RouteService

type RouteService struct {
	Options []option.RequestOption
}

RouteService 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 NewRouteService method instead.

func NewRouteService

func NewRouteService(opts ...option.RequestOption) (r *RouteService)

NewRouteService 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 (*RouteService) Delete

func (r *RouteService) Delete(ctx context.Context, routeID string, body RouteDeleteParams, opts ...option.RequestOption) (res *RouteDeleteResponse, err error)

Deletes a route.

func (*RouteService) Get

func (r *RouteService) Get(ctx context.Context, routeID string, query RouteGetParams, opts ...option.RequestOption) (res *WorkersRoute, err error)

Returns information about a route, including URL pattern and Worker.

func (*RouteService) List

Returns routes for a zone.

func (*RouteService) ListAutoPaging

Returns routes for a zone.

func (*RouteService) New

func (r *RouteService) New(ctx context.Context, params RouteNewParams, opts ...option.RequestOption) (res *RouteNewResponse, err error)

Creates a route that maps a URL pattern to a Worker.

func (*RouteService) Update

func (r *RouteService) Update(ctx context.Context, routeID string, params RouteUpdateParams, opts ...option.RequestOption) (res *WorkersRoute, err error)

Updates the URL pattern or Worker associated with a route.

type RouteUpdateParams

type RouteUpdateParams struct {
	// Identifier
	ZoneID  param.Field[string] `path:"zone_id,required"`
	Pattern param.Field[string] `json:"pattern,required"`
	// Name of the script, used in URLs and route configuration.
	Script param.Field[string] `json:"script"`
}

func (RouteUpdateParams) MarshalJSON

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

type RouteUpdateResponseEnvelope

type RouteUpdateResponseEnvelope struct {
	Errors   []RouteUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RouteUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   WorkersRoute                          `json:"result,required"`
	// Whether the API call was successful
	Success RouteUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    routeUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*RouteUpdateResponseEnvelope) UnmarshalJSON

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

type RouteUpdateResponseEnvelopeErrors

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

func (*RouteUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type RouteUpdateResponseEnvelopeMessages

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

func (*RouteUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type RouteUpdateResponseEnvelopeSuccess

type RouteUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RouteUpdateResponseEnvelopeSuccessTrue RouteUpdateResponseEnvelopeSuccess = true
)

func (RouteUpdateResponseEnvelopeSuccess) IsKnown

type ScriptBindingGetParams

type ScriptBindingGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type ScriptBindingGetResponseEnvelope

type ScriptBindingGetResponseEnvelope struct {
	Errors   []ScriptBindingGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptBindingGetResponseEnvelopeMessages `json:"messages,required"`
	Result   []WorkersBinding                           `json:"result,required"`
	// Whether the API call was successful
	Success ScriptBindingGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptBindingGetResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptBindingGetResponseEnvelope) UnmarshalJSON

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

type ScriptBindingGetResponseEnvelopeErrors

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

func (*ScriptBindingGetResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptBindingGetResponseEnvelopeMessages

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

func (*ScriptBindingGetResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptBindingGetResponseEnvelopeSuccess

type ScriptBindingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptBindingGetResponseEnvelopeSuccessTrue ScriptBindingGetResponseEnvelopeSuccess = true
)

func (ScriptBindingGetResponseEnvelopeSuccess) IsKnown

type ScriptBindingService

type ScriptBindingService struct {
	Options []option.RequestOption
}

ScriptBindingService 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 NewScriptBindingService method instead.

func NewScriptBindingService

func NewScriptBindingService(opts ...option.RequestOption) (r *ScriptBindingService)

NewScriptBindingService 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 (*ScriptBindingService) Get

List the bindings for a Workers script.

type ScriptContentService

type ScriptContentService struct {
	Options []option.RequestOption
}

ScriptContentService 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 NewScriptContentService method instead.

func NewScriptContentService

func NewScriptContentService(opts ...option.RequestOption) (r *ScriptContentService)

NewScriptContentService 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 (*ScriptContentService) Update

func (r *ScriptContentService) Update(ctx context.Context, scriptName string, params ScriptContentUpdateParams, opts ...option.RequestOption) (res *WorkersScript, err error)

Put script content without touching config or metadata

type ScriptContentUpdateParams

type ScriptContentUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A module comprising a Worker script, often a javascript file. Multiple modules
	// may be provided as separate named parts, but at least one module must be
	// present. This should be referenced either in the metadata as `main_module`
	// (esm)/`body_part` (service worker) or as a header `CF-WORKER-MAIN-MODULE-PART`
	// (esm) /`CF-WORKER-BODY-PART` (service worker) by part name.
	AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata               param.Field[ScriptContentUpdateParamsMetadata] `json:"metadata"`
	CfWorkerBodyPart       param.Field[string]                            `header:"CF-WORKER-BODY-PART"`
	CfWorkerMainModulePart param.Field[string]                            `header:"CF-WORKER-MAIN-MODULE-PART"`
}

func (ScriptContentUpdateParams) MarshalMultipart

func (r ScriptContentUpdateParams) MarshalMultipart() (data []byte, contentType string, err error)

type ScriptContentUpdateParamsMetadata

type ScriptContentUpdateParamsMetadata struct {
	// Name of the part in the multipart request that contains the script (e.g. the
	// file adding a listener to the `fetch` event). Indicates a
	// `service worker syntax` Worker.
	BodyPart param.Field[string] `json:"body_part"`
	// Name of the part in the multipart request that contains the main module (e.g.
	// the file exporting a `fetch` handler). Indicates a `module syntax` Worker.
	MainModule param.Field[string] `json:"main_module"`
}

JSON encoded metadata about the uploaded parts and Worker configuration.

func (ScriptContentUpdateParamsMetadata) MarshalJSON

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

type ScriptContentUpdateResponseEnvelope

type ScriptContentUpdateResponseEnvelope struct {
	Errors   []ScriptContentUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptContentUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   WorkersScript                                 `json:"result,required"`
	// Whether the API call was successful
	Success ScriptContentUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptContentUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptContentUpdateResponseEnvelope) UnmarshalJSON

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

type ScriptContentUpdateResponseEnvelopeErrors

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

func (*ScriptContentUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptContentUpdateResponseEnvelopeMessages

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

func (*ScriptContentUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptContentUpdateResponseEnvelopeSuccess

type ScriptContentUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptContentUpdateResponseEnvelopeSuccessTrue ScriptContentUpdateResponseEnvelopeSuccess = true
)

func (ScriptContentUpdateResponseEnvelopeSuccess) IsKnown

type ScriptContentV2GetParams

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

type ScriptContentV2Service

type ScriptContentV2Service struct {
	Options []option.RequestOption
}

ScriptContentV2Service 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 NewScriptContentV2Service method instead.

func NewScriptContentV2Service

func NewScriptContentV2Service(opts ...option.RequestOption) (r *ScriptContentV2Service)

NewScriptContentV2Service 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 (*ScriptContentV2Service) Get

func (r *ScriptContentV2Service) Get(ctx context.Context, scriptName string, query ScriptContentV2GetParams, opts ...option.RequestOption) (res *http.Response, err error)

Fetch script content only

type ScriptDeleteParams

type ScriptDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// If set to true, delete will not be stopped by associated service binding,
	// durable object, or other binding. Any of these associated bindings/durable
	// objects will be deleted along with the script.
	Force param.Field[bool] `query:"force"`
}

func (ScriptDeleteParams) URLQuery

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

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

type ScriptGetParams

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

type ScriptListParams

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

type ScriptScheduleGetParams

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

type ScriptScheduleGetResponse

type ScriptScheduleGetResponse struct {
	Schedules []ScriptScheduleGetResponseSchedule `json:"schedules"`
	JSON      scriptScheduleGetResponseJSON       `json:"-"`
}

func (*ScriptScheduleGetResponse) UnmarshalJSON

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

type ScriptScheduleGetResponseEnvelope

type ScriptScheduleGetResponseEnvelope struct {
	Errors   []ScriptScheduleGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptScheduleGetResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptScheduleGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptScheduleGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptScheduleGetResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptScheduleGetResponseEnvelope) UnmarshalJSON

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

type ScriptScheduleGetResponseEnvelopeErrors

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

func (*ScriptScheduleGetResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptScheduleGetResponseEnvelopeMessages

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

func (*ScriptScheduleGetResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptScheduleGetResponseEnvelopeSuccess

type ScriptScheduleGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptScheduleGetResponseEnvelopeSuccessTrue ScriptScheduleGetResponseEnvelopeSuccess = true
)

func (ScriptScheduleGetResponseEnvelopeSuccess) IsKnown

type ScriptScheduleGetResponseSchedule

type ScriptScheduleGetResponseSchedule struct {
	CreatedOn  interface{}                           `json:"created_on"`
	Cron       interface{}                           `json:"cron"`
	ModifiedOn interface{}                           `json:"modified_on"`
	JSON       scriptScheduleGetResponseScheduleJSON `json:"-"`
}

func (*ScriptScheduleGetResponseSchedule) UnmarshalJSON

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

type ScriptScheduleService

type ScriptScheduleService struct {
	Options []option.RequestOption
}

ScriptScheduleService 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 NewScriptScheduleService method instead.

func NewScriptScheduleService

func NewScriptScheduleService(opts ...option.RequestOption) (r *ScriptScheduleService)

NewScriptScheduleService 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 (*ScriptScheduleService) Get

Fetches Cron Triggers for a Worker.

func (*ScriptScheduleService) Update

Updates Cron Triggers for a Worker.

type ScriptScheduleUpdateParams

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

func (ScriptScheduleUpdateParams) MarshalJSON

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

type ScriptScheduleUpdateResponse

type ScriptScheduleUpdateResponse struct {
	Schedules []ScriptScheduleUpdateResponseSchedule `json:"schedules"`
	JSON      scriptScheduleUpdateResponseJSON       `json:"-"`
}

func (*ScriptScheduleUpdateResponse) UnmarshalJSON

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

type ScriptScheduleUpdateResponseEnvelope

type ScriptScheduleUpdateResponseEnvelope struct {
	Errors   []ScriptScheduleUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptScheduleUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptScheduleUpdateResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptScheduleUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptScheduleUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptScheduleUpdateResponseEnvelope) UnmarshalJSON

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

type ScriptScheduleUpdateResponseEnvelopeErrors

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

func (*ScriptScheduleUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptScheduleUpdateResponseEnvelopeMessages

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

func (*ScriptScheduleUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptScheduleUpdateResponseEnvelopeSuccess

type ScriptScheduleUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptScheduleUpdateResponseEnvelopeSuccessTrue ScriptScheduleUpdateResponseEnvelopeSuccess = true
)

func (ScriptScheduleUpdateResponseEnvelopeSuccess) IsKnown

type ScriptScheduleUpdateResponseSchedule

type ScriptScheduleUpdateResponseSchedule struct {
	CreatedOn  interface{}                              `json:"created_on"`
	Cron       interface{}                              `json:"cron"`
	ModifiedOn interface{}                              `json:"modified_on"`
	JSON       scriptScheduleUpdateResponseScheduleJSON `json:"-"`
}

func (*ScriptScheduleUpdateResponseSchedule) UnmarshalJSON

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

type ScriptService

type ScriptService struct {
	Options    []option.RequestOption
	Bindings   *ScriptBindingService
	Schedules  *ScriptScheduleService
	Tail       *ScriptTailService
	UsageModel *ScriptUsageModelService
	Content    *ScriptContentService
	ContentV2  *ScriptContentV2Service
	Settings   *ScriptSettingService
}

ScriptService 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 NewScriptService method instead.

func NewScriptService

func NewScriptService(opts ...option.RequestOption) (r *ScriptService)

NewScriptService 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 (*ScriptService) Delete

func (r *ScriptService) Delete(ctx context.Context, scriptName string, params ScriptDeleteParams, opts ...option.RequestOption) (err error)

Delete your worker. This call has no response body on a successful delete.

func (*ScriptService) Get

func (r *ScriptService) Get(ctx context.Context, scriptName string, query ScriptGetParams, opts ...option.RequestOption) (res *http.Response, err error)

Fetch raw script content for your worker. Note this is the original script content, not JSON encoded.

func (*ScriptService) List

Fetch a list of uploaded workers.

func (*ScriptService) ListAutoPaging

Fetch a list of uploaded workers.

func (*ScriptService) Update

func (r *ScriptService) Update(ctx context.Context, scriptName string, params ScriptUpdateParams, opts ...option.RequestOption) (res *WorkersScript, err error)

Upload a worker module.

type ScriptSettingEditParams

type ScriptSettingEditParams struct {
	// Identifier
	AccountID param.Field[string]                          `path:"account_id,required"`
	Settings  param.Field[ScriptSettingEditParamsSettings] `json:"settings"`
}

func (ScriptSettingEditParams) MarshalJSON

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

type ScriptSettingEditParamsSettings

type ScriptSettingEditParamsSettings struct {
	Errors   param.Field[[]ScriptSettingEditParamsSettingsError]   `json:"errors,required"`
	Messages param.Field[[]ScriptSettingEditParamsSettingsMessage] `json:"messages,required"`
	Result   param.Field[ScriptSettingEditParamsSettingsResult]    `json:"result,required"`
	// Whether the API call was successful
	Success param.Field[ScriptSettingEditParamsSettingsSuccess] `json:"success,required"`
}

func (ScriptSettingEditParamsSettings) MarshalJSON

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

type ScriptSettingEditParamsSettingsError

type ScriptSettingEditParamsSettingsError struct {
	Code    param.Field[int64]  `json:"code,required"`
	Message param.Field[string] `json:"message,required"`
}

func (ScriptSettingEditParamsSettingsError) MarshalJSON

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

type ScriptSettingEditParamsSettingsMessage

type ScriptSettingEditParamsSettingsMessage struct {
	Code    param.Field[int64]  `json:"code,required"`
	Message param.Field[string] `json:"message,required"`
}

func (ScriptSettingEditParamsSettingsMessage) MarshalJSON

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

type ScriptSettingEditParamsSettingsResult

type ScriptSettingEditParamsSettingsResult struct {
	// List of bindings attached to this Worker
	Bindings param.Field[[]ScriptSettingEditParamsSettingsResultBinding] `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate param.Field[string] `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush param.Field[bool] `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations param.Field[ScriptSettingEditParamsSettingsResultMigrations] `json:"migrations"`
	Placement  param.Field[ScriptSettingEditParamsSettingsResultPlacement]  `json:"placement"`
	// Tags to help you manage your Workers
	Tags param.Field[[]string] `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers param.Field[[]ScriptSettingEditParamsSettingsResultTailConsumer] `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel param.Field[string] `json:"usage_model"`
}

func (ScriptSettingEditParamsSettingsResult) MarshalJSON

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

type ScriptSettingEditParamsSettingsResultBindingsWorkersD1Binding

type ScriptSettingEditParamsSettingsResultBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID param.Field[string] `json:"id,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name param.Field[string] `json:"name,required"`
	// The class of resource that the binding provides.
	Type param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersD1BindingType] `json:"type,required"`
}

func (ScriptSettingEditParamsSettingsResultBindingsWorkersD1Binding) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersD1BindingType

type ScriptSettingEditParamsSettingsResultBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditParamsSettingsResultBindingsWorkersD1BindingTypeD1 ScriptSettingEditParamsSettingsResultBindingsWorkersD1BindingType = "d1"
)

func (ScriptSettingEditParamsSettingsResultBindingsWorkersD1BindingType) IsKnown

type ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBinding

type ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBinding struct {
	// Namespace to bind to
	Namespace param.Field[string] `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingType] `json:"type,required"`
	// Outbound worker
	Outbound param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingOutbound] `json:"outbound"`
}

func (ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBinding) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingOutbound

type ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params param.Field[[]string] `json:"params"`
	// Outbound worker
	Worker param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker] `json:"worker"`
}

Outbound worker

func (ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingOutbound) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker

type ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment param.Field[string] `json:"environment"`
	// Name of the outbound worker
	Service param.Field[string] `json:"service"`
}

Outbound worker

func (ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingType

type ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

func (ScriptSettingEditParamsSettingsResultBindingsWorkersDispatchNamespaceBindingType) IsKnown

type ScriptSettingEditParamsSettingsResultBindingsWorkersDoBinding

type ScriptSettingEditParamsSettingsResultBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName param.Field[string] `json:"class_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersDoBindingType] `json:"type,required"`
	// The environment of the script_name to bind to
	Environment param.Field[string] `json:"environment"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName param.Field[string] `json:"script_name"`
}

func (ScriptSettingEditParamsSettingsResultBindingsWorkersDoBinding) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersDoBindingType

type ScriptSettingEditParamsSettingsResultBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditParamsSettingsResultBindingsWorkersDoBindingTypeDurableObjectNamespace ScriptSettingEditParamsSettingsResultBindingsWorkersDoBindingType = "durable_object_namespace"
)

func (ScriptSettingEditParamsSettingsResultBindingsWorkersDoBindingType) IsKnown

type ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBinding

type ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBinding struct {
	// The class of resource that the binding provides.
	Type param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBindingType] `json:"type,required"`
}

func (ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBinding) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBindingType

type ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBindingTypeKVNamespace ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

func (ScriptSettingEditParamsSettingsResultBindingsWorkersKVNamespaceBindingType) IsKnown

type ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBinding

type ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBinding struct {
	// The class of resource that the binding provides.
	Type param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBindingType] `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID param.Field[string] `json:"certificate_id"`
}

func (ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBinding) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBindingType

type ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBindingTypeMTLSCertificate ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBindingType = "mtls_certificate"
)

func (ScriptSettingEditParamsSettingsResultBindingsWorkersMTLSCERTBindingType) IsKnown

type ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBinding

type ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBinding struct {
	// Name of the Queue to bind to
	QueueName param.Field[string] `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBindingType] `json:"type,required"`
}

func (ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBinding) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBindingType

type ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBindingTypeQueue ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBindingType = "queue"
)

func (ScriptSettingEditParamsSettingsResultBindingsWorkersQueueBindingType) IsKnown

type ScriptSettingEditParamsSettingsResultBindingsWorkersR2Binding

type ScriptSettingEditParamsSettingsResultBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName param.Field[string] `json:"bucket_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersR2BindingType] `json:"type,required"`
}

func (ScriptSettingEditParamsSettingsResultBindingsWorkersR2Binding) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersR2BindingType

type ScriptSettingEditParamsSettingsResultBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditParamsSettingsResultBindingsWorkersR2BindingTypeR2Bucket ScriptSettingEditParamsSettingsResultBindingsWorkersR2BindingType = "r2_bucket"
)

func (ScriptSettingEditParamsSettingsResultBindingsWorkersR2BindingType) IsKnown

type ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBinding

type ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment,required"`
	// Name of Worker to bind to
	Service param.Field[string] `json:"service,required"`
	// The class of resource that the binding provides.
	Type param.Field[ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBindingType] `json:"type,required"`
}

func (ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBinding) MarshalJSON

type ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBindingType

type ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBindingTypeService ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBindingType = "service"
)

func (ScriptSettingEditParamsSettingsResultBindingsWorkersServiceBindingType) IsKnown

type ScriptSettingEditParamsSettingsResultMigrations

type ScriptSettingEditParamsSettingsResultMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Satisfied by workers.ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrations, workers.ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrations.

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrations

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrationsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrationsTransferredClass] `json:"transferred_classes"`
}

A single set of migrations to apply.

func (ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrations) MarshalJSON

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrationsRenamedClass

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrationsRenamedClass) MarshalJSON

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrationsTransferredClass

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (ScriptSettingEditParamsSettingsResultMigrationsWorkersSingleStepMigrationsTransferredClass) MarshalJSON

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrations

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// Migrations to apply in order.
	Steps param.Field[[]ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStep] `json:"steps"`
}

func (ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrations) MarshalJSON

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStep

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass] `json:"transferred_classes"`
}

func (ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStep) MarshalJSON

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass) MarshalJSON

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass

type ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (ScriptSettingEditParamsSettingsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass) MarshalJSON

type ScriptSettingEditParamsSettingsResultPlacement

type ScriptSettingEditParamsSettingsResultPlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode param.Field[ScriptSettingEditParamsSettingsResultPlacementMode] `json:"mode"`
}

func (ScriptSettingEditParamsSettingsResultPlacement) MarshalJSON

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

type ScriptSettingEditParamsSettingsResultPlacementMode

type ScriptSettingEditParamsSettingsResultPlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	ScriptSettingEditParamsSettingsResultPlacementModeSmart ScriptSettingEditParamsSettingsResultPlacementMode = "smart"
)

func (ScriptSettingEditParamsSettingsResultPlacementMode) IsKnown

type ScriptSettingEditParamsSettingsResultTailConsumer

type ScriptSettingEditParamsSettingsResultTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service param.Field[string] `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace param.Field[string] `json:"namespace"`
}

A reference to a script that will consume logs from the attached Worker.

func (ScriptSettingEditParamsSettingsResultTailConsumer) MarshalJSON

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

type ScriptSettingEditParamsSettingsSuccess

type ScriptSettingEditParamsSettingsSuccess bool

Whether the API call was successful

const (
	ScriptSettingEditParamsSettingsSuccessTrue ScriptSettingEditParamsSettingsSuccess = true
)

func (ScriptSettingEditParamsSettingsSuccess) IsKnown

type ScriptSettingEditResponse

type ScriptSettingEditResponse struct {
	// List of bindings attached to this Worker
	Bindings []ScriptSettingEditResponseBinding `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate string `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags []string `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations ScriptSettingEditResponseMigrations `json:"migrations"`
	Placement  ScriptSettingEditResponsePlacement  `json:"placement"`
	// Tags to help you manage your Workers
	Tags []string `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []ScriptSettingEditResponseTailConsumer `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string                        `json:"usage_model"`
	JSON       scriptSettingEditResponseJSON `json:"-"`
}

func (*ScriptSettingEditResponse) UnmarshalJSON

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

type ScriptSettingEditResponseBindingsWorkersD1Binding

type ScriptSettingEditResponseBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID string `json:"id,required"`
	// A JavaScript variable name for the binding.
	Binding string `json:"binding,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingEditResponseBindingsWorkersD1BindingType `json:"type,required"`
	JSON scriptSettingEditResponseBindingsWorkersD1BindingJSON `json:"-"`
}

func (*ScriptSettingEditResponseBindingsWorkersD1Binding) UnmarshalJSON

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

type ScriptSettingEditResponseBindingsWorkersD1BindingType

type ScriptSettingEditResponseBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditResponseBindingsWorkersD1BindingTypeD1 ScriptSettingEditResponseBindingsWorkersD1BindingType = "d1"
)

func (ScriptSettingEditResponseBindingsWorkersD1BindingType) IsKnown

type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBinding

type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace to bind to
	Namespace string `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingType `json:"type,required"`
	// Outbound worker
	Outbound ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound `json:"outbound"`
	JSON     scriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingJSON     `json:"-"`
}

func (*ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBinding) UnmarshalJSON

type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound

type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params []string `json:"params"`
	// Outbound worker
	Worker ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker `json:"worker"`
	JSON   scriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundJSON   `json:"-"`
}

Outbound worker

func (*ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound) UnmarshalJSON

type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker

type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment string `json:"environment"`
	// Name of the outbound worker
	Service string                                                                             `json:"service"`
	JSON    scriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorkerJSON `json:"-"`
}

Outbound worker

func (*ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker) UnmarshalJSON

type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingType

type ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

func (ScriptSettingEditResponseBindingsWorkersDispatchNamespaceBindingType) IsKnown

type ScriptSettingEditResponseBindingsWorkersDoBinding

type ScriptSettingEditResponseBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName string `json:"class_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingEditResponseBindingsWorkersDoBindingType `json:"type,required"`
	// The environment of the script_name to bind to
	Environment string `json:"environment"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName string                                                `json:"script_name"`
	JSON       scriptSettingEditResponseBindingsWorkersDoBindingJSON `json:"-"`
}

func (*ScriptSettingEditResponseBindingsWorkersDoBinding) UnmarshalJSON

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

type ScriptSettingEditResponseBindingsWorkersDoBindingType

type ScriptSettingEditResponseBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditResponseBindingsWorkersDoBindingTypeDurableObjectNamespace ScriptSettingEditResponseBindingsWorkersDoBindingType = "durable_object_namespace"
)

func (ScriptSettingEditResponseBindingsWorkersDoBindingType) IsKnown

type ScriptSettingEditResponseBindingsWorkersKVNamespaceBinding

type ScriptSettingEditResponseBindingsWorkersKVNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingEditResponseBindingsWorkersKVNamespaceBindingType `json:"type,required"`
	JSON scriptSettingEditResponseBindingsWorkersKVNamespaceBindingJSON `json:"-"`
}

func (*ScriptSettingEditResponseBindingsWorkersKVNamespaceBinding) UnmarshalJSON

type ScriptSettingEditResponseBindingsWorkersKVNamespaceBindingType

type ScriptSettingEditResponseBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditResponseBindingsWorkersKVNamespaceBindingTypeKVNamespace ScriptSettingEditResponseBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

func (ScriptSettingEditResponseBindingsWorkersKVNamespaceBindingType) IsKnown

type ScriptSettingEditResponseBindingsWorkersMTLSCERTBinding

type ScriptSettingEditResponseBindingsWorkersMTLSCERTBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingEditResponseBindingsWorkersMTLSCERTBindingType `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID string                                                      `json:"certificate_id"`
	JSON          scriptSettingEditResponseBindingsWorkersMtlscertBindingJSON `json:"-"`
}

func (*ScriptSettingEditResponseBindingsWorkersMTLSCERTBinding) UnmarshalJSON

type ScriptSettingEditResponseBindingsWorkersMTLSCERTBindingType

type ScriptSettingEditResponseBindingsWorkersMTLSCERTBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditResponseBindingsWorkersMTLSCERTBindingTypeMTLSCertificate ScriptSettingEditResponseBindingsWorkersMTLSCERTBindingType = "mtls_certificate"
)

func (ScriptSettingEditResponseBindingsWorkersMTLSCERTBindingType) IsKnown

type ScriptSettingEditResponseBindingsWorkersQueueBinding

type ScriptSettingEditResponseBindingsWorkersQueueBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of the Queue to bind to
	QueueName string `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingEditResponseBindingsWorkersQueueBindingType `json:"type,required"`
	JSON scriptSettingEditResponseBindingsWorkersQueueBindingJSON `json:"-"`
}

func (*ScriptSettingEditResponseBindingsWorkersQueueBinding) UnmarshalJSON

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

type ScriptSettingEditResponseBindingsWorkersQueueBindingType

type ScriptSettingEditResponseBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditResponseBindingsWorkersQueueBindingTypeQueue ScriptSettingEditResponseBindingsWorkersQueueBindingType = "queue"
)

func (ScriptSettingEditResponseBindingsWorkersQueueBindingType) IsKnown

type ScriptSettingEditResponseBindingsWorkersR2Binding

type ScriptSettingEditResponseBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName string `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingEditResponseBindingsWorkersR2BindingType `json:"type,required"`
	JSON scriptSettingEditResponseBindingsWorkersR2BindingJSON `json:"-"`
}

func (*ScriptSettingEditResponseBindingsWorkersR2Binding) UnmarshalJSON

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

type ScriptSettingEditResponseBindingsWorkersR2BindingType

type ScriptSettingEditResponseBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditResponseBindingsWorkersR2BindingTypeR2Bucket ScriptSettingEditResponseBindingsWorkersR2BindingType = "r2_bucket"
)

func (ScriptSettingEditResponseBindingsWorkersR2BindingType) IsKnown

type ScriptSettingEditResponseBindingsWorkersServiceBinding

type ScriptSettingEditResponseBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of Worker to bind to
	Service string `json:"service,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingEditResponseBindingsWorkersServiceBindingType `json:"type,required"`
	JSON scriptSettingEditResponseBindingsWorkersServiceBindingJSON `json:"-"`
}

func (*ScriptSettingEditResponseBindingsWorkersServiceBinding) UnmarshalJSON

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

type ScriptSettingEditResponseBindingsWorkersServiceBindingType

type ScriptSettingEditResponseBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingEditResponseBindingsWorkersServiceBindingTypeService ScriptSettingEditResponseBindingsWorkersServiceBindingType = "service"
)

func (ScriptSettingEditResponseBindingsWorkersServiceBindingType) IsKnown

type ScriptSettingEditResponseEnvelope

type ScriptSettingEditResponseEnvelope struct {
	Errors   []ScriptSettingEditResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptSettingEditResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptSettingEditResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptSettingEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptSettingEditResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptSettingEditResponseEnvelope) UnmarshalJSON

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

type ScriptSettingEditResponseEnvelopeErrors

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

func (*ScriptSettingEditResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptSettingEditResponseEnvelopeMessages

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

func (*ScriptSettingEditResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptSettingEditResponseEnvelopeSuccess

type ScriptSettingEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptSettingEditResponseEnvelopeSuccessTrue ScriptSettingEditResponseEnvelopeSuccess = true
)

func (ScriptSettingEditResponseEnvelopeSuccess) IsKnown

type ScriptSettingEditResponseMigrations

type ScriptSettingEditResponseMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Union satisfied by workers.ScriptSettingEditResponseMigrationsWorkersSingleStepMigrations or workers.ScriptSettingEditResponseMigrationsWorkersSteppedMigrations.

type ScriptSettingEditResponseMigrationsWorkersSingleStepMigrations

type ScriptSettingEditResponseMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []ScriptSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []ScriptSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass `json:"transferred_classes"`
	JSON               scriptSettingEditResponseMigrationsWorkersSingleStepMigrationsJSON               `json:"-"`
}

A single set of migrations to apply.

func (*ScriptSettingEditResponseMigrationsWorkersSingleStepMigrations) UnmarshalJSON

type ScriptSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass

type ScriptSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From string                                                                         `json:"from"`
	To   string                                                                         `json:"to"`
	JSON scriptSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClassJSON `json:"-"`
}

func (*ScriptSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass) UnmarshalJSON

type ScriptSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass

type ScriptSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       string                                                                             `json:"from"`
	FromScript string                                                                             `json:"from_script"`
	To         string                                                                             `json:"to"`
	JSON       scriptSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClassJSON `json:"-"`
}

func (*ScriptSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass) UnmarshalJSON

type ScriptSettingEditResponseMigrationsWorkersSteppedMigrations

type ScriptSettingEditResponseMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// Migrations to apply in order.
	Steps []ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStep `json:"steps"`
	JSON  scriptSettingEditResponseMigrationsWorkersSteppedMigrationsJSON   `json:"-"`
}

func (*ScriptSettingEditResponseMigrationsWorkersSteppedMigrations) UnmarshalJSON

type ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStep

type ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass `json:"transferred_classes"`
	JSON               scriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepJSON                `json:"-"`
}

func (*ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStep) UnmarshalJSON

type ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass

type ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From string                                                                           `json:"from"`
	To   string                                                                           `json:"to"`
	JSON scriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClassJSON `json:"-"`
}

func (*ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass) UnmarshalJSON

type ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass

type ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       string                                                                               `json:"from"`
	FromScript string                                                                               `json:"from_script"`
	To         string                                                                               `json:"to"`
	JSON       scriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClassJSON `json:"-"`
}

func (*ScriptSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass) UnmarshalJSON

type ScriptSettingEditResponsePlacement

type ScriptSettingEditResponsePlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode ScriptSettingEditResponsePlacementMode `json:"mode"`
	JSON scriptSettingEditResponsePlacementJSON `json:"-"`
}

func (*ScriptSettingEditResponsePlacement) UnmarshalJSON

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

type ScriptSettingEditResponsePlacementMode

type ScriptSettingEditResponsePlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	ScriptSettingEditResponsePlacementModeSmart ScriptSettingEditResponsePlacementMode = "smart"
)

func (ScriptSettingEditResponsePlacementMode) IsKnown

type ScriptSettingEditResponseTailConsumer

type ScriptSettingEditResponseTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service string `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace string                                    `json:"namespace"`
	JSON      scriptSettingEditResponseTailConsumerJSON `json:"-"`
}

A reference to a script that will consume logs from the attached Worker.

func (*ScriptSettingEditResponseTailConsumer) UnmarshalJSON

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

type ScriptSettingGetParams

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

type ScriptSettingGetResponse

type ScriptSettingGetResponse struct {
	// List of bindings attached to this Worker
	Bindings []ScriptSettingGetResponseBinding `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate string `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags []string `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations ScriptSettingGetResponseMigrations `json:"migrations"`
	Placement  ScriptSettingGetResponsePlacement  `json:"placement"`
	// Tags to help you manage your Workers
	Tags []string `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []ScriptSettingGetResponseTailConsumer `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string                       `json:"usage_model"`
	JSON       scriptSettingGetResponseJSON `json:"-"`
}

func (*ScriptSettingGetResponse) UnmarshalJSON

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

type ScriptSettingGetResponseBindingsWorkersD1Binding

type ScriptSettingGetResponseBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID string `json:"id,required"`
	// A JavaScript variable name for the binding.
	Binding string `json:"binding,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingGetResponseBindingsWorkersD1BindingType `json:"type,required"`
	JSON scriptSettingGetResponseBindingsWorkersD1BindingJSON `json:"-"`
}

func (*ScriptSettingGetResponseBindingsWorkersD1Binding) UnmarshalJSON

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

type ScriptSettingGetResponseBindingsWorkersD1BindingType

type ScriptSettingGetResponseBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	ScriptSettingGetResponseBindingsWorkersD1BindingTypeD1 ScriptSettingGetResponseBindingsWorkersD1BindingType = "d1"
)

func (ScriptSettingGetResponseBindingsWorkersD1BindingType) IsKnown

type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBinding

type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace to bind to
	Namespace string `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingType `json:"type,required"`
	// Outbound worker
	Outbound ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound `json:"outbound"`
	JSON     scriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingJSON     `json:"-"`
}

func (*ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBinding) UnmarshalJSON

type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound

type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params []string `json:"params"`
	// Outbound worker
	Worker ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker `json:"worker"`
	JSON   scriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundJSON   `json:"-"`
}

Outbound worker

func (*ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound) UnmarshalJSON

type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker

type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment string `json:"environment"`
	// Name of the outbound worker
	Service string                                                                            `json:"service"`
	JSON    scriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorkerJSON `json:"-"`
}

Outbound worker

func (*ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker) UnmarshalJSON

type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingType

type ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

func (ScriptSettingGetResponseBindingsWorkersDispatchNamespaceBindingType) IsKnown

type ScriptSettingGetResponseBindingsWorkersDoBinding

type ScriptSettingGetResponseBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName string `json:"class_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingGetResponseBindingsWorkersDoBindingType `json:"type,required"`
	// The environment of the script_name to bind to
	Environment string `json:"environment"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName string                                               `json:"script_name"`
	JSON       scriptSettingGetResponseBindingsWorkersDoBindingJSON `json:"-"`
}

func (*ScriptSettingGetResponseBindingsWorkersDoBinding) UnmarshalJSON

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

type ScriptSettingGetResponseBindingsWorkersDoBindingType

type ScriptSettingGetResponseBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingGetResponseBindingsWorkersDoBindingTypeDurableObjectNamespace ScriptSettingGetResponseBindingsWorkersDoBindingType = "durable_object_namespace"
)

func (ScriptSettingGetResponseBindingsWorkersDoBindingType) IsKnown

type ScriptSettingGetResponseBindingsWorkersKVNamespaceBinding

type ScriptSettingGetResponseBindingsWorkersKVNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingGetResponseBindingsWorkersKVNamespaceBindingType `json:"type,required"`
	JSON scriptSettingGetResponseBindingsWorkersKVNamespaceBindingJSON `json:"-"`
}

func (*ScriptSettingGetResponseBindingsWorkersKVNamespaceBinding) UnmarshalJSON

type ScriptSettingGetResponseBindingsWorkersKVNamespaceBindingType

type ScriptSettingGetResponseBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingGetResponseBindingsWorkersKVNamespaceBindingTypeKVNamespace ScriptSettingGetResponseBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

func (ScriptSettingGetResponseBindingsWorkersKVNamespaceBindingType) IsKnown

type ScriptSettingGetResponseBindingsWorkersMTLSCERTBinding

type ScriptSettingGetResponseBindingsWorkersMTLSCERTBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingGetResponseBindingsWorkersMTLSCERTBindingType `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID string                                                     `json:"certificate_id"`
	JSON          scriptSettingGetResponseBindingsWorkersMtlscertBindingJSON `json:"-"`
}

func (*ScriptSettingGetResponseBindingsWorkersMTLSCERTBinding) UnmarshalJSON

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

type ScriptSettingGetResponseBindingsWorkersMTLSCERTBindingType

type ScriptSettingGetResponseBindingsWorkersMTLSCERTBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingGetResponseBindingsWorkersMTLSCERTBindingTypeMTLSCertificate ScriptSettingGetResponseBindingsWorkersMTLSCERTBindingType = "mtls_certificate"
)

func (ScriptSettingGetResponseBindingsWorkersMTLSCERTBindingType) IsKnown

type ScriptSettingGetResponseBindingsWorkersQueueBinding

type ScriptSettingGetResponseBindingsWorkersQueueBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of the Queue to bind to
	QueueName string `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingGetResponseBindingsWorkersQueueBindingType `json:"type,required"`
	JSON scriptSettingGetResponseBindingsWorkersQueueBindingJSON `json:"-"`
}

func (*ScriptSettingGetResponseBindingsWorkersQueueBinding) UnmarshalJSON

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

type ScriptSettingGetResponseBindingsWorkersQueueBindingType

type ScriptSettingGetResponseBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingGetResponseBindingsWorkersQueueBindingTypeQueue ScriptSettingGetResponseBindingsWorkersQueueBindingType = "queue"
)

func (ScriptSettingGetResponseBindingsWorkersQueueBindingType) IsKnown

type ScriptSettingGetResponseBindingsWorkersR2Binding

type ScriptSettingGetResponseBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName string `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingGetResponseBindingsWorkersR2BindingType `json:"type,required"`
	JSON scriptSettingGetResponseBindingsWorkersR2BindingJSON `json:"-"`
}

func (*ScriptSettingGetResponseBindingsWorkersR2Binding) UnmarshalJSON

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

type ScriptSettingGetResponseBindingsWorkersR2BindingType

type ScriptSettingGetResponseBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	ScriptSettingGetResponseBindingsWorkersR2BindingTypeR2Bucket ScriptSettingGetResponseBindingsWorkersR2BindingType = "r2_bucket"
)

func (ScriptSettingGetResponseBindingsWorkersR2BindingType) IsKnown

type ScriptSettingGetResponseBindingsWorkersServiceBinding

type ScriptSettingGetResponseBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of Worker to bind to
	Service string `json:"service,required"`
	// The class of resource that the binding provides.
	Type ScriptSettingGetResponseBindingsWorkersServiceBindingType `json:"type,required"`
	JSON scriptSettingGetResponseBindingsWorkersServiceBindingJSON `json:"-"`
}

func (*ScriptSettingGetResponseBindingsWorkersServiceBinding) UnmarshalJSON

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

type ScriptSettingGetResponseBindingsWorkersServiceBindingType

type ScriptSettingGetResponseBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	ScriptSettingGetResponseBindingsWorkersServiceBindingTypeService ScriptSettingGetResponseBindingsWorkersServiceBindingType = "service"
)

func (ScriptSettingGetResponseBindingsWorkersServiceBindingType) IsKnown

type ScriptSettingGetResponseEnvelope

type ScriptSettingGetResponseEnvelope struct {
	Errors   []ScriptSettingGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptSettingGetResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptSettingGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptSettingGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptSettingGetResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptSettingGetResponseEnvelope) UnmarshalJSON

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

type ScriptSettingGetResponseEnvelopeErrors

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

func (*ScriptSettingGetResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptSettingGetResponseEnvelopeMessages

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

func (*ScriptSettingGetResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptSettingGetResponseEnvelopeSuccess

type ScriptSettingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptSettingGetResponseEnvelopeSuccessTrue ScriptSettingGetResponseEnvelopeSuccess = true
)

func (ScriptSettingGetResponseEnvelopeSuccess) IsKnown

type ScriptSettingGetResponseMigrations

type ScriptSettingGetResponseMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Union satisfied by workers.ScriptSettingGetResponseMigrationsWorkersSingleStepMigrations or workers.ScriptSettingGetResponseMigrationsWorkersSteppedMigrations.

type ScriptSettingGetResponseMigrationsWorkersSingleStepMigrations

type ScriptSettingGetResponseMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []ScriptSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []ScriptSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass `json:"transferred_classes"`
	JSON               scriptSettingGetResponseMigrationsWorkersSingleStepMigrationsJSON               `json:"-"`
}

A single set of migrations to apply.

func (*ScriptSettingGetResponseMigrationsWorkersSingleStepMigrations) UnmarshalJSON

type ScriptSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass

type ScriptSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From string                                                                        `json:"from"`
	To   string                                                                        `json:"to"`
	JSON scriptSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClassJSON `json:"-"`
}

func (*ScriptSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass) UnmarshalJSON

type ScriptSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass

type ScriptSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       string                                                                            `json:"from"`
	FromScript string                                                                            `json:"from_script"`
	To         string                                                                            `json:"to"`
	JSON       scriptSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClassJSON `json:"-"`
}

func (*ScriptSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass) UnmarshalJSON

type ScriptSettingGetResponseMigrationsWorkersSteppedMigrations

type ScriptSettingGetResponseMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// Migrations to apply in order.
	Steps []ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStep `json:"steps"`
	JSON  scriptSettingGetResponseMigrationsWorkersSteppedMigrationsJSON   `json:"-"`
}

func (*ScriptSettingGetResponseMigrationsWorkersSteppedMigrations) UnmarshalJSON

type ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStep

type ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass `json:"transferred_classes"`
	JSON               scriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepJSON                `json:"-"`
}

func (*ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStep) UnmarshalJSON

type ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass

type ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From string                                                                          `json:"from"`
	To   string                                                                          `json:"to"`
	JSON scriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClassJSON `json:"-"`
}

func (*ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass) UnmarshalJSON

type ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass

type ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       string                                                                              `json:"from"`
	FromScript string                                                                              `json:"from_script"`
	To         string                                                                              `json:"to"`
	JSON       scriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClassJSON `json:"-"`
}

func (*ScriptSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass) UnmarshalJSON

type ScriptSettingGetResponsePlacement

type ScriptSettingGetResponsePlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode ScriptSettingGetResponsePlacementMode `json:"mode"`
	JSON scriptSettingGetResponsePlacementJSON `json:"-"`
}

func (*ScriptSettingGetResponsePlacement) UnmarshalJSON

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

type ScriptSettingGetResponsePlacementMode

type ScriptSettingGetResponsePlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	ScriptSettingGetResponsePlacementModeSmart ScriptSettingGetResponsePlacementMode = "smart"
)

func (ScriptSettingGetResponsePlacementMode) IsKnown

type ScriptSettingGetResponseTailConsumer

type ScriptSettingGetResponseTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service string `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace string                                   `json:"namespace"`
	JSON      scriptSettingGetResponseTailConsumerJSON `json:"-"`
}

A reference to a script that will consume logs from the attached Worker.

func (*ScriptSettingGetResponseTailConsumer) UnmarshalJSON

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

type ScriptSettingService

type ScriptSettingService struct {
	Options []option.RequestOption
}

ScriptSettingService 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 NewScriptSettingService method instead.

func NewScriptSettingService

func NewScriptSettingService(opts ...option.RequestOption) (r *ScriptSettingService)

NewScriptSettingService 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 (*ScriptSettingService) Edit

Patch script metadata or config, such as bindings or usage model

func (*ScriptSettingService) Get

Get script metadata and config, such as bindings or usage model

type ScriptTailDeleteParams

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

type ScriptTailDeleteResponse added in v2.1.0

type ScriptTailDeleteResponse interface {
	ImplementsWorkersScriptTailDeleteResponse()
}

Union satisfied by workers.ScriptTailDeleteResponseUnknown, workers.ScriptTailDeleteResponseArray or shared.UnionString.

type ScriptTailDeleteResponseArray

type ScriptTailDeleteResponseArray []interface{}

func (ScriptTailDeleteResponseArray) ImplementsWorkersScriptTailDeleteResponse

func (r ScriptTailDeleteResponseArray) ImplementsWorkersScriptTailDeleteResponse()

type ScriptTailDeleteResponseEnvelope

type ScriptTailDeleteResponseEnvelope struct {
	Errors   []ScriptTailDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptTailDeleteResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptTailDeleteResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptTailDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptTailDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptTailDeleteResponseEnvelope) UnmarshalJSON

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

type ScriptTailDeleteResponseEnvelopeErrors

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

func (*ScriptTailDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptTailDeleteResponseEnvelopeMessages

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

func (*ScriptTailDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptTailDeleteResponseEnvelopeSuccess

type ScriptTailDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptTailDeleteResponseEnvelopeSuccessTrue ScriptTailDeleteResponseEnvelopeSuccess = true
)

func (ScriptTailDeleteResponseEnvelopeSuccess) IsKnown

type ScriptTailGetParams

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

type ScriptTailGetResponse

type ScriptTailGetResponse struct {
	ID        interface{}               `json:"id"`
	ExpiresAt interface{}               `json:"expires_at"`
	URL       interface{}               `json:"url"`
	JSON      scriptTailGetResponseJSON `json:"-"`
}

func (*ScriptTailGetResponse) UnmarshalJSON

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

type ScriptTailGetResponseEnvelope

type ScriptTailGetResponseEnvelope struct {
	Errors   []ScriptTailGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptTailGetResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptTailGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptTailGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptTailGetResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptTailGetResponseEnvelope) UnmarshalJSON

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

type ScriptTailGetResponseEnvelopeErrors

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

func (*ScriptTailGetResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptTailGetResponseEnvelopeMessages

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

func (*ScriptTailGetResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptTailGetResponseEnvelopeSuccess

type ScriptTailGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptTailGetResponseEnvelopeSuccessTrue ScriptTailGetResponseEnvelopeSuccess = true
)

func (ScriptTailGetResponseEnvelopeSuccess) IsKnown

type ScriptTailNewParams

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

type ScriptTailNewResponse

type ScriptTailNewResponse struct {
	ID        interface{}               `json:"id"`
	ExpiresAt interface{}               `json:"expires_at"`
	URL       interface{}               `json:"url"`
	JSON      scriptTailNewResponseJSON `json:"-"`
}

func (*ScriptTailNewResponse) UnmarshalJSON

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

type ScriptTailNewResponseEnvelope

type ScriptTailNewResponseEnvelope struct {
	Errors   []ScriptTailNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptTailNewResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptTailNewResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptTailNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptTailNewResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptTailNewResponseEnvelope) UnmarshalJSON

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

type ScriptTailNewResponseEnvelopeErrors

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

func (*ScriptTailNewResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptTailNewResponseEnvelopeMessages

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

func (*ScriptTailNewResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptTailNewResponseEnvelopeSuccess

type ScriptTailNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptTailNewResponseEnvelopeSuccessTrue ScriptTailNewResponseEnvelopeSuccess = true
)

func (ScriptTailNewResponseEnvelopeSuccess) IsKnown

type ScriptTailService

type ScriptTailService struct {
	Options []option.RequestOption
}

ScriptTailService 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 NewScriptTailService method instead.

func NewScriptTailService

func NewScriptTailService(opts ...option.RequestOption) (r *ScriptTailService)

NewScriptTailService 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 (*ScriptTailService) Delete

func (r *ScriptTailService) Delete(ctx context.Context, scriptName string, id string, body ScriptTailDeleteParams, opts ...option.RequestOption) (res *ScriptTailDeleteResponse, err error)

Deletes a tail from a Worker.

func (*ScriptTailService) Get

func (r *ScriptTailService) Get(ctx context.Context, scriptName string, query ScriptTailGetParams, opts ...option.RequestOption) (res *ScriptTailGetResponse, err error)

Get list of tails currently deployed on a Worker.

func (*ScriptTailService) New

func (r *ScriptTailService) New(ctx context.Context, scriptName string, body ScriptTailNewParams, opts ...option.RequestOption) (res *ScriptTailNewResponse, err error)

Starts a tail that receives logs and exception from a Worker.

type ScriptUpdateParams

type ScriptUpdateParams interface {
	ImplementsScriptUpdateParams()
	// contains filtered or unexported methods
}

This interface is a union satisfied by one of the following: ScriptUpdateParamsVariant0, ScriptUpdateParamsVariant1.

type ScriptUpdateParamsVariant0

type ScriptUpdateParamsVariant0 struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Rollback to provided deployment based on deployment ID. Request body will only
	// parse a "message" part. You can learn more about deployments
	// [here](https://developers.cloudflare.com/workers/platform/deployments/).
	RollbackTo param.Field[string] `query:"rollback_to"`
	// A module comprising a Worker script, often a javascript file. Multiple modules
	// may be provided as separate named parts, but at least one module must be present
	// and referenced in the metadata as `main_module` or `body_part` by part name.
	AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata param.Field[ScriptUpdateParamsVariant0Metadata] `json:"metadata"`
}

func (ScriptUpdateParamsVariant0) ImplementsScriptUpdateParams

func (ScriptUpdateParamsVariant0) ImplementsScriptUpdateParams()

func (ScriptUpdateParamsVariant0) MarshalMultipart

func (r ScriptUpdateParamsVariant0) MarshalMultipart() (data []byte, contentType string, err error)

func (ScriptUpdateParamsVariant0) URLQuery

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

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

type ScriptUpdateParamsVariant0Metadata

type ScriptUpdateParamsVariant0Metadata struct {
	// List of bindings available to the worker.
	Bindings param.Field[[]interface{}] `json:"bindings"`
	// Name of the part in the multipart request that contains the script (e.g. the
	// file adding a listener to the `fetch` event). Indicates a
	// `service worker syntax` Worker.
	BodyPart param.Field[string] `json:"body_part"`
	// Date indicating targeted support in the Workers runtime. Backwards incompatible
	// fixes to the runtime following this date will not affect this Worker.
	CompatibilityDate param.Field[string] `json:"compatibility_date"`
	// Flags that enable or disable certain features in the Workers runtime. Used to
	// enable upcoming features or opt in or out of specific changes not included in a
	// `compatibility_date`.
	CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"`
	// List of binding types to keep from previous_upload.
	KeepBindings param.Field[[]string] `json:"keep_bindings"`
	// Whether Logpush is turned on for the Worker.
	Logpush param.Field[bool] `json:"logpush"`
	// Name of the part in the multipart request that contains the main module (e.g.
	// the file exporting a `fetch` handler). Indicates a `module syntax` Worker.
	MainModule param.Field[string] `json:"main_module"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations param.Field[ScriptUpdateParamsVariant0MetadataMigrations] `json:"migrations"`
	Placement  param.Field[ScriptUpdateParamsVariant0MetadataPlacement]  `json:"placement"`
	// List of strings to use as tags for this Worker
	Tags param.Field[[]string] `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers param.Field[[]ScriptUpdateParamsVariant0MetadataTailConsumer] `json:"tail_consumers"`
	// Usage model to apply to invocations.
	UsageModel param.Field[ScriptUpdateParamsVariant0MetadataUsageModel] `json:"usage_model"`
	// Key-value pairs to use as tags for this version of this Worker
	VersionTags param.Field[interface{}] `json:"version_tags"`
}

JSON encoded metadata about the uploaded parts and Worker configuration.

func (ScriptUpdateParamsVariant0Metadata) MarshalJSON

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

type ScriptUpdateParamsVariant0MetadataMigrations

type ScriptUpdateParamsVariant0MetadataMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Satisfied by workers.ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrations, workers.ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrations.

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrations

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass] `json:"transferred_classes"`
}

A single set of migrations to apply.

func (ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrations) MarshalJSON

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrationsRenamedClass) MarshalJSON

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (ScriptUpdateParamsVariant0MetadataMigrationsWorkersSingleStepMigrationsTransferredClass) MarshalJSON

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrations

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// Migrations to apply in order.
	Steps param.Field[[]ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStep] `json:"steps"`
}

func (ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrations) MarshalJSON

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStep

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStepsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStepsTransferredClass] `json:"transferred_classes"`
}

func (ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStep) MarshalJSON

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStepsRenamedClass

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStepsRenamedClass) MarshalJSON

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStepsTransferredClass

type ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (ScriptUpdateParamsVariant0MetadataMigrationsWorkersSteppedMigrationsStepsTransferredClass) MarshalJSON

type ScriptUpdateParamsVariant0MetadataPlacement

type ScriptUpdateParamsVariant0MetadataPlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode param.Field[ScriptUpdateParamsVariant0MetadataPlacementMode] `json:"mode"`
}

func (ScriptUpdateParamsVariant0MetadataPlacement) MarshalJSON

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

type ScriptUpdateParamsVariant0MetadataPlacementMode

type ScriptUpdateParamsVariant0MetadataPlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	ScriptUpdateParamsVariant0MetadataPlacementModeSmart ScriptUpdateParamsVariant0MetadataPlacementMode = "smart"
)

func (ScriptUpdateParamsVariant0MetadataPlacementMode) IsKnown

type ScriptUpdateParamsVariant0MetadataTailConsumer

type ScriptUpdateParamsVariant0MetadataTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service param.Field[string] `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace param.Field[string] `json:"namespace"`
}

A reference to a script that will consume logs from the attached Worker.

func (ScriptUpdateParamsVariant0MetadataTailConsumer) MarshalJSON

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

type ScriptUpdateParamsVariant0MetadataUsageModel

type ScriptUpdateParamsVariant0MetadataUsageModel string

Usage model to apply to invocations.

const (
	ScriptUpdateParamsVariant0MetadataUsageModelBundled ScriptUpdateParamsVariant0MetadataUsageModel = "bundled"
	ScriptUpdateParamsVariant0MetadataUsageModelUnbound ScriptUpdateParamsVariant0MetadataUsageModel = "unbound"
)

func (ScriptUpdateParamsVariant0MetadataUsageModel) IsKnown

type ScriptUpdateParamsVariant1

type ScriptUpdateParamsVariant1 struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// Rollback to provided deployment based on deployment ID. Request body will only
	// parse a "message" part. You can learn more about deployments
	// [here](https://developers.cloudflare.com/workers/platform/deployments/).
	RollbackTo param.Field[string] `query:"rollback_to"`
	// Rollback message to be associated with this deployment. Only parsed when query
	// param `"rollback_to"` is present.
	Message param.Field[string] `json:"message"`
}

func (ScriptUpdateParamsVariant1) ImplementsScriptUpdateParams

func (ScriptUpdateParamsVariant1) ImplementsScriptUpdateParams()

func (ScriptUpdateParamsVariant1) MarshalJSON

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

func (ScriptUpdateParamsVariant1) URLQuery

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

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

type ScriptUpdateResponseEnvelope

type ScriptUpdateResponseEnvelope struct {
	Errors   []ScriptUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   WorkersScript                          `json:"result,required"`
	// Whether the API call was successful
	Success ScriptUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptUpdateResponseEnvelope) UnmarshalJSON

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

type ScriptUpdateResponseEnvelopeErrors

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

func (*ScriptUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptUpdateResponseEnvelopeMessages

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

func (*ScriptUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptUpdateResponseEnvelopeSuccess

type ScriptUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptUpdateResponseEnvelopeSuccessTrue ScriptUpdateResponseEnvelopeSuccess = true
)

func (ScriptUpdateResponseEnvelopeSuccess) IsKnown

type ScriptUsageModelGetParams

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

type ScriptUsageModelGetResponse

type ScriptUsageModelGetResponse struct {
	UsageModel interface{}                     `json:"usage_model"`
	JSON       scriptUsageModelGetResponseJSON `json:"-"`
}

func (*ScriptUsageModelGetResponse) UnmarshalJSON

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

type ScriptUsageModelGetResponseEnvelope

type ScriptUsageModelGetResponseEnvelope struct {
	Errors   []ScriptUsageModelGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptUsageModelGetResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptUsageModelGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptUsageModelGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptUsageModelGetResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptUsageModelGetResponseEnvelope) UnmarshalJSON

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

type ScriptUsageModelGetResponseEnvelopeErrors

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

func (*ScriptUsageModelGetResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptUsageModelGetResponseEnvelopeMessages

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

func (*ScriptUsageModelGetResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptUsageModelGetResponseEnvelopeSuccess

type ScriptUsageModelGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptUsageModelGetResponseEnvelopeSuccessTrue ScriptUsageModelGetResponseEnvelopeSuccess = true
)

func (ScriptUsageModelGetResponseEnvelopeSuccess) IsKnown

type ScriptUsageModelService

type ScriptUsageModelService struct {
	Options []option.RequestOption
}

ScriptUsageModelService 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 NewScriptUsageModelService method instead.

func NewScriptUsageModelService

func NewScriptUsageModelService(opts ...option.RequestOption) (r *ScriptUsageModelService)

NewScriptUsageModelService 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 (*ScriptUsageModelService) Get

Fetches the Usage Model for a given Worker.

func (*ScriptUsageModelService) Update

Updates the Usage Model for a given Worker. Requires a Workers Paid subscription.

type ScriptUsageModelUpdateParams

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

func (ScriptUsageModelUpdateParams) MarshalJSON

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

type ScriptUsageModelUpdateResponse

type ScriptUsageModelUpdateResponse struct {
	UsageModel interface{}                        `json:"usage_model"`
	JSON       scriptUsageModelUpdateResponseJSON `json:"-"`
}

func (*ScriptUsageModelUpdateResponse) UnmarshalJSON

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

type ScriptUsageModelUpdateResponseEnvelope

type ScriptUsageModelUpdateResponseEnvelope struct {
	Errors   []ScriptUsageModelUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ScriptUsageModelUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   ScriptUsageModelUpdateResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ScriptUsageModelUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    scriptUsageModelUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*ScriptUsageModelUpdateResponseEnvelope) UnmarshalJSON

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

type ScriptUsageModelUpdateResponseEnvelopeErrors

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

func (*ScriptUsageModelUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type ScriptUsageModelUpdateResponseEnvelopeMessages

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

func (*ScriptUsageModelUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type ScriptUsageModelUpdateResponseEnvelopeSuccess

type ScriptUsageModelUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ScriptUsageModelUpdateResponseEnvelopeSuccessTrue ScriptUsageModelUpdateResponseEnvelopeSuccess = true
)

func (ScriptUsageModelUpdateResponseEnvelopeSuccess) IsKnown

type ServiceEnvironmentContentGetParams

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

type ServiceEnvironmentContentService

type ServiceEnvironmentContentService struct {
	Options []option.RequestOption
}

ServiceEnvironmentContentService 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 NewServiceEnvironmentContentService method instead.

func NewServiceEnvironmentContentService

func NewServiceEnvironmentContentService(opts ...option.RequestOption) (r *ServiceEnvironmentContentService)

NewServiceEnvironmentContentService 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 (*ServiceEnvironmentContentService) Get

func (r *ServiceEnvironmentContentService) Get(ctx context.Context, serviceName string, environmentName string, query ServiceEnvironmentContentGetParams, opts ...option.RequestOption) (res *http.Response, err error)

Get script content from a worker with an environment

func (*ServiceEnvironmentContentService) Update

func (r *ServiceEnvironmentContentService) Update(ctx context.Context, serviceName string, environmentName string, params ServiceEnvironmentContentUpdateParams, opts ...option.RequestOption) (res *WorkersScript, err error)

Put script content from a worker with an environment

type ServiceEnvironmentContentUpdateParams

type ServiceEnvironmentContentUpdateParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// A module comprising a Worker script, often a javascript file. Multiple modules
	// may be provided as separate named parts, but at least one module must be
	// present. This should be referenced either in the metadata as `main_module`
	// (esm)/`body_part` (service worker) or as a header `CF-WORKER-MAIN-MODULE-PART`
	// (esm) /`CF-WORKER-BODY-PART` (service worker) by part name.
	AnyPartName param.Field[[]io.Reader] `json:"<any part name>" format:"binary"`
	// JSON encoded metadata about the uploaded parts and Worker configuration.
	Metadata               param.Field[ServiceEnvironmentContentUpdateParamsMetadata] `json:"metadata"`
	CfWorkerBodyPart       param.Field[string]                                        `header:"CF-WORKER-BODY-PART"`
	CfWorkerMainModulePart param.Field[string]                                        `header:"CF-WORKER-MAIN-MODULE-PART"`
}

func (ServiceEnvironmentContentUpdateParams) MarshalMultipart

func (r ServiceEnvironmentContentUpdateParams) MarshalMultipart() (data []byte, contentType string, err error)

type ServiceEnvironmentContentUpdateParamsMetadata

type ServiceEnvironmentContentUpdateParamsMetadata struct {
	// Name of the part in the multipart request that contains the script (e.g. the
	// file adding a listener to the `fetch` event). Indicates a
	// `service worker syntax` Worker.
	BodyPart param.Field[string] `json:"body_part"`
	// Name of the part in the multipart request that contains the main module (e.g.
	// the file exporting a `fetch` handler). Indicates a `module syntax` Worker.
	MainModule param.Field[string] `json:"main_module"`
}

JSON encoded metadata about the uploaded parts and Worker configuration.

func (ServiceEnvironmentContentUpdateParamsMetadata) MarshalJSON

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

type ServiceEnvironmentContentUpdateResponseEnvelope

type ServiceEnvironmentContentUpdateResponseEnvelope struct {
	Errors   []ServiceEnvironmentContentUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ServiceEnvironmentContentUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   WorkersScript                                             `json:"result,required"`
	// Whether the API call was successful
	Success ServiceEnvironmentContentUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    serviceEnvironmentContentUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*ServiceEnvironmentContentUpdateResponseEnvelope) UnmarshalJSON

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

type ServiceEnvironmentContentUpdateResponseEnvelopeErrors

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

func (*ServiceEnvironmentContentUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type ServiceEnvironmentContentUpdateResponseEnvelopeMessages

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

func (*ServiceEnvironmentContentUpdateResponseEnvelopeMessages) UnmarshalJSON

type ServiceEnvironmentContentUpdateResponseEnvelopeSuccess

type ServiceEnvironmentContentUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ServiceEnvironmentContentUpdateResponseEnvelopeSuccessTrue ServiceEnvironmentContentUpdateResponseEnvelopeSuccess = true
)

func (ServiceEnvironmentContentUpdateResponseEnvelopeSuccess) IsKnown

type ServiceEnvironmentService

type ServiceEnvironmentService struct {
	Options  []option.RequestOption
	Content  *ServiceEnvironmentContentService
	Settings *ServiceEnvironmentSettingService
}

ServiceEnvironmentService 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 NewServiceEnvironmentService method instead.

func NewServiceEnvironmentService

func NewServiceEnvironmentService(opts ...option.RequestOption) (r *ServiceEnvironmentService)

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

type ServiceEnvironmentSettingEditParams struct {
	// Identifier
	AccountID param.Field[string]                                       `path:"account_id,required"`
	Errors    param.Field[[]ServiceEnvironmentSettingEditParamsError]   `json:"errors,required"`
	Messages  param.Field[[]ServiceEnvironmentSettingEditParamsMessage] `json:"messages,required"`
	Result    param.Field[ServiceEnvironmentSettingEditParamsResult]    `json:"result,required"`
	// Whether the API call was successful
	Success param.Field[ServiceEnvironmentSettingEditParamsSuccess] `json:"success,required"`
}

func (ServiceEnvironmentSettingEditParams) MarshalJSON

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

type ServiceEnvironmentSettingEditParamsError

type ServiceEnvironmentSettingEditParamsError struct {
	Code    param.Field[int64]  `json:"code,required"`
	Message param.Field[string] `json:"message,required"`
}

func (ServiceEnvironmentSettingEditParamsError) MarshalJSON

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

type ServiceEnvironmentSettingEditParamsMessage

type ServiceEnvironmentSettingEditParamsMessage struct {
	Code    param.Field[int64]  `json:"code,required"`
	Message param.Field[string] `json:"message,required"`
}

func (ServiceEnvironmentSettingEditParamsMessage) MarshalJSON

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

type ServiceEnvironmentSettingEditParamsResult

type ServiceEnvironmentSettingEditParamsResult struct {
	// List of bindings attached to this Worker
	Bindings param.Field[[]ServiceEnvironmentSettingEditParamsResultBinding] `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate param.Field[string] `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush param.Field[bool] `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations param.Field[ServiceEnvironmentSettingEditParamsResultMigrations] `json:"migrations"`
	Placement  param.Field[ServiceEnvironmentSettingEditParamsResultPlacement]  `json:"placement"`
	// Tags to help you manage your Workers
	Tags param.Field[[]string] `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers param.Field[[]ServiceEnvironmentSettingEditParamsResultTailConsumer] `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel param.Field[string] `json:"usage_model"`
}

func (ServiceEnvironmentSettingEditParamsResult) MarshalJSON

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

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1Binding

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID param.Field[string] `json:"id,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name param.Field[string] `json:"name,required"`
	// The class of resource that the binding provides.
	Type param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1BindingType] `json:"type,required"`
}

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1Binding) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1BindingType

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1BindingTypeD1 ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1BindingType = "d1"
)

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersD1BindingType) IsKnown

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBinding

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBinding struct {
	// Namespace to bind to
	Namespace param.Field[string] `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType] `json:"type,required"`
	// Outbound worker
	Outbound param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutbound] `json:"outbound"`
}

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBinding) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutbound

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params param.Field[[]string] `json:"params"`
	// Outbound worker
	Worker param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker] `json:"worker"`
}

Outbound worker

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutbound) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment param.Field[string] `json:"environment"`
	// Name of the outbound worker
	Service param.Field[string] `json:"service"`
}

Outbound worker

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingOutboundWorker) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersDispatchNamespaceBindingType) IsKnown

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBinding

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName param.Field[string] `json:"class_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBindingType] `json:"type,required"`
	// The environment of the script_name to bind to
	Environment param.Field[string] `json:"environment"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName param.Field[string] `json:"script_name"`
}

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBinding) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBindingType

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBindingTypeDurableObjectNamespace ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBindingType = "durable_object_namespace"
)

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersDoBindingType) IsKnown

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBinding

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBinding struct {
	// The class of resource that the binding provides.
	Type param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType] `json:"type,required"`
}

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBinding) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBindingTypeKVNamespace ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersKVNamespaceBindingType) IsKnown

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBinding

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBinding struct {
	// The class of resource that the binding provides.
	Type param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBindingType] `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID param.Field[string] `json:"certificate_id"`
}

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBinding) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBindingType

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBindingTypeMTLSCertificate ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBindingType = "mtls_certificate"
)

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersMTLSCERTBindingType) IsKnown

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBinding

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBinding struct {
	// Name of the Queue to bind to
	QueueName param.Field[string] `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBindingType] `json:"type,required"`
}

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBinding) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBindingType

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBindingTypeQueue ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBindingType = "queue"
)

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersQueueBindingType) IsKnown

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2Binding

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName param.Field[string] `json:"bucket_name,required"`
	// The class of resource that the binding provides.
	Type param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2BindingType] `json:"type,required"`
}

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2Binding) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2BindingType

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2BindingTypeR2Bucket ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2BindingType = "r2_bucket"
)

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersR2BindingType) IsKnown

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBinding

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment,required"`
	// Name of Worker to bind to
	Service param.Field[string] `json:"service,required"`
	// The class of resource that the binding provides.
	Type param.Field[ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBindingType] `json:"type,required"`
}

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBinding) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBindingType

type ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBindingTypeService ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBindingType = "service"
)

func (ServiceEnvironmentSettingEditParamsResultBindingsWorkersServiceBindingType) IsKnown

type ServiceEnvironmentSettingEditParamsResultMigrations

type ServiceEnvironmentSettingEditParamsResultMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Satisfied by workers.ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrations, workers.ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrations.

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrations

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsTransferredClass] `json:"transferred_classes"`
}

A single set of migrations to apply.

func (ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrations) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsRenamedClass

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsRenamedClass) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsTransferredClass

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSingleStepMigrationsTransferredClass) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrations

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag param.Field[string] `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag param.Field[string] `json:"old_tag"`
	// Migrations to apply in order.
	Steps param.Field[[]ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStep] `json:"steps"`
}

func (ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrations) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStep

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses param.Field[[]string] `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses param.Field[[]string] `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses param.Field[[]ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass] `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses param.Field[[]ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass] `json:"transferred_classes"`
}

func (ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStep) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From param.Field[string] `json:"from"`
	To   param.Field[string] `json:"to"`
}

func (ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsRenamedClass) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass

type ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       param.Field[string] `json:"from"`
	FromScript param.Field[string] `json:"from_script"`
	To         param.Field[string] `json:"to"`
}

func (ServiceEnvironmentSettingEditParamsResultMigrationsWorkersSteppedMigrationsStepsTransferredClass) MarshalJSON

type ServiceEnvironmentSettingEditParamsResultPlacement

type ServiceEnvironmentSettingEditParamsResultPlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode param.Field[ServiceEnvironmentSettingEditParamsResultPlacementMode] `json:"mode"`
}

func (ServiceEnvironmentSettingEditParamsResultPlacement) MarshalJSON

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

type ServiceEnvironmentSettingEditParamsResultPlacementMode

type ServiceEnvironmentSettingEditParamsResultPlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	ServiceEnvironmentSettingEditParamsResultPlacementModeSmart ServiceEnvironmentSettingEditParamsResultPlacementMode = "smart"
)

func (ServiceEnvironmentSettingEditParamsResultPlacementMode) IsKnown

type ServiceEnvironmentSettingEditParamsResultTailConsumer

type ServiceEnvironmentSettingEditParamsResultTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service param.Field[string] `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment param.Field[string] `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace param.Field[string] `json:"namespace"`
}

A reference to a script that will consume logs from the attached Worker.

func (ServiceEnvironmentSettingEditParamsResultTailConsumer) MarshalJSON

type ServiceEnvironmentSettingEditParamsSuccess

type ServiceEnvironmentSettingEditParamsSuccess bool

Whether the API call was successful

const (
	ServiceEnvironmentSettingEditParamsSuccessTrue ServiceEnvironmentSettingEditParamsSuccess = true
)

func (ServiceEnvironmentSettingEditParamsSuccess) IsKnown

type ServiceEnvironmentSettingEditResponse

type ServiceEnvironmentSettingEditResponse struct {
	// List of bindings attached to this Worker
	Bindings []ServiceEnvironmentSettingEditResponseBinding `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate string `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags []string `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations ServiceEnvironmentSettingEditResponseMigrations `json:"migrations"`
	Placement  ServiceEnvironmentSettingEditResponsePlacement  `json:"placement"`
	// Tags to help you manage your Workers
	Tags []string `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []ServiceEnvironmentSettingEditResponseTailConsumer `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string                                    `json:"usage_model"`
	JSON       serviceEnvironmentSettingEditResponseJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponse) UnmarshalJSON

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

type ServiceEnvironmentSettingEditResponseBindingsWorkersD1Binding

type ServiceEnvironmentSettingEditResponseBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID string `json:"id,required"`
	// A JavaScript variable name for the binding.
	Binding string `json:"binding,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingEditResponseBindingsWorkersD1BindingType `json:"type,required"`
	JSON serviceEnvironmentSettingEditResponseBindingsWorkersD1BindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersD1Binding) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersD1BindingType

type ServiceEnvironmentSettingEditResponseBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditResponseBindingsWorkersD1BindingTypeD1 ServiceEnvironmentSettingEditResponseBindingsWorkersD1BindingType = "d1"
)

func (ServiceEnvironmentSettingEditResponseBindingsWorkersD1BindingType) IsKnown

type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBinding

type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace to bind to
	Namespace string `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType `json:"type,required"`
	// Outbound worker
	Outbound ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound `json:"outbound"`
	JSON     serviceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingJSON     `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBinding) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound

type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params []string `json:"params"`
	// Outbound worker
	Worker ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker `json:"worker"`
	JSON   serviceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundJSON   `json:"-"`
}

Outbound worker

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutbound) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker

type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment string `json:"environment"`
	// Name of the outbound worker
	Service string                                                                                         `json:"service"`
	JSON    serviceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorkerJSON `json:"-"`
}

Outbound worker

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType

type ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

func (ServiceEnvironmentSettingEditResponseBindingsWorkersDispatchNamespaceBindingType) IsKnown

type ServiceEnvironmentSettingEditResponseBindingsWorkersDoBinding

type ServiceEnvironmentSettingEditResponseBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName string `json:"class_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingEditResponseBindingsWorkersDoBindingType `json:"type,required"`
	// The environment of the script_name to bind to
	Environment string `json:"environment"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName string                                                            `json:"script_name"`
	JSON       serviceEnvironmentSettingEditResponseBindingsWorkersDoBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersDoBinding) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersDoBindingType

type ServiceEnvironmentSettingEditResponseBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditResponseBindingsWorkersDoBindingTypeDurableObjectNamespace ServiceEnvironmentSettingEditResponseBindingsWorkersDoBindingType = "durable_object_namespace"
)

func (ServiceEnvironmentSettingEditResponseBindingsWorkersDoBindingType) IsKnown

type ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBinding

type ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBindingType `json:"type,required"`
	JSON serviceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBinding) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBindingType

type ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBindingTypeKVNamespace ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

func (ServiceEnvironmentSettingEditResponseBindingsWorkersKVNamespaceBindingType) IsKnown

type ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBinding

type ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBindingType `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID string                                                                  `json:"certificate_id"`
	JSON          serviceEnvironmentSettingEditResponseBindingsWorkersMtlscertBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBinding) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBindingType

type ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBindingTypeMTLSCertificate ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBindingType = "mtls_certificate"
)

func (ServiceEnvironmentSettingEditResponseBindingsWorkersMTLSCERTBindingType) IsKnown

type ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBinding

type ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of the Queue to bind to
	QueueName string `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBindingType `json:"type,required"`
	JSON serviceEnvironmentSettingEditResponseBindingsWorkersQueueBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBinding) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBindingType

type ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBindingTypeQueue ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBindingType = "queue"
)

func (ServiceEnvironmentSettingEditResponseBindingsWorkersQueueBindingType) IsKnown

type ServiceEnvironmentSettingEditResponseBindingsWorkersR2Binding

type ServiceEnvironmentSettingEditResponseBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName string `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingEditResponseBindingsWorkersR2BindingType `json:"type,required"`
	JSON serviceEnvironmentSettingEditResponseBindingsWorkersR2BindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersR2Binding) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersR2BindingType

type ServiceEnvironmentSettingEditResponseBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditResponseBindingsWorkersR2BindingTypeR2Bucket ServiceEnvironmentSettingEditResponseBindingsWorkersR2BindingType = "r2_bucket"
)

func (ServiceEnvironmentSettingEditResponseBindingsWorkersR2BindingType) IsKnown

type ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBinding

type ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of Worker to bind to
	Service string `json:"service,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBindingType `json:"type,required"`
	JSON serviceEnvironmentSettingEditResponseBindingsWorkersServiceBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBinding) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBindingType

type ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBindingTypeService ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBindingType = "service"
)

func (ServiceEnvironmentSettingEditResponseBindingsWorkersServiceBindingType) IsKnown

type ServiceEnvironmentSettingEditResponseEnvelope

type ServiceEnvironmentSettingEditResponseEnvelope struct {
	Errors   []ServiceEnvironmentSettingEditResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ServiceEnvironmentSettingEditResponseEnvelopeMessages `json:"messages,required"`
	Result   ServiceEnvironmentSettingEditResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ServiceEnvironmentSettingEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    serviceEnvironmentSettingEditResponseEnvelopeJSON    `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseEnvelope) UnmarshalJSON

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

type ServiceEnvironmentSettingEditResponseEnvelopeErrors

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

func (*ServiceEnvironmentSettingEditResponseEnvelopeErrors) UnmarshalJSON

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

type ServiceEnvironmentSettingEditResponseEnvelopeMessages

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

func (*ServiceEnvironmentSettingEditResponseEnvelopeMessages) UnmarshalJSON

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

type ServiceEnvironmentSettingEditResponseEnvelopeSuccess

type ServiceEnvironmentSettingEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ServiceEnvironmentSettingEditResponseEnvelopeSuccessTrue ServiceEnvironmentSettingEditResponseEnvelopeSuccess = true
)

func (ServiceEnvironmentSettingEditResponseEnvelopeSuccess) IsKnown

type ServiceEnvironmentSettingEditResponseMigrations

type ServiceEnvironmentSettingEditResponseMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Union satisfied by workers.ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrations or workers.ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrations.

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrations

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass `json:"transferred_classes"`
	JSON               serviceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsJSON               `json:"-"`
}

A single set of migrations to apply.

func (*ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrations) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From string                                                                                     `json:"from"`
	To   string                                                                                     `json:"to"`
	JSON serviceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClassJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsRenamedClass) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       string                                                                                         `json:"from"`
	FromScript string                                                                                         `json:"from_script"`
	To         string                                                                                         `json:"to"`
	JSON       serviceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClassJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseMigrationsWorkersSingleStepMigrationsTransferredClass) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrations

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// Migrations to apply in order.
	Steps []ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStep `json:"steps"`
	JSON  serviceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsJSON   `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrations) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStep

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass `json:"transferred_classes"`
	JSON               serviceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepJSON                `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStep) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From string                                                                                       `json:"from"`
	To   string                                                                                       `json:"to"`
	JSON serviceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClassJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass) UnmarshalJSON

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass

type ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       string                                                                                           `json:"from"`
	FromScript string                                                                                           `json:"from_script"`
	To         string                                                                                           `json:"to"`
	JSON       serviceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClassJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass) UnmarshalJSON

type ServiceEnvironmentSettingEditResponsePlacement

type ServiceEnvironmentSettingEditResponsePlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode ServiceEnvironmentSettingEditResponsePlacementMode `json:"mode"`
	JSON serviceEnvironmentSettingEditResponsePlacementJSON `json:"-"`
}

func (*ServiceEnvironmentSettingEditResponsePlacement) UnmarshalJSON

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

type ServiceEnvironmentSettingEditResponsePlacementMode

type ServiceEnvironmentSettingEditResponsePlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	ServiceEnvironmentSettingEditResponsePlacementModeSmart ServiceEnvironmentSettingEditResponsePlacementMode = "smart"
)

func (ServiceEnvironmentSettingEditResponsePlacementMode) IsKnown

type ServiceEnvironmentSettingEditResponseTailConsumer

type ServiceEnvironmentSettingEditResponseTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service string `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace string                                                `json:"namespace"`
	JSON      serviceEnvironmentSettingEditResponseTailConsumerJSON `json:"-"`
}

A reference to a script that will consume logs from the attached Worker.

func (*ServiceEnvironmentSettingEditResponseTailConsumer) UnmarshalJSON

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

type ServiceEnvironmentSettingGetParams

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

type ServiceEnvironmentSettingGetResponse

type ServiceEnvironmentSettingGetResponse struct {
	// List of bindings attached to this Worker
	Bindings []ServiceEnvironmentSettingGetResponseBinding `json:"bindings"`
	// Opt your Worker into changes after this date
	CompatibilityDate string `json:"compatibility_date"`
	// Opt your Worker into specific changes
	CompatibilityFlags []string `json:"compatibility_flags"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// Migrations to apply for Durable Objects associated with this Worker.
	Migrations ServiceEnvironmentSettingGetResponseMigrations `json:"migrations"`
	Placement  ServiceEnvironmentSettingGetResponsePlacement  `json:"placement"`
	// Tags to help you manage your Workers
	Tags []string `json:"tags"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []ServiceEnvironmentSettingGetResponseTailConsumer `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string                                   `json:"usage_model"`
	JSON       serviceEnvironmentSettingGetResponseJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponse) UnmarshalJSON

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

type ServiceEnvironmentSettingGetResponseBindingsWorkersD1Binding

type ServiceEnvironmentSettingGetResponseBindingsWorkersD1Binding struct {
	// ID of the D1 database to bind to
	ID string `json:"id,required"`
	// A JavaScript variable name for the binding.
	Binding string `json:"binding,required"`
	// The name of the D1 database associated with the 'id' provided.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingGetResponseBindingsWorkersD1BindingType `json:"type,required"`
	JSON serviceEnvironmentSettingGetResponseBindingsWorkersD1BindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersD1Binding) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersD1BindingType

type ServiceEnvironmentSettingGetResponseBindingsWorkersD1BindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingGetResponseBindingsWorkersD1BindingTypeD1 ServiceEnvironmentSettingGetResponseBindingsWorkersD1BindingType = "d1"
)

func (ServiceEnvironmentSettingGetResponseBindingsWorkersD1BindingType) IsKnown

type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBinding

type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace to bind to
	Namespace string `json:"namespace,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType `json:"type,required"`
	// Outbound worker
	Outbound ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound `json:"outbound"`
	JSON     serviceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingJSON     `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBinding) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound

type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound struct {
	// Pass information from the Dispatch Worker to the Outbound Worker through the
	// parameters
	Params []string `json:"params"`
	// Outbound worker
	Worker ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker `json:"worker"`
	JSON   serviceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundJSON   `json:"-"`
}

Outbound worker

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutbound) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker

type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker struct {
	// Environment of the outbound worker
	Environment string `json:"environment"`
	// Name of the outbound worker
	Service string                                                                                        `json:"service"`
	JSON    serviceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorkerJSON `json:"-"`
}

Outbound worker

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingOutboundWorker) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType

type ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingTypeDispatchNamespace ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType = "dispatch_namespace"
)

func (ServiceEnvironmentSettingGetResponseBindingsWorkersDispatchNamespaceBindingType) IsKnown

type ServiceEnvironmentSettingGetResponseBindingsWorkersDoBinding

type ServiceEnvironmentSettingGetResponseBindingsWorkersDoBinding struct {
	// The exported class name of the Durable Object
	ClassName string `json:"class_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingGetResponseBindingsWorkersDoBindingType `json:"type,required"`
	// The environment of the script_name to bind to
	Environment string `json:"environment"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id"`
	// The script where the Durable Object is defined, if it is external to this Worker
	ScriptName string                                                           `json:"script_name"`
	JSON       serviceEnvironmentSettingGetResponseBindingsWorkersDoBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersDoBinding) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersDoBindingType

type ServiceEnvironmentSettingGetResponseBindingsWorkersDoBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingGetResponseBindingsWorkersDoBindingTypeDurableObjectNamespace ServiceEnvironmentSettingGetResponseBindingsWorkersDoBindingType = "durable_object_namespace"
)

func (ServiceEnvironmentSettingGetResponseBindingsWorkersDoBindingType) IsKnown

type ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBinding

type ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBindingType `json:"type,required"`
	JSON serviceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBinding) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBindingType

type ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBindingTypeKVNamespace ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBindingType = "kv_namespace"
)

func (ServiceEnvironmentSettingGetResponseBindingsWorkersKVNamespaceBindingType) IsKnown

type ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBinding

type ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBindingType `json:"type,required"`
	// ID of the certificate to bind to
	CertificateID string                                                                 `json:"certificate_id"`
	JSON          serviceEnvironmentSettingGetResponseBindingsWorkersMtlscertBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBinding) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBindingType

type ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBindingTypeMTLSCertificate ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBindingType = "mtls_certificate"
)

func (ServiceEnvironmentSettingGetResponseBindingsWorkersMTLSCERTBindingType) IsKnown

type ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBinding

type ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of the Queue to bind to
	QueueName string `json:"queue_name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBindingType `json:"type,required"`
	JSON serviceEnvironmentSettingGetResponseBindingsWorkersQueueBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBinding) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBindingType

type ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBindingTypeQueue ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBindingType = "queue"
)

func (ServiceEnvironmentSettingGetResponseBindingsWorkersQueueBindingType) IsKnown

type ServiceEnvironmentSettingGetResponseBindingsWorkersR2Binding

type ServiceEnvironmentSettingGetResponseBindingsWorkersR2Binding struct {
	// R2 bucket to bind to
	BucketName string `json:"bucket_name,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingGetResponseBindingsWorkersR2BindingType `json:"type,required"`
	JSON serviceEnvironmentSettingGetResponseBindingsWorkersR2BindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersR2Binding) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersR2BindingType

type ServiceEnvironmentSettingGetResponseBindingsWorkersR2BindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingGetResponseBindingsWorkersR2BindingTypeR2Bucket ServiceEnvironmentSettingGetResponseBindingsWorkersR2BindingType = "r2_bucket"
)

func (ServiceEnvironmentSettingGetResponseBindingsWorkersR2BindingType) IsKnown

type ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBinding

type ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBinding struct {
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment,required"`
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Name of Worker to bind to
	Service string `json:"service,required"`
	// The class of resource that the binding provides.
	Type ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBindingType `json:"type,required"`
	JSON serviceEnvironmentSettingGetResponseBindingsWorkersServiceBindingJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBinding) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBindingType

type ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBindingType string

The class of resource that the binding provides.

const (
	ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBindingTypeService ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBindingType = "service"
)

func (ServiceEnvironmentSettingGetResponseBindingsWorkersServiceBindingType) IsKnown

type ServiceEnvironmentSettingGetResponseEnvelope

type ServiceEnvironmentSettingGetResponseEnvelope struct {
	Errors   []ServiceEnvironmentSettingGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []ServiceEnvironmentSettingGetResponseEnvelopeMessages `json:"messages,required"`
	Result   ServiceEnvironmentSettingGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success ServiceEnvironmentSettingGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    serviceEnvironmentSettingGetResponseEnvelopeJSON    `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseEnvelope) UnmarshalJSON

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

type ServiceEnvironmentSettingGetResponseEnvelopeErrors

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

func (*ServiceEnvironmentSettingGetResponseEnvelopeErrors) UnmarshalJSON

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

type ServiceEnvironmentSettingGetResponseEnvelopeMessages

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

func (*ServiceEnvironmentSettingGetResponseEnvelopeMessages) UnmarshalJSON

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

type ServiceEnvironmentSettingGetResponseEnvelopeSuccess

type ServiceEnvironmentSettingGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ServiceEnvironmentSettingGetResponseEnvelopeSuccessTrue ServiceEnvironmentSettingGetResponseEnvelopeSuccess = true
)

func (ServiceEnvironmentSettingGetResponseEnvelopeSuccess) IsKnown

type ServiceEnvironmentSettingGetResponseMigrations

type ServiceEnvironmentSettingGetResponseMigrations interface {
	// contains filtered or unexported methods
}

Migrations to apply for Durable Objects associated with this Worker.

Union satisfied by workers.ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrations or workers.ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrations.

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrations

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrations struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass `json:"transferred_classes"`
	JSON               serviceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsJSON               `json:"-"`
}

A single set of migrations to apply.

func (*ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrations) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass struct {
	From string                                                                                    `json:"from"`
	To   string                                                                                    `json:"to"`
	JSON serviceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClassJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsRenamedClass) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass struct {
	From       string                                                                                        `json:"from"`
	FromScript string                                                                                        `json:"from_script"`
	To         string                                                                                        `json:"to"`
	JSON       serviceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClassJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseMigrationsWorkersSingleStepMigrationsTransferredClass) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrations

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrations struct {
	// Tag to set as the latest migration tag.
	NewTag string `json:"new_tag"`
	// Tag used to verify against the latest migration tag for this Worker. If they
	// don't match, the upload is rejected.
	OldTag string `json:"old_tag"`
	// Migrations to apply in order.
	Steps []ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStep `json:"steps"`
	JSON  serviceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsJSON   `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrations) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStep

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStep struct {
	// A list of classes to delete Durable Object namespaces from.
	DeletedClasses []string `json:"deleted_classes"`
	// A list of classes to create Durable Object namespaces from.
	NewClasses []string `json:"new_classes"`
	// A list of classes with Durable Object namespaces that were renamed.
	RenamedClasses []ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass `json:"renamed_classes"`
	// A list of transfers for Durable Object namespaces from a different Worker and
	// class to a class defined in this Worker.
	TransferredClasses []ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass `json:"transferred_classes"`
	JSON               serviceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepJSON                `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStep) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass struct {
	From string                                                                                      `json:"from"`
	To   string                                                                                      `json:"to"`
	JSON serviceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClassJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsRenamedClass) UnmarshalJSON

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass

type ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass struct {
	From       string                                                                                          `json:"from"`
	FromScript string                                                                                          `json:"from_script"`
	To         string                                                                                          `json:"to"`
	JSON       serviceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClassJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponseMigrationsWorkersSteppedMigrationsStepsTransferredClass) UnmarshalJSON

type ServiceEnvironmentSettingGetResponsePlacement

type ServiceEnvironmentSettingGetResponsePlacement struct {
	// Enables
	// [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement).
	// Only `"smart"` is currently supported
	Mode ServiceEnvironmentSettingGetResponsePlacementMode `json:"mode"`
	JSON serviceEnvironmentSettingGetResponsePlacementJSON `json:"-"`
}

func (*ServiceEnvironmentSettingGetResponsePlacement) UnmarshalJSON

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

type ServiceEnvironmentSettingGetResponsePlacementMode

type ServiceEnvironmentSettingGetResponsePlacementMode string

Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported

const (
	ServiceEnvironmentSettingGetResponsePlacementModeSmart ServiceEnvironmentSettingGetResponsePlacementMode = "smart"
)

func (ServiceEnvironmentSettingGetResponsePlacementMode) IsKnown

type ServiceEnvironmentSettingGetResponseTailConsumer

type ServiceEnvironmentSettingGetResponseTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service string `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace string                                               `json:"namespace"`
	JSON      serviceEnvironmentSettingGetResponseTailConsumerJSON `json:"-"`
}

A reference to a script that will consume logs from the attached Worker.

func (*ServiceEnvironmentSettingGetResponseTailConsumer) UnmarshalJSON

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

type ServiceEnvironmentSettingService

type ServiceEnvironmentSettingService struct {
	Options []option.RequestOption
}

ServiceEnvironmentSettingService 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 NewServiceEnvironmentSettingService method instead.

func NewServiceEnvironmentSettingService

func NewServiceEnvironmentSettingService(opts ...option.RequestOption) (r *ServiceEnvironmentSettingService)

NewServiceEnvironmentSettingService 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 (*ServiceEnvironmentSettingService) Edit

Patch script metadata, such as bindings

func (*ServiceEnvironmentSettingService) Get

Get script settings from a worker with an environment

type ServiceService

type ServiceService struct {
	Options      []option.RequestOption
	Environments *ServiceEnvironmentService
}

ServiceService 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 NewServiceService method instead.

func NewServiceService

func NewServiceService(opts ...option.RequestOption) (r *ServiceService)

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

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

type SubdomainGetResponse

type SubdomainGetResponse struct {
	Name interface{}              `json:"name"`
	JSON subdomainGetResponseJSON `json:"-"`
}

func (*SubdomainGetResponse) UnmarshalJSON

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

type SubdomainGetResponseEnvelope

type SubdomainGetResponseEnvelope struct {
	Errors   []SubdomainGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SubdomainGetResponseEnvelopeMessages `json:"messages,required"`
	Result   SubdomainGetResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success SubdomainGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    subdomainGetResponseEnvelopeJSON    `json:"-"`
}

func (*SubdomainGetResponseEnvelope) UnmarshalJSON

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

type SubdomainGetResponseEnvelopeErrors

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

func (*SubdomainGetResponseEnvelopeErrors) UnmarshalJSON

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

type SubdomainGetResponseEnvelopeMessages

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

func (*SubdomainGetResponseEnvelopeMessages) UnmarshalJSON

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

type SubdomainGetResponseEnvelopeSuccess

type SubdomainGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubdomainGetResponseEnvelopeSuccessTrue SubdomainGetResponseEnvelopeSuccess = true
)

func (SubdomainGetResponseEnvelopeSuccess) IsKnown

type SubdomainService

type SubdomainService struct {
	Options []option.RequestOption
}

SubdomainService 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 NewSubdomainService method instead.

func NewSubdomainService

func NewSubdomainService(opts ...option.RequestOption) (r *SubdomainService)

NewSubdomainService 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 (*SubdomainService) Get

Returns a Workers subdomain for an account.

func (*SubdomainService) Update

Creates a Workers subdomain for an account.

type SubdomainUpdateParams

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

func (SubdomainUpdateParams) MarshalJSON

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

type SubdomainUpdateResponse

type SubdomainUpdateResponse struct {
	Name interface{}                 `json:"name"`
	JSON subdomainUpdateResponseJSON `json:"-"`
}

func (*SubdomainUpdateResponse) UnmarshalJSON

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

type SubdomainUpdateResponseEnvelope

type SubdomainUpdateResponseEnvelope struct {
	Errors   []SubdomainUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SubdomainUpdateResponseEnvelopeMessages `json:"messages,required"`
	Result   SubdomainUpdateResponse                   `json:"result,required"`
	// Whether the API call was successful
	Success SubdomainUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    subdomainUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SubdomainUpdateResponseEnvelope) UnmarshalJSON

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

type SubdomainUpdateResponseEnvelopeErrors

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

func (*SubdomainUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type SubdomainUpdateResponseEnvelopeMessages

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

func (*SubdomainUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type SubdomainUpdateResponseEnvelopeSuccess

type SubdomainUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubdomainUpdateResponseEnvelopeSuccessTrue SubdomainUpdateResponseEnvelopeSuccess = true
)

func (SubdomainUpdateResponseEnvelopeSuccess) IsKnown

type WorkerService

type WorkerService struct {
	Options         []option.RequestOption
	AI              *AIService
	Scripts         *ScriptService
	Filters         *FilterService
	Routes          *RouteService
	AccountSettings *AccountSettingService
	Deployments     *DeploymentService
	Domains         *DomainService
	Subdomains      *SubdomainService
	Services        *ServiceService
}

WorkerService 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 NewWorkerService method instead.

func NewWorkerService

func NewWorkerService(opts ...option.RequestOption) (r *WorkerService)

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

type WorkersBinding interface {
	// contains filtered or unexported methods
}

Union satisfied by workers.WorkersBindingWorkersKVNamespaceBinding or workers.WorkersBindingWorkersWasmModuleBinding.

type WorkersBindingWorkersKVNamespaceBinding

type WorkersBindingWorkersKVNamespaceBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// Namespace identifier tag.
	NamespaceID string `json:"namespace_id,required"`
	// The class of resource that the binding provides.
	Type WorkersBindingWorkersKVNamespaceBindingType `json:"type,required"`
	JSON workersBindingWorkersKVNamespaceBindingJSON `json:"-"`
}

func (*WorkersBindingWorkersKVNamespaceBinding) UnmarshalJSON

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

type WorkersBindingWorkersKVNamespaceBindingType

type WorkersBindingWorkersKVNamespaceBindingType string

The class of resource that the binding provides.

const (
	WorkersBindingWorkersKVNamespaceBindingTypeKVNamespace WorkersBindingWorkersKVNamespaceBindingType = "kv_namespace"
)

func (WorkersBindingWorkersKVNamespaceBindingType) IsKnown

type WorkersBindingWorkersWasmModuleBinding

type WorkersBindingWorkersWasmModuleBinding struct {
	// A JavaScript variable name for the binding.
	Name string `json:"name,required"`
	// The class of resource that the binding provides.
	Type WorkersBindingWorkersWasmModuleBindingType `json:"type,required"`
	JSON workersBindingWorkersWasmModuleBindingJSON `json:"-"`
}

func (*WorkersBindingWorkersWasmModuleBinding) UnmarshalJSON

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

type WorkersBindingWorkersWasmModuleBindingType

type WorkersBindingWorkersWasmModuleBindingType string

The class of resource that the binding provides.

const (
	WorkersBindingWorkersWasmModuleBindingTypeWasmModule WorkersBindingWorkersWasmModuleBindingType = "wasm_module"
)

func (WorkersBindingWorkersWasmModuleBindingType) IsKnown

type WorkersDomain

type WorkersDomain struct {
	// Identifer of the Worker Domain.
	ID string `json:"id"`
	// Worker environment associated with the zone and hostname.
	Environment string `json:"environment"`
	// Hostname of the Worker Domain.
	Hostname string `json:"hostname"`
	// Worker service associated with the zone and hostname.
	Service string `json:"service"`
	// Identifier of the zone.
	ZoneID string `json:"zone_id"`
	// Name of the zone.
	ZoneName string            `json:"zone_name"`
	JSON     workersDomainJSON `json:"-"`
}

func (*WorkersDomain) UnmarshalJSON

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

type WorkersFilter

type WorkersFilter struct {
	// Identifier
	ID      string            `json:"id,required"`
	Enabled bool              `json:"enabled,required"`
	Pattern string            `json:"pattern,required"`
	JSON    workersFilterJSON `json:"-"`
}

func (*WorkersFilter) UnmarshalJSON

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

type WorkersRoute

type WorkersRoute struct {
	// Identifier
	ID      string `json:"id,required"`
	Pattern string `json:"pattern,required"`
	// Name of the script, used in URLs and route configuration.
	Script string           `json:"script,required"`
	JSON   workersRouteJSON `json:"-"`
}

func (*WorkersRoute) UnmarshalJSON

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

type WorkersScript

type WorkersScript struct {
	// The id of the script in the Workers system. Usually the script name.
	ID string `json:"id"`
	// When the script was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Hashed script content, can be used in a If-None-Match header when updating.
	Etag string `json:"etag"`
	// Whether Logpush is turned on for the Worker.
	Logpush bool `json:"logpush"`
	// When the script was last modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Deprecated. Deployment metadata for internal usage.
	PipelineHash string `json:"pipeline_hash"`
	// Specifies the placement mode for the Worker (e.g. 'smart').
	PlacementMode string `json:"placement_mode"`
	// List of Workers that will consume logs from the attached Worker.
	TailConsumers []WorkersScriptTailConsumer `json:"tail_consumers"`
	// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
	UsageModel string            `json:"usage_model"`
	JSON       workersScriptJSON `json:"-"`
}

func (*WorkersScript) UnmarshalJSON

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

type WorkersScriptTailConsumer

type WorkersScriptTailConsumer struct {
	// Name of Worker that is to be the consumer.
	Service string `json:"service,required"`
	// Optional environment if the Worker utilizes one.
	Environment string `json:"environment"`
	// Optional dispatch namespace the script belongs to.
	Namespace string                        `json:"namespace"`
	JSON      workersScriptTailConsumerJSON `json:"-"`
}

A reference to a script that will consume logs from the attached Worker.

func (*WorkersScriptTailConsumer) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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